13#include "lf/geometry/geometry.h"
24 o <<
"Mesh of dimension " <<
static_cast<int>(dim_mesh)
25 <<
", ambient dimension " <<
static_cast<int>(dim_world) <<
'\n';
30 for (
int co_dim = base::narrow<int>(dim_mesh); co_dim >= 0; co_dim--) {
32 o <<
"Co-dimension " << co_dim <<
": " << no_ent <<
" entities" <<
'\n';
37 const dim_t e_codim = e->Codim();
41 LF_VERIFY_MSG(e_geo_ptr,
42 co_dim <<
"-entity " << e_idx <<
": missing geometry");
43 LF_VERIFY_MSG(e_geo_ptr->
DimLocal() == dim_mesh - co_dim,
44 co_dim <<
"-entity " << e_idx <<
": wrong dimension");
45 LF_VERIFY_MSG(e_geo_ptr->
RefEl() == e_refel,
46 co_dim <<
"-entity " << e_idx <<
": refEl mismatch");
47 LF_VERIFY_MSG(e_codim == co_dim, co_dim <<
"-entity " << e_idx
48 <<
" co-dimension mismatch");
49 const Eigen::MatrixXd &ref_el_corners(e_refel.
NodeCoords());
50 o <<
"entity " << e_idx <<
" (" << e_refel <<
"): ";
54 for (
int l = 1; l <= base::narrow<int>(dim_mesh) - co_dim; l++) {
55 o <<
"rel codim-" << l <<
" subent: [";
57 auto sub_ent_range = e->SubEntities(l);
58 for (
const Entity *sub_ent : sub_ent_range) {
59 o << mesh.
Index(*sub_ent) <<
' ';
65 o <<
'\n' << e_geo_ptr->
Global(ref_el_corners);
81 LF_ASSERT_MSG(e_geo_ptr !=
nullptr,
"Missing geometry information!");
83 stream <<
"Entity " << e_ref_el <<
"/" <<
typeid(*e_geo_ptr).name() <<
'\n';
85 if (output_ctrl > 10) {
86 stream <<
"Dimension: " << dim_ref_el <<
'\n';
88 const Eigen::MatrixXd &ref_el_corners(e_ref_el.
NodeCoords());
91 for (
base::dim_t co_dim = dim_ref_el; co_dim > 0; co_dim--) {
94 <<
"Codimension " << co_dim <<
": " << num_sub_ent
95 <<
" sub-entities" <<
'\n';
97 if (output_ctrl > 50) {
102 stream <<
"* Subentity " << sub_ent_num <<
" (" << sub_ent_refel
105 if (output_ctrl > 90) {
107 stream << e_geo_ptr->
Global(ref_el_corners).col(sub_ent_num)
118 stream << e_geo_ptr->
Global(ref_el_corners) <<
'\n';
121 stream <<
"-----------------------" <<
'\n';
Represents a reference element with all its properties.
constexpr RefEl(RefElType type) noexcept
Create a RefEl from a lf::base::RefElType enum.
const Eigen::MatrixXd & NodeCoords() const
Get the coordinates of the nodes of this reference element.
constexpr size_type NumSubEntities(dim_t sub_codim) const
Get the number of sub-entities of this RefEl with the given codimension.
constexpr dim_t Dimension() const
Return the dimension of this reference element.
static constexpr RefEl kPoint()
Returns the (0-dimensional) reference point.
Interface class for shape information on a mesh cell in the spirit of parametric finite element metho...
virtual base::RefEl RefEl() const =0
The Reference element that defines the domain of this mapping.
virtual Eigen::MatrixXd Global(const Eigen::MatrixXd &local) const =0
Map a number of points in local coordinates into the global coordinate system.
virtual dim_t DimLocal() const =0
Dimension of the domain of this mapping.
Interface class representing a topological entity in a cellular complex
virtual std::span< const Entity *const > SubEntities(unsigned rel_codim) const =0
Return all sub entities of this entity that have the given codimension (w.r.t. this entity!...
virtual const geometry::Geometry * Geometry() const =0
Describes the geometry of this entity.
virtual base::RefEl RefEl() const =0
Describes the reference element type of this entity.
Abstract interface for objects representing a single mesh.
lf::base::size_type size_type
virtual unsigned DimWorld() const =0
The dimension of the Euclidean space in which the mesh is embedded.
virtual std::span< const Entity *const > Entities(unsigned codim) const =0
All entities of a given codimension.
virtual size_type NumEntities(unsigned codim) const =0
The number of Entities that have the given codimension.
virtual unsigned DimMesh() const =0
The dimension of the manifold described by the mesh, or equivalently the maximum dimension of the ref...
virtual size_type Index(const Entity &e) const =0
Acess to the index of a mesh entity of any co-dimension.
unsigned int size_type
general type for variables related to size of arrays
unsigned int dim_t
type for dimensions and co-dimensions and numbers derived from them
Contains helper functions and classes that all operate on the interface classes defined in lf::mesh.
void PrintInfo(std::ostream &o, const lf::mesh::Mesh &mesh, int ctrl)