Selection through cylinder primitive. More...

#include <MeshSelection.hpp>

Inheritance diagram for mimmo::SelectionByCylinder:
Collaboration diagram for mimmo::SelectionByCylinder:

Public Member Functions

 SelectionByCylinder ()
 
 SelectionByCylinder (const bitpit::Config::Section &rootXML)
 
 SelectionByCylinder (const SelectionByCylinder &other)
 
 SelectionByCylinder (darray3E origin, darray3E span, double infLimTheta, darray3E mainAxis, mimmo::MimmoSharedPointer< MimmoObject > target)
 
virtual ~SelectionByCylinder ()
 
virtual void absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="")
 
void buildPorts ()
 
void clear ()
 
virtual void flushSectionXML (bitpit::Config::Section &slotXML, std::string name="")
 
SelectionByCylinderoperator= (SelectionByCylinder other)
 
- Public Member Functions inherited from mimmo::GenericSelection
 GenericSelection ()
 
 GenericSelection (const GenericSelection &other)
 
virtual ~GenericSelection ()
 
livector1D constrainedBoundary ()
 
void execute ()
 
mimmo::MimmoSharedPointer< MimmoObjectgetPatch ()
 
const mimmo::MimmoSharedPointer< MimmoObjectgetPatch () const
 
bool isDual ()
 
GenericSelectionoperator= (const GenericSelection &other)
 
virtual void plotOptionalResults ()
 
void setDual (bool flag=false)
 
virtual void setGeometry (mimmo::MimmoSharedPointer< MimmoObject >)
 
SelectionType whichMethod ()
 
- Public Member Functions inherited from mimmo::BaseManipulation
 BaseManipulation ()
 
 BaseManipulation (const BaseManipulation &other)
 
virtual ~BaseManipulation ()
 
void activate ()
 
bool arePortsBuilt ()
 
void clear ()
 
void disable ()
 
void exec ()
 
BaseManipulationgetChild (int i=0)
 
ConnectionType getConnectionType ()
 
MimmoSharedPointer< MimmoObjectgetGeometry ()
 
MimmoSharedPointer< MimmoObject > & getGeometryReference ()
 
int getId ()
 
bitpit::Logger & getLog ()
 
std::string getName ()
 
int getNChild ()
 
int getNParent ()
 
int getNPortsIn ()
 
int getNPortsOut ()
 
BaseManipulationgetParent (int i=0)
 
std::unordered_map< PortID, PortIn * > getPortsIn ()
 
std::unordered_map< PortID, PortOut * > getPortsOut ()
 
uint getPriority ()
 
virtual std::vector< BaseManipulation * > getSubBlocksEmbedded ()
 
bool isActive ()
 
bool isApply ()
 
bool isChild (BaseManipulation *, int &)
 
bool isParent (BaseManipulation *, int &)
 
bool isPlotInExecution ()
 
BaseManipulationoperator= (const BaseManipulation &other)
 
void removePins ()
 
void removePinsIn ()
 
void removePinsOut ()
 
void setApply (bool flag=true)
 
void setGeometry (MimmoSharedPointer< MimmoObject > geometry)
 
void setId (int)
 
void setLog (bitpit::Logger &log)
 
void setName (std::string name)
 
void setOutputPlot (std::string path)
 
void setPlotInExecution (bool)
 
void setPriority (uint priority)
 
void unsetGeometry ()
 
- Public Member Functions inherited from mimmo::Cylinder
 Cylinder ()
 
 Cylinder (const Cylinder &)
 
 Cylinder (const darray3E &origin, const darray3E &span)
 
 ~Cylinder ()
 
darray3E getLocalOrigin ()
 
bool intersectShapeAABBox (const darray3E &bMin, const darray3E &bMax)
 
darray3E toLocalCoord (const darray3E &point)
 
darray3E toWorldCoord (const darray3E &point)
 
- Public Member Functions inherited from mimmo::BasicShape
 BasicShape ()
 
virtual ~BasicShape ()
 
livector1D excludeCloudPoints (bitpit::PatchKernel *)
 
livector1D excludeCloudPoints (const dvecarr3E &)
 
livector1D excludeCloudPoints (MimmoSharedPointer< MimmoObject >)
 
livector1D excludeGeometry (bitpit::PatchKernel *)
 
livector1D excludeGeometry (MimmoSharedPointer< MimmoObject >)
 
CoordType getCoordinateType (int dir)
 
darray3E getInfLimits ()
 
darray3E getLocalSpan ()
 
darray3E getOrigin ()
 
dmatrix33E getRefSystem ()
 
darray3E getScaling ()
 
ShapeType getShapeType ()
 
ShapeType getShapeType () const
 
darray3E getSpan ()
 
livector1D includeCloudPoints (bitpit::PatchKernel *)
 
livector1D includeCloudPoints (const dvecarr3E &)
 
livector1D includeCloudPoints (MimmoSharedPointer< MimmoObject >)
 
livector1D includeGeometry (bitpit::PatchKernel *)
 
livector1D includeGeometry (MimmoSharedPointer< MimmoObject >)
 
bool isPointIncluded (bitpit::PatchKernel *, const long int &indexV)
 
bool isPointIncluded (const darray3E &)
 
bool isSimplexIncluded (bitpit::PatchKernel *, const long int &indexT)
 
bool isSimplexIncluded (const dvecarr3E &)
 
void setCoordinateType (CoordType, int dir)
 
void setInfLimits (darray3E val)
 
void setInfLimits (double val, int dir)
 
void setOrigin (darray3E)
 
void setRefSystem (darray3E, darray3E, darray3E)
 
void setRefSystem (dmatrix33E axes)
 
void setRefSystem (int, darray3E)
 
void setSpan (darray3E)
 
void setSpan (double, double, double)
 

Protected Member Functions

livector1D extractSelection ()
 
void swap (SelectionByCylinder &) noexcept
 
- Protected Member Functions inherited from mimmo::GenericSelection
void swap (GenericSelection &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 Member Functions inherited from mimmo::BasicShape
darray3E checkNearestPointToAABBox (const darray3E &point, const darray3E &bMin, const darray3E &bMax)
 
uint32_t intersectShapePlane (int level, const darray3E &target)
 
void swap (BasicShape &) noexcept
 

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 Member Functions inherited from mimmo::BasicShape
static dmatrix33E inverse (const dmatrix33E &mat)
 
static darray3E matmul (const darray3E &vec, const dmatrix33E &mat)
 
static darray3E matmul (const dmatrix33E &mat, const darray3E &vec)
 
static dmatrix33E transpose (const dmatrix33E &mat)
 
- Protected Attributes inherited from mimmo::GenericSelection
bool m_dual
 
mimmo::MimmoSharedPointer< MimmoObjectm_subpatch
 
int m_topo
 
SelectionType m_type
 
- 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< MimmoObjectm_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
 
- Protected Attributes inherited from mimmo::BasicShape
dvecarr3E m_bbox
 
darray3E m_infLimits
 
darray3E m_origin
 
darray3E m_scaling
 
dmatrix33E m_sdr
 
dmatrix33E m_sdr_inverse
 
ShapeType m_shape
 
darray3E m_span
 
std::array< CoordType, 3 > m_typeCoord
 
- Static Protected Attributes inherited from mimmo::BaseManipulation
static int sm_baseManipulationCounter
 

Detailed Description

Selection through cylinder primitive.

Selection Object managing selection of sub-patches oof a MimmoObject Data structure. Select all elements contained in a cylinder.

Ports available in SelectionByCylinder Class :


Port Input
PortType variable/function DataType
M_POINT setOrigin (MC_ARRAY3, MD_FLOAT)
M_AXES setRefSystem (MC_ARR3ARR3, MD_FLOAT)
M_SPAN setSpan (MC_ARRAY3, MD_FLOAT)
M_INFLIMITS setInfLimits (MC_ARRAY3, MD_FLOAT)
Port Output
PortType variable/function DataType

Inherited from GenericSelection

Port Input
PortType variable/function DataType
M_VALUEB setDual (MC_SCALAR, MD_BOOL)
M_GEOM setGeometry (MC_SCALAR, MD_MIMMO_)
Port Output
PortType variable/function DataType
M_VECTORLI constrainedBoundary (MC_VECTOR, MD_LONG)
M_GEOM getPatch (MC_SCALAR, MD_MIMMO_)

The xml available parameters, sections and subsections are the following :

Inherited from BaseManipulation:

  • ClassName: name of the class as mimmo.SelectionByCylinder;
  • Priority: uint marking priority in multi-chain execution;
  • PlotInExecution: boolean 0/1 print optional results of the class;
  • OutputPlot: target directory for optional results writing.

Proper of the class:

  • Dual: boolean to get straight what given by selection method or its exact dual;
  • Origin: array of 3 doubles identifying origin of cylinder (space separated);
  • Span: span of the cylinder (base_radius angular_azimuthal_width height);
  • RefSystem: reference system of the cylinder (axis2 along the cylinder's height):

    <RefSystem>
       <axis0> 1.0 0.0 0.0 </axis0>
       <axis1> 0.0 1.0 0.0 </axis1>
       <axis2> 0.0 0.0 1.0 </axis2>
    </RefSystem>


  • InfLimits: set starting point for each cylindrical coordinate. Useful to assign different starting angular coordinate to azimuthal width.

Geometry has to be mandatorily passed through port.

Examples
geohandlers_example_00000.cpp.

Definition at line 272 of file MeshSelection.hpp.

Constructor & Destructor Documentation

◆ SelectionByCylinder() [1/4]

mimmo::SelectionByCylinder::SelectionByCylinder ( )

Basic Constructor

Definition at line 33 of file SelectionByCylinder.cpp.

◆ SelectionByCylinder() [2/4]

mimmo::SelectionByCylinder::SelectionByCylinder ( const bitpit::Config::Section &  rootXML)

Custom constructor reading xml data

Parameters
[in]rootXMLreference to your xml tree section

Definition at line 42 of file SelectionByCylinder.cpp.

◆ SelectionByCylinder() [3/4]

mimmo::SelectionByCylinder::SelectionByCylinder ( darray3E  origin,
darray3E  span,
double  infLimTheta,
darray3E  mainAxis,
mimmo::MimmoSharedPointer< MimmoObject target 
)

Custom Constructor. Pay attention span of angular coordinate must be at most 2*pi.

Parameters
[in]originOrigin of the cylinder->baricenter
[in]spanSpan of the cylinder, basis radius/ span of angular coord in radians/height
[in]infLimThetaStarting origin of the angular coordinate. default is 0 radians.
[in]mainAxisOrientation of the cylinder height axis
[in]targetPointer to MimmoObject target geometry

Definition at line 65 of file SelectionByCylinder.cpp.

◆ ~SelectionByCylinder()

mimmo::SelectionByCylinder::~SelectionByCylinder ( )
virtual

Destructor

Definition at line 78 of file SelectionByCylinder.cpp.

◆ SelectionByCylinder() [4/4]

mimmo::SelectionByCylinder::SelectionByCylinder ( const SelectionByCylinder other)

Copy Constructor

Definition at line 83 of file SelectionByCylinder.cpp.

Member Function Documentation

◆ absorbSectionXML()

void mimmo::SelectionByCylinder::absorbSectionXML ( const bitpit::Config::Section &  slotXML,
std::string  name = "" 
)
virtual

It sets infos reading from a XML bitpit::Config::section.

Parameters
[in]slotXMLbitpit::Config::Section of XML file
[in]namename associated to the slot

Reimplemented from mimmo::BaseManipulation.

Definition at line 159 of file SelectionByCylinder.cpp.

◆ buildPorts()

void mimmo::SelectionByCylinder::buildPorts ( )
virtual

It builds the input/output ports of the object

Reimplemented from mimmo::GenericSelection.

Definition at line 109 of file SelectionByCylinder.cpp.

◆ clear()

void mimmo::SelectionByCylinder::clear ( )

Clear content of the class

Definition at line 127 of file SelectionByCylinder.cpp.

◆ extractSelection()

livector1D mimmo::SelectionByCylinder::extractSelection ( )
protectedvirtual

Extract portion of target geometry which are enough near to the external geometry provided

Returns
ids of cell of target tessellation extracted

Implements mimmo::GenericSelection.

Definition at line 138 of file SelectionByCylinder.cpp.

◆ flushSectionXML()

void mimmo::SelectionByCylinder::flushSectionXML ( bitpit::Config::Section &  slotXML,
std::string  name = "" 
)
virtual

It sets infos from class members in a XML bitpit::Config::section.

Parameters
[in]slotXMLbitpit::Config::Section of XML file
[in]namename associated to the slot

Reimplemented from mimmo::BaseManipulation.

Definition at line 261 of file SelectionByCylinder.cpp.

◆ operator=()

SelectionByCylinder & mimmo::SelectionByCylinder::operator= ( SelectionByCylinder  other)

Copy operator

Definition at line 89 of file SelectionByCylinder.cpp.

◆ swap()

void mimmo::SelectionByCylinder::swap ( SelectionByCylinder x)
protectednoexcept

Swap function. Assign data of this class to another of the same type and vice-versa. Resulting patch of selection is not swapped, ever.

Parameters
[in]xSelectionByCylinder object

Definition at line 99 of file SelectionByCylinder.cpp.


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