ASL
0.1.7
Advanced Simulation Library
Toggle main menu visibility
Loading...
Searching...
No Matches
src
numExtend
aslFDAdvectionDiffusionExtended.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 ASLFDADVECTIONDIFFUSION_H
25
#define ASLFDADVECTIONDIFFUSION_H
26
27
#include "
../num/aslNumMethod.h
"
28
29
30
namespace
acl
{
31
class
Kernel
;
32
class
VectorOfElementsData
;
33
}
34
35
namespace
asl
36
{
37
class
VectorTemplate
;
38
template
<
typename
V>
class
DataWithGhostNodes
;
39
typedef
DataWithGhostNodes<acl::VectorOfElementsData>
DataWithGhostNodesACLData
;
40
typedef
std::shared_ptr<DataWithGhostNodesACLData>
SPDataWithGhostNodesACLData
;
41
class
AbstractDataWithGhostNodes
;
42
typedef
std::shared_ptr<AbstractDataWithGhostNodes>
SPAbstractDataWithGhostNodes
;
43
45
60
class
FDAdvectionDiffusionExtended
:
public
NumMethod
61
{
62
public
:
63
typedef
SPDataWithGhostNodesACLData
Data
;
64
typedef
SPAbstractDataWithGhostNodes
ScalarField
;
65
private
:
66
std::unique_ptr<acl::Kernel> kernel;
67
68
std::vector<Data> cData;
69
std::vector<Data> cInternalData;
70
71
bool
electricField;
72
ScalarField
efPhi;
73
ScalarField
efFactor1;
74
ScalarField
efFactor2;
75
std::vector<ScalarField> efChargeAnd;
76
77
const
VectorTemplate
* vectorTemplate;
78
79
int
t;
80
std::vector<double> diffusionCoefficient;
81
public
:
82
FDAdvectionDiffusionExtended
();
83
FDAdvectionDiffusionExtended
(
Data
c,
double
dC,
const
VectorTemplate
* vT);
84
void
setDiffusionCoefficient
(
double
d,
unsigned
int
i=0);
85
double
getDiffusionCoefficient
(
unsigned
int
i=0);
86
void
setVectorTemplate
(
VectorTemplate
* vT);
87
VectorTemplate
setVectorTemplate
(
const
VectorTemplate
* vT);
88
void
setElectricFieldParameters
(
ScalarField
phi,
ScalarField
f1,
ScalarField
f2,
ScalarField
qAnd);
89
virtual
void
init
();
90
virtual
void
execute
();
91
void
addComponent
(
Data
c,
double
dC);
92
void
addComponent
(
Data
c,
double
dC,
ScalarField
qAnd);
93
94
};
95
96
typedef
std::shared_ptr<FDAdvectionDiffusionExtended>
SPFDAdvectionDiffusionExtended
;
97
98
99
}
// asl
100
#endif
// ASLFDADVECTIONDIFFUSION_H
aslNumMethod.h
acl::Kernel
OpenCl Kernel generator.
Definition
aclKernel.h:49
acl::VectorOfElementsData
The class represents several ElementData.
Definition
aclVectorOfElementsDef.h:57
asl::AbstractDataWithGhostNodes
Definition
aslDataWithGhostNodes.h:39
asl::DataWithGhostNodes
Definition
aslDataWithGhostNodes.h:58
asl::FDAdvectionDiffusionExtended::execute
virtual void execute()
Executes the numerical procedure.
asl::FDAdvectionDiffusionExtended::ScalarField
SPAbstractDataWithGhostNodes ScalarField
Definition
aslFDAdvectionDiffusionExtended.h:64
asl::FDAdvectionDiffusionExtended::getDiffusionCoefficient
double getDiffusionCoefficient(unsigned int i=0)
asl::FDAdvectionDiffusionExtended::setDiffusionCoefficient
void setDiffusionCoefficient(double d, unsigned int i=0)
asl::FDAdvectionDiffusionExtended::setVectorTemplate
void setVectorTemplate(VectorTemplate *vT)
asl::FDAdvectionDiffusionExtended::setVectorTemplate
VectorTemplate setVectorTemplate(const VectorTemplate *vT)
asl::FDAdvectionDiffusionExtended::FDAdvectionDiffusionExtended
FDAdvectionDiffusionExtended(Data c, double dC, const VectorTemplate *vT)
asl::FDAdvectionDiffusionExtended::setElectricFieldParameters
void setElectricFieldParameters(ScalarField phi, ScalarField f1, ScalarField f2, ScalarField qAnd)
asl::FDAdvectionDiffusionExtended::Data
SPDataWithGhostNodesACLData Data
Definition
aslFDAdvectionDiffusionExtended.h:63
asl::FDAdvectionDiffusionExtended::init
virtual void init()
Builds the necesery internal data and kernels.
asl::FDAdvectionDiffusionExtended::addComponent
void addComponent(Data c, double dC, ScalarField qAnd)
asl::FDAdvectionDiffusionExtended::FDAdvectionDiffusionExtended
FDAdvectionDiffusionExtended()
asl::FDAdvectionDiffusionExtended::addComponent
void addComponent(Data c, double dC)
asl::NumMethod
Definition
aslNumMethod.h:35
asl::VectorTemplate
Defines set of vectros with several properties.
Definition
aslTemplates.h:88
acl
Advanced Computational Language.
Definition
acl.h:41
asl
Advanced Simulation Library.
Definition
aslDataInc.h:31
asl::DataWithGhostNodesACLData
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition
aslGenerators.h:46
asl::SPFDAdvectionDiffusionExtended
std::shared_ptr< FDAdvectionDiffusionExtended > SPFDAdvectionDiffusionExtended
Definition
aslFDAdvectionDiffusionExtended.h:96
asl::SPAbstractDataWithGhostNodes
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition
aslGenerators.h:51
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition
aslGenerators.h:47
Generated by
1.17.0