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 =
boundary_id_type BoundaryID
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
bool needInternalNeighborSideMaterial(SubdomainID subdomain_id, const THREAD_ID tid)
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...
Stores the stateful material properties computed by materials.
bool hasStatefulProperties() const
void updateStatefulPropsForPRefinement(const processor_id_type pid, const std::vector< QpMap > &p_refinement_map, const libMesh::QBase &qrule, const libMesh::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) ...
void restrictStatefulProps(const std::vector< std::pair< unsigned int, QpMap > > &coarsening_map, const std::vector< const Elem * > &coarsened_element_children, const libMesh::QBase &qrule, const libMesh::QBase &qrule_face, const THREAD_ID tid, const Elem &elem, int input_side=-1)
Creates storage for newly created elements from mesh Adaptivity.
void prolongStatefulProps(processor_id_type pid, const std::vector< std::vector< QpMap > > &refinement_map, const libMesh::QBase &qrule, const libMesh::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.
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< const Elem * > & coarsenedElementChildren(const Elem *elem) const
Get the newly removed children element ids for an element that was just coarsened.
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< QpMap > & getPCoarseningMap(const Elem &elem) const
Get the map describing for each volumetric quadrature point (qp) on the coarse level which qp on the ...
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...
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...
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.
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we're doing includes p-refinement.
bool hasActiveBlockObjects(THREAD_ID tid=0) const
bool _need_internal_side_material
std::vector< std::vector< std::unique_ptr< Assembly > > > & _assembly
bool _refine
Whether or not you are projecting refinements. Set to false for coarsening.
MaterialPropertyStorage & _bnd_material_props
const MaterialWarehouse & _materials
Materials warehouse.
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override
Called when doing boundary assembling.
MaterialPropertyStorage & _material_props
ProjectMaterialProperties(bool refine, FEProblemBase &fe_problem, MaterialPropertyStorage &material_props, MaterialPropertyStorage &bnd_material_props, std::vector< std::vector< std::unique_ptr< Assembly > > > &assembly)
FEProblemBase & _fe_problem
void join(const ProjectMaterialProperties &)
virtual ~ProjectMaterialProperties()
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
const MaterialWarehouse & _discrete_materials
Discrete materials warehouse.
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
virtual void onInternalSide(const Elem *elem, unsigned int side) override
Called when doing internal edge assembling.
SubdomainID _subdomain
The subdomain for the current element.
Base class for assembly-like calculations.
processor_id_type processor_id() const