18 #ifndef ASSEMBLY_BASE_HH_
19 #define ASSEMBLY_BASE_HH_
33 template <
unsigned int dim>
111 return result.first->second;
127 return result.first->second;
137 if (dim == 3)
return nullptr;
146 return result.first->second;
163 return result.first->second;
184 if ( (cell_side.side().edge().n_sides() == 1) && (cell_side.side().is_boundary()) ) {
187 if ( (cell_side.n_edge_sides() >=
min_edge_sides_) && (cell_side.edge_sides().begin()->element().idx() == cell.
elm_idx())) {
308 uint subset_idx = integral_it.second->get_subset_idx();
351 for (
auto integral_it :
integrals_.boundary_) {
352 auto integral = integral_it.second;
354 integral->get_subset_high_idx());
358 for (
auto p : integral->points(bdr_side) ) {
380 for (
auto coupling_integral_it :
integrals_.coupling_) {
381 auto coupling_integral = coupling_integral_it.second;
384 if (add_bulk_points) {
388 ++ppv_low.n_mesh_items_;
389 for (
auto p : coupling_integral->points(ngh_side) ) {
390 auto p_low = p.lower_dim(cell);
399 coupling_integral->get_subset_high_idx());
411 template <
template <
unsigned int>
class IntegralAcc>
415 for (
auto p : integral->points(cell_side) ) {
444 template <
unsigned int dim>
#define ASSERT_PERMANENT_EQ(a, b)
Definition of comparative assert macro (EQual)
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
unsigned int n_dofs_high()
Return number of DOFs of higher dim element.
AssemblyBasePatch(unsigned int quad_order, AssemblyInternals *asm_internals)
unsigned int n_dofs()
Return number of DOFs.
void add_coupling_integrals(const DHCellAccessor &cell)
DimIntegrals< dim > integrals_
Set of used integrals.
IntegralData integral_data_
Holds patch data for computing different types of integrals.
virtual void boundary_side_integral(FMT_UNUSED DHCellSide cell_side)
virtual ~AssemblyBase()
Destructor.
virtual void cell_integral(FMT_UNUSED DHCellAccessor cell, FMT_UNUSED unsigned int element_patch_idx)
void assemble_neighbour_integrals()
unsigned int min_edge_sides_
void add_volume_integrals(const DHCellAccessor &cell)
Quadrature * quad_
Quadrature used in assembling methods.
std::shared_ptr< CouplingIntegralAcc< dim > > create_coupling_integral(Quadrature *quad)
void add_edge_integrals(const DHCellSide &cell_side)
std::shared_ptr< EdgeIntegralAcc< dim > > create_edge_integral(Quadrature *quad)
AssemblyInternals * asm_internals_
Holds shared internals data with GeneriAssembly.
std::shared_ptr< BoundaryIntegralAcc< dim > > create_boundary_integral(Quadrature *quad)
std::shared_ptr< BulkIntegralAcc< dim > > create_bulk_integral(Quadrature *quad)
void assemble_edge_integrals()
void add_side_points(std::shared_ptr< IntegralAcc< dim > > &integral, DHCellSide cell_side, PatchPointValues< 3 > &ppv)
AssemblyBase(unsigned int quad_order, AssemblyInternals *asm_internals)
std::string print_update_flags(UpdateFlags u) const
Print update flags to string format.
Quadrature * quad_low_
Quadrature used in assembling methods (dim-1).
const IntegralData & integral_data() const
Getter of integral_data_.
void clean_integral_data()
virtual void dimjoin_intergral(FMT_UNUSED DHCellAccessor cell_lower_dim, FMT_UNUSED DHCellSide neighb_side)
virtual void edge_integral(FMT_UNUSED RangeConvert< DHEdgeSide, DHCellSide > edge_side_range)
void set_min_edge_sides(unsigned int val)
Setter of min_edge_sides_.
void add_boundary_integrals(const DHCellSide &bdr_side)
void assemble_boundary_side_integrals()
bool add_integrals_of_computing_step(DHCellAccessor cell)
const DimIntegrals< dim > & integrals() const
Getter of integrals_.
virtual void assemble_cell_integrals()
ElementAccessor< 3 > element_accessor()
Base point accessor class.
unsigned int eval_point_idx() const
Return index in EvalPoints object.
static unsigned int get()
Return number of stored elements.
Cell accessor allow iterate over DOF handler cells.
RangeConvert< DHNeighbSide, DHCellSide > neighb_sides() const
Returns range of neighbour cell of lower dimension corresponding to cell of higher dimension.
bool is_own() const
Return true if accessor represents own element (false for ghost element)
unsigned int dim() const
Return dimension of element appropriate to cell.
Range< DHCellSide > side_range() const
Returns range of cell sides.
unsigned int elm_idx() const
Return serial idx to element of loc_ele_idx_.
ElementAccessor< 3 > elm() const
Return ElementAccessor to element of loc_ele_idx_.
unsigned int local_idx() const
Return local index to element (index of DOF handler).
Side accessor allows to iterate over sides of DOF handler cell.
unsigned int elem_idx() const
const DHCellAccessor & cell() const
Return DHCellAccessor appropriate to the side.
RangeConvert< DHEdgeSide, DHCellSide > edge_sides() const
Returns range of all sides looped over common Edge.
unsigned int dim() const
Return dimension of element appropriate to the side.
ElementAccessor< 3 > element() const
RegionIdx region_idx() const
unsigned int get_simd_rounded_size()
Returns number of eval. points with addition of max simd duplicates due to regions.
void add_eval_point(unsigned int i_reg, unsigned int i_ele, unsigned int i_eval_point, unsigned int dh_loc_idx)
unsigned int position_in_cache(unsigned mesh_elm_idx, bool bdr=false) const
Return position of element stored in ElementCacheMap.
PatchPointValues< spacedim > & ppv(uint domain, uint dim)
Temporary method.
RevertibleValue n_mesh_items_
Number of elements or sides in patch.
Symmetric Gauss-Legendre quadrature formulae on simplices.
Base class for quadrature rules on simplices in arbitrary dimensions.
unsigned int size() const
Returns number of quadrature points.
unsigned int idx() const
Returns a global index of the region.
Definitions of particular quadrature rules on simplices.
Holds common data shared between GenericAssemblz and Assembly<dim> classes.
PatchFEValues< 3 > fe_values_
Common FEValues object over all dimensions.
ElementCacheMap element_cache_map_
ElementCacheMap according to EvalPoints.
std::shared_ptr< EvalPoints > eval_points_
EvalPoints object shared by all integrals.
Set of integral of given dimension necessary in assemblation.
Set of integral data of given dimension used in assemblation.
RevertableListVector< CouplingIntegralData > coupling_
Holds data for computing couplings integrals.
RevertableListVector< BulkIntegralData > bulk_
Holds data for computing bulk integrals.
RevertableListVector< BoundaryIntegralData > boundary_
Holds data for computing boundary integrals.
RevertableListVector< EdgeIntegralData > edge_
Holds data for computing edge integrals.
static std::tuple< uint, uint > integral_tuple(uint dim, uint quad_size)
Create tuple from dimennsion and size of Quadrature.
void set_size(uint new_size)
Set size of vec_list_.
void revert_temporary()
Erase temporary part of data.
void make_permanent()
Finalize temporary part of data.
void reset()
Clear the list.
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.
UpdateFlags
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.