13 #if !defined(KRATOS_COUPLING_NITSCHE_CONDITION_H_INCLUDED )
14 #define KRATOS_COUPLING_NITSCHE_CONDITION_H_INCLUDED
128 GeometryType::Pointer pGeometry)
135 GeometryType::Pointer pGeometry,
136 PropertiesType::Pointer pProperties)
137 :
Condition(NewId, pGeometry, pProperties)
155 GeometryType::Pointer pGeom,
156 PropertiesType::Pointer pProperties
159 return Kratos::make_intrusive<CouplingNitscheCondition>(
160 NewId, pGeom, pProperties);
167 PropertiesType::Pointer pProperties
170 return Kratos::make_intrusive< CouplingNitscheCondition >(
190 CalculateAll(left_hand_side_matrix, rRightHandSideVector,
191 rCurrentProcessInfo,
false,
true);
206 CalculateAll(rLeftHandSideMatrix, right_hand_side_vector,
207 rCurrentProcessInfo,
true,
false);
223 if (rCurrentProcessInfo[BUILD_LEVEL] == 2)
226 rCurrentProcessInfo);
231 rCurrentProcessInfo,
true,
true);
261 const bool CalculateStiffnessMatrixFlag,
262 const bool CalculateResidualVectorFlag
273 Vector& rDeterminantOfJacobian);
281 int Step = 0)
const override;
298 std::string
Info()
const override
300 std::stringstream buffer;
301 buffer <<
"\"CouplingNitscheCondition\" #" <<
Id();
308 rOStream <<
"\"CouplingNitscheCondition\" #" <<
Id();
324 std::vector<array_1d<double, 3>> m_A_ab_covariant_vector_master;
325 std::vector<array_1d<double, 3>> m_A_ab_covariant_vector_slave;
328 Vector m_dA_vector_master;
334 std::vector<Matrix> m_T_vector_master;
335 std::vector<Matrix> m_T_vector_slave;
339 std::vector<Matrix> m_T_hat_vector_master;
340 std::vector<Matrix> m_T_hat_vector_slave;
342 std::vector<array_1d< array_1d<double, 3>,2>> m_reference_contravariant_base_master;
343 std::vector<array_1d< array_1d<double, 3>,2>> m_reference_contravariant_base_slave;
346 std::vector<array_1d<double, 2>> m_n_contravariant_vector_master;
347 std::vector<array_1d<double, 2>> m_n_contravariant_vector_slave;
349 void CalculateKinematics(
351 KinematicVariables& rKinematicVariables,
355 void CalculateTransformation(
356 const KinematicVariables& rKinematicVariables,
360 void CalculateTraction(
363 const KinematicVariables& rActualKinematic,
364 ConstitutiveVariables& rThisConstitutiveVariablesMembrane,
367 void CalculateFirstVariationStressCovariant(
369 Matrix& rFirstVariationStressCovariant,
370 const KinematicVariables& rActualKinematic,
371 ConstitutiveVariables& rThisConstitutiveVariablesMembrane,
374 void CalculateFirstVariationTraction(
376 Matrix& rFirstVariationTraction,
377 Matrix& rFirstVariationStressCovariant,
378 const KinematicVariables& rActualKinematic,
379 ConstitutiveVariables& rThisConstitutiveVariablesMembrane,
382 void CalculateSecondVariationTractionProduct(
385 const KinematicVariables& rActualKinematic,
386 ConstitutiveVariables& rThisConstitutiveVariablesMembrane,
389 void CalculateSecondVariationTraction(
391 Matrix& rSecondVariationTraction,
392 const KinematicVariables& rActualKinematic,
393 Matrix& rFirstVariationStressCovariant,
407 void CalculateConstitutiveVariables(
409 KinematicVariables& rActualMetric,
410 ConstitutiveVariables& rThisConstitutiveVariablesMembrane,
421 void CalculateTransformationPrestress(
422 Matrix& rTransformationPrestress,
423 const KinematicVariables& rActualKinematic
437 virtual void save(
Serializer& rSerializer)
const override
440 rSerializer.
save(
"A_ab_covariant_vector_master", m_A_ab_covariant_vector_master);
441 rSerializer.
save(
"A_ab_covariant_vector_slave", m_A_ab_covariant_vector_slave);
442 rSerializer.
save(
"dA_vector_master", m_dA_vector_master);
443 rSerializer.
save(
"dA_vector_slave", m_dA_vector_slave);
444 rSerializer.
save(
"T_vector_master", m_T_vector_master);
445 rSerializer.
save(
"T_vector_slave", m_T_vector_slave);
446 rSerializer.
save(
"reference_contravariant_base_master", m_reference_contravariant_base_master);
447 rSerializer.
save(
"reference_contravariant_base_slave", m_reference_contravariant_base_slave);
453 rSerializer.
load(
"A_ab_covariant_vector_master", m_A_ab_covariant_vector_master);
454 rSerializer.
load(
"A_ab_covariant_vector_slave", m_A_ab_covariant_vector_slave);
455 rSerializer.
load(
"dA_vector_master", m_dA_vector_master);
456 rSerializer.
load(
"dA_vector_slave", m_dA_vector_slave);
457 rSerializer.
load(
"T_vector_master", m_T_vector_master);
458 rSerializer.
load(
"T_vector_slave", m_T_vector_slave);
459 rSerializer.
load(
"reference_contravariant_base_master", m_reference_contravariant_base_master);
460 rSerializer.
load(
"reference_contravariant_base_slave", m_reference_contravariant_base_slave);
Base class for all Conditions.
Definition: condition.h:59
std::size_t SizeType
Definition: condition.h:94
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
Matrix MatrixType
Definition: condition.h:90
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
StressMeasure
Definition: constitutive_law.h:69
Nitsche factor based coupling condition.
Definition: coupling_nitsche_condition.h:40
Condition::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create with Id, pointer to geometry and pointer to property.
Definition: coupling_nitsche_condition.h:153
std::string Info() const override
Turn back information as a string.
Definition: coupling_nitsche_condition.h:298
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
This is called during the assembling process in order to calculate the condition left hand side matri...
Definition: coupling_nitsche_condition.h:200
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Sets on rResult the ID's of the element degrees of freedom.
Definition: coupling_nitsche_condition.cpp:1337
void CalculateNitscheStabilizationMatrix(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: coupling_nitsche_condition.cpp:669
CouplingNitscheCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor with Id and geometry.
Definition: coupling_nitsche_condition.h:126
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
This function provides a more general interface to the element.
Definition: coupling_nitsche_condition.h:218
CouplingNitscheCondition()
Default constructor.
Definition: coupling_nitsche_condition.h:141
void DeterminantOfJacobianInitial(const GeometryType &rGeometry, Vector &rDeterminantOfJacobian)
Definition: coupling_nitsche_condition.cpp:630
std::size_t SizeType
Size types.
Definition: coupling_nitsche_condition.h:118
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create with Id, pointer to geometry and pointer to property.
Definition: coupling_nitsche_condition.h:164
std::size_t IndexType
Definition: coupling_nitsche_condition.h:119
KRATOS_CLASS_POINTER_DEFINITION(CouplingNitscheCondition)
Counted pointer of CouplingNitscheCondition.
void CalculateAll(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo, const bool CalculateStiffnessMatrixFlag, const bool CalculateResidualVectorFlag)
Calculates left (K) and right (u) hand sides.
Definition: coupling_nitsche_condition.cpp:290
PatchType
Definition: coupling_nitsche_condition.h:288
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: coupling_nitsche_condition.h:306
void GetValuesVector(Vector &rValues, int Step=0) const override
Definition: coupling_nitsche_condition.cpp:1302
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Sets on rElementalDofList the degrees of freedom of the considered element geometry.
Definition: coupling_nitsche_condition.cpp:1371
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
This is called during the assembling process in order to calculate the condition right hand side matr...
Definition: coupling_nitsche_condition.h:184
virtual ~CouplingNitscheCondition()=default
Destructor.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: coupling_nitsche_condition.h:312
ConfigurationType
Definition: coupling_nitsche_condition.h:283
CouplingNitscheCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor with Id, geometry and property.
Definition: coupling_nitsche_condition.h:133
std::size_t IndexType
Definition: flags.h:74
GeometryType::Pointer pGetGeometry()
Returns the pointer to the geometry.
Definition: geometrical_object.h:140
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
IndexType Id() const
Definition: indexed_object.h:107
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
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
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
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:189
Definition: coupling_nitsche_condition.h:94
ConstitutiveVariables(SizeType StrainSize)
Definition: coupling_nitsche_condition.h:102
Vector StrainVector
Definition: coupling_nitsche_condition.h:95
Matrix ConstitutiveMatrix
Definition: coupling_nitsche_condition.h:97
Vector StressVector
Definition: coupling_nitsche_condition.h:96
Internal variables used for metric transformation.
Definition: coupling_nitsche_condition.h:45
array_1d< double, 3 > a2
Definition: coupling_nitsche_condition.h:52
KinematicVariables(SizeType Dimension)
Definition: coupling_nitsche_condition.h:72
array_1d< double, 3 > a1
Definition: coupling_nitsche_condition.h:50
array_1d< double, 3 > t
Definition: coupling_nitsche_condition.h:62
array_1d< double, 3 > a3
Definition: coupling_nitsche_condition.h:54
array_1d< double, 3 > a_ab_covariant
Definition: coupling_nitsche_condition.h:47
array_1d< double, 2 > n_contravariant
Definition: coupling_nitsche_condition.h:66
double dA
Definition: coupling_nitsche_condition.h:59
array_1d< double, 3 > a3_tilde
Definition: coupling_nitsche_condition.h:56
array_1d< double, 3 > n
Definition: coupling_nitsche_condition.h:64