www.cemf.ir
internalPoints Class Referenceabstract
+ Inheritance diagram for internalPoints:
+ Collaboration diagram for internalPoints:

Public Types

using PointsType = realx3Field_D
 
using PointsTypeHost = typename PointsType::FieldTypeHost
 
using device_type = typename PointsType::device_type
 
using memory_space = typename PointsType::memory_space
 
using execution_space = typename PointsType::execution_space
 

Public Member Functions

 TypeInfo ("internalPoints")
 
 internalPoints ()
 
 internalPoints (const realx3Vector &posVec)
 Construct from point positions, assume all points are active. More...
 
 internalPoints (const internalPoints &)=delete
 No Copy construct. More...
 
 internalPoints (internalPoints &&)=default
 Move construct. More...
 
internalPointsoperator= (const internalPoints &)=delete
 No Copy assignment. More...
 
internalPointsoperator= (internalPoints &&)=default
 Move assignment. More...
 
 ~internalPoints () override=default
 Destructor. More...
 
const pFlagTypeDeviceactivePointsMaskDevice () const
 
const pFlagTypeHostactivePointsMaskHost () const
 
const PointsTypepointPosition () const
 
PointsTypepointPosition ()
 
auto pointPositionHost () const
 
auto pointPositionDevice () const
 
PointsTypeHost activePointsHost () const
 
uint32 size () const
 
uint32 capacity () const
 
bool empty () const
 
uint32 numActive () const
 
bool isAllActive () const
 
auto activeRange () const
 
virtual Timetime ()=0
 
virtual const Timetime () const =0
 
virtual boundaryBaseboundary (size_t boundaryIndex)=0
 
virtual const boundaryBaseboundary (size_t boundaryIndex) const =0
 
bool deletePoints (scatteredFieldAccess< uint32, memory_space > delPoints)
 delete points at indices given in delPoints. More...
 
uint32 updateFlag (const domain &dm, const std::array< real, 6 > &dist)
 
void fillNeighborsLists (ViewType1D< uint32, memory_space > leftList, ViewType1D< uint32, memory_space > rightList, ViewType1D< uint32, memory_space > bottomList, ViewType1D< uint32, memory_space > topList, ViewType1D< uint32, memory_space > rearList, ViewType1D< uint32, memory_space > frontList)
 
bool insertPoints (const realx3Vector &points, anyList &varList)
 
bool insertPointsOnly (const realx3Vector_D &points, message &msg, anyList &varList)
 
bool read (iIstream &is)
 Read. More...
 
bool write (iOstream &os) const
 Write. More...
 
bool read (iIstream &is, const IOPattern &iop)
 Read. More...
 
bool write (iOstream &os, const IOPattern &iop) const
 Write. More...
 
- Public Member Functions inherited from subscriber
 subscriber (const word &name)
 
 subscriber (const subscriber &)
 Copy constructor, only copies the name, not the list. More...
 
 subscriber (subscriber &&)
 Move constructor, moves the name and the list, also change the subriber of the object in the list
More...
 
subscriberoperator= (const subscriber &)
 Copy assignemnt, only assign the name, do not assign the list. More...
 
subscriberoperator= (subscriber &&)
 Move assignment, move assign name and list, also change the subcriber of the object in the list
More...
 
virtual ~subscriber ()
 
virtual bool subscribe (message msg, observer *obsevr) const
 
virtual bool unsubscribe (observer *obsevr) const
 
bool notify (uint32 iter, real t, real dt, const message msg, const anyList &varList)
 
bool notify (const timeInfo &ti, const message msg, const anyList &varList)
 
const wordsubscriberName () const
 

Static Public Attributes

static const uint32 initialCapacity_ = 10000
 

Protected Member Functions

void syncPFlag () const
 
void unSyncFlag ()
 
void createDeviceFlag (uint32 cap, uint32 start, uint32 end)
 
bool sortPoints (const uint32IndexContainer &sortedIndices)
 

Private Member Functions

bool deletePoints (const uint32Vector_D &delPoints)
 
bool changePointsFlagPosition (const uint32Vector_D &changePoints, realx3 transferVector, uint32 fromBoundaryIndex, uint32 toBoundaryIndex)
 

Private Attributes

friend boundaryBase
 
PointsType pointPosition_
 Position of points on device. More...
 
pFlagTypeDevice pFlagsD_
 flag of points on device More...
 
pFlagTypeHost pFlagsH_
 flag of points on host More...
 
bool pFlagSync_ = false
 if both host and device flags sync More...
 

Detailed Description

Definition at line 38 of file internalPoints.hpp.

Member Typedef Documentation

◆ PointsType

Definition at line 46 of file internalPoints.hpp.

◆ PointsTypeHost

Definition at line 48 of file internalPoints.hpp.

◆ device_type

Definition at line 50 of file internalPoints.hpp.

◆ memory_space

Definition at line 52 of file internalPoints.hpp.

◆ execution_space

Definition at line 54 of file internalPoints.hpp.

Constructor & Destructor Documentation

◆ internalPoints() [1/4]

Definition at line 159 of file internalPoints.cpp.

◆ internalPoints() [2/4]

internalPoints ( const realx3Vector posVec)
explicit

Construct from point positions, assume all points are active.

Definition at line 167 of file internalPoints.cpp.

◆ internalPoints() [3/4]

internalPoints ( const internalPoints )
delete

No Copy construct.

◆ internalPoints() [4/4]

internalPoints ( internalPoints &&  )
default

Move construct.

◆ ~internalPoints()

~internalPoints ( )
overridedefault

Destructor.

Member Function Documentation

◆ deletePoints() [1/2]

◆ changePointsFlagPosition()

bool changePointsFlagPosition ( const uint32Vector_D changePoints,
realx3  transferVector,
uint32  fromBoundaryIndex,
uint32  toBoundaryIndex 
)
private

◆ syncPFlag()

void syncPFlag ( ) const
protected

Definition at line 28 of file internalPoints.cpp.

References pointFlag< ExecutionSpace >::clone(), internalPoints::pFlagsD_, internalPoints::pFlagsH_, and internalPoints::pFlagSync_.

+ Here is the call graph for this function:

◆ unSyncFlag()

void unSyncFlag ( )
inlineprotected

Definition at line 92 of file internalPoints.hpp.

References internalPoints::pFlagSync_.

Referenced by internalPoints::createDeviceFlag().

+ Here is the caller graph for this function:

◆ createDeviceFlag()

void createDeviceFlag ( uint32  cap,
uint32  start,
uint32  end 
)
inlineprotected

Definition at line 98 of file internalPoints.hpp.

References internalPoints::pFlagsD_, and internalPoints::unSyncFlag().

+ Here is the call graph for this function:

◆ sortPoints()

bool sortPoints ( const uint32IndexContainer sortedIndices)
protected

Definition at line 145 of file internalPoints.cpp.

References fatalErrorInFunction, and indexContainer< IndexType >::size().

+ Here is the call graph for this function:

◆ TypeInfo()

TypeInfo ( "internalPoints"  )

◆ operator=() [1/2]

internalPoints& operator= ( const internalPoints )
delete

No Copy assignment.

◆ operator=() [2/2]

internalPoints& operator= ( internalPoints &&  )
default

Move assignment.

◆ activePointsMaskDevice()

const pFlow::pFlagTypeDevice & activePointsMaskDevice ( ) const

Definition at line 194 of file internalPoints.cpp.

Referenced by internalField< realx3, void >::activePointsMaskDevice().

+ Here is the caller graph for this function:

◆ activePointsMaskHost()

const pFlow::pFlagTypeHost & activePointsMaskHost ( ) const

Definition at line 201 of file internalPoints.cpp.

Referenced by internalField< realx3, void >::activePointsMaskHost(), and pointRectCell::mapPOints().

+ Here is the caller graph for this function:

◆ pointPosition() [1/2]

pFlow::internalPoints::PointsType & pointPosition ( ) const

Definition at line 209 of file internalPoints.cpp.

Referenced by particles::pointPosition(), selectBox::selectAllPointsInBox(), and pointStructure::setupPointStructure().

+ Here is the caller graph for this function:

◆ pointPosition() [2/2]

PointsType& pointPosition ( )

◆ pointPositionHost()

auto pointPositionHost ( ) const
inline

Definition at line 153 of file internalPoints.hpp.

References VectorSingle< T, MemorySpace >::hostView(), and internalPoints::pointPosition_.

Referenced by pointRectCell::mapPOints().

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

◆ pointPositionDevice()

auto pointPositionDevice ( ) const
inline

Definition at line 159 of file internalPoints.hpp.

References VectorSingle< T, MemorySpace >::deviceView(), and internalPoints::pointPosition_.

+ Here is the call graph for this function:

◆ activePointsHost()

pFlow::internalPoints::PointsTypeHost activePointsHost ( ) const

Definition at line 222 of file internalPoints.cpp.

References n.

◆ size()

uint32 size ( ) const
inline

Definition at line 168 of file internalPoints.hpp.

References pointFlag< ExecutionSpace >::activeRange_, Range< T >::end(), and internalPoints::pFlagsD_.

Referenced by internalPoints::empty(), selectorStridedRange::selectorStridedRange(), and particles::size().

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

◆ capacity()

uint32 capacity ( ) const
inline

Definition at line 175 of file internalPoints.hpp.

References pointFlag< ExecutionSpace >::capacity(), and internalPoints::pFlagsD_.

Referenced by particles::capacity().

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

◆ empty()

bool empty ( ) const
inline

Definition at line 181 of file internalPoints.hpp.

References internalPoints::size().

+ Here is the call graph for this function:

◆ numActive()

uint32 numActive ( ) const
inline

Definition at line 188 of file internalPoints.hpp.

References pointFlag< ExecutionSpace >::numActive(), and internalPoints::pFlagsD_.

Referenced by particles::numActive().

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

◆ isAllActive()

bool isAllActive ( ) const
inline

Definition at line 195 of file internalPoints.hpp.

References pointFlag< ExecutionSpace >::isAllActive(), and internalPoints::pFlagsD_.

Referenced by particles::isAllActive(), and internalField< realx3, void >::isAllActive().

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

◆ activeRange()

auto activeRange ( ) const
inline

Definition at line 201 of file internalPoints.hpp.

References pointFlag< ExecutionSpace >::activeRange(), and internalPoints::pFlagsD_.

Referenced by pointField< pFlow::VectorSingle, pFlow::AB3History >::activeRange(), and internalField< realx3, void >::activeRange().

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

◆ time() [1/2]

virtual Time& time ( )
pure virtual

Implemented in pointStructure.

Referenced by internalField< realx3, void >::time().

+ Here is the caller graph for this function:

◆ time() [2/2]

virtual const Time& time ( ) const
pure virtual

Implemented in pointStructure.

◆ boundary() [1/2]

virtual boundaryBase& boundary ( size_t  boundaryIndex)
pure virtual

Implemented in pointStructure.

◆ boundary() [2/2]

virtual const boundaryBase& boundary ( size_t  boundaryIndex) const
pure virtual

Implemented in pointStructure.

◆ deletePoints() [2/2]

bool deletePoints ( scatteredFieldAccess< uint32, memory_space delPoints)

delete points at indices given in delPoints.

The default is that delPoints contains sorted indices

Definition at line 253 of file internalPoints.cpp.

References END_WARNING, pFlow::endl(), fatalErrorInFunction, and WARNING.

+ Here is the call graph for this function:

◆ updateFlag()

pFlow::uint32 updateFlag ( const domain dm,
const std::array< real, 6 > &  dist 
)

Definition at line 271 of file internalPoints.cpp.

◆ fillNeighborsLists()

void fillNeighborsLists ( ViewType1D< uint32, memory_space leftList,
ViewType1D< uint32, memory_space rightList,
ViewType1D< uint32, memory_space bottomList,
ViewType1D< uint32, memory_space topList,
ViewType1D< uint32, memory_space rearList,
ViewType1D< uint32, memory_space frontList 
)

Definition at line 291 of file internalPoints.cpp.

◆ insertPoints()

◆ insertPointsOnly()

◆ read() [1/2]

bool read ( iIstream is)

Read.

Definition at line 530 of file internalPoints.cpp.

References pFlow::endl(), fatalErrorInFunction, and IOstream::name().

+ Here is the call graph for this function:

◆ write() [1/2]

bool write ( iOstream os) const

Write.

Definition at line 556 of file internalPoints.cpp.

Referenced by pFlow::operator<<(), and pointStructure::write().

+ Here is the caller graph for this function:

◆ read() [2/2]

bool read ( iIstream is,
const IOPattern iop 
)

Read.

Definition at line 566 of file internalPoints.cpp.

References pFlow::endl(), fatalErrorInFunction, and IOstream::name().

+ Here is the call graph for this function:

◆ write() [2/2]

bool write ( iOstream os,
const IOPattern iop 
) const

Write.

Definition at line 590 of file internalPoints.cpp.

Member Data Documentation

◆ initialCapacity_

const uint32 initialCapacity_ = 10000
inlinestatic

Definition at line 44 of file internalPoints.hpp.

◆ boundaryBase

friend boundaryBase
private

Definition at line 60 of file internalPoints.hpp.

◆ pointPosition_

PointsType pointPosition_
private

Position of points on device.

Definition at line 65 of file internalPoints.hpp.

Referenced by internalPoints::pointPositionDevice(), and internalPoints::pointPositionHost().

◆ pFlagsD_

◆ pFlagsH_

pFlagTypeHost pFlagsH_
mutableprivate

flag of points on host

Definition at line 71 of file internalPoints.hpp.

Referenced by internalPoints::syncPFlag().

◆ pFlagSync_

bool pFlagSync_ = false
mutableprivate

if both host and device flags sync

Definition at line 74 of file internalPoints.hpp.

Referenced by internalPoints::syncPFlag(), and internalPoints::unSyncFlag().


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