ASL
0.1.7
Advanced Simulation Library
Toggle main menu visibility
Loading...
Searching...
No Matches
src
writers
aslWriter.h
Go to the documentation of this file.
1
/*
2
* Advanced Simulation Library <http://asl.org.il>
3
*
4
* Copyright 2015 Avtech Scientific <http://avtechscientific.com>
5
*
6
*
7
* This file is part of Advanced Simulation Library (ASL).
8
*
9
* ASL is free software: you can redistribute it and/or modify it
10
* under the terms of the GNU Affero General Public License as
11
* published by the Free Software Foundation, version 3 of the License.
12
*
13
* ASL is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Affero General Public License for more details.
17
*
18
* You should have received a copy of the GNU Affero General Public License
19
* along with ASL. If not, see <http://www.gnu.org/licenses/>.
20
*
21
*/
22
23
24
#ifndef ASLWRITER_H
25
#define ASLWRITER_H
26
27
//#include <acl/aclMath/aclVectorOfElementsDef.h>
28
#include<string>
29
#include<memory>
30
#include<vector>
31
32
namespace
acl
33
{
34
class
VectorOfElements
;
35
class
VectorOfElementsData
;
36
class
Kernel
;
37
}
38
39
namespace
asl
40
{
41
class
AbstractData
;
42
class
Block
;
43
44
class
Writer
45
{
46
public
:
47
Writer
(
const
std::string & file_);
48
~Writer
();
49
virtual
void
write
() = 0;
50
void
enable
();
51
void
addScalars
(std::string name,
AbstractData
& data);
52
void
addVector
(std::string name,
AbstractData
& data);
53
void
addScalars
(std::string name,
acl::VectorOfElementsData
& data);
54
void
addVector
(std::string name,
acl::VectorOfElementsData
& data);
55
void
addScalars
(std::string name,
56
const
acl::VectorOfElements
& data,
57
acl::Kernel
& kernel,
58
unsigned
int
nGhost = 1);
59
void
addVector
(std::string name,
60
const
acl::VectorOfElements
& data,
61
acl::Kernel
& kernel,
62
unsigned
int
nGhost = 1);
63
64
static
Writer
*
current
;
65
66
protected
:
67
std::shared_ptr<Block>
block
;
68
std::vector<std::pair<std::string, acl::VectorOfElementsData>>
scalarFields
;
69
std::vector<std::pair<std::string, acl::VectorOfElementsData>>
vectorFields
;
70
std::string
file
;
71
unsigned
int
numOfWrites
;
72
};
73
74
}
// asl
75
76
#endif
// ASLWRITER_H
acl::Kernel
OpenCl Kernel generator.
Definition
aclKernel.h:49
acl::VectorOfElementsData
The class represents several ElementData.
Definition
aclVectorOfElementsDef.h:57
acl::VectorOfElements
The class represents several Element.
Definition
aclVectorOfElementsDef.h:92
asl::AbstractData
Definition
aslDataWrapper.h:53
asl::Block
Definition
aslBlocks.h:57
asl::Writer::write
virtual void write()=0
asl::Writer::Writer
Writer(const std::string &file_)
asl::Writer::addVector
void addVector(std::string name, acl::VectorOfElementsData &data)
asl::Writer::addScalars
void addScalars(std::string name, const acl::VectorOfElements &data, acl::Kernel &kernel, unsigned int nGhost=1)
asl::Writer::~Writer
~Writer()
asl::Writer::current
static Writer * current
Definition
aslWriter.h:64
asl::Writer::numOfWrites
unsigned int numOfWrites
Definition
aslWriter.h:71
asl::Writer::block
std::shared_ptr< Block > block
Definition
aslWriter.h:67
asl::Writer::addVector
void addVector(std::string name, AbstractData &data)
asl::Writer::enable
void enable()
asl::Writer::addVector
void addVector(std::string name, const acl::VectorOfElements &data, acl::Kernel &kernel, unsigned int nGhost=1)
asl::Writer::vectorFields
std::vector< std::pair< std::string, acl::VectorOfElementsData > > vectorFields
Definition
aslWriter.h:69
asl::Writer::file
std::string file
Definition
aslWriter.h:70
asl::Writer::scalarFields
std::vector< std::pair< std::string, acl::VectorOfElementsData > > scalarFields
Definition
aslWriter.h:68
asl::Writer::addScalars
void addScalars(std::string name, AbstractData &data)
asl::Writer::addScalars
void addScalars(std::string name, acl::VectorOfElementsData &data)
acl
Advanced Computational Language.
Definition
acl.h:41
asl
Advanced Simulation Library.
Definition
aslDataInc.h:31
Generated by
1.17.0