A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
More...
#include <Mesh.h>
|
template<typename Topology , typename Geometry > |
| Mesh (MPI_Comm comm, Topology &&topology, Geometry &&geometry) |
| Create a mesh. More...
|
|
| Mesh (MPI_Comm comm, mesh::CellType type, const Eigen::Ref< const Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &x, const Eigen::Ref< const Eigen::Array< std::int64_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &cells, const fem::CoordinateElement &element, const std::vector< std::int64_t > &global_cell_indices, const GhostMode ghost_mode, std::int32_t num_ghost_cells=0) |
|
| Mesh (const Mesh &mesh)=default |
| Copy constructor. More...
|
|
| Mesh (Mesh &&mesh)=default |
| Move constructor. More...
|
|
| ~Mesh ()=default |
| Destructor.
|
|
Mesh & | operator= (const Mesh &mesh)=delete |
|
Mesh & | operator= (Mesh &&mesh)=default |
| Assignment move operator. More...
|
|
Topology & | topology () |
| Get mesh topology. More...
|
|
const Topology & | topology () const |
| Get mesh topology (const version) More...
|
|
Topology & | topology_mutable () const |
| Get mesh topology if one really needs the mutable version. More...
|
|
Geometry & | geometry () |
| Get mesh geometry. More...
|
|
const Geometry & | geometry () const |
| Get mesh geometry (const version) More...
|
|
double | hmin () const |
| Compute minimum cell size in mesh, measured greatest distance between any two vertices of a cell. More...
|
|
double | hmax () const |
| Compute maximum cell size in mesh, measured greatest distance between any two vertices of a cell. More...
|
|
double | rmin () const |
| Compute minimum cell inradius. More...
|
|
double | rmax () const |
| Compute maximum cell inradius. More...
|
|
std::size_t | hash () const |
| Compute hash of mesh, currently based on the has of the mesh geometry and mesh topology. More...
|
|
std::size_t | id () const |
| Get unique identifier for the mesh. More...
|
|
MPI_Comm | mpi_comm () const |
| Mesh MPI communicator. More...
|
|
|
std::string | name = "mesh" |
| Name.
|
|
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
◆ Mesh() [1/4]
template<typename Topology , typename Geometry >
dolfinx::mesh::Mesh::Mesh |
( |
MPI_Comm |
comm, |
|
|
Topology && |
topology, |
|
|
Geometry && |
geometry |
|
) |
| |
|
inline |
Create a mesh.
- Parameters
-
[in] | comm | MPI Communicator |
[in] | topology | Mesh topology |
[in] | geometry | Mesh geometry |
◆ Mesh() [2/4]
Mesh::Mesh |
( |
MPI_Comm |
comm, |
|
|
mesh::CellType |
type, |
|
|
const Eigen::Ref< const Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> & |
x, |
|
|
const Eigen::Ref< const Eigen::Array< std::int64_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> & |
cells, |
|
|
const fem::CoordinateElement & |
element, |
|
|
const std::vector< std::int64_t > & |
global_cell_indices, |
|
|
const GhostMode |
ghost_mode, |
|
|
std::int32_t |
num_ghost_cells = 0 |
|
) |
| |
- Todo:
- Remove this constructor once the creation of ElementDofLayout and coordinate maps is make straightforward
Construct a Mesh from topological and geometric data.
- Parameters
-
[in] | comm | MPI Communicator |
[in] | type | Cell type |
[in] | x | Array of geometric points, arranged in global index order |
[in] | cells | Array of cells (containing the global point indices for each cell) |
[in] | element | Element that describes the geometry of a cell |
[in] | global_cell_indices | Array of global cell indices. If not empty, this must be same size as the number of rows in cells. If empty, global cell indices will be constructed, beginning from 0 on process 0. |
[in] | ghost_mode | The ghost mode |
[in] | num_ghost_cells | Number of ghost cells on this process (must be at end of list of cells) |
◆ Mesh() [3/4]
dolfinx::mesh::Mesh::Mesh |
( |
const Mesh & |
mesh | ) |
|
|
default |
Copy constructor.
- Parameters
-
[in] | mesh | Mesh to be copied |
◆ Mesh() [4/4]
dolfinx::mesh::Mesh::Mesh |
( |
Mesh && |
mesh | ) |
|
|
default |
Move constructor.
- Parameters
-
◆ geometry() [1/2]
Get mesh geometry.
- Returns
- The geometry object associated with the mesh
◆ geometry() [2/2]
const Geometry& dolfinx::mesh::Mesh::geometry |
( |
| ) |
const |
Get mesh geometry (const version)
- Returns
- The geometry object associated with the mesh
◆ hash()
std::size_t Mesh::hash |
( |
| ) |
const |
Compute hash of mesh, currently based on the has of the mesh geometry and mesh topology.
- Returns
- A tree-hashed value of the coordinates over all MPI processes
◆ hmax()
double Mesh::hmax |
( |
| ) |
const |
Compute maximum cell size in mesh, measured greatest distance between any two vertices of a cell.
- Returns
- The maximum cell size. The size is computed using Cell::h()
◆ hmin()
double Mesh::hmin |
( |
| ) |
const |
Compute minimum cell size in mesh, measured greatest distance between any two vertices of a cell.
- Returns
- The minimum cell size. The size is computed using Cell::h()
◆ id()
std::size_t dolfinx::mesh::Mesh::id |
( |
| ) |
const |
|
inline |
Get unique identifier for the mesh.
- Returns
- The unique identifier associated with the object
◆ mpi_comm()
MPI_Comm Mesh::mpi_comm |
( |
| ) |
const |
Mesh MPI communicator.
- Returns
- The communicator on which the mesh is distributed
◆ operator=()
Mesh& dolfinx::mesh::Mesh::operator= |
( |
Mesh && |
mesh | ) |
|
|
default |
Assignment move operator.
- Parameters
-
◆ rmax()
double Mesh::rmax |
( |
| ) |
const |
Compute maximum cell inradius.
- Returns
- The maximum of cells' inscribed sphere radii
◆ rmin()
double Mesh::rmin |
( |
| ) |
const |
Compute minimum cell inradius.
- Returns
- double The minimum of cells' inscribed sphere radii
◆ topology() [1/2]
Get mesh topology.
- Returns
- The topology object associated with the mesh.
◆ topology() [2/2]
const Topology& dolfinx::mesh::Mesh::topology |
( |
| ) |
const |
Get mesh topology (const version)
- Returns
- The topology object associated with the mesh.
◆ topology_mutable()
Topology & Mesh::topology_mutable |
( |
| ) |
const |
Get mesh topology if one really needs the mutable version.
- Returns
- The topology object associated with the mesh.
The documentation for this class was generated from the following files:
- /build/dolfinx-AhTyre/dolfinx-2019.2.0~git20200420.6043d6d/cpp/dolfinx/mesh/Mesh.h
- /build/dolfinx-AhTyre/dolfinx-2019.2.0~git20200420.6043d6d/cpp/dolfinx/mesh/Mesh.cpp