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"
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 
55  {
56  public:
59  protected:
60  std::unique_ptr<acl::Kernel> kernel;
61 
64 
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 
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 
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
SPDataWithGhostNodesACLData Data
Numerical method which computes homogenious isotropic elasticity equation.
SPFDElasticity2 generateFDElasticity(SPDataWithGhostNodesACLData d, double bM, double sM, double dt, const VectorTemplate *vT)
acl::VectorOfElements stressLinear(acl::VectorOfElements &strain)
Advanced Simulation Library.
Definition: aslDataInc.h:30
Advanced Computational Language.
Definition: acl.h:40
Numerical method which computes homogenious isotropic elasticity equation.
virtual void init()
Builds the necesery internal data and kernels.
acl::VectorOfElements Param
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
virtual void init()
Builds the necesery internal data and kernels.
std::shared_ptr< FDElasticityIncompressibleStatic > SPFDElasticityIncompressibleStatic
std::unique_ptr< acl::Kernel > kernel
abstract class for elasticity solver
virtual void init()=0
Builds the necesery internal data and kernels.
const unsigned int nD(const Block &b)
Definition: aslBlocks.h:220
virtual void execute()
Executes the numerical procedure.
Numerical method which computes homogenious isotropic elasticity equation.
Data getDisplacementData() const
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:45
const Param getShearModulus() const
void setDumpingFactor(Param dumpF)
virtual void execute()
Executes the numerical procedure.
const Param getBulkModulus() const
VectorTemplate getVectorTemplate()
virtual void init()
Builds the necesery internal data and kernels.
std::shared_ptr< FDElasticityRelaxation > SPFDElasticityRelaxation
void setDumpingFactor(Param dumpF)
std::shared_ptr< FDElasticity2 > SPFDElasticity2
SPFDElasticityIncompressibleStatic generateFDElasticityStatic(SPDataWithGhostNodesACLData d, double bM, double sM, const VectorTemplate *vT)
acl::VectorOfElements strain(vector< TemplateVE > &displacment)
The class represents several Element.
virtual void execute()
Executes the numerical procedure.
SPFDElasticityRelaxation generateFDElasticityRelax(SPDataWithGhostNodesACLData d, double bM, double sM, double dt, const VectorTemplate *vT)
const VectorTemplate * vectorTemplate
Data getDisplacementInternalData() const
virtual void execute()=0
Executes the numerical procedure.
void setVectorTemplate(const VectorTemplate *vT)
Param getDeltat() const
DataWithGhostNodes< acl::VectorOfElements > DataWithGhostNodesACL
Definition: aslGenerators.h:48
std::shared_ptr< DataWithGhostNodesACL > SPDataWithGhostNodesACL
Definition: aslGenerators.h:49
Defines set of vectros with several properties.
Definition: aslTemplates.h:87
void setForce(Param f)