Class managing the GeomShapes of a mesh. More...
#include <arcane/geometry/GeomShapeMng.h>
Public Member Functions | |
| GeomShapeMng (IMesh *mesh, const String &name) | |
| Initializes for the mesh mesh with the name name. | |
| GeomShapeMng (IMesh *mesh) | |
| Initializes for the mesh mesh with the default name GenericElement. | |
| GeomShapeMng (const GeomShapeMng &rhs) | |
| Copy constructor. | |
| bool | isInitialized () const |
| Indicates if the instance is initialized. | |
| void | initialize () |
| Initializes the instance. | |
| void | initShape (GeomShapeView &ge, Cell cell) const |
| Initializes the view ge with the information of the cell cell. | |
| GeomShapeMutableView | mutableShapeView (Cell cell) |
| Returns a mutable view on the GeomShape of the cell cell. | |
| const String & | name () const |
| Manager name. | |
Private Attributes | |
| String | m_name |
| VariableCellArrayReal3 | m_cell_shape_nodes |
| Generic elements nodes. | |
| VariableCellArrayReal3 | m_cell_shape_faces |
| Generic elements face. | |
| VariableCellReal3 | m_cell_shape_centers |
| Generic elements center. | |
Class managing the GeomShapes of a mesh.
This class stores the information of the geometric shapes (GeomShape) associated to the mesh cells. For a cell, retrieving a view is done via the initShape() method:
A view can be used multiple times. For example, if you want to iterate over multiple cells:
The view retrieved by GeomShapeView is constant. To retrieve a mutable view, you must use mutableShapeView(). The mutable view is only used to update the different coordinates (nodes, face centers, ...).
Before being able to use one of the initShape() or mutableShapeView() methods, you must initialize one of the instances by calling initialize(). Initialization only performs memory allocation but does not update the coordinates.
This class only manages the data on the geometric shapes and these are independent of other variables. This means that if the coordinates of a cell node change, you must explicitly update the geometric shape information. Arcane provides the BarycentricGeomShapeComputer class for this, but the user can calculate this information in another way than using the barycenter.
All instances of this class whose name name() is identical are implicitly shared and therefore provide the same GeomShapeView. For example:
Definition at line 90 of file src/arcane/geometry/GeomShapeMng.h.
Initializes for the mesh mesh with the name name.
Definition at line 26 of file GeomShapeMng.cc.
References m_cell_shape_centers, m_cell_shape_faces, and m_cell_shape_nodes.
Referenced by GeomShapeMng().
| Arcane::geometric::GeomShapeMng::GeomShapeMng | ( | IMesh * | mesh | ) |
Initializes for the mesh mesh with the default name GenericElement.
Definition at line 38 of file GeomShapeMng.cc.
References m_cell_shape_centers, m_cell_shape_faces, and m_cell_shape_nodes.
| Arcane::geometric::GeomShapeMng::GeomShapeMng | ( | const GeomShapeMng & | rhs | ) |
Copy constructor.
Definition at line 50 of file GeomShapeMng.cc.
References GeomShapeMng(), m_cell_shape_centers, m_cell_shape_faces, and m_cell_shape_nodes.
| void Arcane::geometric::GeomShapeMng::initialize | ( | ) |
Initializes the instance.
Only instances with the same name need to be initialized once.
Definition at line 65 of file GeomShapeMng.cc.
References m_cell_shape_faces, m_cell_shape_nodes, Arcane::ItemStaticInfo::MAX_CELL_FACE, and Arcane::ItemStaticInfo::MAX_CELL_NODE.
|
inline |
Initializes the view ge with the information of the cell cell.
Definition at line 120 of file src/arcane/geometry/GeomShapeMng.h.
References m_cell_shape_centers, m_cell_shape_faces, and m_cell_shape_nodes.
|
inline |
Indicates if the instance is initialized.
Definition at line 110 of file src/arcane/geometry/GeomShapeMng.h.
References m_cell_shape_nodes.
|
inline |
Returns a mutable view on the GeomShape of the cell cell.
Definition at line 127 of file src/arcane/geometry/GeomShapeMng.h.
References m_cell_shape_centers, m_cell_shape_faces, and m_cell_shape_nodes.
|
inline |
Manager name.
Definition at line 133 of file src/arcane/geometry/GeomShapeMng.h.
|
private |
Generic elements center.
Definition at line 140 of file src/arcane/geometry/GeomShapeMng.h.
Referenced by GeomShapeMng(), GeomShapeMng(), GeomShapeMng(), initShape(), and mutableShapeView().
|
private |
Generic elements face.
Definition at line 139 of file src/arcane/geometry/GeomShapeMng.h.
Referenced by GeomShapeMng(), GeomShapeMng(), GeomShapeMng(), initialize(), initShape(), and mutableShapeView().
|
private |
Generic elements nodes.
Definition at line 138 of file src/arcane/geometry/GeomShapeMng.h.
Referenced by GeomShapeMng(), GeomShapeMng(), GeomShapeMng(), initialize(), initShape(), isInitialized(), and mutableShapeView().
|
private |
Definition at line 137 of file src/arcane/geometry/GeomShapeMng.h.