18 #ifndef GENERIC_ASSEMBLY_HH_
19 #define GENERIC_ASSEMBLY_HH_
44 std::array<std::shared_ptr<BulkIntegral>, 3>
bulk_;
45 std::array<std::shared_ptr<EdgeIntegral>, 3>
edge_;
46 std::array<std::shared_ptr<CouplingIntegral>, 3>
coupling_;
47 std::array<std::shared_ptr<BoundaryIntegral>, 3>
boundary_;
81 virtual void assemble(std::shared_ptr<DOFHandlerMultiDim> dh) = 0;
102 template <
template<
IntDim...>
class DimAssembly>
160 void assemble(std::shared_ptr<DOFHandlerMultiDim> dh)
override {
165 bool add_into_patch =
false;
166 for(
auto cell_it = dh->local_range().begin(); cell_it != dh->local_range().end(); )
168 unsigned int cell_dim = cell_it->dim();
169 if (!add_into_patch) {
171 add_into_patch =
true;
175 bool is_patch_full =
false;
176 switch ( cell_dim ) {
187 ASSERT(
false).error(
"Should not happen!");
194 add_into_patch =
false;
202 add_into_patch =
false;
207 if (add_into_patch) {
static unsigned int get()
Return number of stored elements.
Provides the numbering of the finite element degrees of freedom on the computational mesh.
Directing class of FieldValueCache.
unsigned int get_simd_rounded_size()
Returns number of eval. points with addition of max simd duplicates due to regions.
void start_elements_update()
Start update of cache.
void finish_elements_update()
Finish update after reading data to cache.
void clear_element_eval_points_map()
Reset all items of elements_eval_points_map.
void create_patch()
Create patch of cached elements before reading data to cache.
RevertableList< EvalPointData > eval_point_data_
void init(std::shared_ptr< EvalPoints > eval_points)
Init cache.
void make_paermanent_eval_points()
Mark eval_point_data_ as permanent.
Class holds local coordinations of evaluating points (bulk and sides) specified by element dimension.
AssemblyInternals asm_internals_
Holds shared internals data.
virtual ~GenericAssemblyBase()
GenericAssemblyBase(MixedPtr< FiniteElement > fe)
std::shared_ptr< EvalPoints > eval_points() const
Getter to EvalPoints object.
virtual void assemble(std::shared_ptr< DOFHandlerMultiDim > dh)=0
Generic class of assemblation.
GenericAssembly(typename DimAssembly< 1 >::EqData *eq_data)
MixedPtr< DimAssembly, 1 > multidim_assembly_
Assembly object.
void assemble_integrals()
Call assemblations when patch is filled.
void assemble(std::shared_ptr< DOFHandlerMultiDim > dh) override
General assemble methods.
void patch_reinit()
Reinit PatchFeValues object during construction of patch.
const ElementCacheMap & cache_map() const
Return ElementCacheMap.
GenericAssembly(typename DimAssembly< 1 >::EqData *eq_data, DOFHandlerMultiDim *dh)
void initialize()
Common part of GenericAssemblz constructors.
void set_min_edge_sides(unsigned int val)
Allows rewrite number of minimal edge sides.
void reallocate_cache()
Calls cache_reallocate method on.
bool use_patch_fe_values_
Flag holds if common fe_values_ object is used in multidim_assembly_.
MixedPtr< DimAssembly, 1 > multidim_assembly() const
Getter to set of assembly objects.
void add_patch_points(const DimIntegrals< dim > &integrals, const IntegralData &integral_data, ElementCacheMap *element_cache_map, std::shared_ptr< EvalPoints > eval_points)
Add elements, sides and quadrature points registered on patch.
void init_finalize()
Finalize initialization, creates child (patch) arena and passes it to PatchPointValue objects.
void make_permanent_ppv_data()
Marks data of last successfully added element to patch as permanent.
void clean_elements_map()
Clear elements_map, set values to (-1)
void reinit_patch()
Reinit data.
void reset()
Reset PatchpointValues structures.
Class FEValues calculates finite element data on the actual cells such as shape function values,...
unsigned int IntDim
A dimension index type.
Class FEValues calculates finite element data on the actual cells such as shape function values,...
Definitions of particular quadrature rules on simplices.
Allow set mask of active integrals.
std::array< std::shared_ptr< BulkIntegral >, 3 > bulk_
Bulk integrals of elements of dimensions 1, 2, 3.
std::array< std::shared_ptr< BoundaryIntegral >, 3 > boundary_
Boundary integrals betwwen elements of dimensions 1, 2, 3 and boundaries.
std::array< std::shared_ptr< EdgeIntegral >, 3 > edge_
Edge integrals between elements of dimensions 1, 2, 3.
std::array< std::shared_ptr< CouplingIntegral >, 3 > coupling_
Coupling integrals between elements of dimensions 1-2, 2-3.
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.
AssemblyInternals(MixedPtr< FiniteElement > fe)
std::shared_ptr< EvalPoints > eval_points_
EvalPoints object shared by all integrals.
std::size_t revert_temporary()
Erase temporary part of data.
#define END_TIMER(tag)
Ends a timer with specified tag.
#define START_TIMER(tag)
Starts a timer with specified tag.