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

Class allowing the definition of a mesh zone. More...

#include <arcane/cartesianmesh/AMRZonePosition.h>

Collaboration diagram for Arcane::AMRZonePosition:

Public Member Functions

 AMRZonePosition (const Real3 &position, const Real3 &length)
 3D zone constructor.
 AMRZonePosition (const Real2 &position, const Real2 &length)
 2D zone constructor.
Real3 position () const
 Method allowing retrieval of the zone's position.
Real3 length () const
 Method allowing retrieval of the zone's size.
bool is3d () const
 Method allowing determination if it is a 2D or 3D zone.
void cellsInPatch (IMesh *mesh, UniqueArray< Int32 > &cells_local_id) const
 Method allowing retrieval of the cells included in the zone.
void cellsInPatch (ICartesianMesh *mesh, UniqueArray< Int32 > &cells_local_id, AMRPatchPosition &position) const
 Method allowing retrieval of the cells included in the zone. An AMRPatchPosition object designating the patch position is also filled.
AMRPatchPosition toAMRPatchPosition (ICartesianMesh *mesh) const
 Method allowing conversion of this AMRZonePosition into AMRPatchPosition.

Private Attributes

Real3 m_position
Real3 m_length
bool m_is_3d

Detailed Description

Class allowing the definition of a mesh zone.

Definition at line 34 of file AMRZonePosition.h.

Constructor & Destructor Documentation

◆ AMRZonePosition() [1/2]

Arcane::AMRZonePosition::AMRZonePosition ( const Real3 & position,
const Real3 & length )
inline

3D zone constructor.

Parameters
positionThe geometric position of the zone.
lengthThe size of the zone.

Definition at line 43 of file AMRZonePosition.h.

References length(), and position().

Here is the call graph for this function:

◆ AMRZonePosition() [2/2]

Arcane::AMRZonePosition::AMRZonePosition ( const Real2 & position,
const Real2 & length )
inline

2D zone constructor.

Parameters
positionThe geometric position of the zone.
lengthThe size of the zone.

Definition at line 54 of file AMRZonePosition.h.

References length(), and position().

Here is the call graph for this function:

Member Function Documentation

◆ cellsInPatch() [1/2]

void Arcane::AMRZonePosition::cellsInPatch ( ICartesianMesh * mesh,
UniqueArray< Int32 > & cells_local_id,
AMRPatchPosition & position ) const

Method allowing retrieval of the cells included in the zone. An AMRPatchPosition object designating the patch position is also filled.

Parameters
meshThe mesh.
cells_local_idThe array that will contain the localIds of the zone's cells. Note: the array will first be cleared.
position[OUT] The patch position.

Definition at line 66 of file AMRZonePosition.cc.

References Arcane::Array< T >::add(), ARCANE_FATAL, cellsInPatch(), Arcane::Array< T >::clear(), ENUMERATE_, Arcane::Item::hasFlags(), Arcane::Cell::hasHChildren(), Arcane::Cell::hChild(), Arcane::ItemFlags::II_InPatch, Arcane::Cell::level(), Arcane::MD_DirX, Arcane::MD_DirY, Arcane::MD_DirZ, Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::nodes(), Arcane::PatchCartesianMeshOnly, position(), Arcane::MessagePassing::ReduceMax, Arcane::MessagePassing::ReduceMin, Arcane::MessagePassing::ReduceSum, Arcane::Item::uniqueId(), Arcane::FixedArray< T, NbElement >::view(), Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.

Here is the call graph for this function:

◆ cellsInPatch() [2/2]

void Arcane::AMRZonePosition::cellsInPatch ( IMesh * mesh,
UniqueArray< Int32 > & cells_local_id ) const

Method allowing retrieval of the cells included in the zone.

Parameters
meshThe mesh.
cells_local_idThe array that will contain the localIds of the zone's cells. Note: the array will first be cleared.

Definition at line 36 of file AMRZonePosition.cc.

References Arcane::Array< T >::add(), Arcane::Array< T >::clear(), ENUMERATE_, Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::nodes(), Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.

Referenced by cellsInPatch(), and Arcane::CartesianPatchGroup::removeCellsInZone().

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

◆ is3d()

bool Arcane::AMRZonePosition::is3d ( ) const
inline

Method allowing determination if it is a 2D or 3D zone.

Returns
True if it is a 3D zone.

Definition at line 84 of file AMRZonePosition.h.

◆ length()

Real3 Arcane::AMRZonePosition::length ( ) const
inline

Method allowing retrieval of the zone's size.

Returns
The size of the zone.

Definition at line 75 of file AMRZonePosition.h.

Referenced by Arcane::CartesianPatchGroup::addPatch(), AMRZonePosition(), and AMRZonePosition().

Here is the caller graph for this function:

◆ position()

Real3 Arcane::AMRZonePosition::position ( ) const
inline

Method allowing retrieval of the zone's position.

Returns
The geometric position of the zone.

Definition at line 66 of file AMRZonePosition.h.

Referenced by Arcane::CartesianPatchGroup::addPatch(), AMRZonePosition(), AMRZonePosition(), cellsInPatch(), and toAMRPatchPosition().

Here is the caller graph for this function:

◆ toAMRPatchPosition()

AMRPatchPosition Arcane::AMRZonePosition::toAMRPatchPosition ( ICartesianMesh * mesh) const

Method allowing conversion of this AMRZonePosition into AMRPatchPosition.

Warning
The size of the overlap cell layer is not correctly defined! This must be done after calling this method.
Parameters
meshThe Cartesian mesh.
Returns
The corresponding AMRPatchPosition.

Definition at line 167 of file AMRZonePosition.cc.

References ARCANE_FATAL, ENUMERATE_, Arcane::Item::hasFlags(), Arcane::Cell::hasHChildren(), Arcane::Cell::hChild(), Arcane::ItemFlags::II_InPatch, Arcane::Cell::level(), Arcane::MD_DirX, Arcane::MD_DirY, Arcane::MD_DirZ, Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::nodes(), Arcane::PatchCartesianMeshOnly, position(), Arcane::MessagePassing::ReduceMax, Arcane::MessagePassing::ReduceMin, Arcane::MessagePassing::ReduceSum, Arcane::Item::uniqueId(), Arcane::FixedArray< T, NbElement >::view(), Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.

Referenced by Arcane::CartesianPatchGroup::addPatch().

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

Member Data Documentation

◆ m_is_3d

bool Arcane::AMRZonePosition::m_is_3d
private

Definition at line 123 of file AMRZonePosition.h.

◆ m_length

Real3 Arcane::AMRZonePosition::m_length
private

Definition at line 122 of file AMRZonePosition.h.

◆ m_position

Real3 Arcane::AMRZonePosition::m_position
private

Definition at line 121 of file AMRZonePosition.h.


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