19 #include "libmesh/threads.h" 20 #include "libmesh/elem.h" 27 std::vector<std::vector<std::unique_ptr<Assembly>>> & assembly)
30 _fe_problem(fe_problem),
31 _material_props(material_props),
32 _bnd_material_props(bnd_material_props),
34 _need_internal_side_material(false),
35 _materials(_fe_problem.getRegularMaterialsWarehouse()),
36 _discrete_materials(_fe_problem.getDiscreteMaterialWarehouse())
45 _fe_problem(x._fe_problem),
46 _material_props(x._material_props),
47 _bnd_material_props(x._bnd_material_props),
48 _assembly(x._assembly),
49 _need_internal_side_material(x._need_internal_side_material),
50 _materials(x._materials),
51 _discrete_materials(x._discrete_materials)
92 const std::vector<std::vector<QpMap>> & refinement_map =
123 const std::vector<std::pair<unsigned int, QpMap>> & coarsening_map =
163 const std::vector<std::vector<QpMap>> & refinement_map =
194 const std::vector<std::pair<unsigned int, QpMap>> & coarsening_map =
215 mooseError(
"I'm pretty sure we're not handling stateful material property prolongation or " 216 "restriction correctly on internal sides");
217 for (
unsigned int child = 0; child < elem->n_children(); child++)
219 const Elem * child_elem = elem->child_ptr(child);
221 for (
unsigned int side = 0; side < child_elem->n_sides(); side++)
223 if (!elem->is_child_on_side(child, side))
225 const std::vector<std::vector<QpMap>> & refinement_map =
const std::vector< QpMap > & getPCoarseningSideMap(const Elem &elem) const
Get the map describing for each side quadrature point (qp) on the coarse level which qp on the previo...
Base class for assembly-like calculations.
bool hasActiveBlockObjects(THREAD_ID tid=0) const
ProjectMaterialProperties(bool refine, FEProblemBase &fe_problem, MaterialPropertyStorage &material_props, MaterialPropertyStorage &bnd_material_props, std::vector< std::vector< std::unique_ptr< Assembly >>> &assembly)
void prolongStatefulProps(processor_id_type pid, const std::vector< std::vector< QpMap >> &refinement_map, const QBase &qrule, const QBase &qrule_face, MaterialPropertyStorage &parent_material_props, const THREAD_ID tid, const Elem &elem, const int input_parent_side, const int input_child, const int input_child_side)
Creates storage for newly created elements from mesh Adaptivity.
void restrictStatefulProps(const std::vector< std::pair< unsigned int, QpMap >> &coarsening_map, const std::vector< const Elem *> &coarsened_element_children, const QBase &qrule, const QBase &qrule_face, const THREAD_ID tid, const Elem &elem, int input_side=-1)
Creates storage for newly created elements from mesh Adaptivity.
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
const std::vector< std::pair< unsigned int, QpMap > > & getCoarseningMap(const Elem &elem, int input_side)
Get the coarsening map for a given element type.
const std::vector< std::vector< QpMap > > & getRefinementMap(const Elem &elem, int parent_side, int child, int child_side)
Get the refinement map for a given element type.
Stores the stateful material properties computed by materials.
MaterialPropertyStorage & _bnd_material_props
const MaterialWarehouse & _discrete_materials
Discrete materials warehouse.
bool needBoundaryMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
These methods are used to determine whether stateful material properties need to be stored on interna...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
FEProblemBase & _fe_problem
StoredRange< std::vector< const Elem * >::iterator, const Elem * > ConstElemPointerRange
bool _refine
Whether or not you are projecting refinements. Set to false for coarsening.
const MaterialWarehouse & _materials
Materials warehouse.
MaterialPropertyStorage & _material_props
bool needSubdomainMaterialOnSide(SubdomainID subdomain_id, const THREAD_ID tid)
bool _need_internal_side_material
boundary_id_type BoundaryID
void updateStatefulPropsForPRefinement(const processor_id_type pid, const std::vector< QpMap > &p_refinement_map, const QBase &qrule, const QBase &qrule_face, const THREAD_ID tid, const Elem &elem, const int input_side)
Based on the p-refinement flag of elem, either prolong (for refinement) or restrict (for coarsening) ...
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override
Called when doing boundary assembling.
const std::vector< QpMap > & getPRefinementMap(const Elem &elem) const
Get the map describing for each volumetric quadrature point (qp) on the refined level which qp on the...
const std::vector< QpMap > & getPRefinementSideMap(const Elem &elem) const
Get the map describing for each side quadrature point (qp) on the refined level which qp on the previ...
bool hasStatefulProperties() const
const std::vector< const Elem * > & coarsenedElementChildren(const Elem *elem) const
Get the newly removed children element ids for an element that was just coarsened.
SubdomainID _subdomain
The subdomain for the current element.
void join(const ProjectMaterialProperties &)
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we're doing is p-refinement.
processor_id_type processor_id() const
const std::vector< QpMap > & getPCoarseningMap(const Elem &elem) const
Get the map describing for each volumetric quadrature point (qp) on the coarse level which qp on the ...
virtual void onInternalSide(const Elem *elem, unsigned int side) override
Called when doing internal edge assembling.
std::vector< std::vector< std::unique_ptr< Assembly > > > & _assembly
virtual ~ProjectMaterialProperties()