# PhasicFlow: demComponent Class Reference
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

demComponent Class Referenceabstract

A base class for every main component of DEM system. More...

Inheritance diagram for demComponent:
[legend]
Collaboration diagram for demComponent:
[legend]

## Public Member Functions

| TypeInfo ("demComponent")
| Type info. More...
| demComponent (const word &name, systemControl &control)
| construct from components More...
| demComponent (const demComponent &)=delete
| No copy constructor. More...
| demComponent (demComponent &&)=delete
| No move constructor. More...
demComponent & | operator= (const demComponent &)=delete
| No copy assignment. More...
demComponent & | operator= (demComponent &&)=delete
| No move assignment. More...
virtual | ~demComponent ()=default
| destructor More...
const auto & | control () const
| Const ref to systemControl. More...
auto & | control ()
| Ref to systemControl. More...
real | dt () const
| Time step of integration. More...
real | currentTime () const
| Current simulation time. More...
uint32 | currentIter () const
| return current iteration number More...
timeInfo | TimeInfo () const
| return time info of the simulaiton More...
const auto & | time () const
auto & | time ()
const auto & | timers () const
| Const ref to timers. More...
auto & | timers ()
| Ref to timers. More...
virtual bool | beforeTimeLoop ()
| This is called before the start of time loop. More...
virtual bool | beforeIteration ()=0
| This is called in time loop, before iterate. More...
virtual bool | iterate ()=0
| This is called in time loop. More...
virtual bool | afterIteration ()=0
| This is called in time loop, after iterate. More...
virtual bool | afterTimeLoop ()
| This is called after the time loop. More...

## Private Attributes

systemControl & | control_
| Reference to systemControl. More...
Time & | time_
Timers | timers_
| All timers (if any) of this component. More...
word | componentName_
| Name of the DEM component. More...

## Detailed Description

A base class for every main component of DEM system.

This class provides abstraction at a very high level for any solver/utility that forces the derived component (i.e. particles, geometry, and etc) to advance over time when iterate is called in time a loop.

Definition at line 42 of file demComponent.hpp.

## Constructor & Destructor Documentation

## demComponent() [1/3]

demComponent | ( | const word & | name,
|  | systemControl & | control
| ) |  |

construct from components

Definition at line 25 of file demComponent.cpp.

## demComponent() [2/3]

demComponent | ( | const demComponent & |  | ) |

delete

No copy constructor.

## demComponent() [3/3]

demComponent | ( | demComponent && |  | ) |

delete

No move constructor.

## ~demComponent()

virtual ~demComponent | ( |  | ) |

virtualdefault

destructor

## Member Function Documentation

## TypeInfo()

TypeInfo | ( | "demComponent" |  | ) |

Type info.

## operator=() [1/2]

demComponent& operator= | ( | const demComponent & |  | ) |

delete

No copy assignment.

## operator=() [2/2]

demComponent& operator= | ( | demComponent && |  | ) |

delete

No move assignment.

## control() [1/2]

const auto& control | ( |  | ) | const

inline

Const ref to systemControl.

Definition at line 88 of file demComponent.hpp.

References demComponent::control_.

Referenced by grainParticles::grainParticles(), insertion::insertion(), and sphereParticles::sphereParticles().

Here is the caller graph for this function:

## control() [2/2]

auto& control | ( |  | ) |

inline

Ref to systemControl.

Definition at line 95 of file demComponent.hpp.

References demComponent::control_.

## dt()

pFlow::real dt | ( |  | ) | const

Time step of integration.

Definition at line 33 of file demComponent.cpp.

Referenced by geometryMotion< MotionModelType >::getModel().

Here is the caller graph for this function:

## currentTime()

pFlow::real currentTime | ( |  | ) | const

Current simulation time.

Definition at line 38 of file demComponent.cpp.

## currentIter()

pFlow::uint32 currentIter | ( |  | ) | const

return current iteration number

Definition at line 43 of file demComponent.cpp.

## TimeInfo()

pFlow::timeInfo TimeInfo | ( |  | ) | const

return time info of the simulaiton

Definition at line 48 of file demComponent.cpp.

## time() [1/2]

const auto& time | ( |  | ) | const

inline

Definition at line 113 of file demComponent.hpp.

References demComponent::time_.

Referenced by pointStructure::time().

Here is the caller graph for this function:

## time() [2/2]

auto& time | ( |  | ) |

inline

Definition at line 119 of file demComponent.hpp.

References demComponent::time_.

## timers() [1/2]

const auto& timers | ( |  | ) | const

inline

Const ref to timers.

Definition at line 127 of file demComponent.hpp.

References demComponent::timers_.

## timers() [2/2]

auto& timers | ( |  | ) |

inline

Ref to timers.

Definition at line 134 of file demComponent.hpp.

References demComponent::timers_.

## beforeTimeLoop()

virtual bool beforeTimeLoop | ( |  | ) |

inlinevirtual

This is called before the start of time loop.

Definition at line 141 of file demComponent.hpp.

References notImplementedFunction.

## beforeIteration()

virtual bool beforeIteration | ( |  | ) |

pure virtual

This is called in time loop, before iterate.

Implemented in grainParticles, sphereParticles, geometry, particles, grainInteraction< contactForceModel, geometryMotionModel, contactListType >, sphereInteraction< contactForceModel, geometryMotionModel, contactListType >, pointStructure, and dynamicPointStructure.

## iterate()

virtual bool iterate | ( |  | ) |

pure virtual

This is called in time loop.

Perform the main calculations when the component should evolve along time.

Implemented in grainParticles, sphereParticles, geometry, particles, grainInteraction< contactForceModel, geometryMotionModel, contactListType >, sphereInteraction< contactForceModel, geometryMotionModel, contactListType >, geometryMotion< MotionModelType >, pointStructure, and dynamicPointStructure.

## afterIteration()

virtual bool afterIteration | ( |  | ) |

pure virtual

This is called in time loop, after iterate.

Implemented in geometry, particles, grainInteraction< contactForceModel, geometryMotionModel, contactListType >, sphereInteraction< contactForceModel, geometryMotionModel, contactListType >, and pointStructure.

## afterTimeLoop()

virtual bool afterTimeLoop | ( |  | ) |

inlinevirtual

This is called after the time loop.

Definition at line 162 of file demComponent.hpp.

References notImplementedFunction.

## Member Data Documentation

## control_

systemControl& control_

private

Reference to systemControl.

Definition at line 48 of file demComponent.hpp.

Referenced by demComponent::control().

## time_

Time& time_

private

Definition at line 50 of file demComponent.hpp.

Referenced by demComponent::time().

## timers_

Timers timers_

private

All timers (if any) of this component.

Definition at line 53 of file demComponent.hpp.

Referenced by demComponent::timers().

## componentName_

word componentName_

private

Name of the DEM component.

Definition at line 56 of file demComponent.hpp.

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

- src/phasicFlow/demComponent/demComponent.hpp
- src/phasicFlow/demComponent/demComponent.cpp