18 #ifndef ASSEMBLY_BASE_HH_
19 #define ASSEMBLY_BASE_HH_
33 template <
unsigned int dim>
110 return result.first->second;
125 return result.first->second;
135 if (dim == 3)
return nullptr;
143 return result.first->second;
159 return result.first->second;
180 if ( (cell_side.side().edge().n_sides() == 1) && (cell_side.side().is_boundary()) ) {
183 if ( (cell_side.n_edge_sides() >=
min_edge_sides_) && (cell_side.edge_sides().begin()->element().idx() == cell.
elm_idx())) {
205 for (
unsigned int i=0; i<
integrals_.n_patch_cells(); ++i) {
224 for (
unsigned int i=0; i<
integrals_.n_patch_boundaries(); ++i) {
235 for (
unsigned int i=0; i<
integrals_.n_patch_edges(); ++i) {
246 for (
unsigned int i=0; i<
integrals_.n_patch_neighbours(); ++i) {
296 uint subset_idx = integral_it.second->get_subset_idx();
297 integral_it.second->patch_data().emplace_back(cell);
319 integral_it.second->patch_data().emplace_back(range);
335 for (
auto integral_it :
integrals_.boundary_) {
336 auto integral = integral_it.second;
337 integral->patch_data().emplace_back(bdr_side);
341 for (
auto p : integral->points(bdr_side) ) {
362 for (
auto coupling_integral_it :
integrals_.coupling_) {
363 auto coupling_integral = coupling_integral_it.second;
366 if (add_bulk_points) {
370 ++ppv_low.n_mesh_items_;
371 for (
auto p : coupling_integral->points(ngh_side) ) {
372 auto p_low = p.lower_dim(cell);
380 coupling_integral->patch_data().emplace_back(cell, ngh_side);
392 template <
template <
unsigned int>
class IntegralAcc>
396 for (
auto p : integral->points(cell_side) ) {
#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.
void add_side_points(std::shared_ptr< IntegralAcc< dim > > &integral, DHCellSide cell_side, PatchPointValues< 3 > &ppv)
std::shared_ptr< CouplingIntegralAcc< dim > > create_coupling_integral(Quadrature *quad)
void assemble_neighbour_integrals()
virtual void edge_integral(FMT_UNUSED RangeConvert< DHEdgeSide, DHCellSide > edge_side_range)
unsigned int n_dofs_high()
Return number of DOFs of higher dim element.
void add_coupling_integrals(const DHCellAccessor &cell)
std::shared_ptr< BulkIntegralAcc< dim > > create_bulk_integral(Quadrature *quad)
Quadrature * quad_low_
Quadrature used in assembling methods (dim-1).
bool add_integrals_of_computing_step(DHCellAccessor cell)
virtual void assemble_cell_integrals()
virtual void boundary_side_integral(FMT_UNUSED DHCellSide cell_side)
void add_boundary_integrals(const DHCellSide &bdr_side)
virtual void dimjoin_intergral(FMT_UNUSED DHCellAccessor cell_lower_dim, FMT_UNUSED DHCellSide neighb_side)
AssemblyBasePatch(unsigned int quad_order, AssemblyInternals *asm_internals)
Quadrature * quad_
Quadrature used in assembling methods.
unsigned int min_edge_sides_
AssemblyInternals * asm_internals_
Holds shared internals data with GeneriAssembly.
DimIntegrals< dim > integrals_
Set of used integrals.
void clean_integral_data()
virtual ~AssemblyBasePatch()
Destructor.
virtual void cell_integral(FMT_UNUSED DHCellAccessor cell, FMT_UNUSED unsigned int element_patch_idx)
std::shared_ptr< EdgeIntegralAcc< dim > > create_edge_integral(Quadrature *quad)
unsigned int n_dofs()
Return number of DOFs.
void add_edge_integrals(const DHCellSide &cell_side)
void assemble_boundary_side_integrals()
const DimIntegrals< dim > & integrals() const
Getter of integrals_.
void set_min_edge_sides(unsigned int val)
Setter of min_edge_sides_.
void add_volume_integrals(const DHCellAccessor &cell)
void assemble_edge_integrals()
std::shared_ptr< BoundaryIntegralAcc< dim > > create_boundary_integral(Quadrature *quad)
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.
static std::tuple< uint, uint > integral_tuple(uint dim, uint quad_size)
Create tuple from dimennsion and size of Quadrature.
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.