| 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 ASLFDPOROELASTICITYBC_H |
| 25 |
#define ASLFDPOROELASTICITYBC_H |
| 26 |
|
| 27 |
#include "aslBCond.h" |
| 28 |
#include "acl/aclMath/aclVectorOfElementsDef.h" |
| 29 |
|
| 30 |
namespace acl{ |
| 31 |
class Kernel; |
| 32 |
} |
| 33 |
|
| 34 |
namespace asl |
| 35 |
{ |
| 36 |
class FDPoroElasticity; |
| 37 |
typedef std::shared_ptr<FDPoroElasticity> SPFDPoroElasticity; |
| 38 |
class DistanceFunction; |
| 39 |
typedef std::shared_ptr<DistanceFunction> SPDistanceFunction; |
| 40 |
class PositionFunction; |
| 41 |
typedef std::shared_ptr<PositionFunction> SPPositionFunction; |
| 42 |
|
| 43 |
/// Bondary condition corresponding to a rigid wall (\f$\vec u=0\f$ and \f$\nabla p=0\f$) |
| 44 |
/** |
| 45 |
\ingroup ElasticityBC |
| 46 |
*/ |
| 47 |
class BCRigidWallPoroElasticity:public BCond |
| 48 |
{ |
| 49 |
protected: |
| 50 |
std::unique_ptr<acl::Kernel> kernel; |
| 51 |
SPFDPoroElasticity num; |
| 52 |
acl::VectorOfElements value; |
| 53 |
public: |
| 54 |
BCRigidWallPoroElasticity(SPFDPoroElasticity nm); |
| 55 |
BCRigidWallPoroElasticity(SPFDPoroElasticity nm, acl::VectorOfElements v); |
| 56 |
~BCRigidWallPoroElasticity(); |
| 57 |
virtual void execute(); |
| 58 |
virtual void init(); |
| 59 |
}; |
| 60 |
|
| 61 |
/// Bondary condition corresponding to a rigid wall (\f$\vec u=0\f$ and \f$\nabla p=0\f$) |
| 62 |
/** |
| 63 |
\ingroup ElasticityBC |
| 64 |
*/ |
| 65 |
class BCRigidWallDF: public BCondWithMap |
| 66 |
{ |
| 67 |
protected: |
| 68 |
std::unique_ptr<acl::Kernel> kernel; |
| 69 |
SPFDPoroElasticity num; |
| 70 |
SPDistanceFunction rWall; |
| 71 |
public: |
| 72 |
BCRigidWallDF(SPFDPoroElasticity nm, |
| 73 |
SPDistanceFunction rw, |
| 74 |
SPAbstractDataWithGhostNodes map); |
| 75 |
~BCRigidWallDF(); |
| 76 |
virtual void execute(); |
| 77 |
virtual void init(); |
| 78 |
}; |
| 79 |
|
| 80 |
void addBCRigidWall(std::vector<SPNumMethod> & bcList, |
| 81 |
SPFDPoroElasticity nm, |
| 82 |
const std::vector<SlicesNames> & sl); |
| 83 |
|
| 84 |
/// Bondary condition set given values to pressure |
| 85 |
/** |
| 86 |
\ingroup ElasticityBC |
| 87 |
*/ |
| 88 |
void addBCZeroStress(std::vector<SPNumMethod> & bcList, |
| 89 |
SPFDPoroElasticity nm, |
| 90 |
SPAbstractDataWithGhostNodes map); |
| 91 |
|
| 92 |
/// Bondary condition set given values to pressure |
| 93 |
/** |
| 94 |
\ingroup ElasticityBC |
| 95 |
\param bcList list of boundary conditions |
| 96 |
\param nm corresponding numerical method |
| 97 |
\param p pressure field |
| 98 |
\param map computation map |
| 99 |
*/ |
| 100 |
void addBCZeroStress(std::vector<SPNumMethod> & bcList, |
| 101 |
SPFDPoroElasticity nm, |
| 102 |
SPPositionFunction p, |
| 103 |
SPAbstractDataWithGhostNodes map); |
| 104 |
|
| 105 |
|
| 106 |
/** |
| 107 |
\ingroup ElasticityBC |
| 108 |
*/ |
| 109 |
void addBCRigidWallDF(std::vector<SPNumMethod> & bcList, |
| 110 |
SPFDPoroElasticity nm, |
| 111 |
SPDistanceFunction rw, |
| 112 |
SPAbstractDataWithGhostNodes map); |
| 113 |
|
| 114 |
/** |
| 115 |
\ingroup ElasticityBC |
| 116 |
considers \p rw as linear interpolation |
| 117 |
*/ |
| 118 |
void addBCRigidWallDF(std::vector<SPNumMethod> & bcList, |
| 119 |
SPFDPoroElasticity nm, |
| 120 |
SPAbstractDataWithGhostNodes rw, |
| 121 |
SPAbstractDataWithGhostNodes map); |
| 122 |
|
| 123 |
|
| 124 |
} //asl |
| 125 |
|
| 126 |
#endif //ASLFDPOROELASTICITYBC_H |