mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: FaceCellWave : additional trackData like argument for passing in non-cell data
This commit is contained in:
@ -155,7 +155,7 @@ Foam::labelList Foam::structuredDecomp::decompose
|
||||
bool haveWarned = false;
|
||||
forAll(finalDecomp, cellI)
|
||||
{
|
||||
if (!cellData[cellI].valid())
|
||||
if (!cellData[cellI].valid(deltaCalc.data()))
|
||||
{
|
||||
if (!haveWarned)
|
||||
{
|
||||
|
||||
@ -97,71 +97,90 @@ public:
|
||||
|
||||
//- Check whether origin has been changed at all or
|
||||
// still contains original (invalid) value.
|
||||
inline bool valid() const;
|
||||
template<class TrackingData>
|
||||
inline bool valid(TrackingData& td) const;
|
||||
|
||||
//- Check for identical geometrical data. Used for cyclics checking.
|
||||
template<class TrackingData>
|
||||
inline bool sameGeometry
|
||||
(
|
||||
const polyMesh&,
|
||||
const topoDistanceData&,
|
||||
const scalar
|
||||
const scalar,
|
||||
TrackingData& td
|
||||
) const;
|
||||
|
||||
//- Convert any absolute coordinates into relative to (patch)face
|
||||
// centre
|
||||
template<class TrackingData>
|
||||
inline void leaveDomain
|
||||
(
|
||||
const polyMesh&,
|
||||
const polyPatch&,
|
||||
const label patchFaceI,
|
||||
const point& faceCentre
|
||||
const point& faceCentre,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Reverse of leaveDomain
|
||||
template<class TrackingData>
|
||||
inline void enterDomain
|
||||
(
|
||||
const polyMesh&,
|
||||
const polyPatch&,
|
||||
const label patchFaceI,
|
||||
const point& faceCentre
|
||||
const point& faceCentre,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Apply rotation matrix to any coordinates
|
||||
template<class TrackingData>
|
||||
inline void transform
|
||||
(
|
||||
const polyMesh&,
|
||||
const tensor&
|
||||
const tensor&,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of neighbouring face.
|
||||
template<class TrackingData>
|
||||
inline bool updateCell
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisCellI,
|
||||
const label neighbourFaceI,
|
||||
const topoDistanceData& neighbourInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of neighbouring cell.
|
||||
template<class TrackingData>
|
||||
inline bool updateFace
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisFaceI,
|
||||
const label neighbourCellI,
|
||||
const topoDistanceData& neighbourInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of different value on same face.
|
||||
template<class TrackingData>
|
||||
inline bool updateFace
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisFaceI,
|
||||
const topoDistanceData& neighbourInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Same (like operator==)
|
||||
template<class TrackingData>
|
||||
inline bool equal(const topoDistanceData&, TrackingData& td) const;
|
||||
|
||||
// Member Operators
|
||||
|
||||
// Needed for List IO
|
||||
|
||||
@ -53,18 +53,21 @@ inline Foam::topoDistanceData::topoDistanceData
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline bool Foam::topoDistanceData::valid() const
|
||||
template <class TrackingData>
|
||||
inline bool Foam::topoDistanceData::valid(TrackingData& td) const
|
||||
{
|
||||
return distance_ != -1;
|
||||
}
|
||||
|
||||
|
||||
// No geometric data so never any problem on cyclics
|
||||
template <class TrackingData>
|
||||
inline bool Foam::topoDistanceData::sameGeometry
|
||||
(
|
||||
const polyMesh&,
|
||||
const topoDistanceData&,
|
||||
const scalar
|
||||
const scalar,
|
||||
TrackingData&
|
||||
) const
|
||||
{
|
||||
return true;
|
||||
@ -72,44 +75,52 @@ inline bool Foam::topoDistanceData::sameGeometry
|
||||
|
||||
|
||||
// No geometric data.
|
||||
template <class TrackingData>
|
||||
inline void Foam::topoDistanceData::leaveDomain
|
||||
(
|
||||
const polyMesh&,
|
||||
const polyPatch& patch,
|
||||
const label patchFaceI,
|
||||
const point& faceCentre
|
||||
const point& faceCentre,
|
||||
TrackingData&
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// No geometric data.
|
||||
template <class TrackingData>
|
||||
inline void Foam::topoDistanceData::transform
|
||||
(
|
||||
const polyMesh&,
|
||||
const tensor& rotTensor
|
||||
const tensor& rotTensor,
|
||||
TrackingData&
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// No geometric data.
|
||||
template <class TrackingData>
|
||||
inline void Foam::topoDistanceData::enterDomain
|
||||
(
|
||||
const polyMesh&,
|
||||
const polyPatch& patch,
|
||||
const label patchFaceI,
|
||||
const point& faceCentre
|
||||
const point& faceCentre,
|
||||
TrackingData&
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// Update cell with neighbouring face information
|
||||
template <class TrackingData>
|
||||
inline bool Foam::topoDistanceData::updateCell
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisCellI,
|
||||
const label neighbourFaceI,
|
||||
const topoDistanceData& neighbourInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData&
|
||||
)
|
||||
{
|
||||
if (distance_ == -1)
|
||||
@ -126,13 +137,15 @@ inline bool Foam::topoDistanceData::updateCell
|
||||
|
||||
|
||||
// Update face with neighbouring cell information
|
||||
template <class TrackingData>
|
||||
inline bool Foam::topoDistanceData::updateFace
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label thisFaceI,
|
||||
const label neighbourCellI,
|
||||
const topoDistanceData& neighbourInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData&
|
||||
)
|
||||
{
|
||||
// From cell to its faces.
|
||||
@ -150,12 +163,14 @@ inline bool Foam::topoDistanceData::updateFace
|
||||
|
||||
|
||||
// Update face with coupled face information
|
||||
template <class TrackingData>
|
||||
inline bool Foam::topoDistanceData::updateFace
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisFaceI,
|
||||
const topoDistanceData& neighbourInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData&
|
||||
)
|
||||
{
|
||||
// From face to face (e.g. coupled faces)
|
||||
@ -171,6 +186,17 @@ inline bool Foam::topoDistanceData::updateFace
|
||||
}
|
||||
|
||||
|
||||
template <class TrackingData>
|
||||
inline bool Foam::topoDistanceData::equal
|
||||
(
|
||||
const topoDistanceData& rhs,
|
||||
TrackingData& td
|
||||
) const
|
||||
{
|
||||
return operator==(rhs);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline bool Foam::topoDistanceData::operator==
|
||||
|
||||
Reference in New Issue
Block a user