Interface for applying selection methods simultaneously on bulk+boundary compound meshes. More...
#include <FVMeshSelection.hpp>
Protected Member Functions | |
void | buildPorts () |
bool | checkCoherenceBulkBoundary () |
void | cleanUpBoundaryPatch () |
MimmoSharedPointer< MimmoObject > | createInternalBoundaryPatch () |
virtual void | plotOptionalResults () |
void | swap (FVGenericSelection &x) noexcept |
Protected Member Functions inherited from mimmo::BaseManipulation | |
void | _apply (MimmoPiercedVector< darray3E > &displacements) |
void | addChild (BaseManipulation *child) |
void | addParent (BaseManipulation *parent) |
void | addPinIn (BaseManipulation *objIn, PortID portR) |
void | addPinOut (BaseManipulation *objOut, PortID portS, PortID portR) |
virtual void | apply () |
void | cleanBufferIn (PortID port) |
template<typename T , typename O > | |
bool | createPortIn (O *obj, void(O::*setVar_)(T), PortID portR, bool mandatory=false, int family=0) |
template<typename T , typename O > | |
bool | createPortIn (T *var_, PortID portR, bool mandatory=false, int family=0) |
template<typename T , typename O > | |
bool | createPortOut (O *obj, T(O::*getVar_)(), PortID portS) |
template<typename T , typename O > | |
bool | createPortOut (T *var_, PortID portS) |
void | deletePorts () |
PortID | findPinIn (PortIn &pin) |
PortID | findPinOut (PortOut &pin) |
void | initializeLogger (bool logexists) |
void | readBufferIn (PortID port) |
void | removePinIn (BaseManipulation *objIn, PortID portR) |
void | removePinIn (PortID portR, int j) |
void | removePinOut (BaseManipulation *objOut, PortID portS) |
void | removePinOut (PortID portS, int j) |
void | setBufferIn (PortID port, mimmo::IBinaryStream &input) |
void | swap (BaseManipulation &x) noexcept |
void | unsetChild (BaseManipulation *child) |
void | unsetParent (BaseManipulation *parent) |
void | write (MimmoSharedPointer< MimmoObject > geometry) |
template<typename mpv_t > | |
void | write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data) |
template<typename mpv_t , typename... Args> | |
void | write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data, Args ... args) |
template<typename mpv_t > | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data) |
template<typename mpv_t , typename... Args> | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data, Args ... args) |
template<typename mpv_t > | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data) |
template<typename mpv_t , typename... Args> | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data, Args ... args) |
Protected Attributes | |
MimmoSharedPointer< MimmoObject > | m_bndgeometry |
MimmoSharedPointer< MimmoObject > | m_bndpatch |
bool | m_dual |
MimmoSharedPointer< MimmoObject > | m_intbndpatch |
MimmoSharedPointer< GenericSelection > | m_selectEngine |
int | m_topo |
MimmoSharedPointer< MimmoObject > | m_volpatch |
Protected Attributes inherited from mimmo::BaseManipulation | |
bool | m_active |
bool | m_apply |
bool | m_arePortsBuilt |
bmumap | m_child |
int | m_counter |
bool | m_execPlot |
MimmoSharedPointer< MimmoObject > | m_geometry |
bitpit::Logger * | m_log |
std::string | m_name |
std::string | m_outputPlot |
bmumap | m_parent |
std::unordered_map< PortID, PortIn * > | m_portIn |
std::unordered_map< PortID, PortOut * > | m_portOut |
ConnectionType | m_portsType |
uint | m_priority |
Additional Inherited Members | |
Public Types inherited from mimmo::BaseManipulation | |
typedef std::unordered_map< BaseManipulation *, int > | bmumap |
typedef pin::ConnectionType | ConnectionType |
typedef std::string | PortID |
Static Protected Attributes inherited from mimmo::BaseManipulation | |
static int | sm_baseManipulationCounter |
Detailed Description
Interface for applying selection methods simultaneously on bulk+boundary compound meshes.
The class is meant as a wrapping to a GenericSelection derivate classes. It applies selection on a coumpound target made by a bulk mesh (volume mesh, surface mesh) and its boundaries (surface mesh, 3D curve mesh respectively). it performs selection extracting bulk and boundary sub-patches. Additionally, it exposes all the other boundaries of the bulk sub-patch, not belonging to the original boundary (referred here as "internal" boundary).
The compound bulk+boundary must comply with the following requisites:
- topological coherence: if a bulk volume mesh is linked, its boundary mesh must be a surface mesh. If a bulk surface mesh is linked, a boundary 3D curve/line must be linked. No other cases are taken into account.
- vertex ids coherence: boundary vertex ids of the bulk and constitutive vertex ids of the boundary must be the same
- MPI only: bulk and boundary must be distributed coherently among ranks. (see output of mimmo::Partition class)
BEWARE: This class does not have its xml interface implemented. Please refer to one of its specialized classes for xml TUI usage.
Ports available in FVGenericSelection Class :
Port Input | ||
---|---|---|
PortType | variable/function | DataType |
M_VALUEB | setDual | (MC_SCALAR, MD_BOOL) |
M_GEOM | setGeometry | (MC_SCALAR, MD_MIMMO_) |
M_GEOM2 | setBoundary | (MC_SCALAR, MD_MIMMO_) |
Port Output | ||
---|---|---|
PortType | variable/function | DataType |
M_GEOM | getVolumePatch | (MC_SCALAR, MD_MIMMO_) |
M_GEOM2 | getBoundaryPatch | (MC_SCALAR, MD_MIMMO_) |
M_GEOM3 | getInternalBoundaryPatch | (MC_SCALAR, MD_MIMMO_) |
Definition at line 78 of file FVMeshSelection.hpp.
Constructor & Destructor Documentation
◆ FVGenericSelection() [1/2]
mimmo::FVGenericSelection::FVGenericSelection | ( | int | topo = 1 | ) |
Basic Constructor. Parameter topo get topology of the target MimmoFvMesh where performing extraction:
- 1 for volume bulk and surface boundary
- 2 for surface bulk and 3DCurve boundary
No other values are allowed
- Parameters
-
[in] topo topology of the target MimmoFvMesh.
Definition at line 38 of file FVGenericSelection.cpp.
◆ ~FVGenericSelection()
|
virtual |
Basic Destructor
Definition at line 48 of file FVGenericSelection.cpp.
◆ FVGenericSelection() [2/2]
mimmo::FVGenericSelection::FVGenericSelection | ( | const FVGenericSelection & | other | ) |
Copy Constructor, any already calculated selection is not copied.
Definition at line 53 of file FVGenericSelection.cpp.
Member Function Documentation
◆ buildPorts()
|
protectedvirtual |
It builds the input/output ports of the object
Implements mimmo::BaseManipulation.
Reimplemented in mimmo::FVSelectionBySphere, mimmo::FVSelectionByCylinder, and mimmo::FVSelectionByBox.
Definition at line 86 of file FVGenericSelection.cpp.
◆ checkCoherenceBulkBoundary()
|
protected |
Check if boundary and bulk geometry as coherence in vertex indexing.
Definition at line 386 of file FVGenericSelection.cpp.
◆ cleanUpBoundaryPatch()
|
protected |
Once bulk and boundary are filled with selections, ensure that boundary patch has only vertices shared with the bulk borders. Clean up the mesh eventually.
Definition at line 265 of file FVGenericSelection.cpp.
◆ createInternalBoundaryPatch()
|
protected |
Once bulk and boundary patch selections are filled and clean, retrieve the internal boundary patch.
- Returns
- the internal boundary patch
Definition at line 323 of file FVGenericSelection.cpp.
◆ execute()
|
virtual |
Execute your object. A selection is extracted and trasferred in two indipendent MimmoObject structures pointed by m_volpatch and m_bndpatch members
Implements mimmo::BaseManipulation.
Definition at line 224 of file FVGenericSelection.cpp.
◆ getBoundaryPatch()
const mimmo::MimmoSharedPointer< MimmoObject > mimmo::FVGenericSelection::getBoundaryPatch | ( | ) | const |
Return pointer to boundary sub-patch extracted by the class
- Returns
- pointer to Boundary MimmoObject extracted sub-patch
Definition at line 166 of file FVGenericSelection.cpp.
◆ getInternalBoundaryPatch()
const mimmo::MimmoSharedPointer< MimmoObject > mimmo::FVGenericSelection::getInternalBoundaryPatch | ( | ) | const |
Return pointer to internal boundary sub-patch extracted by the class
- Returns
- pointer to Boundary MimmoObject extracted sub-patch
Definition at line 176 of file FVGenericSelection.cpp.
◆ getVolumePatch()
const mimmo::MimmoSharedPointer< MimmoObject > mimmo::FVGenericSelection::getVolumePatch | ( | ) | const |
Return pointer to bulk sub-patch extracted by the class
- Returns
- pointer to Bulk Mesh MimmoObject extracted sub-patch
Definition at line 157 of file FVGenericSelection.cpp.
◆ isDual()
bool mimmo::FVGenericSelection::isDual | ( | ) |
Return actual status of "dual" feature of the class. See setDual method.
- Returns
- true/false for "dual" feature activated or not
Definition at line 214 of file FVGenericSelection.cpp.
◆ operator=()
FVGenericSelection & mimmo::FVGenericSelection::operator= | ( | FVGenericSelection | other | ) |
Copy operator, any already calculated selection is not copied.
Definition at line 63 of file FVGenericSelection.cpp.
◆ plotOptionalResults()
|
protectedvirtual |
Plot optional result of the class in execution. It plots the selected patch as standard vtk unstructured grid.
Reimplemented from mimmo::BaseManipulation.
Definition at line 363 of file FVGenericSelection.cpp.
◆ setBoundaryGeometry()
void mimmo::FVGenericSelection::setBoundaryGeometry | ( | mimmo::MimmoSharedPointer< MimmoObject > | target | ) |
Set link to target boundary geometry for your selection.
- Parameters
-
[in] target Pointer to MimmoObject with boundary target geometry.
Definition at line 120 of file FVGenericSelection.cpp.
◆ setDual()
void mimmo::FVGenericSelection::setDual | ( | bool | flag = false | ) |
Set your class behavior selecting a portion of a target geoemetry. Given a initial set up, gets the dual result (its negative) of current selection. For instance, in a class extracting geometry inside the volume of an elemental shape, gets all other parts of it not included in the shape.
- Parameters
-
[in] flag true-Activate / false-Deactivate "dual" feature .
Definition at line 137 of file FVGenericSelection.cpp.
◆ setGeometry()
void mimmo::FVGenericSelection::setGeometry | ( | mimmo::MimmoSharedPointer< MimmoObject > | target | ) |
Set link to target bulk geometry for your selection. Reimplementation of mimmo::BaseManipulation::setGeometry();
- Parameters
-
[in] target Pointer to MimmoObject with bulk target geometry.
Definition at line 107 of file FVGenericSelection.cpp.
◆ setSelection()
void mimmo::FVGenericSelection::setSelection | ( | MimmoSharedPointer< GenericSelection > | selectBlock | ) |
Set GenericSelection block that performs selection coherently on bulk+boundary compound.
- Parameters
-
[in] selectBlock valid pointer to a selection block.
Definition at line 146 of file FVGenericSelection.cpp.
◆ swap()
|
protectednoexcept |
Swap function. Assign data of this class to another of the same type and vice-versa. Resulting patches of selection are not swapped, ever.
- Parameters
-
[in] x FVGenericSelection object
Definition at line 73 of file FVGenericSelection.cpp.
Member Data Documentation
◆ m_bndgeometry
|
protected |
target boundary geometry
Definition at line 113 of file FVMeshSelection.hpp.
◆ m_bndpatch
|
protected |
Pointer to result boundary sub-patch
Definition at line 116 of file FVMeshSelection.hpp.
◆ m_dual
|
protected |
False selects w/ current set up, true gets its "negative". False is default.
Definition at line 112 of file FVMeshSelection.hpp.
◆ m_intbndpatch
|
protected |
Pointer to boundary internal (not shared with boundary sub-patch) to the volume selection
Definition at line 117 of file FVMeshSelection.hpp.
◆ m_selectEngine
|
protected |
pointer to valid selector block
Definition at line 114 of file FVMeshSelection.hpp.
◆ m_topo
|
protected |
1 = volume (default value), 2 = surface
Definition at line 111 of file FVMeshSelection.hpp.
◆ m_volpatch
|
protected |
Pointer to result volume sub-patch
Definition at line 115 of file FVMeshSelection.hpp.
The documentation for this class was generated from the following files:
- src/geohandlers/FVMeshSelection.hpp
- src/geohandlers/FVGenericSelection.cpp