37 #ifndef _STRUCTURALANISOTROPICCONSTITUTIVELAW_H_ 38 #define _STRUCTURALANISOTROPICCONSTITUTIVELAW_H_ 1
45 #pragma GCC diagnostic ignored "-Wunused-variable" 46 #pragma GCC diagnostic ignored "-Wunused-parameter" 48 #include <Epetra_Vector.h> 49 #include <EpetraExt_MatrixMatrix.h> 50 #include <Epetra_SerialDenseMatrix.h> 52 #pragma GCC diagnostic ignored "-Wunused-variable" 53 #pragma GCC diagnostic ignored "-Wunused-parameter" 55 #include <lifev/core/array/MatrixElemental.hpp> 56 #include <lifev/core/array/VectorElemental.hpp> 57 #include <lifev/core/array/MatrixEpetra.hpp> 58 #include <lifev/core/array/VectorEpetra.hpp> 60 #include <lifev/core/fem/Assembly.hpp> 61 #include <lifev/core/fem/AssemblyElemental.hpp> 62 #include <lifev/structure/fem/AssemblyElementalStructure.hpp> 63 #include <lifev/structure/fem/ExpressionDefinitions.hpp> 64 #include <lifev/core/fem/FESpace.hpp> 66 #include <lifev/core/LifeV.hpp> 67 #include <lifev/core/util/Displayer.hpp> 68 #include <lifev/core/util/Factory.hpp> 69 #include <lifev/core/util/FactorySingleton.hpp> 71 #include <lifev/core/algorithm/SolverAztecOO.hpp> 73 #include <lifev/structure/solver/StructuralConstitutiveLawData.hpp> 76 #include <lifev/eta/fem/ETFESpace.hpp> 77 #include <lifev/eta/expression/Integrate.hpp> 88 template <
typename MeshType>
89 class StructuralAnisotropicConstitutiveLaw
97 typedef MatrixEpetra<
Real> matrix_Type;
98 typedef std::shared_ptr<matrix_Type> matrixPtr_Type;
99 typedef VectorEpetra vector_Type;
100 typedef std::shared_ptr<vector_Type> vectorPtr_Type;
102 typedef typename std::shared_ptr<data_Type> dataPtr_Type;
103 typedef typename std::shared_ptr<
const Displayer> displayerPtr_Type;
105 typedef FactorySingleton<Factory<StructuralAnisotropicConstitutiveLaw<MeshType>, std::string> > StructureAnisotropicMaterialFactory;
107 typedef std::vector<
typename MeshType::element_Type* > vectorVolumes_Type;
109 typedef std::map< UInt, vectorVolumes_Type> mapMarkerVolumes_Type;
110 typedef std::shared_ptr<mapMarkerVolumes_Type> mapMarkerVolumesPtr_Type;
112 typedef std::vector<UInt> vectorIndexes_Type;
113 typedef std::map< UInt, vectorIndexes_Type> mapMarkerIndexes_Type;
114 typedef std::shared_ptr<mapMarkerIndexes_Type> mapMarkerIndexesPtr_Type;
116 typedef ETFESpace<MeshType, MapEpetra, 3, 3 > ETFESpace_Type;
117 typedef std::shared_ptr<ETFESpace_Type> ETFESpacePtr_Type;
119 typedef FESpace< MeshType, MapEpetra > FESpace_Type;
120 typedef std::shared_ptr<FESpace_Type> FESpacePtr_Type;
123 typedef std::vector<std::vector<Real> > vectorsParameters_Type;
124 typedef std::shared_ptr<vectorsParameters_Type> vectorsParametersPtr_Type;
128 typedef std::function<Real ( Real
const&, Real
const&, Real
const&, Real
const&, ID
const& ) > fiberFunction_Type;
129 typedef std::shared_ptr<fiberFunction_Type> fiberFunctionPtr_Type;
131 typedef std::vector<fiberFunctionPtr_Type> vectorFiberFunction_Type;
132 typedef std::shared_ptr<vectorFiberFunction_Type> vectorFiberFunctionPtr_Type;
135 typedef std::vector<vectorPtr_Type> vectorInterpolatedFibers_Type;
159 StructuralAnisotropicConstitutiveLaw();
161 virtual ~StructuralAnisotropicConstitutiveLaw() {}
176 virtual void setup (
const FESpacePtr_Type& dFESpace,
177 const ETFESpacePtr_Type& ETFESpace,
178 const std::shared_ptr<
const MapEpetra>& monolithicMap,
179 const UInt offset,
const dataPtr_Type& dataMaterial) = 0;
186 virtual void computeLinearStiff ( dataPtr_Type& dataMaterial,
187 const mapMarkerVolumesPtr_Type ,
188 const mapMarkerIndexesPtr_Type ) = 0;
197 virtual void updateJacobianMatrix (
const vector_Type& disp,
const dataPtr_Type& dataMaterial,
198 const mapMarkerVolumesPtr_Type mapsMarkerVolumes,
199 const mapMarkerIndexesPtr_Type mapsMarkerIndexes,
200 const displayerPtr_Type& displayer ) = 0;
213 virtual void computeStiffness (
const vector_Type& sol,
const UInt iter,
Real factor,
const dataPtr_Type& dataMaterial,
214 const mapMarkerVolumesPtr_Type mapsMarkerVolumes,
215 const mapMarkerIndexesPtr_Type mapsMarkerIndexes,
216 const displayerPtr_Type& displayer ) = 0;
218 virtual void computeReferenceConfigurations (
const vector_Type& sol,
219 const dataPtr_Type& dataMaterial,
220 const displayerPtr_Type& displayer ) = 0;
227 virtual void computeKinematicsVariables (
const VectorElemental& dk_loc ) = 0;
235 virtual void showMe ( std::string
const& fileNameStiff, std::string
const& fileNameJacobian ) = 0;
246 virtual void computeLocalFirstPiolaKirchhoffTensor ( Epetra_SerialDenseMatrix& firstPiola,
247 const Epetra_SerialDenseMatrix& tensorF,
248 const Epetra_SerialDenseMatrix& cofactorF,
249 const std::vector<Real>& invariants,
250 const UInt material) = 0;
259 virtual void computeCauchyStressTensor (
const vectorPtr_Type disp,
261 vectorPtr_Type sigma_1,
262 vectorPtr_Type sigma_2,
263 vectorPtr_Type sigma_3) = 0;
266 virtual void setupFiberDirections( vectorFiberFunctionPtr_Type vectorOfFibers ) = 0;
269 virtual void evaluateActivationFibers(
const vector_Type& displacement,
270 vector_Type& fourthInvariant) = 0;
276 void setIthFiberVector(
const vector_Type& fiberInterpolated,
const UInt i )
278 ASSERT( i <= M_vectorInterpolated.size(),
" No such fiber family in the class" );
279 this->M_vectorInterpolated[ i-1 ].reset(
new vector_Type(*
this->M_localMap) );
283 *( M_vectorInterpolated[ i - 1 ] ) = fiberInterpolated;
286 void setNumberOfFamilies(
const UInt n )
288 this->M_vectorInterpolated.resize( n );
299 MapEpetra
const& map()
const 305 FESpace_Type& dFESpace()
307 return M_dispFESpace;
311 matrixPtr_Type
const jacobian()
const 317 const vector_Type& ithFiberVector(
const UInt i )
const 319 ASSERT( i <= M_vectorInterpolated.size(),
" No such fiber family in the class" );
323 return *( M_vectorInterpolated[ i - 1 ] );
327 virtual matrixPtr_Type
const stiffMatrix()
const = 0;
330 virtual vectorPtr_Type
const stiffVector()
const = 0;
334 virtual vectorPtr_Type
const selectionCriterion(
const UInt i )
const = 0;
337 virtual vectorPtr_Type
const activationDisplacement(
const UInt i )
const = 0;
340 virtual vectorPtr_Type
const activatedUnitFiber(
const UInt i )
const = 0;
343 virtual vectorPtr_Type
const activatedDeterminant(
const UInt i )
const = 0;
345 virtual void apply (
const vector_Type& sol, vector_Type& res,
346 const mapMarkerVolumesPtr_Type mapsMarkerVolumes,
347 const mapMarkerIndexesPtr_Type mapsMarkerIndexes,
348 const displayerPtr_Type displayer ) = 0;
364 FESpacePtr_Type M_dispFESpace;
366 ETFESpacePtr_Type M_dispETFESpace;
368 std::shared_ptr<
const MapEpetra> M_localMap;
371 matrixPtr_Type M_jacobian;
376 dataPtr_Type M_dataMaterial;
378 displayerPtr_Type M_displayer;
384 vectorFiberFunctionPtr_Type M_vectorOfFibers;
388 vectorInterpolatedFibers_Type M_vectorInterpolated;
398 template <
typename MeshType>
399 StructuralAnisotropicConstitutiveLaw<MeshType>::StructuralAnisotropicConstitutiveLaw( ) :
405 M_vectorOfFibers ( ),
406 M_vectorInterpolated ( ),
ExpressionMinusTransposed< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > > minusTransposedTensor_Type
ExpressionDot< ExpressionProduct< ExpressionTranspose< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > >, ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > >, ExpressionOuterProduct< ExpressionInterpolateValue< MeshType, MapEpetra, 3, 3 >, ExpressionInterpolateValue< MeshType, MapEpetra, 3, 3 > > > stretch_Type
FESpace - Short description here please!
ExpressionInterpolateValue< MeshType, MapEpetra, 3, 3 > interpolatedValue_Type
ExpressionProduct< ExpressionPower< ExpressionDeterminant< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > > >, ExpressionTrace< ExpressionProduct< ExpressionTranspose< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > >, ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > > > > isochoricTrace_Type
ExpressionOuterProduct< ExpressionInterpolateValue< MeshType, MapEpetra, 3, 3 >, ExpressionInterpolateValue< MeshType, MapEpetra, 3, 3 > > outerProduct_Type
ExpressionProduct< ExpressionPower< ExpressionDeterminant< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > > >, ExpressionDot< ExpressionProduct< ExpressionTranspose< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > >, ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > >, ExpressionOuterProduct< ExpressionInterpolateValue< MeshType, MapEpetra, 3, 3 >, ExpressionInterpolateValue< MeshType, MapEpetra, 3, 3 > > > > isochoricStretch_Type
ExpressionProduct< ExpressionTranspose< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > >, ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > > rightCauchyGreenTensor_Type
double Real
Generic real data.
ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > deformationGradient_Type
ExpressionTrace< ExpressionProduct< ExpressionTranspose< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > >, ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > > > traceTensor_Type
ExpressionDeterminant< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > > determinantTensorF_Type
QuadratureRule - The basis class for storing and accessing quadrature rules.
class ETFESpace A light, templated version of the FESpace
DataElasticStructure - Data container for solid problems with elastic structure.
ExpressionPower< ExpressionDeterminant< ExpressionAddition< ExpressionInterpolateGradient< MeshType, MapEpetra, 3, 3 >, ExpressionMatrix< 3, 3 > > > > powerExpression_Type
uint32_type UInt
generic unsigned integer (used mainly for addressing)