18 #ifndef ASSEMBLY_HM_HH_
19 #define ASSEMBLY_HM_HH_
34 template <
unsigned int dim>
42 static constexpr
const char *
name() {
return "FlowPotentialAssemblyHM"; }
62 shared_ptr<FE_P<dim>> fe_p = std::make_shared< FE_P<dim> >(1);
63 shared_ptr<FiniteElement<dim>> fe_ = std::make_shared<FESystem<dim>>(fe_p,
FEVector, 3);
82 unsigned int flow_bc_type =
eq_data_->
flow_->eq_fields().bc_type(p_bdr);
94 double bc_pressure =
eq_data_->
flow_->eq_fields().bc_pressure(p_bdr);
117 template <
template<
IntDim...>
class DimAssembly>
123 template <
unsigned int dim>
130 static constexpr
const char *
name() {
return "ResidualAssemblyHM"; }
146 shared_ptr<FE_P<dim>> fe_ = std::make_shared< FE_P<dim> >(0);
154 if (cell.
dim() != dim)
return;
155 if (!cell.
is_own())
return;
161 for (
auto p : this->
bulk_points(element_patch_idx) )
163 double new_p =
eq_data_->
flow_->eq_fields().field_ele_pressure(p);
183 template <
template<
IntDim...>
class DimAssembly>
Range< BulkPoint > bulk_points(unsigned int element_patch_idx) const
Return BulkPoint range of appropriate dimension.
Quadrature * quad_
Quadrature used in assembling methods.
Quadrature * quad_low_
Quadrature used in assembling methods (dim-1).
int active_integrals_
Holds mask of active integrals.
Range< BoundaryPoint > boundary_points(const DHCellSide &cell_side) const
Return BoundaryPoint range of appropriate dimension.
ElementCacheMap * element_cache_map_
ElementCacheMap shared with GenericAssembly object.
ElementAccessor< 3 > element_accessor()
Cell accessor allow iterate over DOF handler cells.
bool is_own() const
Return true if accessor represents own element (false for ghost element)
LocDofVec get_loc_dof_indices() const
Returns the local indices of dofs associated to the cell on the local process.
unsigned int dim() const
Return dimension of element appropriate to cell.
ElementAccessor< 3 > elm() const
Return ElementAccessor to element of loc_ele_idx_.
Side accessor allows to iterate over sides of DOF handler cell.
Side side() const
Return Side of given cell and side_idx.
const DHCellAccessor & cell() const
Return DHCellAccessor appropriate to the side.
unsigned int side_idx() const
Directing class of FieldValueCache.
void initialize(Quadrature &_quadrature, FiniteElement< DIM > &_fe, UpdateFlags _flags)
Initialize structures and calculates cell-independent data.
double JxW(const unsigned int point_no)
Return the product of Jacobian determinant and the quadrature weight at given quadrature point.
void reinit(const ElementAccessor< spacedim > &cell)
Update cell-dependent data (gradients, Jacobians etc.)
Container for various descendants of FieldCommonBase.
FEValues< 3 > fe_values_side_
FEValues of side object.
HM_Iterative::EqFields EqFields
~FlowPotentialAssemblyHM()
Destructor.
EqData * eq_data_
Data objects shared with HM_Iterative.
FieldSet used_fields_
Sub field set contains fields used in calculation.
VectorMPI ref_potential_vec_
Vector of dofs of field ref_potential.
EqFields * eq_fields_
Fields shared with HM_Iterative.
LocDofVec dof_indices_
Vector of global DOF indices.
static constexpr const char * name()
HM_Iterative::EqData EqData
void boundary_side_integral(DHCellSide dh_side)
Assemble integral over element.
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
FlowPotentialAssemblyHM(EqFields *eq_fields, EqData *eq_data)
Constructor.
DarcyLMH::EqFields FlowEqFields
Generic class of assemblation.
double p_dif2
Squared norm of pressure difference in two subsequent iterations.
std::shared_ptr< DarcyLMH > flow_
steady or unsteady water flow simulator based on MH scheme
double p_norm2
Squared pressure norm in the last iteration.
Field< 3, FieldValue< 3 >::Scalar > density
Density of fluid.
Field< 3, FieldValue< 3 >::Scalar > old_iter_pressure
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > ref_potential_ptr_
FieldFE for pressure_potential field.
Field< 3, FieldValue< 3 >::Scalar > alpha
Biot coefficient.
Field< 3, FieldValue< 3 >::Scalar > gravity
Standard gravity.
~ResidualAssemblyHM()
Destructor.
ResidualAssemblyHM(EqFields *eq_fields, EqData *eq_data)
Constructor.
HM_Iterative::EqFields EqFields
HM_Iterative::EqData EqData
FieldSet used_fields_
Sub field set contains fields used in calculation.
EqFields * eq_fields_
Data objects shared with Elasticity.
static constexpr const char * name()
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
void cell_integral(DHCellAccessor cell, unsigned int element_patch_idx)
Assemble integral over element.
FEValues< 3 > fe_values_
FEValues of cell object.
bool is_boundary() const
Returns true for side on the boundary.
void set(unsigned int pos, double val)
Set value on given position.
Definitions of basic Lagrangean finite elements with polynomial shape functions.
Class FEValues calculates finite element data on the actual cells such as shape function values,...
arma::Col< IntIdx > LocDofVec
unsigned int IntDim
A dimension index type.
Definitions of particular quadrature rules on simplices.
@ update_JxW_values
Transformed quadrature weights.
@ update_side_JxW_values
Transformed quadrature weight for cell sides.