# PhasicFlow: integration 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.

integration Class Referenceabstract

Base class for integrating the first order ODE (IVP) More...

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

## Public Member Functions

| TypeInfo ("integration")
| Type info. More...
| integration (const word &baseName, pointStructure &pStruct, const word &method, const realx3Field_D &initialValField)
| Construct from components. More...
| integration (const integration &)=default
| Copy constructor. More...
| integration (integration &&)=default
| Move constructor. More...
integration & | operator= (const integration &)=default
| Copy assignment. More...
integration & | operator= (integration &&)=default
| Move assignment. More...
virtual | ~integration ()=default
| Destructor. More...
| create_vCtor (integration, word,(const word &baseName, pointStructure &pStruct, const word &method, const realx3Field_D &initialValField),(baseName, pStruct, method, initialValField))
| Add a virtual constructor. More...
const auto & | pStruct () const
| Const ref to pointStructure. More...
const word & | baseName () const
| Base name. More...
repository & | owner ()
| Ref to the owner repository. More...
virtual void | updateBoundariesSlaveToMasterIfRequested ()=0
virtual word | method () const =0
| return integration method More...
virtual bool | predict (real dt, realx3PointField_D &y, realx3PointField_D &dy)=0
| Prediction step in integration. More...
virtual bool | predict (real dt, realx3Field_D &y, realx3PointField_D &dy)=0
virtual bool | correct (real dt, realx3PointField_D &y, realx3PointField_D &dy)=0
| Correction/main integration step. More...
virtual bool | correctPStruct (real dt, pointStructure &pStruct, realx3PointField_D &vel)=0
virtual bool | setInitialVals (const int32IndexContainer &newIndices, const realx3Vector &y)=0
| Set the initial values for new indices. More...
virtual bool | needSetInitialVals () const =0
| Check if the method requires any set initial vals. More...

## Static Public Member Functions

static uniquePtr< integration > | create (const word &baseName, pointStructure &pStruct, const word &method, const realx3Field_D &initialValField)
| Create the polymorphic object based on inputs. More...

## Private Attributes

repository & | owner_
| The owner repository that all fields are storred in. More...
const pointStructure & | pStruct_
| A reference to pointStructure. More...
const word | baseName_
| The base name for integration. More...

## Detailed Description

Base class for integrating the first order ODE (IVP)

The ODE should be in the following form:

\[ \frac{dy}{dt} = f(y,t) \]

for example the equation of motion is in the following form:

\[ m\frac{d\vec{v}}{dt} = m\vec{g} + \sum \vec{f_c}(\vec{v},t) \]

The integration method can be either one-step or predictor-corrector type.

Definition at line 51 of file integration.hpp.

## Constructor & Destructor Documentation

## integration() [1/3]

integration | ( | const word & | baseName,
|  | pointStructure & | pStruct,
|  | const word & | method,
|  | const realx3Field_D & | initialValField
| ) |  |

Construct from components.

Definition at line 26 of file integration.cpp.

## integration() [2/3]

integration | ( | const integration & |  | ) |

default

Copy constructor.

## integration() [3/3]

integration | ( | integration && |  | ) |

default

Move constructor.

## ~integration()

virtual ~integration | ( |  | ) |

virtualdefault

Destructor.

## Member Function Documentation

## TypeInfo()

TypeInfo | ( | "integration" |  | ) |

Type info.

## operator=() [1/2]

integration& operator= | ( | const integration & |  | ) |

default

Copy assignment.

## operator=() [2/2]

integration& operator= | ( | integration && |  | ) |

default

Move assignment.

## create_vCtor()

create_vCtor | ( | integration | ,
|  | word | ,
|  | (const word &baseName, pointStructure &pStruct, const word &method, const realx3Field_D &initialValField) | ,
|  | (baseName, pStruct, method, initialValField) |
| ) |  |

Add a virtual constructor.

## pStruct()

const auto& pStruct | ( |  | ) | const

inline

Const ref to pointStructure.

Definition at line 115 of file integration.hpp.

References integration::pStruct_.

## baseName()

const word& baseName | ( |  | ) | const

inline

Base name.

Definition at line 122 of file integration.hpp.

References integration::baseName_.

## owner()

repository& owner | ( |  | ) |

inline

Ref to the owner repository.

Definition at line 129 of file integration.hpp.

References integration::owner_.

## updateBoundariesSlaveToMasterIfRequested()

virtual void updateBoundariesSlaveToMasterIfRequested | ( |  | ) |

pure virtual

Implemented in AdamsBashforth2.

## method()

virtual word method | ( |  | ) | const

pure virtual

return integration method

Implemented in AdamsBashforth2.

## predict() [1/2]

virtual bool predict | ( | real | dt,
|  | realx3PointField_D & | y,
|  | realx3PointField_D & | dy
| ) |  |

pure virtual

Prediction step in integration.

## predict() [2/2]

virtual bool predict | ( | real | dt,
|  | realx3Field_D & | y,
|  | realx3PointField_D & | dy
| ) |  |

pure virtual

Implemented in AdamsBashforth2.

## correct()

virtual bool correct | ( | real | dt,
|  | realx3PointField_D & | y,
|  | realx3PointField_D & | dy
| ) |  |

pure virtual

Correction/main integration step.

Implemented in AdamsBashforth2.

## correctPStruct()

virtual bool correctPStruct | ( | real | dt,
|  | pointStructure & | pStruct,
|  | realx3PointField_D & | vel
| ) |  |

pure virtual

Implemented in AdamsBashforth2.

## setInitialVals()

virtual bool setInitialVals | ( | const int32IndexContainer & | newIndices,
|  | const realx3Vector & | y
| ) |  |

pure virtual

Set the initial values for new indices.

Implemented in AdamsBashforth4, AdamsBashforth5, AdamsBashforth3, AdamsMoulton5, AdamsMoulton4, AdamsMoulton3, and AdamsBashforth2.

## needSetInitialVals()

virtual bool needSetInitialVals | ( |  | ) | const

pure virtual

Check if the method requires any set initial vals.

Implemented in AdamsBashforth4, AdamsBashforth5, AdamsBashforth3, AdamsMoulton5, AdamsMoulton4, AdamsMoulton3, and AdamsBashforth2.

## create()

pFlow::uniquePtr< pFlow::integration > create | ( | const word & | baseName,
|  | pointStructure & | pStruct,
|  | const word & | method,
|  | const realx3Field_D & | initialValField
| ) |  |

static

Create the polymorphic object based on inputs.

Definition at line 41 of file integration.cpp.

References pFlow::baseName(), fatalError, fatalExit, pFlow::printKeys(), and pStruct.

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

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

## Member Data Documentation

## owner_

repository& owner_

private

The owner repository that all fields are storred in.

Definition at line 58 of file integration.hpp.

Referenced by integration::owner().

## pStruct_

const pointStructure& pStruct_

private

A reference to pointStructure.

Definition at line 61 of file integration.hpp.

Referenced by integration::pStruct().

## baseName_

const word baseName_

private

The base name for integration.

Definition at line 64 of file integration.hpp.

Referenced by integration::baseName().

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

- src/Integration/integration/integration.hpp
- src/Integration/integration/integration.cpp