ASL  0.1.7
Advanced Simulation Library
aslFDAdvectionDiffusion.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 "aslSingleKernelNM.h"
28 
29 namespace acl
30 {
31  class VectorOfElementsData;
32  class VectorOfElements;
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 
61  {
62  public:
65 
66  private:
67  std::vector<Data> cData;
68  std::vector<Data> cInternalData;
69 
70  bool electricField;
71  Field efPhi;
72  Field efFactor1;
73  Field efFactor2;
74  std::vector<Field> efChargeAnd;
75 
76  Field velocity;
78  Field distributionFunction;
79  bool compressibilityCorrectionFlag;
80 
81  const VectorTemplate* vectorTemplate;
82 
83  int t;
84  std::vector<acl::VectorOfElements> diffusionCoefficient;
85 
86  virtual void init0();
87  virtual void postProcessing();
88  public:
91  const acl::VectorOfElements & dC,
92  const VectorTemplate* vT);
94  unsigned int i = 0);
95  inline const acl::VectorOfElements & getDiffusionCoefficient(unsigned int i=0) const;
97  inline const VectorTemplate* getVectorTemplate() const;
99  Field f1,
100  Field f2,
101  Field qAnd);
102  void setVelocity(Field v, bool compressibilityCorrection=false);
104 
105  inline Field getVelocity();
107  inline std::vector<Data> & getData();
109  void addComponent(Data c, acl::VectorOfElements & dC, Field qAnd);
110 
111  };
112 
113  typedef std::shared_ptr<FDAdvectionDiffusion> SPFDAdvectionDiffusion;
114 
126  double diffustionCoeff,
128  const VectorTemplate* vt,
129  bool compressibilityCorrection = false);
130 
141  double diffustionCoeff,
142  const VectorTemplate* vt);
143 
144 // ------------------------- Implementation ------------------------
145 
147  {
148  return velocity;
149  }
150 
152  {
153  return distributionFunction;
154  }
155 
156  inline std::vector<FDAdvectionDiffusion::Data> & FDAdvectionDiffusion::getData()
157  {
158  return cData;
159  }
160 
162  {
163  return vectorTemplate;
164  }
165 
166  inline const acl::VectorOfElements &
168  {
169  return diffusionCoefficient[i];
170  }
171 
172 } // asl
173 #endif // ASLFDADVECTIONDIFFUSION_H
Advanced Simulation Library.
Definition: aslDataInc.h:30
Advanced Computational Language.
Definition: acl.h:40
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
void addComponent(Data c, acl::VectorOfElements &dC)
void setDiffusionCoefficient(acl::VectorOfElements d, unsigned int i=0)
void setElectricFieldParameters(Field phi, Field f1, Field f2, Field qAnd)
const VectorTemplate * getVectorTemplate() const
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:45
std::vector< Data > & getData()
SPFDAdvectionDiffusion generateFDAdvectionDiffusion(SPDataWithGhostNodesACLData c, double diffustionCoeff, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt, bool compressibilityCorrection=false)
void setVelocity(Field v, bool compressibilityCorrection=false)
The class represents several Element.
std::shared_ptr< FDAdvectionDiffusion > SPFDAdvectionDiffusion
SPDataWithGhostNodesACLData Data
void setDistributionFunction(Field f)
SPAbstractDataWithGhostNodes Field
Numerical method which computes multicomponent transport processes.
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition: aslGenerators.h:50
Defines set of vectros with several properties.
Definition: aslTemplates.h:87
void setVectorTemplate(VectorTemplate *vT)
const acl::VectorOfElements & getDiffusionCoefficient(unsigned int i=0) const