1 #ifndef KRATOS_STATIONARY_STOKES_H
2 #define KRATOS_STATIONARY_STOKES_H
42 #ifndef KRATOS_FLUID_TAYLOR_HOOD_H
43 #define KRATOS_FLUID_TAYLOR_HOOD_H
86 template<
unsigned int TDim >
121 Element(NewId, pGeometry, pProperties)
147 Element::Pointer
Create(
IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties)
const override;
194 std::string
Info()
const override
196 std::stringstream buffer;
206 rOStream <<
"Integration method: " <<
static_cast<int>(this->mIntegrationMethod);
213 rOStream <<
"Geometry Data: " << std::endl;
246 const double Density,
247 const double Viscosity,
252 const double Weigth);
256 const double Density,
261 const double Weight);
263 template<
class TVariableType >
269 rResult = rShapeFunc[0] * rGeom[0].FastGetSolutionStepValue(Var);
273 rResult += rShapeFunc[
i] * rGeom[
i].FastGetSolutionStepValue(Var);
279 const double DynViscosity);
313 std::vector< ShapeDerivativesType > mDN_DX;
316 std::vector< double > mGaussWeight;
324 void save(
Serializer& rSerializer)
const override
329 unsigned int IntMethod = 0;
330 switch(mIntegrationMethod)
348 KRATOS_ERROR <<
"Unknown integration method encountered on serializer save for StationaryStokes element: " <<
static_cast<int>(mIntegrationMethod) << std::endl;
351 rSerializer.
save(
"IntMethod",IntMethod);
352 rSerializer.
save(
"mDN_DX",mDN_DX);
353 rSerializer.
save(
"mGaussWeight",mGaussWeight);
362 unsigned int IntMethod = 0;
363 rSerializer.load(
"IntMethod",IntMethod);
364 switch(
static_cast<int>(mIntegrationMethod))
382 KRATOS_ERROR <<
"Unknown integration method encountered on serializer load for StationaryStokes element: " <<
static_cast<int>(IntMethod);
385 rSerializer.load(
"mDN_DX",mDN_DX);
386 rSerializer.load(
"mGaussWeight",mGaussWeight);
437 template<
unsigned int TDim >
445 template<
unsigned int TDim >
450 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Elements.
Definition: element.h:60
std::size_t SizeType
Definition: element.h:94
Element(IndexType NewId=0)
Definition: element.h:121
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: flags.h:74
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
IntegrationMethod
Definition: geometry_data.h:76
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: geometry.h:3834
SizeType WorkingSpaceDimension() const
Definition: geometry.h:1287
IndexType Id() const
Definition: indexed_object.h:107
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 save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
GLS-stabilized element for the solution of the stationary Stokes problem.
Definition: stationary_stokes.h:88
void EquationIdVector(Element::EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Fill given vector with the linear system row index for the element's degrees of freedom.
Definition: stationary_stokes.cpp:179
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new StationaryStokes element and return a pointer to it.
Definition: stationary_stokes.cpp:8
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Check that all required data containers are properly initialized and registered in Kratos.
Definition: stationary_stokes.cpp:20
void GetFirstDerivativesVector(Vector &rValues, int Step=0) const override
Definition: stationary_stokes.cpp:201
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: stationary_stokes.h:210
Kratos::Geometry< Node > GeometryType
Type for geometry calls.
Definition: stationary_stokes.h:103
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(StationaryStokes)
Pointer definition of StationaryStokes.
StationaryStokes(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a Geometry instance.
Definition: stationary_stokes.h:115
void EvaluateInPoint(TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc, GeometryType &rGeom)
Definition: stationary_stokes.h:264
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: stationary_stokes.h:202
StationaryStokes(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using geometry and properties.
Definition: stationary_stokes.h:120
void AddContinuityTerms(MatrixType &rLHS, VectorType &rRHS, const double Density, const array_1d< double, 3 > &BodyForce, const double TauOne, const ShapeFunctionsType &N, const ShapeDerivativesType &DN_DX, const double Weight)
Definition: stationary_stokes.cpp:274
StationaryStokes(IndexType NewId=0)
Default constructor.
Definition: stationary_stokes.h:110
Kratos::Vector ShapeFunctionsType
Type for shape function values container.
Definition: stationary_stokes.h:97
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Evaluate the elemental contribution to the problem.
Definition: stationary_stokes.cpp:96
Kratos::Matrix ShapeDerivativesType
Type for shape function derivatives container.
Definition: stationary_stokes.h:100
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: stationary_stokes.h:165
void AddMomentumTerms(MatrixType &rLHS, VectorType &rRHS, const double Density, const double Viscosity, const array_1d< double, 3 > &BodyForce, const double TauTwo, const ShapeFunctionsType &N, const ShapeDerivativesType &DN_DX, const double Weigth)
Definition: stationary_stokes.cpp:222
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create a new element of this type.
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Fill given array with containing the element's degrees of freedom.
Definition: stationary_stokes.cpp:156
friend class Serializer
Definition: stationary_stokes.h:322
~StationaryStokes() override
Destructor.
Definition: stationary_stokes.h:125
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Calculate Shape function derivatives and Jacobian at each integration point.
Definition: stationary_stokes.cpp:54
virtual void CalculateTau(double &TauOne, double &TauTwo, const double DynViscosity)
Definition: stationary_stokes.cpp:321
std::string Info() const override
Turn back information as a string.
Definition: stationary_stokes.h:194
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#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
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
#define KRATOS_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17