14 #ifndef KRATOS_STOKES_WALL_CONDITION_H
15 #define KRATOS_STOKES_WALL_CONDITION_H
66 template<
unsigned int TDim,
unsigned int TNumNodes = TDim >
128 GeometryType::Pointer pGeometry):
140 GeometryType::Pointer pGeometry,
141 PropertiesType::Pointer pProperties):
180 return Kratos::make_intrusive<StokesWallCondition>(NewId,
GetGeometry().
Create(ThisNodes), pProperties);
190 Condition::Pointer
Create(
IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties)
const override {
191 return Kratos::make_intrusive< StokesWallCondition >(NewId, pGeom, pProperties);
204 const SizeType BlockSize = TDim + 1;
205 const SizeType LocalSize = BlockSize * TNumNodes;
207 if (rLeftHandSideMatrix.size1() != LocalSize)
208 rLeftHandSideMatrix.
resize(LocalSize,LocalSize);
210 if (rRightHandSideVector.size() != LocalSize)
211 rRightHandSideVector.
resize(LocalSize);
216 if( this->
Is(OUTLET) )
230 const SizeType BlockSize = TDim + 1;
231 const SizeType LocalSize = BlockSize * TNumNodes;
233 if (rLeftHandSideMatrix.size1() != LocalSize)
234 rLeftHandSideMatrix.
resize(LocalSize,LocalSize);
247 const SizeType BlockSize = TDim + 1;
248 const SizeType LocalSize = BlockSize * TNumNodes;
250 if (rRightHandSideVector.size() != LocalSize)
251 rRightHandSideVector.
resize(LocalSize);
255 if( this->
Is(OUTLET) )
281 if(this->
GetGeometry()[
i].SolutionStepsDataHas(VELOCITY) ==
false)
283 if(this->
GetGeometry()[
i].SolutionStepsDataHas(PRESSURE) ==
false)
285 if(this->
GetGeometry()[
i].SolutionStepsDataHas(EXTERNAL_PRESSURE) ==
false)
287 if(this->
GetGeometry()[
i].HasDofFor(VELOCITY_X) ==
false ||
288 this->
GetGeometry()[
i].HasDofFor(VELOCITY_Y) ==
false ||
308 EquationIdVectorType& rResult,
309 const ProcessInfo& rCurrentProcessInfo)
const override;
319 const ProcessInfo& CurrentProcessInfo)
const override;
337 std::string
Info()
const override
339 std::stringstream buffer;
340 buffer <<
"StokesWallCondition" << TDim <<
"D";
347 rOStream <<
"StokesWallCondition";
351 void PrintData(std::ostream& rOStream)
const override {}
417 void save(
Serializer& rSerializer)
const override
469 template<
unsigned int TDim,
unsigned int TNumNodes >
477 template<
unsigned int TDim,
unsigned int TNumNodes >
482 rOStream << std::endl;
Base class for all Conditions.
Definition: condition.h:59
std::size_t SizeType
Definition: condition.h:94
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
virtual int Check(const ProcessInfo &rCurrentProcessInfo) const
Definition: condition.h:854
Condition & operator=(Condition const &rOther)
Assignment operator.
Definition: condition.h:181
std::size_t IndexType
Definition: flags.h:74
bool Is(Flags const &rOther) const
Definition: flags.h:274
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 const & Id() const
Id of this Geometry.
Definition: geometry.h:964
This object defines an indexed object.
Definition: indexed_object.h:54
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Implements a wall condition for the monolithic stokes formulation - based on BDF2.
Definition: stokes_wall_condition.h:68
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: stokes_wall_condition.h:96
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: stokes_wall_condition.h:345
~StokesWallCondition() override
Destructor.
Definition: stokes_wall_condition.h:153
Vector VectorType
Definition: stokes_wall_condition.h:84
Geometry< NodeType > GeometryType
Definition: stokes_wall_condition.h:80
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: stokes_wall_condition.h:94
StokesWallCondition(IndexType NewId=0)
Default constructor.
Definition: stokes_wall_condition.h:106
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Return a matrix of the correct size, filled with zeros (for compatibility with time schemes).
Definition: stokes_wall_condition.h:226
void GetDofList(DofsVectorType &ConditionDofList, const ProcessInfo &CurrentProcessInfo) const override
Returns a list of the element's Dofs.
StokesWallCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: stokes_wall_condition.h:139
Properties PropertiesType
Definition: stokes_wall_condition.h:78
std::vector< std::size_t > EquationIdVectorType
Definition: stokes_wall_condition.h:92
std::string Info() const override
Turn back information as a string.
Definition: stokes_wall_condition.h:337
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Check that all data required by this condition is available and reasonable.
Definition: stokes_wall_condition.h:265
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new StokesWallCondition object.
Definition: stokes_wall_condition.h:178
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition: stokes_wall_condition.h:82
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(StokesWallCondition)
Pointer definition of StokesWallCondition.
Matrix MatrixType
Definition: stokes_wall_condition.h:86
StokesWallCondition(StokesWallCondition const &rOther)
Copy constructor.
Definition: stokes_wall_condition.h:147
StokesWallCondition(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: stokes_wall_condition.h:116
Node NodeType
Definition: stokes_wall_condition.h:76
void ApplyNeumannCondition(MatrixType &rLocalMatrix, VectorType &rLocalVector)
Definition: stokes_wall_condition.cpp:156
StokesWallCondition & operator=(StokesWallCondition const &rOther)
Assignment operator.
Definition: stokes_wall_condition.h:161
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Return local right hand side of the correct size, filled with zeros (for compatibility with time sche...
Definition: stokes_wall_condition.h:243
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: stokes_wall_condition.h:351
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Provides the global indices for each one of this element's local rows.
std::size_t SizeType
Definition: stokes_wall_condition.h:90
Condition::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create a new StokesWallCondition object.
Definition: stokes_wall_condition.h:190
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Return local contributions of the correct size, filled with zeros (for compatibility with time scheme...
Definition: stokes_wall_condition.h:199
StokesWallCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: stokes_wall_condition.h:127
std::size_t IndexType
Definition: stokes_wall_condition.h:88
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#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
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
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
tuple tmp
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:98
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17