11 #if !defined(KRATOS_SUPPORT_PENALTY_CONDITION_H_INCLUDED )
12 #define KRATOS_SUPPORT_PENALTY_CONDITION_H_INCLUDED
48 GeometryType::Pointer pGeometry)
55 GeometryType::Pointer pGeometry,
56 PropertiesType::Pointer pProperties)
57 :
Condition(NewId, pGeometry, pProperties)
75 GeometryType::Pointer pGeom,
76 PropertiesType::Pointer pProperties
79 return Kratos::make_intrusive<SupportPenaltyCondition>(
80 NewId, pGeom, pProperties);
87 PropertiesType::Pointer pProperties
90 return Kratos::make_intrusive<SupportPenaltyCondition>(
110 if (rRightHandSideVector.size() != mat_size)
111 rRightHandSideVector.
resize(mat_size);
116 CalculateAll(left_hand_side_matrix, rRightHandSideVector,
117 rCurrentProcessInfo,
false,
true);
134 if (rLeftHandSideMatrix.size1() != mat_size && rLeftHandSideMatrix.size2())
135 rLeftHandSideMatrix.
resize(mat_size, mat_size);
138 CalculateAll(rLeftHandSideMatrix, right_hand_side_vector,
139 rCurrentProcessInfo,
true,
false);
157 if (rRightHandSideVector.size() != mat_size)
158 rRightHandSideVector.
resize(mat_size);
161 if (rLeftHandSideMatrix.size1() != mat_size)
162 rLeftHandSideMatrix.
resize(mat_size, mat_size);
166 rCurrentProcessInfo,
true,
true);
194 const bool CalculateStiffnessMatrixFlag,
195 const bool CalculateResidualVectorFlag
200 Vector& rDeterminantOfJacobian);
214 std::string
Info()
const override
216 std::stringstream buffer;
217 buffer <<
"\"SupportPenaltyCondition\" #" <<
Id();
224 rOStream <<
"\"SupportPenaltyCondition\" #" <<
Id();
241 virtual void save(
Serializer& rSerializer)
const override
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
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
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
Condition for penalty support condition.
Definition: support_penalty_condition.h:29
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SupportPenaltyCondition)
Counted pointer definition of SupportPenaltyCondition.
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
This function provides a more general interface to the element.
Definition: support_penalty_condition.h:150
Condition::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create with Id, pointer to geometry and pointer to property.
Definition: support_penalty_condition.h:73
std::size_t SizeType
Size types.
Definition: support_penalty_condition.h:38
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: support_penalty_condition.h:228
SupportPenaltyCondition()
Default constructor.
Definition: support_penalty_condition.h:61
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: support_penalty_condition.h:104
void CalculateAll(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo, const bool CalculateStiffnessMatrixFlag, const bool CalculateResidualVectorFlag)
Calculates left (K) and right (u) hand sides, according to the flags.
Definition: support_penalty_condition.cpp:23
SupportPenaltyCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor with Id, geometry and property.
Definition: support_penalty_condition.h:53
virtual ~SupportPenaltyCondition() override
Destructor.
Definition: support_penalty_condition.h:65
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Performs check if Penalty factor is provided.
Definition: support_penalty_condition.cpp:133
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: support_penalty_condition.h:126
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: support_penalty_condition.h:222
SupportPenaltyCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor with Id and geometry.
Definition: support_penalty_condition.h:46
std::size_t IndexType
Definition: support_penalty_condition.h:39
std::string Info() const override
Turn back information as a string.
Definition: support_penalty_condition.h:214
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create with Id, pointer to geometry and pointer to property.
Definition: support_penalty_condition.h:84
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Sets on rResult the ID's of the element degrees of freedom.
Definition: support_penalty_condition.cpp:140
void DeterminantOfJacobianInitial(const GeometryType &rGeometry, Vector &rDeterminantOfJacobian)
Definition: support_penalty_condition.cpp:95
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Sets on rConditionDofList the degrees of freedom of the considered element geometry.
Definition: support_penalty_condition.cpp:160
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
def load(f)
Definition: ode_solve.py:307