ASL 0.1.7
Advanced Simulation Library
Loading...
Searching...
No Matches
aslFDAdvectionDiffusion2.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 ASLFDADVECTIONDIFFUSION2_H
25#define ASLFDADVECTIONDIFFUSION2_H
26
27#include "aslNumMethod.h"
28
29
30namespace acl{
31 class Kernel;
32 class VectorOfElementsData;
33}
34
35namespace asl
36{
37 class VectorTemplate;
38 template <typename V> class DataWithGhostNodes;
40 typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
41 class AbstractDataWithGhostNodes;
42 typedef std::shared_ptr<AbstractDataWithGhostNodes> SPAbstractDataWithGhostNodes;
43
45
59 class FDAdvectionDiffusion2: public NumMethod
60 {
61 public:
64 private:
65 std::unique_ptr<acl::Kernel> kernel;
66 std::vector<Data> cData;
67 std::vector<Data> cInternalData;
68
69 bool electricField;
70 ScalarField efPhi;
71 ScalarField efFactor1;
72 ScalarField efFactor2;
73 std::vector<ScalarField> efChargeAnd;
74
75 const VectorTemplate* vectorTemplate;
76
77 int t;
78 std::vector<double> diffusionCoefficient;
79 public:
82 void setDiffusionCoefficient(double d, unsigned int i=0);
83 double getDiffusionCoefficient(unsigned int i=0);
87 virtual void init();
88 virtual void execute();
89 void addComponent(Data c, double dC);
90 void addComponent(Data c, double dC, ScalarField qAnd);
91
92 };
93
94 typedef std::shared_ptr<FDAdvectionDiffusion2> SPFDAdvectionDiffusion2;
95
96
97} // asl
98#endif // ASLFDADVECTIONDIFFUSION2_H
virtual void execute()
Executes the numerical procedure.
FDAdvectionDiffusion2(Data c, double dC, const VectorTemplate *vT)
void setDiffusionCoefficient(double d, unsigned int i=0)
SPAbstractDataWithGhostNodes ScalarField
void addComponent(Data c, double dC, ScalarField qAnd)
void addComponent(Data c, double dC)
virtual void init()
Builds the necesery internal data and kernels.
SPDataWithGhostNodesACLData Data
VectorTemplate setVectorTemplate(const VectorTemplate *vT)
double getDiffusionCoefficient(unsigned int i=0)
void setVectorTemplate(VectorTemplate *vT)
void setElectricFieldParameters(ScalarField phi, ScalarField f1, ScalarField f2, ScalarField qAnd)
Defines set of vectros with several properties.
SPDataWrapperACLData generateDataContainerACL_SP(const Block &b, unsigned int n=1)
generates pointer to ACL Data field with n components
Advanced Computational Language.
Definition acl.h:41
Advanced Simulation Library.
Definition aslDataInc.h:31
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
std::shared_ptr< FDAdvectionDiffusion2 > SPFDAdvectionDiffusion2
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData