1 #if !defined(KRATOS_SHELL_5p_HIERARCHIC_ELEMENT_H_INCLUDED)
2 #define KRATOS_SHELL_5p_HIERARCHIC_ELEMENT_H_INCLUDED
43 :
Element(NewId, pGeometry, pProperties)
60 GeometryType::Pointer pGeom,
61 PropertiesType::Pointer pProperties
64 return Kratos::make_intrusive<Shell5pHierarchicElement>(
65 NewId, pGeom, pProperties);
72 PropertiesType::Pointer pProperties
75 KRATOS_ERROR <<
"Can not construct Shell5pHierarchicElement with NodesArrayType, because "
76 <<
"it is based on high order background with QuadraturePointGeometries. "
77 <<
"QuadraturePointGeometries would loose their evaluated shape function within this constructor."
103 const bool CalculateStiffnessMatrixFlag,
104 const bool CalculateResidualVectorFlag
126 const bool CalculateStiffnessMatrixFlag =
false;
127 const bool CalculateResidualVectorFlag =
true;
131 SizeType mat_size = number_of_control_points * 5;
134 if (rRightHandSideVector.size() != mat_size)
135 rRightHandSideVector.
resize(mat_size);
138 CalculateAll(
temp, rRightHandSideVector, rCurrentProcessInfo, CalculateStiffnessMatrixFlag, CalculateResidualVectorFlag);
146 const bool CalculateStiffnessMatrixFlag =
true;
147 const bool CalculateResidualVectorFlag =
false;
151 SizeType mat_size = number_of_control_points * 5;
154 if (rLeftHandSideMatrix.size1() != mat_size || rLeftHandSideMatrix.size2() != mat_size)
155 rLeftHandSideMatrix.
resize(mat_size, mat_size);
158 CalculateAll(rLeftHandSideMatrix,
temp, rCurrentProcessInfo, CalculateStiffnessMatrixFlag, CalculateResidualVectorFlag);
169 const bool CalculateStiffnessMatrixFlag =
true;
170 const bool CalculateResidualVectorFlag =
true;
173 SizeType mat_size = number_of_control_points * 5;
176 if (rLeftHandSideMatrix.size1() != mat_size || rLeftHandSideMatrix.size2() != mat_size)
177 rLeftHandSideMatrix.
resize(mat_size, mat_size);
181 if (rRightHandSideVector.size() != mat_size)
182 rRightHandSideVector.
resize(mat_size);
185 CalculateAll(rLeftHandSideMatrix, rRightHandSideVector, rCurrentProcessInfo, CalculateStiffnessMatrixFlag, CalculateResidualVectorFlag);
191 std::vector<double>& rOutput,
203 const ProcessInfo& rCurrentProcessInfo)
const override;
205 std::string
Info()
const override
207 std::stringstream buffer;
208 buffer <<
"Hierarchic 5p Shell #" <<
Id();
215 rOStream <<
"Hierarchic 5p Shell #" <<
Id();
226 std::vector<ConstitutiveLaw::Pointer> mConstitutiveLawVector;
232 Matrix mInitialTransConToCar;
235 struct MetricVariables
244 Vector a3_kirchhoff_love_tilde;
257 MetricVariables(
const unsigned int& rWorkingSpaceDimension = 3,
const unsigned int& rStrainSize = 5)
260 a_ab_con =
ZeroVector(rWorkingSpaceDimension);
262 curvature =
ZeroVector(rWorkingSpaceDimension);
268 a3_kirchhoff_love =
ZeroVector(rWorkingSpaceDimension);
269 a3_kirchhoff_love_tilde =
ZeroVector(rWorkingSpaceDimension);
280 H =
ZeroMatrix(rWorkingSpaceDimension, rWorkingSpaceDimension);
285 struct ConstitutiveVariables
294 ConstitutiveVariables(
const unsigned int& rStrainSize)
303 struct SecondVariations
312 SecondVariations(
const unsigned int& mat_size)
322 SecondVariations
operator+ (
const SecondVariations& rSecondVariations)
326 KRATOS_ERROR_IF(B11.size1() != rSecondVariations.B11.size1()) <<
"Addition of SecondVariations of different size." << std::endl;
328 unsigned int mat_size = B11.size1();
329 SecondVariations second_variations(mat_size);
330 second_variations.B11 = B11 + rSecondVariations.B11;
331 second_variations.B22 = B22 + rSecondVariations.B22;
332 second_variations.B12 = B12 + rSecondVariations.B12;
333 second_variations.B23 = B23 + rSecondVariations.B23;
334 second_variations.B13 = B13 + rSecondVariations.B13;
336 return second_variations;
342 MetricVariables mInitialMetric = MetricVariables(3, 5);
345 struct GaussQuadratureThickness
347 unsigned int num_GP_thickness;
348 Vector integration_weight_thickness;
352 GaussQuadratureThickness(){}
354 GaussQuadratureThickness(
const unsigned int& rNumGPThickness)
356 num_GP_thickness = rNumGPThickness;
357 integration_weight_thickness =
ZeroVector(rNumGPThickness);
360 if (rNumGPThickness == 3)
362 integration_weight_thickness(0) = 5.0 / 9.0;
363 zeta(0) = -sqrt(3.0 / 5.0);
364 integration_weight_thickness(1) = 8.0/9.0;
366 integration_weight_thickness(2) = 5.0 / 9.0;
367 zeta(2) = sqrt(3.0 / 5.0);
371 KRATOS_ERROR <<
"Desired number of Gauss-Points unlogical or not implemented. You can choose 3 Gauss-Points." << std::endl;
378 GaussQuadratureThickness mGaussIntegrationThickness = GaussQuadratureThickness(3);
389 void CalculateAndAddKm(
393 const double& rIntegrationWeight );
398 void CalculateAndAddNonlinearKm(
399 Matrix& rLeftHandSideMatrix,
400 const SecondVariations& SecondVariationsStrain,
402 const double& rIntegrationWeight);
405 void CalculateMetric( MetricVariables& rMetric);
411 void CalculateTransformationMatrixInitialTransConToCar(
412 const array_1d<double, 3>& rG1_con,
413 const array_1d<double, 3>& rG2_con);
418 void CalculateTransformationMatrixInitialTransCarToCov(
Matrix& rInitialTransCarToCov);
427 void CalculateTransformationMatrixActualTransCovToCar(
428 Matrix& rActualTransCovToCar,
433 const Vector& ra3_kirchhoff_love);
443 void CalculateShearDifferenceVector(
444 array_1d<double, 3>& rw,
445 array_1d<double, 3>& rDw_D1,
446 array_1d<double, 3>& rDw_D2,
447 array_1d<double, 2>& rw_alpha,
449 const MetricVariables& rActualMetric,
459 void CalculateInitialBaseVectorsLinearised(
460 array_1d<double, 3>& rG1,
461 array_1d<double, 3>& rG2,
462 array_1d<double, 3>& rG1_con,
463 array_1d<double, 3>& rG2_con);
474 void CalculateActualBaseVectorsLinearised(
475 const MetricVariables& rActualMetric,
479 array_1d<double, 3>& rg1,
480 array_1d<double, 3>& rg2,
481 array_1d<double, 3>& rg3);
489 void CalculateDeformationGradient(
490 const array_1d<double, 3> rG1,
491 const array_1d<double, 3> rG2,
492 const array_1d<double, 3> rg1,
493 const array_1d<double, 3> rg2,
494 const array_1d<double, 3> rg3,
507 void CalculateConstitutiveVariables(
508 const MetricVariables& rActualMetric,
512 ConstitutiveVariables& rThisConstitutiveVariables,
513 ConstitutiveLaw::Parameters& rValues,
519 void CalculateStrain(
520 array_1d<double, 5>& rStrainVector,
522 const Vector& rCurvature);
529 void CalculateStrainReissnerMindlin(
530 array_1d<double, 5>& rStrainVectorReissnerMindlin,
538 void TransformationCurvilinearStrainSize5ToCartesianStrainSize6(
539 const Vector& rCurvilinearStrain,
540 Vector& rCartesianStrain);
547 const MetricVariables& rActualMetric,
551 void CalculateSecondVariations(
552 SecondVariations& rSecondVariations,
553 const MetricVariables& rActualMetric,
563 void CalculateVariationsReissnerMindlin(
565 SecondVariations& rSecondVariations,
570 const Matrix& rDw_alpha_Dbeta,
571 const MetricVariables& rActualMetric,
572 const bool& rCalculateStiffnessMatrixFlag,
580 virtual void InitializeMaterial();
583 void CalculateHessian(
592 void save(
Serializer& rSerializer)
const override
StressMeasure
Definition: constitutive_law.h:69
Base class for all Elements.
Definition: element.h:60
std::size_t SizeType
Definition: element.h:94
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
Matrix MatrixType
Definition: element.h:90
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: element.h:92
std::size_t IndexType
Definition: flags.h:74
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
SizeType size() const
Definition: geometry.h:518
IndexType Id() const
Definition: indexed_object.h:107
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: shell_5p_hierarchic_element.h:24
std::string Info() const override
Turn back information as a string.
Definition: shell_5p_hierarchic_element.h:205
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Calls CalculateAll.
Definition: shell_5p_hierarchic_element.h:162
void CalculateOnIntegrationPoints(const Variable< double > &rVariable, std::vector< double > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Stress recovery.
Definition: shell_5p_hierarchic_element.cpp:1087
Shell5pHierarchicElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using an array of nodes with properties.
Definition: shell_5p_hierarchic_element.h:42
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create with GeometryType::Pointer.
Definition: shell_5p_hierarchic_element.h:58
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create with NodesArrayType.
Definition: shell_5p_hierarchic_element.h:69
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: shell_5p_hierarchic_element.cpp:1305
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Calls CalculateAll without computing ResidualVector.
Definition: shell_5p_hierarchic_element.h:142
Shell5pHierarchicElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using an array of nodes.
Definition: shell_5p_hierarchic_element.h:37
void CalculateAll(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo, const bool CalculateStiffnessMatrixFlag, const bool CalculateResidualVectorFlag)
Definition: shell_5p_hierarchic_element.cpp:74
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
returns dof list
Definition: shell_5p_hierarchic_element.cpp:1279
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(Shell5pHierarchicElement)
Counted pointer of Shell5pHierarchicElement.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: shell_5p_hierarchic_element.h:213
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Sets on rResult the ID's of the element degrees of freedom.
Definition: shell_5p_hierarchic_element.cpp:1252
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Calls CalculateAll without computing StiffnessMatrix.
Definition: shell_5p_hierarchic_element.h:120
Shell5pHierarchicElement()
default constructor
Definition: shell_5p_hierarchic_element.h:47
virtual ~Shell5pHierarchicElement() override
Destructor.
Definition: shell_5p_hierarchic_element.h:50
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: shell_5p_hierarchic_element.cpp:39
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
Expression::Pointer operator+(const Expression::ConstPointer &rpLeft, const double Right)
H
Definition: generate_droplet_dynamics.py:257
E
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:26
S
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:39
def load(f)
Definition: ode_solve.py:307
float temp
Definition: rotating_cone.py:85
J
Definition: sensitivityMatrix.py:58
B
Definition: sensitivityMatrix.py:76