Skip to content

Commit

Permalink
MPPICCloud: Predictor corrector scheme
Browse files Browse the repository at this point in the history
This change replaces the MPPIC cloud's approximate correcton tracks with
a formal predictor-corrector scheme. This reduces the parcels' memory
usage and prevents ad-hoc corrections to tracking time and associated
parcel properties.
  • Loading branch information
Will Bainbridge committed Dec 13, 2022
1 parent 06e29c4 commit ca0003f
Show file tree
Hide file tree
Showing 30 changed files with 329 additions and 266 deletions.
Expand Up @@ -28,7 +28,7 @@ License
#include "polyMesh.H"
#include "calculatedPointPatchFields.H"

// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

template<class Type>
Foam::interpolation<Type>::interpolation
Expand All @@ -41,6 +41,14 @@ Foam::interpolation<Type>::interpolation
{}


template<class Type>
Foam::interpolation<Type>::interpolation(const interpolation<Type>& i)
:
psi_(i.psi_),
mesh_(i.mesh_)
{}


// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //

template<class Type>
Expand Down
Expand Up @@ -110,6 +110,13 @@ public:
const VolField<Type>& psi
);

//- Copy constructor
interpolation(const interpolation<Type>& i);

//- Clone
virtual autoPtr<interpolation<Type>> clone() const = 0;



//- Destructor
virtual ~interpolation()
Expand Down
Expand Up @@ -38,6 +38,16 @@ Foam::interpolationCell<Type>::interpolationCell
{}


template<class Type>
Foam::interpolationCell<Type>::interpolationCell
(
const interpolationCell<Type>& i
)
:
fieldInterpolation<Type, interpolationCell<Type>>(i)
{}


// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

template<class Type>
Expand Down
Expand Up @@ -65,6 +65,19 @@ public:
const VolField<Type>& psi
);

//- Copy construct
interpolationCell(const interpolationCell<Type>& i);

//- Clone
virtual autoPtr<interpolation<Type>> clone() const
{
return autoPtr<interpolation<Type>>
(
new interpolationCell<Type>(*this)
);
}



// Member Functions

Expand Down
Expand Up @@ -38,6 +38,16 @@ Foam::interpolationCellPatchConstrained<Type>::interpolationCellPatchConstrained
{}


template<class Type>
Foam::interpolationCellPatchConstrained<Type>::interpolationCellPatchConstrained
(
const interpolationCellPatchConstrained<Type>& i
)
:
fieldInterpolation<Type, interpolationCellPatchConstrained<Type>>(i)
{}


// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

template<class Type>
Expand Down
Expand Up @@ -67,6 +67,21 @@ public:
const VolField<Type>& psi
);

//- Copy construct
interpolationCellPatchConstrained
(
const interpolationCellPatchConstrained<Type>& i
);

//- Clone
virtual autoPtr<interpolation<Type>> clone() const
{
return autoPtr<interpolation<Type>>
(
new interpolationCellPatchConstrained<Type>(*this)
);
}


// Member Functions

Expand Down
Expand Up @@ -42,6 +42,20 @@ Foam::interpolationCellPoint<Type>::interpolationCellPoint
}


template<class Type>
Foam::interpolationCellPoint<Type>::interpolationCellPoint
(
const interpolationCellPoint<Type>& i
)
:
fieldInterpolation<Type, interpolationCellPoint<Type>>(i),
interpolationVolPointInterpolation<Type>(i)
{
// Uses cellPointWeight to do interpolation which needs tet decomposition
(void)this->psi().mesh().tetBasePtIs();
}


template<class Type>
Foam::interpolationCellPoint<Type>::interpolationCellPoint
(
Expand Down
Expand Up @@ -65,13 +65,28 @@ public:
const VolField<Type>& psi
);

//- Copy construct
interpolationCellPoint
(
const interpolationCellPoint<Type>& i
);

//- Construct from components
interpolationCellPoint
(
const VolField<Type>& psi,
tmp<PointField<Type>> psip
);

//- Clone
virtual autoPtr<interpolation<Type>> clone() const
{
return autoPtr<interpolation<Type>>
(
new interpolationCellPoint<Type>(*this)
);
}


// Member Functions

Expand Down
Expand Up @@ -45,6 +45,18 @@ Foam::interpolationCellPointFace<Type>::interpolationCellPointFace
{}


template<class Type>
Foam::interpolationCellPointFace<Type>::interpolationCellPointFace
(
const interpolationCellPointFace<Type>& i
)
:
fieldInterpolation<Type, interpolationCellPointFace<Type>>(i),
interpolationVolPointInterpolation<Type>(i),
psis_(i.psis_.clone())
{}


// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

template<class Type>
Expand Down
Expand Up @@ -90,6 +90,21 @@ public:
const VolField<Type>& psi
);

//- Copy construct
interpolationCellPointFace
(
const interpolationCellPointFace<Type>& i
);

//- Clone
virtual autoPtr<interpolation<Type>> clone() const
{
return autoPtr<interpolation<Type>>
(
new interpolationCellPointFace<Type>(*this)
);
}


// Member Functions

Expand Down
Expand Up @@ -331,4 +331,15 @@ interpolationCellPointWallModified
{}


template<class Type>
Foam::interpolationCellPointWallModified<Type>::
interpolationCellPointWallModified
(
const interpolationCellPointWallModified<Type>& i
)
:
interpolationCellPoint<Type>(i)
{}


// ************************************************************************* //
Expand Up @@ -84,6 +84,21 @@ public:
(
const VolField<Type>& psi
);

//- Copy construct
interpolationCellPointWallModified
(
const interpolationCellPointWallModified<Type>& i
);

//- Clone
virtual autoPtr<interpolation<Type>> clone() const
{
return autoPtr<interpolation<Type>>
(
new interpolationCellPointWallModified<Type>(*this)
);
}
};


Expand Down
Expand Up @@ -39,4 +39,15 @@ Foam::interpolationPointMVC<Type>::interpolationPointMVC
{}


template<class Type>
Foam::interpolationPointMVC<Type>::interpolationPointMVC
(
const interpolationPointMVC<Type>& i
)
:
fieldInterpolation<Type, interpolationPointMVC<Type>>(i),
interpolationVolPointInterpolation<Type>(i)
{}


// ************************************************************************* //
Expand Up @@ -65,6 +65,21 @@ public:
const VolField<Type>& psi
);

//- Copy construct
interpolationPointMVC
(
const interpolationPointMVC<Type>& i
);

//- Clone
virtual autoPtr<interpolation<Type>> clone() const
{
return autoPtr<interpolation<Type>>
(
new interpolationPointMVC<Type>(*this)
);
}


// Member Functions

Expand Down
Expand Up @@ -47,6 +47,17 @@ interpolationVolPointInterpolation
{}


template<class Type>
Foam::interpolationVolPointInterpolation<Type>::
interpolationVolPointInterpolation
(
const interpolationVolPointInterpolation<Type>& i
)
:
psip_(i.psip_.clone())
{}


template<class Type>
Foam::interpolationVolPointInterpolation<Type>::
interpolationVolPointInterpolation
Expand Down
Expand Up @@ -70,6 +70,12 @@ public:
const VolField<Type>& psi
);

//- Copy construct
interpolationVolPointInterpolation
(
const interpolationVolPointInterpolation<Type>& i
);

//- Construct from components
interpolationVolPointInterpolation
(
Expand Down

0 comments on commit ca0003f

Please sign in to comment.