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>
39class 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;
This is the base class from which all geometric element types are derived.
Base class for functors that can be evaluated at a point and (optionally) time.
A Node is like a Point, but with more information.
A C++ class to refine a simplicial mesh via splitting edges that exceed a given metric.
std::size_t refine_via_edges()
Finds elements which exceed the requested metric and refines them via inserting new midedge nodes and...
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.
virtual void set_desired_volume_function(FunctionBase< Real > *desired)
Set a function giving desired element volume as a function of position.
bool refine_elements()
Finds elements which exceed the requested metric and refines them via subdivision into new simplices ...
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...
bool should_refine_elem(Elem &elem)
Checks if an element exceeds the requested metric.
std::map< std::pair< Node *, Node * >, Node * > new_nodes
Keep track of new nodes on edges.
Real _desired_volume
The desired volume for the elements in the resulting mesh.
std::vector< std::tuple< dof_id_type, dof_id_type, dof_id_type, processor_id_type > > refinement_datum
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::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...
std::unordered_map< processor_id_type, std::unique_ptr< Elem > > proxy_elements
Keep track of what processor an element's neighbors came from.
std::unique_ptr< FunctionBase< Real > > _desired_volume_func
Location-dependent volume requirements.
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.
void fill_refinement_datum(std::pair< Node *, Node * > vertices, refinement_datum &vec)
Helper for responding to edge queries.
Real & desired_volume()
Sets and/or gets the desired element volume.
UnstructuredMesh & _mesh
Reference to the mesh which is to be refined.
The UnstructuredMesh class is derived from the MeshBase class.
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
uint8_t processor_id_type