# PhasicFlow: sphereInteraction< contactForceModel, geometryMotionModel, contactListType > Class Template Reference

sphereInteraction< contactForceModel, geometryMotionModel, contactListType > Class Template Reference
Inheritance diagram for sphereInteraction< contactForceModel, geometryMotionModel, contactListType >:
[legend]
Collaboration diagram for sphereInteraction< contactForceModel, geometryMotionModel, contactListType >:
[legend]

## Public Types

using | GeometryMotionModel = geometryMotionModel
using | ContactForceModel = contactForceModel
using | MotionModel = typename geometryMotionModel::MotionModel
using | ModelStorage = typename ContactForceModel::contactForceStorage
using | IdType = typename interaction::IdType
using | IndexType = typename interaction::IndexType
using | ExecutionSpace = typename interaction::ExecutionSpace
using | ContactListType = contactListType< ModelStorage, ExecutionSpace, IdType >
using | PairsContainerType = typename contactSearch::PairContainerType
Public Types inherited from interaction
using | IdType = typename interactionBase::IdType
using | IndexType = typename interactionBase::IndexType
using | ExecutionSpace = typename interactionBase::ExecutionSpace
Public Types inherited from interactionBase
using | IndexType = CELL_INDEX_TYPE
using | IdType = ID_TYPE
using | ExecutionSpace = DefaultExecutionSpace

## Public Member Functions

| TypeInfoTemplate3 ("sphereInteraction", ContactForceModel, MotionModel, ContactListType)
| sphereInteraction (systemControl &control, const particles &prtcl, const geometry &geom)
| add_vCtor (interaction, sphereInteraction, systemControl)
bool | beforeIteration () override
bool | iterate () override
bool | afterIteration () override
bool | update (const eventMessage &msg) override
bool | sphereSphereInteraction ()
bool | sphereWallInteraction ()
Public Member Functions inherited from interaction
| TypeInfo ("interaction")
| interaction (systemControl &control, const particles &prtcl, const geometry &geom)
virtual | ~interaction ()=default
| create_vCtor (interaction, systemControl,(systemControl &control, const particles &prtcl, const geometry &geom),(control, prtcl, geom))
auto & | contactSearchPtr ()
auto & | contactSearchRef ()
const auto & | fileDict () const
Public Member Functions inherited from demInteraction
| demInteraction (systemControl &control)
| demInteraction (systemControl &control, const fileSystem &file)
Public Member Functions inherited from property
| TypeInfoNV ("property")
| Type info. More...
| property ()
| Emptry constructor, used for reading from a file. More...
| property (const wordVector &materials, const realVector &densities)
| Constructe from materials and densities. More...
| property (const fileSystem &file)
| Construct from file. More...
| property (const dictionary &dict)
| Construct from dictionary dict. More...
| property (const property &)=default
| Default copy. More...
| property (property &&)=default
| Default move. More...
property & | operator= (const property &)=default
| Default copy assignment. More...
property & | operator= (property &&)=default
| Default move assignment. More...
| ~property ()=default
| Default destructor. More...
const auto & | dict () const
| Return dictionary. More...
auto | numMaterials () const
| Return number of materials. More...
const auto & | materials () const
| Return list of material names. More...
const auto & | densities () const
| Return the list of densities. More...
const word & | material (uint32 i) const
| Return the material name of material i. More...
bool | material (uint32 i, word &name) const
| Get the name of material i. More...
real | density (uint32 i) const
| Return density of material i. More...
bool | density (uint32 i, real &rho) const
| Get the density of material i. More...
bool | nameToIndex (const word &name, uint32 &idx) const
| Get the name of material in index idx Return true, if the name found, otherwise false. More...
bool | read (const dictionary &dict)
| Read from dictionary. More...
bool | write (dictionary &dict) const
| Write to dictionary. More...
Public Member Functions inherited from demComponent
| TypeInfo ("demComponent")
| demComponent (const word &name, systemControl &control)
virtual | ~demComponent ()=default
const auto & | control () const
auto & | control ()
real | dt () const
real | currentTime () const
auto & | timers ()
const auto & | timers () const
Public Member Functions inherited from eventObserver
| eventObserver ()
| eventObserver (const eventSubscriber &subscriber, bool subscribe=true)
virtual | ~eventObserver ()
bool | subscribed () const
bool | subscribe (const eventSubscriber &subscriber)
void | invalidateSubscriber ()
Public Member Functions inherited from interactionBase
| interactionBase (const particles &prtcl, const geometry &geom)
const auto & | pStruct () const
const auto & | surface () const
const auto & | Particles () const
auto & | Geometry () const

## Protected Types

using | rpPPInteraction = Kokkos::RangePolicy< Kokkos::IndexType< int32 >, Kokkos::Schedule< Kokkos::Dynamic > >
| range policy for p-p interaction execution More...
using | rpPWInteraction = rpPPInteraction
| range policy for p-w interaction execution More...

## Protected Member Functions

bool | createSphereInteraction ()
bool | managePPContactLists ()
bool | managePWContactLists ()
Protected Member Functions inherited from property
bool | readDictionary (const dictionary &dict)
| read from dict More...
bool | writeDictionary (dictionary &dict) const
| write to dict More...
bool | makeNameIndex ()
| creates a mapp More...

## Protected Attributes

const GeometryMotionModel & | geometryMotion_
| const reference to geometry More...
const sphereParticles & | sphParticles_
| const reference to particles More...
uniquePtr< ContactForceModel > | forceModel_ = nullptr
| contact force model More...
uniquePtr< ContactListType > | ppContactList_ = nullptr
| contact list for particle-particle interactoins (keeps the history) More...
uniquePtr< ContactListType > | pwContactList_ = nullptr
| contact list for particle-wall interactions (keeps the history) More...
Timer | ppInteractionTimer_
| timer for particle-particle interaction computations More...
Timer | pwInteractionTimer_
| timer for particle-wall interaction computations More...
Protected Attributes inherited from interaction
dictionary & | fileDict_
| interaction file dictionary More...
uniquePtr< contactSearch > | contactSearch_ = nullptr
| contact search object for pp and pw interactions More...
Protected Attributes inherited from property
uniquePtr< dictionary > | dict_ = nullptr
| pointer to the dictionary, if it is constructed from a file/dictionary More...
wordVector | materials_
| list of name of materials More...
realVector | densities_
| list of density of materials More...
wordHashMap< uint32 > | nameIndex_
| rapid mapping from name to index More...
uint32 | numMaterials_ = 0
| number of materials More...
Protected Attributes inherited from demComponent
word | componentName_
systemControl & | control_
Timers | timers_
Protected Attributes inherited from eventObserver
const eventSubscriber * | subscriber_ = nullptr
bool | subscribed_ = false
Protected Attributes inherited from interactionBase
const particles & | particles_
const geometry & | geometry_

## Additional Inherited Members

Static Public Member Functions inherited from interaction
static uniquePtr< interaction > | create (systemControl &control, const particles &prtcl, const geometry &geom)

## Detailed Description

### template<typename contactForceModel, typename geometryMotionModel, template< class, class, class > class contactListType>
class pFlow::sphereInteraction< contactForceModel, geometryMotionModel, contactListType >

Definition at line 36 of file sphereInteraction.hpp.

## Member Typedef Documentation

## GeometryMotionModel

using GeometryMotionModel = geometryMotionModel

Definition at line 42 of file sphereInteraction.hpp.

## ContactForceModel

using ContactForceModel = contactForceModel

Definition at line 44 of file sphereInteraction.hpp.

## MotionModel

using MotionModel = typename geometryMotionModel::MotionModel

Definition at line 46 of file sphereInteraction.hpp.

## ModelStorage

using ModelStorage = typename ContactForceModel::contactForceStorage

Definition at line 48 of file sphereInteraction.hpp.

## IdType

using IdType = typename interaction::IdType

Definition at line 50 of file sphereInteraction.hpp.

## IndexType

using IndexType = typename interaction::IndexType

Definition at line 52 of file sphereInteraction.hpp.

## ExecutionSpace

using ExecutionSpace = typename interaction::ExecutionSpace

Definition at line 54 of file sphereInteraction.hpp.

## ContactListType

using ContactListType = contactListType<ModelStorage, ExecutionSpace, IdType>

Definition at line 57 of file sphereInteraction.hpp.

## PairsContainerType

using PairsContainerType = typename contactSearch::PairContainerType

Definition at line 59 of file sphereInteraction.hpp.

## rpPPInteraction

using rpPPInteraction = Kokkos::RangePolicy<Kokkos::IndexType<int32>, Kokkos::Schedule<Kokkos::Dynamic> >

protected

range policy for p-p interaction execution

Definition at line 93 of file sphereInteraction.hpp.

## rpPWInteraction

using rpPWInteraction = rpPPInteraction

protected

range policy for p-w interaction execution

Definition at line 96 of file sphereInteraction.hpp.

## Constructor & Destructor Documentation

## sphereInteraction()

sphereInteraction | ( | systemControl & | control,
|  | const particles & | prtcl,
|  | const geometry & | geom
| ) |  |

inline

Definition at line 104 of file sphereInteraction.hpp.

References sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::createSphereInteraction(), and fatalExit.

Here is the call graph for this function:

## Member Function Documentation

## createSphereInteraction()

bool createSphereInteraction

protected

Definition at line 26 of file sphereInteraction.cpp.

References VectorSingle< T, MemorySpace >::deviceVector(), endREPORT, and REPORT.

Referenced by sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::sphereInteraction().

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

## managePPContactLists()

bool managePPContactLists | ( |  | ) |

protected

## managePWContactLists()

bool managePWContactLists | ( |  | ) |

protected

## TypeInfoTemplate3()

TypeInfoTemplate3 | ( | "sphereInteraction< contactForceModel, geometryMotionModel, contactListType >" | ,
|  | ContactForceModel | ,
|  | MotionModel | ,
|  | ContactListType |
| ) |  |

## add_vCtor()

add_vCtor | ( | interaction | ,
|  | sphereInteraction< contactForceModel, geometryMotionModel, contactListType > | ,
|  | systemControl |
| ) |  |

## beforeIteration()

bool beforeIteration | ( |  | ) |

inlineoverridevirtual

Implements demComponent.

Definition at line 129 of file sphereInteraction.hpp.

## iterate()

bool iterate | ( |  | ) |

inlineoverridevirtual

Implements demComponent.

Definition at line 135 of file sphereInteraction.hpp.

References interaction::contactSearch_, Timer::end(), fatalErrorInFunction, fatalExit, particles::numActive(), sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::ppContactList_, sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::ppInteractionTimer_, sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::pwContactList_, sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::pwInteractionTimer_, sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::sphereSphereInteraction(), sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::sphereWallInteraction(), sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::sphParticles_, and Timer::start().

Here is the call graph for this function:

## afterIteration()

bool afterIteration | ( |  | ) |

inlineoverridevirtual

Implements demComponent.

Definition at line 203 of file sphereInteraction.hpp.

## update()

bool update | ( | const eventMessage & | msg | ) |

inlineoverridevirtual

Implements eventObserver.

Definition at line 209 of file sphereInteraction.hpp.

## sphereSphereInteraction()

bool sphereSphereInteraction

Definition at line 56 of file sphereInteraction.cpp.

Referenced by sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::iterate().

Here is the caller graph for this function:

## sphereWallInteraction()

bool sphereWallInteraction

Definition at line 95 of file sphereInteraction.cpp.

Referenced by sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::iterate().

Here is the caller graph for this function:

## Member Data Documentation

## geometryMotion_

const GeometryMotionModel& geometryMotion_

protected

const reference to geometry

Definition at line 64 of file sphereInteraction.hpp.

## sphParticles_

const sphereParticles& sphParticles_

protected

const reference to particles

Definition at line 67 of file sphereInteraction.hpp.

Referenced by sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::iterate().

## forceModel_

uniquePtr<ContactForceModel> forceModel_ = nullptr

protected

contact force model

Definition at line 71 of file sphereInteraction.hpp.

## ppContactList_

uniquePtr<ContactListType> ppContactList_ = nullptr

protected

contact list for particle-particle interactoins (keeps the history)

Definition at line 74 of file sphereInteraction.hpp.

Referenced by sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::iterate().

## pwContactList_

uniquePtr<ContactListType> pwContactList_ = nullptr

protected

contact list for particle-wall interactions (keeps the history)

Definition at line 77 of file sphereInteraction.hpp.

Referenced by sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::iterate().

## ppInteractionTimer_

Timer ppInteractionTimer_

protected

timer for particle-particle interaction computations

Definition at line 80 of file sphereInteraction.hpp.

Referenced by sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::iterate().

## pwInteractionTimer_

Timer pwInteractionTimer_

protected

timer for particle-wall interaction computations

Definition at line 83 of file sphereInteraction.hpp.

Referenced by sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::iterate().

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

- src/Interaction/sphereInteraction/sphereInteraction.hpp
- src/Interaction/sphereInteraction/sphereInteraction.cpp