14#include "libmesh/enum_elem_type.h"
15#include "libmesh/enum_elem_quality.h"
67 void updateValue(std::map<DomainElemQuality, Real> & quality_map,
const Real value)
const;
81 template <
typename IDType>
98 template <
typename IDType>
116 template <
typename IDType,
typename ElemsType>
251 template <
class InfoType,
class ItemsType>
281 template <
class InfoMapType,
class ItemsType>
285 using id_type =
typename InfoMapType::id_type;
308 virtual void execute()
override;
332 template <
typename T,
typename... Args>
337 template <
class CombinedInfosType>
346 template <
class CombinedInfosType>
381template <
typename T,
typename... Args>
void dataStore(std::ostream &, MeshInfo::DomainElemQuality &, void *)
Data store and load for DomainElemQuality.
void to_json(nlohmann::json &, const MeshInfo::ElemInfoMap &)
JSON serialization for info maps.
void dataLoad(std::istream &, MeshInfo::DomainElemQuality &, void *)
Reporter object that has a single execution of the "execute" method for each execute flag.
Report mesh information, such as the number of elements, nodes, and degrees of freedom.
unsigned int *const _num_dofs_constrained
static bool hasItem(const std::string &name, const MultiMooseEnum &items)
unsigned int *const _num_local_dofs_aux
SidesetInfos _sideset_infos
Combined sideset information (reporter values and requested items)
unsigned int *const _num_dofs_aux
const libMesh::System & _aux_system
static InputParameters validParams()
const MultiMooseEnum & _sideset_elem_qualities
The requested element quality metrics, bounded over sidesets.
const MultiMooseEnum & _elem_qualities
The requested element quality metrics.
unsigned int *const _num_local_node
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
BoundType
Type of a bound for DomainElemQuality (min or max).
const MultiMooseEnum & _sideset_items
The requested sideset items.
ElemInfos _elem_infos
Combined element information (reporter values and requested items)
static const std::vector< libMesh::ElemQuality > elem_qualities
The qualities to include for elems.
CombinedInfosType initCombinedInfos(const std::string &name, const MultiMooseEnum &items, const MultiMooseEnum &qualities)
Initializer for SidesetInfos and SubdomainInfos.
const MultiMooseEnum & _subdomain_elem_qualities
The requested element quality metrics, bounded over subdomains.
unsigned int *const _num_dofs
Reporter values to declare.
T * declareHelper(const std::string &name, const ReporterMode mode, Args &&... args)
Helper to perform optional declaration based on if the item is requested or all are requested.
const libMesh::MeshBase & _mesh
const MultiMooseEnum & _items
The requested items.
unsigned int *const _num_local_dofs_nl
const MultiMooseEnum & _subdomain_items
The requested subdomain items.
const libMesh::EquationSystems & _equation_systems
virtual void finalize() override
Finalize.
virtual void execute() override
Execute method.
unsigned int *const _num_node
const libMesh::System & _nonlinear_system
unsigned int *const _num_elem
void possiblyAddElemInfo()
Add elem information if requested.
unsigned int *const _num_local_dofs
void possiblyAddDomainInfo(CombinedInfosType &infos)
Add domain information (sidesets and subdomains) if requested.
static const std::vector< DomainElemQuality > domain_elem_qualities
The qualities (ElemQuality and bound type) to include for domain quantities (subdomains and sidesets)
SubdomainInfos _subdomain_infos
Combined subdomain information (reporter values and requested items)
const MultiMooseEnum & _elem_items
The requested elem items.
unsigned int *const _num_local_elem
unsigned int *const _num_dofs_nl
const InputParameters & parameters() const
Get the parameters of the object.
const std::string & name() const
Get the name of the class.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
MooseEnumItem that automatically creates the ID and doesn't allow the ID to be assigned.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Struct that contains all of the reporter data for a domain type (sideset or subdomain) and the items ...
const ItemsType items
Which entries are to be output.
typename info_map_type::map_type map_type
InfoMapType info_map_type
typename InfoMapType::info_type info_type
typename InfoMapType::id_type id_type
InfoMapType *const global
Global information.
InfoMapType *const local
Local information.
Key for a libMesh::ElemQuality quality type with a bound (min or max) to be used over an entire domai...
void updateValue(std::map< DomainElemQuality, Real > &quality_map, const Real value) const
Update the value in the quality map.
libMesh::ElemQuality & elemQuality()
Get the libMesh::ElemQuality entry.
const libMesh::ElemQuality & elemQuality() const
BoundType & boundType()
Get the type of the bound (min or max)
DomainElemQuality()=default
std::string itemName() const
Get the name for this quality ([min,max]_[quality])
const BoundType & boundType() const
Defines which items are to be output for a domain (sideset or subdomain).
bool elems
Markers for whether or not a single item should be output.
DomainInfoItems()=default
std::vector< DomainElemQuality > elem_qualities
Bounded (min, max) element quality metrics that should be output.
Structure for a single domain entry (sideset or subdomain).
Real min_volume
Minimum volume.
std::set< processor_id_type > processor_ids
Processors the elements are on.
DomainInfo(const IDType id)
std::vector< ElemsType > elems
Elements in the domain.
Real max_volume
Maximum volume.
std::size_t num_elems
Number of elements.
std::map< DomainElemQuality, Real > elem_qualities
Bounded (min, max) element quality metrics.
std::set< libMesh::ElemType > elem_types
Type(s) of elements in the domain.
Base struct for defining which items are to be output for a domain that contains elements (elems,...
bool bounding_box
Markers for whether or not a single item should be output.
ElemContainingInfoItems()=default
Struct for element-containing entries (elem, sideset, subdomain).
ElemContainingInfo()=default
ElemContainingInfo(const IDType id)
std::vector< libMesh::ElemQuality > elem_qualities
Element qualities that should be output.
bool dim
Markers for whether or not a single item should be output.
Structure for a single elem entry.
unique_id_type unique_id
Unique ID of the element.
std::vector< std::pair< libMesh::ElemQuality, Real > > elem_qualities
Evaluated element qualities.
SubdomainID subdomain_id
The element's subdomain ID.
std::vector< dof_id_type > neighbor_ids
The ID of each neighbor (indexed by side)
libMesh::ElemType elem_type
The element type.
ElemInfo(const dof_id_type id, const SubdomainID subdomain_id)
std::vector< Point > points
The element's points.
Real hmax
The maximum vertex seperation for the element.
libMesh::ElemMappingType elem_mapping_type
The element mapping type.
unsigned short dim
The dimensionality of the element.
processor_id_type processor_id
The processor ID the element is on.
std::vector< dof_id_type > node_ids
The IDs of each node.
Real hmin
The minimum vertex seperation for the element.
unsigned int num_sides
The number of sides on the element.
Base struct for information for a single entry (elem, sideset, subdomain).
InfoBase(const IDType id)
Struct that defines a domain (sideset or subdomain) map (id -> entities) and the items that should be...
typename InfoType::id_type id_type
ItemsType items
Which items are to be output.
InfoMap(const ItemsType &items)
std::map< id_type, InfoType > map_type
map_type map
The underlying data.