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. | |
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 GeomShapeMng.h.
Initializes for the mesh mesh with the name name.
Definition at line 26 of file GeomShapeMng.cc.
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.
| Arcane::geometric::GeomShapeMng::GeomShapeMng | ( | const GeomShapeMng & | rhs | ) |
| 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 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 GeomShapeMng.h.
|
inline |
Indicates if the instance is initialized.
Definition at line 110 of file GeomShapeMng.h.
|
inline |
Returns a mutable view on the GeomShape of the cell cell.
Definition at line 127 of file GeomShapeMng.h.
|
inline |
Manager name.
Definition at line 133 of file GeomShapeMng.h.