mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
doc for integration
This commit is contained in:
@ -28,21 +28,30 @@ Licence:
|
||||
namespace pFlow
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Fourth order Adams-Moulton integration method for solving ODE
|
||||
*
|
||||
* This is a predictor-corrector integration method.
|
||||
*/
|
||||
class AdamsMoulton4
|
||||
:
|
||||
public integration
|
||||
{
|
||||
protected:
|
||||
|
||||
/// y at time t
|
||||
realx3PointField_D& y0_;
|
||||
|
||||
/// dy at time t
|
||||
realx3PointField_D& dy0_;
|
||||
|
||||
/// dy at time t-dt
|
||||
realx3PointField_D& dy1_;
|
||||
|
||||
/// dy at time t-2*dt
|
||||
realx3PointField_D& dy2_;
|
||||
|
||||
/// Range policy for integration kernel
|
||||
using rpIntegration = Kokkos::RangePolicy<
|
||||
DefaultExecutionSpace,
|
||||
Kokkos::Schedule<Kokkos::Static>,
|
||||
@ -50,29 +59,44 @@ protected:
|
||||
>;
|
||||
public:
|
||||
|
||||
// type info
|
||||
/// Type info
|
||||
TypeInfo("AdamsMoulton4");
|
||||
|
||||
//// - Constructors
|
||||
// - Constructors
|
||||
|
||||
/// Construct from components
|
||||
AdamsMoulton4(
|
||||
const word& baseName,
|
||||
repository& owner,
|
||||
const pointStructure& pStruct,
|
||||
const word& method);
|
||||
|
||||
uniquePtr<integration> clone()const override
|
||||
{
|
||||
return makeUnique<AdamsMoulton4>(*this);
|
||||
}
|
||||
|
||||
/// Destructor
|
||||
virtual ~AdamsMoulton4()=default;
|
||||
|
||||
// - add a virtual constructor
|
||||
// Add this to the virtual constructor table
|
||||
add_vCtor(
|
||||
integration,
|
||||
AdamsMoulton4,
|
||||
word);
|
||||
|
||||
|
||||
//// - Methods
|
||||
bool predict(real dt, realx3Vector_D& y, realx3Vector_D& dy) override;
|
||||
// - Methods
|
||||
|
||||
bool correct(real dt, realx3Vector_D& y, realx3Vector_D& dy) override;
|
||||
bool predict(
|
||||
real dt,
|
||||
realx3Vector_D& y,
|
||||
realx3Vector_D& dy) override;
|
||||
|
||||
bool correct(
|
||||
real dt,
|
||||
realx3Vector_D& y,
|
||||
realx3Vector_D& dy) override;
|
||||
|
||||
bool setInitialVals(
|
||||
const int32IndexContainer& newIndices,
|
||||
@ -83,20 +107,35 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
uniquePtr<integration> clone()const override
|
||||
{
|
||||
return makeUnique<AdamsMoulton4>(*this);
|
||||
}
|
||||
|
||||
bool predictAll(real dt, realx3Vector_D& y, realx3Vector_D& dy, range activeRng);
|
||||
/// Prediction step on all points in the active range
|
||||
bool predictAll(
|
||||
real dt,
|
||||
realx3Vector_D& y,
|
||||
realx3Vector_D& dy,
|
||||
range activeRng);
|
||||
|
||||
/// Prediction step on active points in the active range
|
||||
template<typename activeFunctor>
|
||||
bool predictRange(real dt, realx3Vector_D& y, realx3Vector_D& dy, activeFunctor activeP);
|
||||
bool predictRange(
|
||||
real dt,
|
||||
realx3Vector_D& y,
|
||||
realx3Vector_D& dy,
|
||||
activeFunctor activeP);
|
||||
|
||||
bool intAll(real dt, realx3Vector_D& y, realx3Vector_D& dy, range activeRng);
|
||||
/// Integrate on all points in the active range
|
||||
bool intAll(
|
||||
real dt,
|
||||
realx3Vector_D& y,
|
||||
realx3Vector_D& dy,
|
||||
range activeRng);
|
||||
|
||||
/// Integrate on active points in the active range
|
||||
template<typename activeFunctor>
|
||||
bool intRange(real dt, realx3Vector_D& y, realx3Vector_D& dy, activeFunctor activeP );
|
||||
bool intRange(
|
||||
real dt,
|
||||
realx3Vector_D& y,
|
||||
realx3Vector_D& dy,
|
||||
activeFunctor activeP );
|
||||
|
||||
};
|
||||
|
||||
@ -182,4 +221,4 @@ bool pFlow::AdamsMoulton4::intRange(
|
||||
|
||||
} // pFlow
|
||||
|
||||
#endif //__integration_hpp__
|
||||
#endif //
|
||||
|
Reference in New Issue
Block a user