mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated mesh-to-mesh interpolation using direct method
This commit is contained in:
@ -38,6 +38,16 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
bool Foam::directMethod::intersect
|
||||
(
|
||||
const label srcCellI,
|
||||
const label tgtCellI
|
||||
) const
|
||||
{
|
||||
return tgt_.pointInCell(src_.cellCentres()[srcCellI], tgtCellI);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::directMethod::findInitialSeeds
|
||||
(
|
||||
const labelList& srcCellIDs,
|
||||
|
||||
@ -56,9 +56,16 @@ protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Return the true if cells intersect
|
||||
virtual bool intersect
|
||||
(
|
||||
const label srcCellI,
|
||||
const label tgtCellI
|
||||
) const;
|
||||
|
||||
//- Find indices of overlapping cells in src and tgt meshes - returns
|
||||
// true if found a matching pair
|
||||
bool findInitialSeeds
|
||||
virtual bool findInitialSeeds
|
||||
(
|
||||
const labelList& srcCellIDs,
|
||||
const boolList& mapFlag,
|
||||
@ -68,7 +75,7 @@ protected:
|
||||
) const;
|
||||
|
||||
//- Calculate the mesh-to-mesh addressing and weights
|
||||
void calculateAddressing
|
||||
virtual void calculateAddressing
|
||||
(
|
||||
labelListList& srcToTgtCellAddr,
|
||||
scalarListList& srcToTgtCellWght,
|
||||
@ -82,7 +89,7 @@ protected:
|
||||
);
|
||||
|
||||
//- Append to list of src mesh seed indices
|
||||
void appendToDirectSeeds
|
||||
virtual void appendToDirectSeeds
|
||||
(
|
||||
boolList& mapFlag,
|
||||
labelList& srcTgtSeed,
|
||||
|
||||
@ -58,7 +58,7 @@ protected:
|
||||
|
||||
//- Find indices of overlapping cells in src and tgt meshes - returns
|
||||
// true if found a matching pair
|
||||
bool findInitialSeeds
|
||||
virtual bool findInitialSeeds
|
||||
(
|
||||
const labelList& srcCellIDs,
|
||||
const boolList& mapFlag,
|
||||
@ -68,7 +68,7 @@ protected:
|
||||
) const;
|
||||
|
||||
//- Calculate the mesh-to-mesh addressing and weights
|
||||
void calculateAddressing
|
||||
virtual void calculateAddressing
|
||||
(
|
||||
labelListList& srcToTgtCellAddr,
|
||||
scalarListList& srcToTgtCellWght,
|
||||
@ -82,7 +82,7 @@ protected:
|
||||
);
|
||||
|
||||
//- Find the nearest cell on mesh2 for cell1 on mesh1
|
||||
void findNearestCell
|
||||
virtual void findNearestCell
|
||||
(
|
||||
const polyMesh& mesh1,
|
||||
const polyMesh& mesh2,
|
||||
@ -91,7 +91,7 @@ protected:
|
||||
) const;
|
||||
|
||||
//- Set the next cells for the marching front algorithm
|
||||
void setNextNearestCells
|
||||
virtual void setNextNearestCells
|
||||
(
|
||||
label& startSeedI,
|
||||
label& srcCellI,
|
||||
@ -101,7 +101,7 @@ protected:
|
||||
) const;
|
||||
|
||||
//- Find a source cell mapped to target cell tgtCellI
|
||||
label findMappedSrcCell
|
||||
virtual label findMappedSrcCell
|
||||
(
|
||||
const label tgtCellI,
|
||||
const List<DynamicList<label> >& tgtToSrc
|
||||
|
||||
@ -72,13 +72,21 @@ protected:
|
||||
labelList maskCells() const;
|
||||
|
||||
//- Return the true if cells intersect
|
||||
bool intersect(const label srcCellI, const label tgtCellI) const;
|
||||
virtual bool intersect
|
||||
(
|
||||
const label srcCellI,
|
||||
const label tgtCellI
|
||||
) const;
|
||||
|
||||
//- Return the intersection volume between two cells
|
||||
scalar interVol(const label srcCellI, const label tgtCellI) const;
|
||||
virtual scalar interVol
|
||||
(
|
||||
const label srcCellI,
|
||||
const label tgtCellI
|
||||
) const;
|
||||
|
||||
//- Append target cell neihgbour cells to cellIDs list
|
||||
void appendNbrCells
|
||||
virtual void appendNbrCells
|
||||
(
|
||||
const label tgtCellI,
|
||||
const polyMesh& mesh,
|
||||
@ -86,7 +94,7 @@ protected:
|
||||
DynamicList<label>& nbrTgtCellIDs
|
||||
) const;
|
||||
|
||||
bool initialise
|
||||
virtual bool initialise
|
||||
(
|
||||
labelListList& srcToTgtAddr,
|
||||
scalarListList& srcToTgtWght,
|
||||
|
||||
Reference in New Issue
Block a user