18 #ifndef ASSEMBLY_HM_HH_
19 #define ASSEMBLY_HM_HH_
34 template <
unsigned int dim,
class TEqData>
42 static constexpr
const char *
name() {
return "HM_FlowPotential_Assembly"; }
61 shared_ptr<FE_P<dim>> fe_p = std::make_shared< FE_P<dim> >(1);
62 shared_ptr<FiniteElement<dim>> fe_ = std::make_shared<FESystem<dim>>(fe_p,
FEVector, 3);
80 unsigned int flow_bc_type =
eq_data_->flow_->eq_fields().bc_type(p_bdr);
92 double bc_pressure =
eq_data_->flow_->eq_fields().bc_pressure(p_bdr);
93 ref_pot += -alpha*density*gravity*bc_pressure *
JxW_bdr_(p) / dh_side.
measure();
118 template <
template<
IntDim...>
class DimAssembly>
124 template <
unsigned int dim,
class TEqData>
131 static constexpr
const char *
name() {
return "HM_Residual_Assembly"; }
152 if (cell.
dim() != dim)
return;
153 if (!cell.
is_own())
return;
158 double new_p =
eq_data_->flow_->eq_fields().field_ele_pressure(p);
159 double old_p =
eq_fields_->old_iter_pressure(p);
160 eq_data_->p_dif2 += (new_p - old_p)*(new_p - old_p) *
JxW_(p);
180 template <
template<
IntDim...>
class DimAssembly>
std::shared_ptr< BulkIntegralAcc< dim > > create_bulk_integral(Quadrature *quad)
Quadrature * quad_low_
Quadrature used in assembling methods (dim-1).
Quadrature * quad_
Quadrature used in assembling methods.
std::shared_ptr< BoundaryIntegralAcc< dim > > create_boundary_integral(Quadrature *quad)
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.
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
Container for various descendants of FieldCommonBase.
FeQ< Scalar > JxW_bdr_
Following data members represent Element quantities and FE quantities.
DarcyLMH::EqFields FlowEqFields
FieldSet used_fields_
Sub field set contains fields used in calculation.
std::shared_ptr< BoundaryIntegralAcc< dim > > bdr_integral_
Boundary integral of assembly class.
LocDofVec dof_indices_
Vector of global DOF indices.
TEqData::EqFields EqFields
FlowPotentialAssemblyHM(EqData *eq_data, AssemblyInternals *asm_internals)
Constructor.
VectorMPI ref_potential_vec_
Vector of dofs of field ref_potential.
~FlowPotentialAssemblyHM()
Destructor.
static constexpr const char * name()
void initialize()
Initialize auxiliary vectors and other data members.
void boundary_side_integral(DHCellSide dh_side)
Assemble integral over element.
EqFields * eq_fields_
Fields shared with HM_Iterative.
EqData * eq_data_
Data objects shared with HM_Iterative.
Generic class of assemblation.
ResidualAssemblyHM(EqData *eq_data, AssemblyInternals *asm_internals)
Constructor.
~ResidualAssemblyHM()
Destructor.
FieldSet used_fields_
Sub field set contains fields used in calculation.
void initialize()
Initialize auxiliary vectors and other data members.
static constexpr const char * name()
EqFields * eq_fields_
Data objects shared with Elasticity.
void cell_integral(DHCellAccessor cell, unsigned int element_patch_idx)
Assemble integral over element.
FeQ< Scalar > JxW_
Following data members represent Element quantities and FE quantities.
TEqData::EqFields EqFields
std::shared_ptr< BulkIntegralAcc< dim > > bulk_integral_
Bulk integral of assembly class.
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.
arma::Col< IntIdx > LocDofVec
unsigned int IntDim
A dimension index type.
Store finite element reinit functions.
Definitions of particular quadrature rules on simplices.
Holds common data shared between GenericAssemblz and Assembly<dim> classes.