13 #ifndef KRATOS_FLUID_ELEMENT_H
14 #define KRATOS_FLUID_ELEMENT_H
55 template <
class TElementData,
bool TDataKnowsAboutTimeIntegration>
56 class FluidElementTimeIntegrationDetail;
59 template <
class TElementData>
105 static constexpr
unsigned int Dim = TElementData::Dim;
107 static constexpr
unsigned int NumNodes = TElementData::NumNodes;
113 static constexpr
unsigned int StrainSize = TElementData::StrainSize;
172 Properties::Pointer pProperties)
const override;
183 GeometryType::Pointer pGeom,
184 Properties::Pointer pProperties)
const override;
254 const ProcessInfo& rCurrentProcessInfo)
const override;
263 const ProcessInfo& rCurrentProcessInfo)
const override;
301 std::vector<double>& rValues,
311 std::vector<Vector>& rValues,
316 std::vector<Matrix>& rValues,
330 std::string
Info()
const override;
334 void PrintInfo(std::ostream& rOStream)
const override;
372 const typename TElementData::NodalScalarData& rValues,
373 const typename TElementData::ShapeFunctionsType& rN)
const;
383 const typename TElementData::NodalVectorData& rValues,
384 const typename TElementData::ShapeFunctionsType& rN)
const;
394 const typename TElementData::NodalTensorData &rValues,
395 const typename TElementData::ShapeFunctionsType &rN)
const;
406 const typename TElementData::ShapeFunctionsType& rN)
const;
416 unsigned int IntegrationPointIndex,
418 const typename TElementData::MatrixRowType& rN,
419 const typename TElementData::ShapeDerivativesType& rDN_DX)
const;
486 const Vector& rUnitNormal,
491 const TElementData& rData,
544 ConstitutiveLaw::Pointer mpConstitutiveLaw =
nullptr;
558 void save(Serializer& rSerializer)
const override;
560 void
load(Serializer& rSerializer) override;
597 namespace Internals {
599 template<
class TElementData, std::
size_t TDim >
609 const typename TElementData::NodalVectorData& rVelocities,
610 const typename TElementData::ShapeDerivativesType& rDNDX);
613 template<
class TElementData >
617 const typename TElementData::NodalVectorData& rVelocities,
618 const typename TElementData::ShapeDerivativesType& rDNDX);
621 template<
class TElementData >
625 const typename TElementData::NodalVectorData& rVelocities,
626 const typename TElementData::ShapeDerivativesType& rDNDX);
643 template<
class TElementData >
651 template<
class TElementData >
656 rOStream << std::endl;
Base class for all Elements.
Definition: element.h:60
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: flags.h:74
Large Displacement Lagrangian Element for 3D and 2D geometries. (base class)
Definition: fluid_element.h:61
virtual ~FluidElement()
Destructor.
Definition: fluid_element.cpp:60
virtual void AddTimeIntegratedRHS(TElementData &rData, VectorType &rRHS)
Definition: fluid_element.cpp:764
GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
Type for an array of shape function gradient matrices.
Definition: fluid_element.h:101
virtual void CalculateMaterialResponse(TElementData &rData) const
Definition: fluid_element.cpp:594
GeometryData::IntegrationMethod GetIntegrationMethod() const override
GetIntegrationMethod Return the integration order to be used.
Definition: fluid_element.cpp:366
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
EquationIdVector Returns the global system rows corresponding to each local row.
Definition: fluid_element.cpp:281
virtual double GetAtCoordinate(const typename TElementData::NodalScalarData &rValues, const typename TElementData::ShapeFunctionsType &rN) const
Get information from TElementData at a given point.
Definition: fluid_element.cpp:529
FluidElement()
Empty constructor needed for serialization.
Definition: fluid_element.cpp:33
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, Properties::Pointer pProperties) const override
Create a new element of this type.
virtual void AddMassLHS(TElementData &rData, MatrixType &rMassMatrix)
Definition: fluid_element.cpp:792
Vector VectorType
Vector type for local contributions to the linear system.
Definition: fluid_element.h:79
virtual void CalculateStrainRate(TElementData &rData) const
Calculate and save the strain rate in the data container This method calculates the strain rate with ...
Definition: fluid_element.cpp:613
std::size_t SizeType
Definition: fluid_element.h:86
static constexpr unsigned int Dim
Definition: fluid_element.h:105
FluidElement(IndexType NewId, GeometryType::Pointer pGeometry, Properties::Pointer pProperties)
Constuctor using geometry and properties.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: fluid_element.cpp:519
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: fluid_element.h:90
static constexpr unsigned int NumNodes
Definition: fluid_element.h:107
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
GetDofList Returns a list of the element's Dofs.
Definition: fluid_element.cpp:304
const ConstitutiveLaw::Pointer GetConstitutiveLaw() const
Definition: fluid_element.cpp:841
MatrixRow< Matrix > ShapeFunctionsType
Type for shape function values container.
Definition: fluid_element.h:95
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(FluidElement)
Pointer definition of FluidElement.
std::string Info() const override
Turn back information as a string.
Definition: fluid_element.cpp:510
Matrix MatrixType
Matrix type for local contributions to the linear system.
Definition: fluid_element.h:82
Kratos::Matrix ShapeFunctionDerivativesType
Type for a matrix containing the shape function gradients.
Definition: fluid_element.h:98
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
CalculateLocalSystem Return empty matrices and vectors of appropriate size. This element does not hav...
Definition: fluid_element.cpp:105
static constexpr unsigned int LocalSize
Definition: fluid_element.h:111
void GetFirstDerivativesVector(Vector &Values, int Step=0) const override
GetFirstDerivativesVector Returns VELOCITY_X, VELOCITY_Y, (VELOCITY_Z,) PRESSURE for each node.
Definition: fluid_element.cpp:327
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: fluid_element.h:92
void CalculateOnIntegrationPoints(Variable< array_1d< double, 3 >> const &rVariable, std::vector< array_1d< double, 3 >> &rValues, ProcessInfo const &rCurrentProcessInfo) override
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Set up the element for solution.
Definition: fluid_element.cpp:83
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
CalculateRightHandSide Return an empty matrix of appropriate size. This element does not have a local...
Definition: fluid_element.cpp:178
void ConvectionOperator(Vector &rResult, const array_1d< double, 3 > &rConvVel, const ShapeFunctionDerivativesType &DN_DX) const
Write the convective operator evaluated at this point (for each nodal funciton) to an array Evaluate ...
Definition: fluid_element.cpp:723
static constexpr unsigned int BlockSize
Definition: fluid_element.h:109
void CalculateMassMatrix(MatrixType &rMassMatrix, const ProcessInfo &rCurrentProcessInfo) override
MassMatrix Calculate the local mass matrix.
Definition: fluid_element.cpp:248
virtual void CalculateGeometryData(Vector &rGaussWeights, Matrix &rNContainer, ShapeFunctionDerivativesArrayType &rDN_DX) const
Determine integration point weights and shape funcition derivatives from the element's geometry.
Definition: fluid_element.cpp:622
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: fluid_element.h:76
std::vector< std::size_t > EquationIdVectorType
Definition: fluid_element.h:88
Geometry< NodeType > GeometryType
Geometry type (using with given NodeType)
Definition: fluid_element.h:73
std::size_t IndexType
Definition: fluid_element.h:84
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
CalculateLeftHandSide Return an empty matrix of appropriate size. This element does not have a local ...
Definition: fluid_element.cpp:145
void Calculate(const Variable< double > &rVariable, double &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: fluid_element.cpp:649
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, Properties::Pointer pProperties) const override
Create a new element of this type using given geometry.
void GetCurrentValuesVector(const TElementData &rData, array_1d< double, LocalSize > &rValues) const
Definition: fluid_element.cpp:819
void GetSecondDerivativesVector(Vector &Values, int Step=0) const override
Returns ACCELERATION_X, ACCELERATION_Y, (ACCELERATION_Z,) 0 for each node.
Definition: fluid_element.cpp:347
void CalculateLocalVelocityContribution(MatrixType &rDampMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
CalculateLocalVelocityContribution Calculate the local contribution in terms of velocity and pressure...
Definition: fluid_element.cpp:210
virtual void AddBoundaryTraction(TElementData &rData, const Vector &rUnitNormal, MatrixType &rLHS, VectorType &rRHS)
Adds the boundary traction component along a cut plane for embedded formulations. This method adds th...
Definition: fluid_element.cpp:805
static constexpr unsigned int StrainSize
Definition: fluid_element.h:113
virtual void UpdateIntegrationPointData(TElementData &rData, unsigned int IntegrationPointIndex, double Weight, const typename TElementData::MatrixRowType &rN, const typename TElementData::ShapeDerivativesType &rDN_DX) const
Set up the element's data and constitutive law for the current integration point.
Definition: fluid_element.cpp:581
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: fluid_element.hpp:584
virtual void AddTimeIntegratedSystem(TElementData &rData, MatrixType &rLHS, VectorType &rRHS)
Definition: fluid_element.cpp:738
Node NodeType
Node type (default is: Node)
Definition: fluid_element.h:70
virtual void AddVelocitySystem(TElementData &rData, MatrixType &rLocalLHS, VectorType &rLocalRHS)
Definition: fluid_element.cpp:777
virtual void AddTimeIntegratedLHS(TElementData &rData, MatrixType &rLHS)
Definition: fluid_element.cpp:751
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: fluid_element.cpp:375
IntegrationMethod
Definition: geometry_data.h:76
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
Definition: fluid_element_time_integration_detail.h:28
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
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Kratos::PeriodicInterfaceProcess Process operator(std::istream &rIStream, PeriodicInterfaceProcess &rThis)
input stream function
AMatrix::MatrixRow< TExpressionType > MatrixRow
Definition: amatrix_interface.h:492
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
tuple const
Definition: ode_solve.py:403
Definition: fluid_element.hpp:82
Definition: fluid_element.h:600
static void Calculate(Vector &rStrainRate, const typename TElementData::NodalVectorData &rVelocities, const typename TElementData::ShapeDerivativesType &rDNDX)
Compute the strain rate vector in Voigt notation, to use as input for the fluid constitutive law.