19 #ifndef LIBMESH_SIMPLEX_REFINER_H 20 #define LIBMESH_SIMPLEX_REFINER_H 22 #include "libmesh/libmesh_config.h" 25 #include "libmesh/elem.h" 26 #include "libmesh/function_base.h" 31 #include <unordered_map> 39 class UnstructuredMesh;
162 std::vector<std::pair<dof_id_type, dof_id_type>>>
185 std::unordered_map<dof_id_type, std::unordered_map<Point, Elem *>>
added_elements;
202 #endif // ifndef LIBMESH_SIMPLEX_REFINER_H std::unordered_map< dof_id_type, std::unordered_map< Point, Elem * > > added_elements
Keep track of elements added within each original element, so we can answer queries about them from o...
virtual void set_desired_volume_function(FunctionBase< Real > *desired)
Set a function giving desired element volume as a function of position.
std::unique_ptr< FunctionBase< Real > > _desired_volume_func
Location-dependent volume requirements.
A Node is like a Point, but with more information.
SimplexRefiner(UnstructuredMesh &mesh)
The constructor.
virtual FunctionBase< Real > * get_desired_volume_function()
Get the function giving desired element volume as a function of position, or nullptr if no such funct...
std::vector< std::tuple< dof_id_type, dof_id_type, dof_id_type, processor_id_type > > refinement_datum
std::map< std::pair< Node *, Node * >, Node * > new_nodes
Keep track of new nodes on edges.
This is the base class from which all geometric element types are derived.
Real & desired_volume()
Sets and/or gets the desired element volume.
The libMesh namespace provides an interface to certain functionality in the library.
uint8_t processor_id_type
A C++ class to refine a simplicial mesh via splitting edges that exceed a given metric.
UnstructuredMesh & _mesh
Reference to the mesh which is to be refined.
std::vector< std::unique_ptr< Elem > > new_elements
Keep track of elements to add so we don't invalidate iterators during an iteration over elements...
The UnstructuredMesh class is derived from the MeshBase class.
bool refine_elements()
Finds elements which exceed the requested metric and refines them via subdivision into new simplices ...
bool should_refine_elem(Elem &elem)
Checks if an element exceeds the requested metric.
void fill_refinement_datum(std::pair< Node *, Node *> vertices, refinement_datum &vec)
Helper for responding to edge queries.
Real _desired_volume
The desired volume for the elements in the resulting mesh.
std::unordered_map< Elem *, dof_id_type > coarse_parent
Keep track of added elements' original coarse ids, so we get subsequent splits assigned to the correc...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unordered_map< processor_id_type, std::unique_ptr< Elem > > proxy_elements
Keep track of what processor an element's neighbors came from.
std::size_t refine_via_edges()
Finds elements which exceed the requested metric and refines them via inserting new midedge nodes and...
std::unordered_map< processor_id_type, std::vector< std::pair< dof_id_type, dof_id_type > > > edge_queries
Keep track of coarse remote edges for which we should query about additional point splits...