refine.h¶
Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
-
Mesh
refine
(const Mesh &mesh, bool redistribute = true)¶ Create uniformly refined mesh
- @param mesh (
Mesh
) - The mesh to refine.
- @param redistribute (_bool_)
- Optional argument to redistribute the refined mesh if mesh is a distributed mesh.
- @return
Mesh
- The refined mesh.
- @code{.cpp}
- mesh = refine(mesh);
@endcode
- @param mesh (
-
std::shared_ptr<const MeshHierarchy>
refine
(const MeshHierarchy &hierarchy, const MeshFunction<bool> &markers)¶ Refine a MeshHierarchy
-
void
refine
(Mesh &refined_mesh, const Mesh &mesh, bool redistribute = true)¶ Create uniformly refined mesh
-
Mesh
refine
(const Mesh &mesh, const MeshFunction<bool> &cell_markers, bool redistribute = true)¶ Create locally refined mesh
- @param mesh (
Mesh
) - The mesh to refine.
- @param cell_markers (_MeshFunction<bool>_)
- A mesh function over booleans specifying which cells that should be refined (and which should not).
- @param redistribute (_bool_)
- Optional argument to redistribute the refined mesh if mesh is a distributed mesh.
- @return
Mesh
- The locally refined mesh.
- @code{.cpp}
MeshFunction<bool> cell_markers(mesh, mesh->topology().dim()); cell_markers.set_all(false); Point origin(0.0, 0.0, 0.0); for (CellIterator cell(mesh); !cell.end(); ++cell) {
Point p = cell->midpoint(); if (p.distance(origin) < 0.1)
cell_markers[*cell] = true;} mesh = refine(mesh, cell_markers);
@endcode
- @param mesh (
-
void
refine
(Mesh &refined_mesh, const Mesh &mesh, const MeshFunction<bool> &cell_markers, bool redistribute = true)¶ Create locally refined mesh
- @param refined_mesh (
Mesh
) - The mesh that will be the refined mesh.
- @param mesh (
Mesh
) - The original mesh.
- @param cell_markers (_MeshFunction<bool>_)
- A mesh function over booleans specifying which cells that should be refined (and which should not).
- @param redistribute (_bool_)
- Optional argument to redistribute the refined mesh if mesh is a distributed mesh.
- @param refined_mesh (