www.cemf.ir
pointFlag< ExecutionSpace > Class Template Reference
+ Inheritance diagram for pointFlag< ExecutionSpace >:
+ Collaboration diagram for pointFlag< ExecutionSpace >:

Public Member Functions

 pointFlag ()=default
 
 pointFlag (uint32 capacity, uint32 start, uint32 end)
 
 pointFlag (viewType flags, uint32 numActive, rangeU32 activeRange, bool isAllActive)
 
 pointFlag (const pointFlag &)=default
 
pointFlagoperator= (const pointFlag &)=default
 
 pointFlag (pointFlag &&)=default
 
pointFlagoperator= (pointFlag &&)=default
 
 ~pointFlag ()=default
 
INLINE_FUNCTION_HD bool isAllActive () const
 
const INLINE_FUNCTION_HD auto & activeRange () const
 
INLINE_FUNCTION_HD uint32 capacity () const
 
INLINE_FUNCTION_HD auto numActive () const
 
INLINE_FUNCTION_HD auto leftSize () const
 
INLINE_FUNCTION_HD auto rightSize () const
 
INLINE_FUNCTION_HD auto bottomSize () const
 
INLINE_FUNCTION_HD auto topSize () const
 
INLINE_FUNCTION_HD auto rearSize () const
 
INLINE_FUNCTION_HD auto frontSize () const
 
INLINE_FUNCTION_HD bool operator() (uint32 i) const
 
INLINE_FUNCTION_HD bool isActive (uint32 i) const
 
INLINE_FUNCTION_HD bool isBoundary (uint8 flg) const
 
INLINE_FUNCTION_HD bool isLeft (uint8 flg) const
 
INLINE_FUNCTION_HD bool isRight (uint8 flg) const
 
INLINE_FUNCTION_HD bool isBottom (uint8 flg) const
 
INLINE_FUNCTION_HD bool isTop (uint8 flg) const
 
INLINE_FUNCTION_HD bool isRear (uint8 flg) const
 
INLINE_FUNCTION_HD bool isFront (uint8 flg) const
 
template<typename ExeSpace >
pointFlag< ExeSpace > clone () const
 
ViewType1D< uint32, memory_spacegetActivePoints ()
 
ViewType1D< uint32, memory_spacegetEmptyPoints (uint32 numToGet) const
 
uint32 markOutOfBoxDelete (const box &validBox, ViewType1D< realx3, memory_space > points)
 Loop over the active points and mark those out of the box and return number of deleted points. More...
 
uint32 addInternalPoints (const ViewType1D< uint32, memory_space > &points)
 
bool deletePoints (scatteredFieldAccess< uint32, memory_space > points)
 
bool deletePoints (ViewType1D< uint32, memory_space > points)
 
bool changeFlags (ViewType1D< uint32, memory_space > changePoints, uint32 boundaryIndex)
 
uint32 markPointRegions (domain dm, ViewType1D< realx3, memory_space > points, real leftLength, real rightLength, real bottomLength, real topLength, real rearLength, real frontLength)
 mark points based on their position in the domain. More...
 
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)
 fill the lists for boundary faces. More...
 
uint32 markDelete (const plane &pln, ViewType1D< realx3, memory_space > points, ViewType1D< uint32, memory_space > indices, ViewType1D< uint32, memory_space > onOff)
 
uint32 changeCapacity (uint32 reqEmptySpots)
 

Protected Member Functions

uint8 getBoundaryFlag (uint32 index) const
 
void resetFlags (uint32 cap, uint32 start, uint32 end)
 

Protected Attributes

viewType flags_
 
uint32 numActive_ = 0
 
rangeU32 activeRange_ = {0,0}
 
bool isAllActive_ = false
 
uint32 nLeft_ = 0
 
uint32 nRight_ = 0
 
uint32 nBottom_ = 0
 
uint32 nTop_ = 0
 
uint32 nRear_ = 0
 
uint32 nFront_ = 0
 

Private Types

enum  Flag : uint8 {
  DELETED = 1, INTERNAL = 2, LEFT = 4, RIGHT = 8,
  BOTTOM = 16, TOP = 32, REAR = 64, FRONT = 128
}
 
using execution_space = ExecutionSpace
 
using memory_space = typename execution_space::memory_space
 
using viewType = ViewType1D< uint8, memory_space >
 
using device_type = typename viewType::device_type
 
using rPolicy = Kokkos::RangePolicy< execution_space, Kokkos::IndexType< uint32 > >
 

Friends

class internalPoints
 

Detailed Description

template<typename ExecutionSpace>
class pFlow::pointFlag< ExecutionSpace >

Definition at line 32 of file pointFlag.hpp.

Member Typedef Documentation

◆ execution_space

using execution_space = ExecutionSpace
private

Definition at line 46 of file pointFlag.hpp.

◆ memory_space

using memory_space = typename execution_space::memory_space
private

Definition at line 48 of file pointFlag.hpp.

◆ viewType

Definition at line 50 of file pointFlag.hpp.

◆ device_type

using device_type = typename viewType::device_type
private

Definition at line 52 of file pointFlag.hpp.

◆ rPolicy

using rPolicy = Kokkos::RangePolicy< execution_space, Kokkos::IndexType<uint32> >
private

Definition at line 56 of file pointFlag.hpp.

Member Enumeration Documentation

◆ Flag

enum Flag : uint8
private
Enumerator
DELETED 
INTERNAL 
LEFT 
RIGHT 
BOTTOM 
TOP 
REAR 
FRONT 

Definition at line 34 of file pointFlag.hpp.

Constructor & Destructor Documentation

◆ pointFlag() [1/5]

pointFlag ( )
default

◆ pointFlag() [2/5]

pointFlag ( uint32  capacity,
uint32  start,
uint32  end 
)
inline

Definition at line 139 of file pointFlag.hpp.

◆ pointFlag() [3/5]

pointFlag ( viewType  flags,
uint32  numActive,
rangeU32  activeRange,
bool  isAllActive 
)
inline

Definition at line 150 of file pointFlag.hpp.

◆ pointFlag() [4/5]

pointFlag ( const pointFlag< ExecutionSpace > &  )
default

◆ pointFlag() [5/5]

pointFlag ( pointFlag< ExecutionSpace > &&  )
default

◆ ~pointFlag()

~pointFlag ( )
default

Member Function Documentation

◆ getBoundaryFlag()

uint8 getBoundaryFlag ( uint32  index) const
inlineprotected

Definition at line 84 of file pointFlag.hpp.

◆ resetFlags()

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

Definition at line 113 of file pointFlag.hpp.

◆ operator=() [1/2]

pointFlag& operator= ( const pointFlag< ExecutionSpace > &  )
default

◆ operator=() [2/2]

pointFlag& operator= ( pointFlag< ExecutionSpace > &&  )
default

◆ isAllActive()

◆ activeRange()

◆ capacity()

INLINE_FUNCTION_HD uint32 capacity ( ) const
inline

Definition at line 185 of file pointFlag.hpp.

Referenced by internalPoints::capacity(), pointFlag< DefaultHostExecutionSpace >::pointFlag(), and pointFlag< DefaultHostExecutionSpace >::resetFlags().

+ Here is the caller graph for this function:

◆ numActive()

INLINE_FUNCTION_HD auto numActive ( ) const
inline

Definition at line 191 of file pointFlag.hpp.

Referenced by pFlow::mapperNBSKernels::findPointExtends(), pFlow::getSortedIndices(), and internalPoints::numActive().

+ Here is the caller graph for this function:

◆ leftSize()

INLINE_FUNCTION_HD auto leftSize ( ) const
inline

Definition at line 197 of file pointFlag.hpp.

◆ rightSize()

INLINE_FUNCTION_HD auto rightSize ( ) const
inline

Definition at line 203 of file pointFlag.hpp.

◆ bottomSize()

INLINE_FUNCTION_HD auto bottomSize ( ) const
inline

Definition at line 209 of file pointFlag.hpp.

◆ topSize()

INLINE_FUNCTION_HD auto topSize ( ) const
inline

Definition at line 215 of file pointFlag.hpp.

◆ rearSize()

INLINE_FUNCTION_HD auto rearSize ( ) const
inline

Definition at line 221 of file pointFlag.hpp.

◆ frontSize()

INLINE_FUNCTION_HD auto frontSize ( ) const
inline

Definition at line 227 of file pointFlag.hpp.

◆ operator()()

INLINE_FUNCTION_HD bool operator() ( uint32  i) const
inline

Definition at line 234 of file pointFlag.hpp.

◆ isActive()

INLINE_FUNCTION_HD bool isActive ( uint32  i) const
inline

Definition at line 240 of file pointFlag.hpp.

Referenced by pFlow::getSortedIndices(), and pointFlag< DefaultHostExecutionSpace >::operator()().

+ Here is the caller graph for this function:

◆ isBoundary()

INLINE_FUNCTION_HD bool isBoundary ( uint8  flg) const
inline

Definition at line 247 of file pointFlag.hpp.

◆ isLeft()

INLINE_FUNCTION_HD bool isLeft ( uint8  flg) const
inline

Definition at line 254 of file pointFlag.hpp.

◆ isRight()

INLINE_FUNCTION_HD bool isRight ( uint8  flg) const
inline

Definition at line 260 of file pointFlag.hpp.

◆ isBottom()

INLINE_FUNCTION_HD bool isBottom ( uint8  flg) const
inline

Definition at line 267 of file pointFlag.hpp.

◆ isTop()

INLINE_FUNCTION_HD bool isTop ( uint8  flg) const
inline

Definition at line 273 of file pointFlag.hpp.

◆ isRear()

INLINE_FUNCTION_HD bool isRear ( uint8  flg) const
inline

Definition at line 279 of file pointFlag.hpp.

◆ isFront()

INLINE_FUNCTION_HD bool isFront ( uint8  flg) const
inline

Definition at line 285 of file pointFlag.hpp.

◆ clone()

pointFlag<ExeSpace> clone ( ) const
inline

Definition at line 291 of file pointFlag.hpp.

Referenced by internalPoints::syncPFlag().

+ Here is the caller graph for this function:

◆ getActivePoints()

pFlow::ViewType1D< pFlow::uint32, typename pFlow::pointFlag< ExecutionSpace >::memory_space > getActivePoints

Definition at line 25 of file pointFlagKernels.hpp.

◆ getEmptyPoints()

pFlow::ViewType1D< pFlow::uint32, typename pFlow::pointFlag< ExecutionSpace >::memory_space > getEmptyPoints ( uint32  numToGet) const

Definition at line 55 of file pointFlagKernels.hpp.

◆ markOutOfBoxDelete()

pFlow::uint32 markOutOfBoxDelete ( const box validBox,
ViewType1D< realx3, memory_space points 
)

Loop over the active points and mark those out of the box and return number of deleted points.

Parameters
validBoxthe box whose inside is valid
pointslist of all points
Returns
number of deleted points

Definition at line 102 of file pointFlagKernels.hpp.

◆ addInternalPoints()

pFlow::uint32 addInternalPoints ( const ViewType1D< uint32, memory_space > &  points)

Definition at line 174 of file pointFlagKernels.hpp.

◆ deletePoints() [1/2]

bool deletePoints ( scatteredFieldAccess< uint32, memory_space points)

Definition at line 221 of file pointFlagKernels.hpp.

◆ deletePoints() [2/2]

bool deletePoints ( ViewType1D< uint32, memory_space points)

Definition at line 263 of file pointFlagKernels.hpp.

◆ changeFlags()

bool changeFlags ( ViewType1D< uint32, memory_space changePoints,
uint32  boundaryIndex 
)

Definition at line 308 of file pointFlagKernels.hpp.

◆ markPointRegions()

pFlow::uint32 markPointRegions ( domain  dm,
ViewType1D< realx3, memory_space points,
real  leftLength,
real  rightLength,
real  bottomLength,
real  topLength,
real  rearLength,
real  frontLength 
)

mark points based on their position in the domain.

This should be the first method to be called when updating boundaries (step 1 of 2).

Parameters
dmthe domain for which particles are tested
pointslist of points
leftLengthneighbor length of the left face
rightLengthneighbor length of the right face
bottomLengthneighbor length of the bottom face
topLengthneighbor length of the top face
rearLengthneighbor length of the rear face
frontLengthneighbor length of the front face
Returns
number of deleted points

Definition at line 330 of file pointFlagKernels.hpp.

◆ 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 
)

fill the lists for boundary faces.

Lists keep the index of particles in the neighborhood of the faces. This mehtod is called after markPointRegions (step 2 of 2).

Parameters
leftListneighbor list of the left face
rightListneighbor list of the right face
bottomListneighbor list of the bottom face
topListneighbor list of the top face
rearListneighbor list of the rear face
frontListneighbor list of the front face

Definition at line 467 of file pointFlagKernels.hpp.

◆ markDelete()

pFlow::uint32 markDelete ( const plane pln,
ViewType1D< realx3, memory_space points,
ViewType1D< uint32, memory_space indices,
ViewType1D< uint32, memory_space onOff 
)

Definition at line 510 of file pointFlagKernels.hpp.

◆ changeCapacity()

pFlow::uint32 changeCapacity ( uint32  reqEmptySpots)

Definition at line 582 of file pointFlagKernels.hpp.

Friends And Related Function Documentation

◆ internalPoints

friend class internalPoints
friend

Definition at line 60 of file pointFlag.hpp.

Member Data Documentation

◆ flags_

◆ numActive_

◆ activeRange_

◆ isAllActive_

◆ nLeft_

◆ nRight_

◆ nBottom_

◆ nTop_

◆ nRear_

◆ nFront_


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