21 #ifndef __PARALLEL_REFINEMENT_H 22 #define __PARALLEL_REFINEMENT_H 24 #include <unordered_map> 32 template<
typename T>
class MeshFunction;
58 bool is_marked(std::size_t edge_index)
const;
63 void mark(std::size_t edge_index);
103 void new_cell(std::size_t i0, std::size_t i1, std::size_t i2,
110 void new_cell(std::size_t i0, std::size_t i1, std::size_t i2);
114 void new_cells(
const std::vector<std::size_t>& idx);
131 std::unordered_map<
unsigned int, std::vector<std::pair<
unsigned int,
132 unsigned int> > > shared_edges;
136 std::shared_ptr<std::map<std::size_t, std::size_t> > local_edge_to_new_vertex;
139 std::vector<double> new_vertex_coordinates;
142 std::vector<std::size_t> new_cell_topology;
145 std::vector<bool> marked_edges;
148 std::vector<std::vector<std::size_t> > marked_for_update;
~ParallelRefinement()
Destructor.
Definition: ParallelRefinement.cpp:53
void partition(Mesh &new_mesh, bool redistribute) const
Definition: ParallelRefinement.cpp:290
const Mesh & mesh() const
Original mesh associated with this refinement.
Definition: ParallelRefinement.h:53
Data structure and methods for refining meshes in parallel.
Definition: ParallelRefinement.h:42
void update_logical_edgefunction()
Transfer marked edges between processes.
Definition: ParallelRefinement.cpp:130
std::shared_ptr< const std::map< std::size_t, std::size_t > > edge_to_new_vertex() const
Definition: ParallelRefinement.cpp:90
void mark(std::size_t edge_index)
Definition: ParallelRefinement.cpp:64
bool is_marked(std::size_t edge_index) const
Definition: ParallelRefinement.cpp:58
std::vector< std::size_t > marked_edge_list(const MeshEntity &cell) const
Definition: ParallelRefinement.cpp:116
A Cell is a MeshEntity of topological codimension 0.
Definition: Cell.h:42
ParallelRefinement(const Mesh &mesh)
Constructor.
Definition: ParallelRefinement.cpp:44
void new_cells(const std::vector< std::size_t > &idx)
Definition: ParallelRefinement.cpp:363
void build_local(Mesh &new_mesh) const
Definition: ParallelRefinement.cpp:245
void create_new_vertices()
Definition: ParallelRefinement.cpp:148
Definition: MeshEntity.h:42
void mark_all()
Mark all edges in mesh.
Definition: ParallelRefinement.cpp:84
void new_cell(const Cell &cell)
Definition: ParallelRefinement.cpp:340