38template <
typename GlobalDimNodalMatrixType>
42 double const& integration_weight_)
47 GlobalDimNodalMatrixType
const dNdx;
62 std::vector<GlobalVector*>
const& x,
63 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_tables,
64 std::vector<double>& cache)
const = 0;
67template <
typename ShapeFunction,
int GlobalDim>
89 bool const is_axially_symmetric,
95 unsigned const n_integration_points =
97 _ip_data.reserve(n_integration_points);
99 auto const& shape_matrices =
101 GlobalDim>(element, is_axially_symmetric,
107 double const aperture_size =
112 for (
unsigned ip = 0; ip < n_integration_points; ip++)
115 shape_matrices[ip].dNdx,
117 shape_matrices[ip].integralMeasure *
118 shape_matrices[ip].detJ * aperture_size);
122 void assemble(
double const t,
double const dt,
123 std::vector<double>
const& local_x,
124 std::vector<double>
const& ,
125 std::vector<double>& local_M_data,
126 std::vector<double>& local_K_data,
127 std::vector<double>& local_b_data)
override;
133 std::vector<double>
const& local_x)
const override;
136 const unsigned integration_point)
const override
143 return Eigen::Map<const Eigen::RowVectorXd>(
144 N[integration_point].data(), N[integration_point].size());
149 std::vector<GlobalVector*>
const& x,
150 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
151 std::vector<double>& velocity_cache)
const override;
157 std::vector<IntegrationPointData<GlobalDimNodalMatrixType>>
_ip_data;
166 Eigen::Map<NodalMatrixType>& local_K,
167 Eigen::Map<NodalVectorType>& local_b,
170 double const mu,
double const rho_L,
172 bool const has_gravity);
175 Eigen::Map<const NodalVectorType>
const& local_p,
179 bool const has_gravity);
189 Eigen::Map<NodalMatrixType>& local_K,
190 Eigen::Map<NodalVectorType>& local_b,
193 double const mu,
double const rho_L,
195 bool const has_gravity);
198 Eigen::Map<const NodalVectorType>
const& local_p,
202 bool const has_gravity);
205 template <
typename LaplacianGravityVelocityCalculator>
207 std::vector<double>
const& local_x,
208 std::vector<double>& local_M_data,
209 std::vector<double>& local_K_data,
210 std::vector<double>& local_b_data);
212 template <
typename LaplacianGravityVelocityCalculator,
213 typename VelocityCacheType>
215 const double t,
const double dt, std::vector<double>
const& local_x,
217 VelocityCacheType& darcy_velocity_at_ips)
const;
219 template <
typename VelocityCacheType>
222 std::vector<double>
const& local_x,
224 VelocityCacheType& darcy_velocity_at_ips)
const;
virtual constexpr unsigned getDimension() const =0
Get dimension of the mesh element.
std::size_t getID() const
Returns the ID of the element.
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
unsigned getNumberOfPoints() const
auto const & NsHigherOrder() const
void setElementID(std::size_t element_id)
virtual std::vector< double > const & getIntPtDarcyVelocity(const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< double > &cache) const =0
Eigen::Vector3d getFlux(MathLib::Point3d const &p_local_coords, double const t, std::vector< double > const &local_x) const override
std::vector< IntegrationPointData< GlobalDimNodalMatrixType > > _ip_data
typename ShapeMatricesType::ShapeMatrices ShapeMatrices
typename LocalAssemblerTraits::LocalMatrix NodalMatrixType
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
LiquidFlowLocalAssembler(MeshLib::Element const &element, std::size_t const, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, LiquidFlowData const &process_data)
typename ShapeMatricesType::NodalRowVectorType NodalRowVectorType
const LiquidFlowData & _process_data
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
void computeProjectedDarcyVelocity(const double t, const double dt, std::vector< double > const &local_x, ParameterLib::SpatialPosition const &pos, VelocityCacheType &darcy_velocity_at_ips) const
typename LocalAssemblerTraits::LocalVector NodalVectorType
void assemble(double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data) override
MeshLib::Element const & _element
NumLib::GenericIntegrationMethod const & _integration_method
void assembleMatrixAndVector(double const t, double const dt, std::vector< double > const &local_x, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
void computeDarcyVelocity(bool const is_scalar_permeability, const double t, const double dt, std::vector< double > const &local_x, ParameterLib::SpatialPosition const &pos, VelocityCacheType &darcy_velocity_at_ips) const
typename ShapeMatricesType::GlobalDimMatrixType GlobalDimMatrixType
typename ShapeMatricesType::GlobalDimNodalMatrixType GlobalDimNodalMatrixType
std::vector< double > const & getIntPtDarcyVelocity(const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &velocity_cache) const override
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > initShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, IntegrationMethod const &integration_method)
const unsigned NUM_NODAL_DOF
std::tuple< double, double > getFluidDensityAndViscosity(double const t, double const dt, ParameterLib::SpatialPosition const &pos, MaterialPropertyLib::Phase const &fluid_phase, MaterialPropertyLib::VariableArray &vars)
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< GlobalDim, ShapeFunction::NPOINTS > GlobalDimNodalMatrixType
MatrixType< GlobalDim, GlobalDim > GlobalDimMatrixType
VectorType< GlobalDim > GlobalDimVectorType
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType
GlobalDimNodalMatrixType const dNdx
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
IntegrationPointData(GlobalDimNodalMatrixType const &dNdx_, double const &integration_weight_)
double const integration_weight
NumLib::ShapeMatrixCache shape_matrix_cache
caches for each mesh element type the shape matrix
ParameterLib::Parameter< double > const & aperture_size
static void calculateLaplacianAndGravityTerm(Eigen::Map< NodalMatrixType > &local_K, Eigen::Map< NodalVectorType > &local_b, IntegrationPointData< GlobalDimNodalMatrixType > const &ip_data, GlobalDimMatrixType const &permeability_with_density_factor, double const mu, double const rho_L, GlobalDimVectorType const &specific_body_force, bool const has_gravity)
static Eigen::Matrix< double, GlobalDim, 1 > calculateVelocity(Eigen::Map< const NodalVectorType > const &local_p, IntegrationPointData< GlobalDimNodalMatrixType > const &ip_data, GlobalDimMatrixType const &permeability, double const mu, double const rho_L, GlobalDimVectorType const &specific_body_force, bool const has_gravity)
static void calculateLaplacianAndGravityTerm(Eigen::Map< NodalMatrixType > &local_K, Eigen::Map< NodalVectorType > &local_b, IntegrationPointData< GlobalDimNodalMatrixType > const &ip_data, GlobalDimMatrixType const &permeability_with_density_factor, double const mu, double const rho_L, GlobalDimVectorType const &specific_body_force, bool const has_gravity)
static Eigen::Matrix< double, GlobalDim, 1 > calculateVelocity(Eigen::Map< const NodalVectorType > const &local_p, IntegrationPointData< GlobalDimNodalMatrixType > const &ip_data, GlobalDimMatrixType const &permeability, double const mu, double const rho_L, GlobalDimVectorType const &specific_body_force, bool const has_gravity)
Vector< NNodes *NodalDOF > LocalVector
Matrix< NNodes *NodalDOF, NNodes *NodalDOF > LocalMatrix