ASL  0.1.6
Advanced Simulation Library
aslFDElasticityBC.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 ASLFDELASTICITYBC_H
25 #define ASLFDELASTICITYBC_H
26 
27 #include "aslBCond.h"
28 #include "acl/aclMath/aclVectorOfElementsDef.h"
29 
30 namespace acl{
31  class Kernel;
33 }
34 
35 namespace asl
36 {
37  class ElasticityCommonA;
39  class FDElasticityIncompressibleStatic;
41  class FDElasticityRelaxation;
43  class FDElasticity2;
45 
47 
50  class BCRigidWall:public BCond
51  {
52  protected:
53  std::unique_ptr<acl::Kernel> kernel;
54  SPFDElasticityIncompressibleStatic num;
55  public:
56  BCRigidWall(SPFDElasticityIncompressibleStatic nm);
57  virtual void execute();
58  virtual void init();
59  };
60 
62 
66  SPBCond generateBCRigidWall(SPFDElasticityIncompressibleStatic nm,
67  const std::vector<SlicesNames> & sl);
68 
70 
73  class BCRigidWallRelaxation:public BCond
74  {
75  protected:
76  std::unique_ptr<acl::Kernel> kernel;
77  SPFDElasticityRelaxation num;
79  public:
80  BCRigidWallRelaxation(SPFDElasticityRelaxation nm);
81  BCRigidWallRelaxation(SPFDElasticityRelaxation nm, acl::VectorOfElements v);
82  virtual void execute();
83  virtual void init();
84  };
85 
87 
91  SPBCond generateBCRigidWall(SPFDElasticityRelaxation nm,
92  const std::vector<SlicesNames> & sl);
93 
95 
99  SPBCond generateBCRigidWall(SPFDElasticity2 nm,
100  const std::vector<SlicesNames> & sl);
101 
103 
107  SPBCond generateBCRigidWall(SPFDElasticity2 nm,
108  const AVec<> & u0,
109  const std::vector<SlicesNames> & sl);
110 
112 
116  SPBCond generateBCRigidWall(SPFDElasticityRelaxation nm,
117  const AVec<> & u0,
118  const std::vector<SlicesNames> & sl);
119 
121 
124  class BCFreeSurface:public BCond
125  {
126  protected:
127  std::unique_ptr<acl::Kernel> kernel;
128  FDElasticityIncompressibleStatic* num;
129  public:
130  BCFreeSurface(FDElasticityIncompressibleStatic* nm);
131  virtual void execute();
132  virtual void init();
133  };
134 
136 
142  class BCFreeSurface2:public BCond
143  {
144  protected:
145  std::unique_ptr<acl::Kernel> kernel;
146  SPFDElasticity2 num;
147  public:
148  BCFreeSurface2(SPFDElasticity2 nm);
149  ~BCFreeSurface2();
150  virtual void execute();
151  virtual void init();
152  };
153 
155 
194  class BCZeroStressMap: public BCondWithMap
195  {
196  protected:
197  SPAbstractDataWithGhostNodes displacement;
198  acl::VectorOfElements lambda;
200  acl::SPKernel kernel;
201  public:
202  BCZeroStressMap(SPAbstractDataWithGhostNodes displacement,
203  acl::VectorOfElements lambda,
206  const VectorTemplate *const t);
207  ~BCZeroStressMap();
208  virtual void execute();
209  virtual void init();
210  };
211 
213 
216  SPNumMethod generateBCZeroStress(SPElasticityCommonA nm,
218 
219 
221 
224 // SPNumMethod generateBCZeroStress(SPFDElasticityIncompressibleStatic nm,
225 // SPAbstractDataWithGhostNodes map);
226 
228 
231 // SPNumMethod generateBCZeroStress(SPFDElasticityRelaxation nm,
232 // SPAbstractDataWithGhostNodes map);
233 
235 
238  SPNumMethod generateBCZeroStressP(SPFDElasticityIncompressibleStatic nm,
240 
242 
245  SPNumMethod generateBCZeroStressP(SPFDElasticityRelaxation nm,
247 
249 
252  class BCImposedDisplacementVelocityValue:public BCond
253  {
254  protected:
255  std::unique_ptr<acl::Kernel> kernel;
256  SPFDElasticityIncompressibleStatic num;
257  AVec<double> displacement;
258  bool bDisplacement;
259  AVec<double> velocity;
260  bool bVelocity;
261  bool initialized;
262  public:
263  BCImposedDisplacementVelocityValue(SPFDElasticityIncompressibleStatic nm);
264  virtual void execute();
265  virtual void init();
266  void setDisplacement(AVec<double> d);
267  void setVelocity(AVec<double> v);
268  };
269 
271 
274  class BCAccelerationSource2: public BCond
275  {
276  protected:
277  std::unique_ptr<acl::Kernel> kernel;
278  FDElasticity2* num;
279  acl::VectorOfElements acceleration;
280  bool initialized;
281  public:
282  BCAccelerationSource2(FDElasticity2* nm);
283  virtual void execute();
284  virtual void init();
285  void setAcceleration(AVec<double> a);
286  };
287 
288 } //asl
289 
290 #endif //ASLFDELASTICITYBC_H
SPNumMethod generateBCZeroStressP(SPFDElasticityRelaxation nm, SPAbstractDataWithGhostNodes map)
Bondary condition set given values to displacement/velocity.
Advanced Simulation Library.
Definition: aslDataInc.h:30
Advanced Computational Language.
Definition: acl.h:40
std::shared_ptr< Kernel > SPKernel
std::shared_ptr< NumMethod > SPNumMethod
Definition: aslNumMethod.h:44
std::shared_ptr< FDElasticityIncompressibleStatic > SPFDElasticityIncompressibleStatic
std::shared_ptr< BCond > SPBCond
Definition: aslBCond.h:88
std::shared_ptr< ElasticityCommonA > SPElasticityCommonA
SPNumMethod generateBCZeroStress(SPElasticityCommonA nm, SPAbstractDataWithGhostNodes map)
Bondary condition set given values to displacement/velocity.
std::shared_ptr< FDElasticityRelaxation > SPFDElasticityRelaxation
std::shared_ptr< FDElasticity2 > SPFDElasticity2
The class represents several Element.
SPBCond generateBCRigidWall(SPFDElasticityRelaxation nm, const AVec<> &u0, const std::vector< SlicesNames > &sl)
Bondary condition corresponding to a rigid wall ( and )
std::shared_ptr< T > map(ElementData m)
Definition: aclMemBlock.h:68
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition: aslGenerators.h:50