13 #ifndef KRATOS_BOUSSINESQ_ELEMENT_H_INCLUDED
14 #define KRATOS_BOUSSINESQ_ELEMENT_H_INCLUDED
50 template<std::
size_t TNumNodes>
127 return Kratos::make_intrusive<BoussinesqElement<TNumNodes>>(NewId, this->
GetGeometry().
Create(ThisNodes), pProperties);
137 Element::Pointer
Create(
IndexType NewId, GeometryType::Pointer pGeom,
typename PropertiesType::Pointer pProperties)
const override
139 return Kratos::make_intrusive<BoussinesqElement<TNumNodes>>(NewId, pGeom, pProperties);
151 p_new_elem->SetData(this->
GetData());
152 p_new_elem->Set(
Flags(*
this));
193 std::string
Info()
const override
195 return "BoussinesqElement";
213 const Matrix& rNContainer,
223 const double Weight = 1.0);
235 double& rMassResidual,
246 const double Weight = 1.0)
override;
253 const double Weight = 1.0)
override;
263 void save(
Serializer& rSerializer)
const override
Implementation of a linear element for shallow water problems.
Definition: boussinesq_element.h:52
BoussinesqElement(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: boussinesq_element.h:97
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Calculate the rhs according to the Adams-Moulton scheme.
Definition: boussinesq_element.cpp:372
void CalculateArtificialViscosity(BoundedMatrix< double, 3, 3 > &rViscosity, BoundedMatrix< double, 2, 2 > &rDiffusion, const ElementData &rData, const array_1d< double, TNumNodes > &rN, const BoundedMatrix< double, TNumNodes, 2 > &rDN_DX) override
Definition: boussinesq_element.cpp:63
BaseType::LocalVectorType LocalVectorType
Definition: boussinesq_element.h:75
~ BoussinesqElement() override
Destructor.
Definition: boussinesq_element.h:112
void AlgebraicResidual(double &rMassResidual, array_1d< double, 2 > &rFreeSurfaceGradient, const ElementData &rData, const array_1d< double, TNumNodes > &rN, const BoundedMatrix< double, TNumNodes, 2 > &rDN_DX) const
Definition: boussinesq_element.cpp:91
void AddRightHandSide(LocalVectorType &rRHS, ElementData &rData, const Matrix &rNContainer, const ShapeFunctionsGradientsType &rDN_DXContainer, const Vector &rWeights)
Definition: boussinesq_element.cpp:325
void AddDispersiveTerms(LocalVectorType &rVector, const ElementData &rData, const array_1d< double, TNumNodes > &rN, const BoundedMatrix< double, TNumNodes, 2 > &rDN_DX, const double Weight=1.0) override
Definition: boussinesq_element.cpp:112
BaseType::NodesArrayType NodesArrayType
Definition: boussinesq_element.h:67
static constexpr IndexType mLocalSize
Definition: boussinesq_element.h:204
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, typename PropertiesType::Pointer pProperties) const override
Create a new element pointer.
Definition: boussinesq_element.h:125
BoussinesqElement()
Default constructor.
Definition: boussinesq_element.h:92
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(BoussinesqElement)
void AddExplicitContribution(const ProcessInfo &rCurrentProcessInfo) override
Add the explicit contribution according to the Adams-Bashforth scheme.
Definition: boussinesq_element.cpp:410
std::size_t IndexType
Definition: boussinesq_element.h:57
BaseType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: boussinesq_element.h:77
PrimitiveElement< TNumNodes > BaseType
Definition: boussinesq_element.h:63
BaseType::VectorType VectorType
Definition: boussinesq_element.h:65
void InitializeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo) override
Calculate the velocity laplacian projection.
Definition: boussinesq_element.cpp:277
Element::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override
Create a new element pointer and clone the previous element data.
Definition: boussinesq_element.h:148
void AddDispersionProjection(LocalVectorType &rDispersionH, LocalVectorType &rDispersionU, const ElementData &rData, const array_1d< double, TNumNodes > &rN, const BoundedMatrix< double, TNumNodes, 2 > &rDN_DX, const double Weight=1.0)
Definition: boussinesq_element.cpp:230
BoussinesqElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: boussinesq_element.h:102
Node NodeType
Definition: boussinesq_element.h:59
Geometry< NodeType > GeometryType
Definition: boussinesq_element.h:61
void GetNodalData(ElementData &rData, const GeometryType &rGeometry, int Step=0) override
Definition: boussinesq_element.cpp:47
BaseType::ElementData ElementData
Definition: boussinesq_element.h:71
BoussinesqElement(IndexType NewId, GeometryType::Pointer pGeometry, typename PropertiesType::Pointer pProperties)
Constructor using Geometry and Properties.
Definition: boussinesq_element.h:107
const Parameters GetSpecifications() const override
This method provides the specifications/requirements of the element.
Definition: boussinesq_element.cpp:34
void AddMassTerms(LocalMatrixType &rMatrix, const ElementData &rData, const array_1d< double, TNumNodes > &rN, const BoundedMatrix< double, TNumNodes, 2 > &rDN_DX, const double Weight=1.0) override
Definition: boussinesq_element.cpp:180
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, typename PropertiesType::Pointer pProperties) const override
Create a new element pointer.
Definition: boussinesq_element.h:137
BaseType::PropertiesType PropertiesType
Definition: boussinesq_element.h:69
std::string Info() const override
Turn back information as a string.
Definition: boussinesq_element.h:193
BaseType::LocalMatrixType LocalMatrixType
Definition: boussinesq_element.h:73
Base class for all Elements.
Definition: element.h:60
Vector VectorType
Definition: element.h:88
PropertiesType::Pointer pGetProperties()
returns the pointer to the property of the element. Does not throw an error, to allow copying of elem...
Definition: element.h:1014
std::size_t IndexType
Definition: flags.h:74
Flags()
Default constructor.
Definition: flags.h:119
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
DataValueContainer & GetData()
Definition: geometrical_object.h:212
Geometry base class.
Definition: geometry.h:71
virtual Pointer Create(PointsArrayType const &rThisPoints) const
Creates a new geometry pointer.
Definition: geometry.h:813
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
Implementation of a linear element for shallow water problems.
Definition: primitive_element.h:51
BaseType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: primitive_element.h:74
BaseType::LocalVectorType LocalVectorType
Definition: primitive_element.h:72
static constexpr IndexType mLocalSize
Definition: primitive_element.h:171
BaseType::NodesArrayType NodesArrayType
Definition: primitive_element.h:64
BaseType::LocalMatrixType LocalMatrixType
Definition: primitive_element.h:70
BaseType::ElementData ElementData
Definition: primitive_element.h:68
BaseType::PropertiesType PropertiesType
Definition: primitive_element.h:66
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
#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
def load(f)
Definition: ode_solve.py:307