ASL  0.1.7
Advanced Simulation Library
aslFDElasticity.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 ASLFDELASTICITY_H
25 #define ASLFDELASTICITY_H
26 
27 #include "aslNumMethod.h"
28 #include "acl/aclMath/aclVectorOfElementsDef.h"
29 
30 namespace acl{
31  class Kernel;
32  class VectorOfElementsData;
33 }
34 
35 namespace asl
36 {
37  class VectorTemplate;
38  class TemplateVE;
39 
40  template <typename V> class DataWithGhostNodes;
41  typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
42  typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
43  typedef DataWithGhostNodes<acl::VectorOfElements> DataWithGhostNodesACL;
44  typedef std::shared_ptr<DataWithGhostNodesACL> SPDataWithGhostNodesACL;
45 
46  namespace elasticity
47  {
48  acl::VectorOfElements strain(vector<TemplateVE> & displacment);
50 // VectorOfElements linearEqLaplasTerm(TemplateVE displacment);
51  }
52 
54  class ElasticityCommonA: public NumMethod
55  {
56  public:
59  protected:
60  std::unique_ptr<acl::Kernel> kernel;
61 
64 
67  Param force;
68  public:
70 
78  ElasticityCommonA(Data d, Param bM, Param sM, const VectorTemplate* vT);
80  void setVectorTemplate(const VectorTemplate* vT);
82 
83  virtual void init()=0;
84  virtual void execute()=0;
85 
86  void setForce(Param f);
87  inline Data getDisplacementData() const;
88  inline Data getDisplacementInternalData() const;
89  inline const Param getBulkModulus() const;
90  inline const Param getShearModulus() const;
91  };
92 
94 
99  {
100  private:
101  Data pressure;
102  Data pressureInternalData;
103  public:
113 
114  virtual void init();
115  virtual void execute();
116 
117  inline Data getPressureData() const;
118  };
119 
120  typedef std::shared_ptr<FDElasticityIncompressibleStatic> SPFDElasticityIncompressibleStatic;
121 
123 
127  class FDElasticityRelaxation: public ElasticityCommonA
128  {
129  private:
130  Data pressure;
131  Data pressureInternalData;
132  Param deltat;
133  Param dumpingFactor;
134  public:
143  FDElasticityRelaxation(Data d, Param bM, Param sM, Param dt, const VectorTemplate* vT);
145 
146  virtual void init();
147  virtual void execute();
148 
149  inline Data getPressureData() const;
150  inline Param getDeltat() const;
151  void setDumpingFactor(Param dumpF);
152  };
153 
154  typedef std::shared_ptr<FDElasticityRelaxation> SPFDElasticityRelaxation;
155 
156 
158 
166  class FDElasticity2: public ElasticityCommonA
167  {
168  private:
169 // VData velocityData;
170  Param deltat;
171  Param dumpingFactor;
172  public:
173  FDElasticity2();
181  FDElasticity2(Data d, Param bM, Param sM,
182  Param dt, const VectorTemplate* vT);
183  ~FDElasticity2();
184 
185  virtual void init();
186  virtual void execute();
187 // inline VData getVelocityData() const;
188 
189  inline Param getDeltat() const;
190  void setDumpingFactor(Param dumpF);
191  };
192 
193  typedef std::shared_ptr<FDElasticity2> SPFDElasticity2;
194 
196 
199  unsigned int nD(const ElasticityCommonA & e);
200 
202  double bM,
203  double sM,
204  double dt,
205  const VectorTemplate* vT);
206 
208  double bM,
209  double sM,
210  const VectorTemplate* vT);
211 
213  double bM,
214  double sM,
215  double dt,
216  const VectorTemplate* vT);
217 
218 //-------------------------IMPLEMENTATION------------------------
219 
222  {
223  return displacementData;
224  }
225 
227  {
229  }
230 
231  inline const ElasticityCommonA::Param
233  {
234  return bulkModulus;
235  }
236 
237  inline const ElasticityCommonA::Param
239  {
240  return shearModulus;
241  }
242 
245  {
246  return pressure;
247  }
248 
251  {
252  return pressure;
253  }
254 
256  {
257  return deltat;
258  }
259 
260 } // asl
261 #endif // ASLFDELASTICITY_H
asl::DataWithGhostNodesACL
DataWithGhostNodes< acl::VectorOfElements > DataWithGhostNodesACL
Definition: aslGenerators.h:48
asl::ElasticityCommonA::getShearModulus
const Param getShearModulus() const
Definition: aslFDElasticity.h:238
asl::FDElasticityRelaxation::getPressureData
Data getPressureData() const
Definition: aslFDElasticity.h:250
asl::ElasticityCommonA::Param
acl::VectorOfElements Param
Definition: aslFDElasticity.h:58
asl::generateFDElasticity
SPFDElasticity2 generateFDElasticity(SPDataWithGhostNodesACLData d, double bM, double sM, double dt, const VectorTemplate *vT)
asl::FDElasticityIncompressibleStatic::getPressureData
Data getPressureData() const
Definition: aslFDElasticity.h:244
asl::FDElasticityIncompressibleStatic::~FDElasticityIncompressibleStatic
~FDElasticityIncompressibleStatic()
asl::ElasticityCommonA::displacementInternalData
Data displacementInternalData
Definition: aslFDElasticity.h:63
asl::FDElasticity2::init
virtual void init()
Builds the necesery internal data and kernels.
asl::ElasticityCommonA::init
virtual void init()=0
Builds the necesery internal data and kernels.
asl::ElasticityCommonA::~ElasticityCommonA
~ElasticityCommonA()
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
asl::FDElasticityRelaxation::~FDElasticityRelaxation
~FDElasticityRelaxation()
asl::ElasticityCommonA::vectorTemplate
const VectorTemplate * vectorTemplate
Definition: aslFDElasticity.h:69
asl::ElasticityCommonA::setVectorTemplate
void setVectorTemplate(const VectorTemplate *vT)
asl::ElasticityCommonA::getDisplacementData
Data getDisplacementData() const
Definition: aslFDElasticity.h:221
asl::FDElasticityIncompressibleStatic::init
virtual void init()
Builds the necesery internal data and kernels.
asl::nD
const unsigned int nD(const Block &b)
Definition: aslBlocks.h:220
asl::FDElasticityIncompressibleStatic
Numerical method which computes homogenious isotropic elasticity equation.
Definition: aslFDElasticity.h:98
asl::SPFDElasticityIncompressibleStatic
std::shared_ptr< FDElasticityIncompressibleStatic > SPFDElasticityIncompressibleStatic
Definition: aslFDElasticity.h:120
asl::ElasticityCommonA::getBulkModulus
const Param getBulkModulus() const
Definition: aslFDElasticity.h:232
asl::ElasticityCommonA
abstract class for elasticity solver
Definition: aslFDElasticity.h:54
asl::FDElasticityIncompressibleStatic::FDElasticityIncompressibleStatic
FDElasticityIncompressibleStatic()
asl::UValue< FlT >
asl::DataWithGhostNodesACLData
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:45
aslNumMethod.h
asl::FDElasticityRelaxation::init
virtual void init()
Builds the necesery internal data and kernels.
asl::FDElasticity2::~FDElasticity2
~FDElasticity2()
asl::ElasticityCommonA::getDisplacementInternalData
Data getDisplacementInternalData() const
Definition: aslFDElasticity.h:226
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:91
asl::FDElasticityRelaxation::FDElasticityRelaxation
FDElasticityRelaxation()
asl::FDElasticity2::setDumpingFactor
void setDumpingFactor(Param dumpF)
asl::ElasticityCommonA::force
Param force
Definition: aslFDElasticity.h:67
asl::generateFDElasticityStatic
SPFDElasticityIncompressibleStatic generateFDElasticityStatic(SPDataWithGhostNodesACLData d, double bM, double sM, const VectorTemplate *vT)
asl::FDElasticityRelaxation::getDeltat
Param getDeltat() const
asl::generateFDElasticityRelax
SPFDElasticityRelaxation generateFDElasticityRelax(SPDataWithGhostNodesACLData d, double bM, double sM, double dt, const VectorTemplate *vT)
asl::FDElasticity2::execute
virtual void execute()
Executes the numerical procedure.
asl::SPFDElasticity2
std::shared_ptr< FDElasticity2 > SPFDElasticity2
Definition: aslFDElasticity.h:193
asl::ElasticityCommonA::shearModulus
Param shearModulus
Definition: aslFDElasticity.h:66
asl::ElasticityCommonA::kernel
std::unique_ptr< acl::Kernel > kernel
Definition: aslFDElasticity.h:60
asl::SPFDElasticityRelaxation
std::shared_ptr< FDElasticityRelaxation > SPFDElasticityRelaxation
Definition: aslFDElasticity.h:154
asl::ElasticityCommonA::Data
SPDataWithGhostNodesACLData Data
Definition: aslFDElasticity.h:57
asl::ElasticityCommonA::bulkModulus
Param bulkModulus
Definition: aslFDElasticity.h:65
asl::FDElasticityIncompressibleStatic::execute
virtual void execute()
Executes the numerical procedure.
asl::FDElasticityRelaxation::setDumpingFactor
void setDumpingFactor(Param dumpF)
asl::ElasticityCommonA::displacementData
Data displacementData
Definition: aslFDElasticity.h:62
asl::VectorTemplate
Defines set of vectros with several properties.
Definition: aslTemplates.h:87
asl::FDElasticity2::getDeltat
Param getDeltat() const
Definition: aslFDElasticity.h:255
asl::elasticity::strain
acl::VectorOfElements strain(vector< TemplateVE > &displacment)
asl::ElasticityCommonA::getVectorTemplate
VectorTemplate getVectorTemplate()
asl::ElasticityCommonA::setForce
void setForce(Param f)
asl::elasticity::stressLinear
acl::VectorOfElements stressLinear(acl::VectorOfElements &strain)
asl::FDElasticity2::FDElasticity2
FDElasticity2()
asl::ElasticityCommonA::execute
virtual void execute()=0
Executes the numerical procedure.
asl::SPDataWithGhostNodesACL
std::shared_ptr< DataWithGhostNodesACL > SPDataWithGhostNodesACL
Definition: aslGenerators.h:49
asl::FDElasticityRelaxation::execute
virtual void execute()
Executes the numerical procedure.
asl
Advanced Simulation Library.
Definition: aslDataInc.h:30
acl
Advanced Computational Language.
Definition: acl.h:40
asl::ElasticityCommonA::ElasticityCommonA
ElasticityCommonA()