Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::mesh::CellMerger Class Reference

Helper class for merging two cells. More...

#include <arcane/mesh/CellMerger.h>

Collaboration diagram for Arcane::mesh::CellMerger:

Public Member Functions

 CellMerger (ITraceMng *)
 Constructor.
 ~CellMerger ()=default
 Destructor.
void merge (Cell i_cell_1, Cell i_cell_2)
 Merges the two cells i_cell_1 and i_cell_2.
ItemInternalgetItemInternal (ItemInternal *i_cell_1, ItemInternal *i_cell_2)
 Returns the ItemInternal used by the cell after merging.
Cell getCell (Cell i_cell_1, Cell i_cell_2)
 Returns the cell used by the cell after merging.

Private Types

enum  _Type {
  NotMergeable = 0 , Hexahedron = 1 , Pyramid = 2 , Pentahedron = 3 ,
  Quadrilateral = 10 , Triangle = 11
}

Private Member Functions

String _typeName (const _Type &t) const
 Returns the name associated with the cell type.
_Type _getCellType (const Integer &internal_cell_type) const
 Determines the cell _Type based on its "ItemInternal" type.
_Type _promoteType (const _Type &t1, const _Type &t2) const
 Determines the cell type resulting from the merging of two given types.

Detailed Description

Helper class for merging two cells.

Definition at line 34 of file CellMerger.h.

Member Enumeration Documentation

◆ _Type

We define a local enumerated type in order to perform arithmetic operations (see

See also
_promoteType)

Definition at line 90 of file CellMerger.h.

Constructor & Destructor Documentation

◆ CellMerger()

Arcane::mesh::CellMerger::CellMerger ( ITraceMng * )
inline

Constructor.

Definition at line 39 of file CellMerger.h.

Member Function Documentation

◆ _getCellType()

CellMerger::_Type Arcane::mesh::CellMerger::_getCellType ( const Integer & internal_cell_type) const
private

Determines the cell _Type based on its "ItemInternal" type.

Parameters
internal_cell_typethe "ItemInternal" type
Returns
the cell _Type

Definition at line 1113 of file CellMerger.cc.

Referenced by getCell(), and merge().

Here is the caller graph for this function:

◆ _promoteType()

CellMerger::_Type Arcane::mesh::CellMerger::_promoteType ( const _Type & t1,
const _Type & t2 ) const
private

Determines the cell type resulting from the merging of two given types.

Note
at this stage, nothing guarantees that the merge will succeed
Parameters
t1the first type
t2the second type
Returns
the type of the merged cell

Definition at line 1141 of file CellMerger.cc.

References _typeName(), and ARCANE_FATAL.

Referenced by getCell().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _typeName()

String Arcane::mesh::CellMerger::_typeName ( const _Type & t) const
private

Returns the name associated with the cell type.

Parameters
tthe type
Returns
the string containing the name.

Definition at line 1091 of file CellMerger.cc.

Referenced by _promoteType().

Here is the caller graph for this function:

◆ getCell()

Cell Arcane::mesh::CellMerger::getCell ( Cell i_cell_1,
Cell i_cell_2 )

Returns the cell used by the cell after merging.

Parameters
i_cell_1a pointer to the first cell
i_cell_2a pointer to the second cell
Returns
the new cell.
Note
the new cell is always either i_cell_1 or i_cell_2. No memory allocation is performed.

Definition at line 1194 of file CellMerger.cc.

References _getCellType(), _promoteType(), ARCANE_FATAL, and Arcane::Item::type().

Referenced by getItemInternal(), and ~CellMerger().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getItemInternal()

ItemInternal * Arcane::mesh::CellMerger::getItemInternal ( ItemInternal * i_cell_1,
ItemInternal * i_cell_2 )

Returns the ItemInternal used by the cell after merging.

Parameters
i_cell_1a pointer to the first cell
i_cell_2a pointer to the second cell
Returns
a pointer to the new cell.
Note
the new pointer is always either i_cell_1 or i_cell_2. No memory allocation is performed.

Definition at line 1238 of file CellMerger.cc.

References getCell().

Referenced by ~CellMerger().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ merge()

void Arcane::mesh::CellMerger::merge ( Cell i_cell_1,
Cell i_cell_2 )

Merges the two cells i_cell_1 and i_cell_2.

Parameters
i_cell_1a pointer to the first cell
i_cell_2a pointer to the second cell
Note
the merge is always performed in i_cell_1, i_cell_2 becomes a flattened cell that will be destroyed later.

Definition at line 1163 of file CellMerger.cc.

References _getCellType(), ARCANE_FATAL, Arcane::Item::itemFamily(), Arcane::IItemFamily::mesh(), and Arcane::Item::type().

Referenced by ~CellMerger().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: