Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mesh interface (AMI). More...
Public Member Functions | |
TypeName ("AMIInterpolation") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, AMIInterpolation, dict,(const dictionary &dict, const bool reverseTarget),(dict, reverseTarget)) | |
Selection table for dictionary construction. More... | |
declareRunTimeSelectionTable (autoPtr, AMIInterpolation, component,(const bool requireMatch, const bool reverseTarget, const scalar lowWeightCorrection),(requireMatch, reverseTarget, lowWeightCorrection)) | |
Selection table for component-wise construction. More... | |
AMIInterpolation (const dictionary &dict, const bool reverseTarget=false) | |
Construct from dictionary. More... | |
AMIInterpolation (const bool requireMatch=true, const bool reverseTarget=false, const scalar lowWeightCorrection=-1) | |
Construct from components. More... | |
AMIInterpolation (const AMIInterpolation &fineAMI, const labelList &sourceRestrictAddressing, const labelList &neighbourRestrictAddressing) | |
AMIInterpolation (const AMIInterpolation &ami) | |
Construct as copy. More... | |
virtual autoPtr< AMIInterpolation > | clone () const |
Construct and return a clone. More... | |
virtual | ~AMIInterpolation ()=default |
Destructor. More... | |
bool | upToDate () const |
Access to the up-to-date flag. More... | |
bool & | upToDate () |
Access to the up-to-date flag. More... | |
bool | distributed () const |
Access to the distributed flag. More... | |
bool | requireMatch () const |
Access to the requireMatch flag. More... | |
bool | setRequireMatch (const bool flag) |
Access to the requireMatch flag. More... | |
bool | mustMatchFaces () const |
Return true if requireMatch and lowWeightCorrectionin active. More... | |
bool | reverseTarget () const |
Access to the reverseTarget flag. More... | |
scalar | lowWeightCorrection () const |
Threshold weight below which interpolation is deactivated. More... | |
bool | applyLowWeightCorrection () const |
Return true if employing a 'lowWeightCorrection'. More... | |
label | singlePatchProc () const |
const List< scalar > & | srcMagSf () const |
Return const access to source patch face areas. More... | |
List< scalar > & | srcMagSf () |
Return access to source patch face areas. More... | |
const labelListList & | srcAddress () const |
Return const access to source patch addressing. More... | |
labelListList & | srcAddress () |
Return access to source patch addressing. More... | |
const scalarListList & | srcWeights () const |
Return const access to source patch weights. More... | |
scalarListList & | srcWeights () |
Return access to source patch weights. More... | |
const scalarField & | srcWeightsSum () const |
scalarField & | srcWeightsSum () |
const pointListList & | srcCentroids () const |
Return const access to source patch face centroids. More... | |
pointListList & | srcCentroids () |
Return access to source patch face centroids. More... | |
const mapDistribute & | srcMap () const |
const List< scalar > & | tgtMagSf () const |
Return const access to target patch face areas. More... | |
List< scalar > & | tgtMagSf () |
Return access to target patch face areas. More... | |
const labelListList & | tgtAddress () const |
Return const access to target patch addressing. More... | |
labelListList & | tgtAddress () |
Return access to target patch addressing. More... | |
const scalarListList & | tgtWeights () const |
Return const access to target patch weights. More... | |
scalarListList & | tgtWeights () |
Return access to target patch weights. More... | |
const scalarField & | tgtWeightsSum () const |
scalarField & | tgtWeightsSum () |
const mapDistribute & | tgtMap () const |
virtual bool | calculate (const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const autoPtr< searchableSurface > &surfPtr=nullptr) |
Update addressing, weights and (optional) centroids. More... | |
void | reset (autoPtr< mapDistribute > &&srcToTgtMap, autoPtr< mapDistribute > &&tgtToSrcMap, labelListList &&srcAddress, scalarListList &&srcWeights, labelListList &&tgtAddress, scalarListList &&tgtWeights) |
Set the maps, addresses and weights from an external source. More... | |
void | append (const primitivePatch &srcPatch, const primitivePatch &tgtPatch) |
Append additional addressing and weights. More... | |
void | normaliseWeights (const bool conformal, const bool output) |
Normalise the weights. More... | |
template<class Type , class CombineOp > | |
void | interpolateToSource (const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const |
template<class Type , class CombineOp > | |
void | interpolateToTarget (const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const |
template<class Type , class CombineOp > | |
tmp< Field< Type > > | interpolateToSource (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const |
Interpolate from target to source with supplied op. More... | |
template<class Type , class CombineOp > | |
tmp< Field< Type > > | interpolateToSource (const tmp< Field< Type > > &tFld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const |
Interpolate from target tmp field to source with supplied op. More... | |
template<class Type , class CombineOp > | |
tmp< Field< Type > > | interpolateToTarget (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const |
Interpolate from source to target with supplied op. More... | |
template<class Type , class CombineOp > | |
tmp< Field< Type > > | interpolateToTarget (const tmp< Field< Type > > &tFld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const |
Interpolate from source tmp field to target with supplied op. More... | |
template<class Type > | |
tmp< Field< Type > > | interpolateToSource (const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >::null()) const |
Interpolate from target to source. More... | |
template<class Type > | |
tmp< Field< Type > > | interpolateToSource (const tmp< Field< Type > > &tFld, const UList< Type > &defaultValues=UList< Type >::null()) const |
Interpolate from target tmp field. More... | |
template<class Type > | |
tmp< Field< Type > > | interpolateToTarget (const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >::null()) const |
Interpolate from source to target. More... | |
template<class Type > | |
tmp< Field< Type > > | interpolateToTarget (const tmp< Field< Type > > &tFld, const UList< Type > &defaultValues=UList< Type >::null()) const |
Interpolate from source tmp field. More... | |
label | srcPointFace (const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const vector &n, const label tgtFacei, point &tgtPoint) const |
Return source patch face index of point on target patch face. More... | |
label | tgtPointFace (const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const vector &n, const label srcFacei, point &srcPoint) const |
Return target patch face index of point on source patch face. More... | |
bool | checkSymmetricWeights (const bool log) const |
void | writeFaceConnectivity (const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const labelListList &srcAddress) const |
Write face connectivity as OBJ file. More... | |
virtual void | write (Ostream &os) const |
Write. More... | |
template<class Type , class CombineOp > | |
Foam::tmp< Foam::Field< Type > > | interpolateToSource (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues) const |
template<class Type , class CombineOp > | |
Foam::tmp< Foam::Field< Type > > | interpolateToSource (const tmp< Field< Type > > &tFld, const CombineOp &cop, const UList< Type > &defaultValues) const |
template<class Type , class CombineOp > | |
Foam::tmp< Foam::Field< Type > > | interpolateToTarget (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues) const |
template<class Type , class CombineOp > | |
Foam::tmp< Foam::Field< Type > > | interpolateToTarget (const tmp< Field< Type > > &tFld, const CombineOp &cop, const UList< Type > &defaultValues) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | interpolateToSource (const Field< Type > &fld, const UList< Type > &defaultValues) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | interpolateToSource (const tmp< Field< Type > > &tFld, const UList< Type > &defaultValues) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | interpolateToTarget (const Field< Type > &fld, const UList< Type > &defaultValues) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | interpolateToTarget (const tmp< Field< Type > > &tFld, const UList< Type > &defaultValues) const |
Static Public Member Functions | |
static autoPtr< AMIInterpolation > | New (const word &modelName, const dictionary &dict, const bool reverseTarget=false) |
Selector for dictionary. More... | |
static autoPtr< AMIInterpolation > | New (const word &modelName, const bool requireMatch=true, const bool reverseTarget=false, const scalar lowWeightCorrection=-1) |
Selector for components. More... | |
Static Public Attributes | |
static bool | cacheIntersections_ = false |
Protected Types | |
typedef treeDataPrimitivePatch< primitivePatch > | treeType |
Local typedef to octree tree-type. More... | |
Protected Member Functions | |
void | operator= (const AMIInterpolation &)=delete |
No copy assignment. More... | |
autoPtr< indexedOctree< treeType > > | createTree (const primitivePatch &patch) const |
Reset the octree for the patch face search. More... | |
label | calcDistribution (const primitivePatch &srcPatch, const primitivePatch &tgtPatch) const |
Calculate if patches are on multiple processors. More... | |
void | projectPointsToSurface (const searchableSurface &surf, pointField &pts) const |
Project points to surface. More... | |
const primitivePatch & | srcPatch0 () const |
Return the orginal src patch with optionally updated points. More... | |
const primitivePatch & | tgtPatch0 () const |
Return the orginal tgt patch with optionally updated points. More... | |
Static Protected Member Functions | |
static void | normaliseWeights (const scalarList &patchAreas, const word &patchName, const labelListList &addr, scalarListList &wght, scalarField &wghtSum, const bool conformal, const bool output, const scalar lowWeightTol) |
static void | agglomerate (const autoPtr< mapDistribute > &targetMap, const scalarList &fineSrcMagSf, const labelListList &fineSrcAddress, const scalarListList &fineSrcWeights, const labelList &sourceRestrictAddressing, const labelList &targetRestrictAddressing, scalarList &srcMagSf, labelListList &srcAddress, scalarListList &srcWeights, scalarField &srcWeightsSum, autoPtr< mapDistribute > &tgtMap) |
Protected Attributes | |
bool | requireMatch_ |
const bool | reverseTarget_ |
const scalar | lowWeightCorrection_ |
Threshold weight below which interpolation is deactivated. More... | |
label | singlePatchProc_ |
scalarList | srcMagSf_ |
Source face areas. More... | |
labelListList | srcAddress_ |
Addresses of target faces per source face. More... | |
scalarListList | srcWeights_ |
Weights of target faces per source face. More... | |
scalarField | srcWeightsSum_ |
Sum of weights of target faces per source face. More... | |
pointListList | srcCentroids_ |
Centroid of target faces per source face. More... | |
pointField | srcPatchPts_ |
refPtr< primitivePatch > | tsrcPatch0_ |
Source patch using manipulated input points. More... | |
autoPtr< mapDistribute > | srcMapPtr_ |
Source map pointer - parallel running only. More... | |
scalarList | tgtMagSf_ |
Target face areas. More... | |
labelListList | tgtAddress_ |
Addresses of source faces per target face. More... | |
scalarListList | tgtWeights_ |
Weights of source faces per target face. More... | |
scalarField | tgtWeightsSum_ |
Sum of weights of source faces per target face. More... | |
pointListList | tgtCentroids_ |
Centroid of source faces per target face. More... | |
pointField | tgtPatchPts_ |
refPtr< primitivePatch > | ttgtPatch0_ |
Target patch using manipulated input points. More... | |
autoPtr< mapDistribute > | tgtMapPtr_ |
Target map pointer - parallel running only. More... | |
bool | upToDate_ |
Up-to-date flag. More... | |
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mesh interface (AMI).
Based on the algorithm given in:
Conservative interpolation between volume meshes by local Galerkin projection, Farrell PE and Maddison JR, 2011, Comput. Methods Appl. Mech Engrg, Volume 200, Issues 1-4, pp 89-100
Interpolation requires that the two patches should have opposite orientations (opposite normals). The 'reverseTarget' flag can be used to reverse the orientation of the target patch.
Definition at line 79 of file AMIInterpolation.H.
|
protected |
Local typedef to octree tree-type.
Definition at line 91 of file AMIInterpolation.H.
AMIInterpolation | ( | const dictionary & | dict, |
const bool | reverseTarget = false |
||
) |
Construct from dictionary.
Definition at line 539 of file AMIInterpolation.C.
AMIInterpolation | ( | const bool | requireMatch = true , |
const bool | reverseTarget = false , |
||
const scalar | lowWeightCorrection = -1 |
||
) |
Construct from components.
Definition at line 565 of file AMIInterpolation.C.
AMIInterpolation | ( | const AMIInterpolation & | fineAMI, |
const labelList & | sourceRestrictAddressing, | ||
const labelList & | neighbourRestrictAddressing | ||
) |
Construct from agglomeration of AMIInterpolation. Agglomeration passed in as new coarse size and addressing from fine from coarse
Definition at line 594 of file AMIInterpolation.C.
References AMIInterpolation::agglomerate(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::max(), Foam::nl, Foam::Pout, UList< T >::size(), AMIInterpolation::srcAddress(), AMIInterpolation::srcAddress_, AMIInterpolation::srcMagSf(), AMIInterpolation::srcMagSf_, AMIInterpolation::srcMapPtr_, AMIInterpolation::srcWeights(), AMIInterpolation::srcWeights_, AMIInterpolation::srcWeightsSum_, AMIInterpolation::tgtAddress(), AMIInterpolation::tgtAddress_, AMIInterpolation::tgtMagSf(), AMIInterpolation::tgtMagSf_, AMIInterpolation::tgtMapPtr_, AMIInterpolation::tgtWeights(), AMIInterpolation::tgtWeights_, and AMIInterpolation::tgtWeightsSum_.
AMIInterpolation | ( | const AMIInterpolation & | ami | ) |
Construct as copy.
Definition at line 699 of file AMIInterpolation.C.
|
virtualdefault |
Destructor.
|
protecteddelete |
No copy assignment.
|
protected |
Reset the octree for the patch face search.
Definition at line 52 of file AMIInterpolation.C.
References boundBox::inflate(), and AMIInterpolation::New().
|
protected |
Calculate if patches are on multiple processors.
Definition at line 76 of file AMIInterpolation.C.
References Pstream::broadcast(), bitSet::count(), DebugInFunction, Foam::endl(), bitSet::find_first(), and UPstream::parRun().
|
protected |
Project points to surface.
Definition at line 117 of file AMIInterpolation.C.
References Foam::abort(), addProfiling, DebugInfo, Foam::endl(), Foam::FatalError, FatalErrorInFunction, searchableSurface::findNearest(), forAll, and UList< T >::size().
|
inlineprotected |
Return the orginal src patch with optionally updated points.
Definition at line 29 of file AMIInterpolationI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and AMIInterpolation::tsrcPatch0_.
|
inlineprotected |
Return the orginal tgt patch with optionally updated points.
Definition at line 42 of file AMIInterpolationI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
staticprotected |
Normalise the (area) weights - suppresses numerical error in weights calculation
NOTE: if area weights are incorrect by 'a significant amount' normalisation may stabilise the solution, but will introduce numerical error!
Definition at line 157 of file AMIInterpolation.C.
References addProfiling, Foam::endl(), forAll, Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::indent(), Foam::Info, Foam::nl, Foam::output(), Foam::returnReduce(), s(), List< T >::setSize(), UList< T >::size(), and Foam::sum().
|
staticprotected |
Definition at line 235 of file AMIInterpolation.C.
References addProfiling, List< T >::append(), mapDistributeBase::constructMap(), mapDistributeBase::constructSize(), mapDistribute::distribute(), UList< T >::find(), forAll, Foam::identity(), Foam::labelMin, Foam::max(), processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), autoPtr< T >::reset(), List< T >::setSize(), UList< T >::size(), and mapDistributeBase::subMap().
Referenced by AMIInterpolation::AMIInterpolation().
TypeName | ( | "AMIInterpolation" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
AMIInterpolation | , | ||
dict | , | ||
(const dictionary &dict, const bool reverseTarget) | , | ||
(dict, reverseTarget) | |||
) |
Selection table for dictionary construction.
declareRunTimeSelectionTable | ( | autoPtr | , |
AMIInterpolation | , | ||
component | , | ||
(const bool requireMatch, const bool reverseTarget, const scalar lowWeightCorrection) | , | ||
(requireMatch, reverseTarget, lowWeightCorrection) | |||
) |
Selection table for component-wise construction.
|
static |
Selector for dictionary.
Definition at line 32 of file AMIInterpolationNew.C.
References DebugInfo, dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInLookup, and AMIInterpolation::reverseTarget().
Referenced by AMIInterpolation::createTree().
|
static |
Selector for components.
Definition at line 57 of file AMIInterpolationNew.C.
References DebugInfo, Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorInLookup.
|
inlinevirtual |
Construct and return a clone.
Reimplemented in advancingFrontAMI, faceAreaWeightAMI, faceAreaWeightAMI2D, and nearestFaceAMI.
Definition at line 338 of file AMIInterpolation.H.
References Time::New().
|
inline |
Access to the up-to-date flag.
Definition at line 56 of file AMIInterpolationI.H.
|
inline |
Access to the up-to-date flag.
Definition at line 62 of file AMIInterpolationI.H.
|
inline |
Access to the distributed flag.
Definition at line 68 of file AMIInterpolationI.H.
Referenced by AMIInterpolation::interpolateToTarget().
|
inline |
Access to the requireMatch flag.
Definition at line 74 of file AMIInterpolationI.H.
Access to the requireMatch flag.
Definition at line 80 of file AMIInterpolationI.H.
|
inline |
Return true if requireMatch and lowWeightCorrectionin active.
Definition at line 87 of file AMIInterpolationI.H.
Referenced by faceAreaWeightAMI::calcAddressing().
|
inline |
Access to the reverseTarget flag.
Definition at line 93 of file AMIInterpolationI.H.
Referenced by AMIInterpolation::New().
|
inline |
Threshold weight below which interpolation is deactivated.
Definition at line 99 of file AMIInterpolationI.H.
|
inline |
Return true if employing a 'lowWeightCorrection'.
Definition at line 105 of file AMIInterpolationI.H.
|
inline |
Set to -1, or the processor holding all faces (both sides) of the AMI
Definition at line 111 of file AMIInterpolationI.H.
Referenced by AMIWeights::reportPatch().
|
inline |
Return const access to source patch face areas.
Definition at line 117 of file AMIInterpolationI.H.
Referenced by AMIInterpolation::AMIInterpolation().
|
inline |
Return access to source patch face areas.
Definition at line 123 of file AMIInterpolationI.H.
|
inline |
Return const access to source patch addressing.
Definition at line 129 of file AMIInterpolationI.H.
Referenced by AMIInterpolation::AMIInterpolation(), mappedPatchFieldBase< Type >::distribute(), cyclicAMIPolyPatch::mapCollocatedFaces(), and AMIWeights::reportPatch().
|
inline |
Return access to source patch addressing.
Definition at line 135 of file AMIInterpolationI.H.
|
inline |
Return const access to source patch weights.
Definition at line 141 of file AMIInterpolationI.H.
Referenced by AMIInterpolation::AMIInterpolation(), assemblyFaceAreaPairGAMGAgglomeration::assemblyFaceAreaPairGAMGAgglomeration(), and mappedPatchFieldBase< Type >::distribute().
|
inline |
Return access to source patch weights.
Definition at line 147 of file AMIInterpolationI.H.
|
inline |
Return const access to normalisation factor of source patch weights (i.e. the sum before normalisation)
Definition at line 153 of file AMIInterpolationI.H.
Referenced by AMIWeights::reportPatch(), cyclicACMIPolyPatch::resetAMI(), and AMIWeights::writeWeightFields().
|
inline |
Return access to normalisation factor of source patch weights (i.e. the sum before normalisation)
Definition at line 159 of file AMIInterpolationI.H.
|
inline |
Return const access to source patch face centroids.
Definition at line 165 of file AMIInterpolationI.H.
|
inline |
Return access to source patch face centroids.
Definition at line 171 of file AMIInterpolationI.H.
|
inline |
Source map pointer - valid only if singlePatchProc = -1 This gets source data into a form to be consumed by tgtAddress, tgtWeights
Definition at line 177 of file AMIInterpolationI.H.
Referenced by mappedPatchFieldBase< Type >::distribute().
|
inline |
Return const access to target patch face areas.
Definition at line 183 of file AMIInterpolationI.H.
Referenced by AMIInterpolation::AMIInterpolation().
|
inline |
Return access to target patch face areas.
Definition at line 189 of file AMIInterpolationI.H.
|
inline |
Return const access to target patch addressing.
Definition at line 195 of file AMIInterpolationI.H.
Referenced by AMIInterpolation::AMIInterpolation(), mappedPatchFieldBase< Type >::distribute(), and AMIWeights::reportPatch().
|
inline |
Return access to target patch addressing.
Definition at line 201 of file AMIInterpolationI.H.
|
inline |
Return const access to target patch weights.
Definition at line 207 of file AMIInterpolationI.H.
Referenced by AMIInterpolation::AMIInterpolation(), and mappedPatchFieldBase< Type >::distribute().
|
inline |
Return access to target patch weights.
Definition at line 213 of file AMIInterpolationI.H.
|
inline |
Return const access to normalisation factor of target patch weights (i.e. the sum before normalisation)
Definition at line 219 of file AMIInterpolationI.H.
Referenced by AMIWeights::reportPatch(), cyclicACMIPolyPatch::resetAMI(), and AMIWeights::writeWeightFields().
|
inline |
Return access to normalisation factor of target patch weights (i.e. the sum before normalisation)
Definition at line 225 of file AMIInterpolationI.H.
|
inline |
Target map pointer - valid only if singlePatchProc=-1. This gets target data into a form to be consumed by srcAddress, srcWeights
Definition at line 231 of file AMIInterpolationI.H.
Referenced by mappedPatchFieldBase< Type >::distribute().
|
virtual |
Update addressing, weights and (optional) centroids.
Reimplemented in advancingFrontAMI, faceAreaWeightAMI, faceAreaWeightAMI2D, and nearestFaceAMI.
Definition at line 723 of file AMIInterpolation.C.
References addProfiling, AMIInterpolation::calculate(), DebugInfo, Foam::endl(), Foam::indent(), Foam::Info, Time::New(), Foam::nl, PrimitivePatch< FaceList, PointField >::points(), and Foam::returnReduce().
Referenced by AMIInterpolation::calculate().
void reset | ( | autoPtr< mapDistribute > && | srcToTgtMap, |
autoPtr< mapDistribute > && | tgtToSrcMap, | ||
labelListList && | srcAddress, | ||
scalarListList && | srcWeights, | ||
labelListList && | tgtAddress, | ||
scalarListList && | tgtWeights | ||
) |
Set the maps, addresses and weights from an external source.
Definition at line 791 of file AMIInterpolation.C.
References DebugInFunction, Foam::endl(), forAll, and Foam::sum().
void append | ( | const primitivePatch & | srcPatch, |
const primitivePatch & | tgtPatch | ||
) |
Append additional addressing and weights.
Definition at line 828 of file AMIInterpolation.C.
References addProfiling, List< T >::append(), forAll, Foam::identity(), and UList< T >::size().
Normalise the weights.
Definition at line 1007 of file AMIInterpolation.C.
References Foam::output().
void interpolateToSource | ( | const UList< Type > & | fld, |
const CombineOp & | cop, | ||
List< Type > & | result, | ||
const UList< Type > & | defaultValues = UList<Type>::null() |
||
) | const |
Interpolate from target to source with supplied op to combine existing value with remote value and weight
Definition at line 121 of file AMIInterpolationTemplates.C.
References Foam::abort(), addProfiling, mapDistribute::distribute(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, Foam::nl, List< T >::setSize(), and UList< T >::size().
Referenced by mappedPatchBase::distribute(), cyclicAMIPolyPatch::interpolateUntransformed(), regionModel::mapRegionPatchField(), and regionModel::mapRegionPatchInternalField().
void interpolateToTarget | ( | const UList< Type > & | fld, |
const CombineOp & | cop, | ||
List< Type > & | result, | ||
const UList< Type > & | defaultValues = UList<Type>::null() |
||
) | const |
Interpolate from source to target with supplied op to combine existing value with remote value and weight
Definition at line 35 of file AMIInterpolationTemplates.C.
References Foam::abort(), addProfiling, mapDistribute::distribute(), AMIInterpolation::distributed(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, AMIInterpolation::lowWeightCorrection_, Foam::nl, List< T >::setSize(), UList< T >::size(), AMIInterpolation::srcAddress_, AMIInterpolation::srcMapPtr_, AMIInterpolation::tgtAddress_, AMIInterpolation::tgtWeights_, and AMIInterpolation::tgtWeightsSum_.
Referenced by mappedPatchBase::distribute(), and cyclicAMIPolyPatch::interpolateUntransformed().
tmp< Field< Type > > interpolateToSource | ( | const Field< Type > & | fld, |
const CombineOp & | cop, | ||
const UList< Type > & | defaultValues = UList< Type >::null() |
||
) | const |
Interpolate from target to source with supplied op.
tmp< Field< Type > > interpolateToSource | ( | const tmp< Field< Type > > & | tFld, |
const CombineOp & | cop, | ||
const UList< Type > & | defaultValues = UList< Type >::null() |
||
) | const |
Interpolate from target tmp field to source with supplied op.
tmp< Field< Type > > interpolateToTarget | ( | const Field< Type > & | fld, |
const CombineOp & | cop, | ||
const UList< Type > & | defaultValues = UList< Type >::null() |
||
) | const |
Interpolate from source to target with supplied op.
tmp< Field< Type > > interpolateToTarget | ( | const tmp< Field< Type > > & | tFld, |
const CombineOp & | cop, | ||
const UList< Type > & | defaultValues = UList< Type >::null() |
||
) | const |
Interpolate from source tmp field to target with supplied op.
tmp< Field< Type > > interpolateToSource | ( | const Field< Type > & | fld, |
const UList< Type > & | defaultValues = UList< Type >::null() |
||
) | const |
Interpolate from target to source.
tmp< Field< Type > > interpolateToSource | ( | const tmp< Field< Type > > & | tFld, |
const UList< Type > & | defaultValues = UList< Type >::null() |
||
) | const |
Interpolate from target tmp field.
tmp< Field< Type > > interpolateToTarget | ( | const Field< Type > & | fld, |
const UList< Type > & | defaultValues = UList< Type >::null() |
||
) | const |
Interpolate from source to target.
tmp< Field< Type > > interpolateToTarget | ( | const tmp< Field< Type > > & | tFld, |
const UList< Type > & | defaultValues = UList< Type >::null() |
||
) | const |
Interpolate from source tmp field.
Foam::label srcPointFace | ( | const primitivePatch & | srcPatch, |
const primitivePatch & | tgtPatch, | ||
const vector & | n, | ||
const label | tgtFacei, | ||
point & | tgtPoint | ||
) | const |
Return source patch face index of point on target patch face.
Definition at line 1039 of file AMIInterpolation.C.
References PointHit< PointType >::distance(), PointHit< PointType >::eligibleMiss(), f(), PointHit< PointType >::hit(), n, PrimitivePatch< FaceList, PointField >::points(), PointHit< PointType >::rawPoint(), PointHit< PointType >::setDistance(), and intersection::VISIBLE.
Foam::label tgtPointFace | ( | const primitivePatch & | srcPatch, |
const primitivePatch & | tgtPatch, | ||
const vector & | n, | ||
const label | srcFacei, | ||
point & | srcPoint | ||
) | const |
Return target patch face index of point on source patch face.
Definition at line 1088 of file AMIInterpolation.C.
References PointHit< PointType >::distance(), PointHit< PointType >::eligibleMiss(), f(), PointHit< PointType >::hit(), n, PrimitivePatch< FaceList, PointField >::points(), PointHit< PointType >::rawPoint(), PointHit< PointType >::setDistance(), and intersection::VISIBLE.
Check if src addresses are present in tgt addresses and viceversa
Definition at line 1138 of file AMIInterpolation.C.
References Foam::endl(), forAll, found, Log, Foam::nl, and UPstream::parRun().
void writeFaceConnectivity | ( | const primitivePatch & | srcPatch, |
const primitivePatch & | tgtPatch, | ||
const labelListList & | srcAddress | ||
) | const |
Write face connectivity as OBJ file.
Definition at line 1201 of file AMIInterpolation.C.
References Foam::endl(), PrimitivePatch< FaceList, PointField >::faceCentres(), forAll, processorFaPatch::myProcNo(), Foam::name(), os(), and Foam::meshTools::writeOBJ().
|
virtual |
Write.
Reimplemented in advancingFrontAMI, faceAreaWeightAMI, faceAreaWeightAMI2D, and nearestFaceAMI.
Definition at line 1233 of file AMIInterpolation.C.
References os(), Foam::type(), and Ostream::writeEntry().
Foam::tmp< Foam::Field< Type > > interpolateToSource | ( | const Field< Type > & | fld, |
const CombineOp & | cop, | ||
const UList< Type > & | defaultValues | ||
) | const |
Definition at line 207 of file AMIInterpolationTemplates.C.
References fld(), Foam::New(), and Foam::Zero.
Foam::tmp< Foam::Field< Type > > interpolateToSource | ( | const tmp< Field< Type > > & | tFld, |
const CombineOp & | cop, | ||
const UList< Type > & | defaultValues | ||
) | const |
Definition at line 229 of file AMIInterpolationTemplates.C.
Foam::tmp< Foam::Field< Type > > interpolateToTarget | ( | const Field< Type > & | fld, |
const CombineOp & | cop, | ||
const UList< Type > & | defaultValues | ||
) | const |
Definition at line 241 of file AMIInterpolationTemplates.C.
References fld(), Foam::New(), and Foam::Zero.
Foam::tmp< Foam::Field< Type > > interpolateToTarget | ( | const tmp< Field< Type > > & | tFld, |
const CombineOp & | cop, | ||
const UList< Type > & | defaultValues | ||
) | const |
Definition at line 263 of file AMIInterpolationTemplates.C.
Foam::tmp< Foam::Field< Type > > interpolateToSource | ( | const Field< Type > & | fld, |
const UList< Type > & | defaultValues | ||
) | const |
Definition at line 275 of file AMIInterpolationTemplates.C.
References fld().
Foam::tmp< Foam::Field< Type > > interpolateToSource | ( | const tmp< Field< Type > > & | tFld, |
const UList< Type > & | defaultValues | ||
) | const |
Definition at line 286 of file AMIInterpolationTemplates.C.
Foam::tmp< Foam::Field< Type > > interpolateToTarget | ( | const Field< Type > & | fld, |
const UList< Type > & | defaultValues | ||
) | const |
Definition at line 297 of file AMIInterpolationTemplates.C.
References fld().
Foam::tmp< Foam::Field< Type > > interpolateToTarget | ( | const tmp< Field< Type > > & | tFld, |
const UList< Type > & | defaultValues | ||
) | const |
Definition at line 308 of file AMIInterpolationTemplates.C.
|
static |
Definition at line 85 of file AMIInterpolation.H.
Referenced by faceAreaWeightAMI::calcInterArea(), and faceAreaWeightAMI::overlaps().
|
protected |
Flag to indicate that the two patches must be matched/an overlap exists between them
Definition at line 97 of file AMIInterpolation.H.
Referenced by advancingFrontAMI::checkPatches().
|
protected |
Flag to indicate that the two patches are co-directional and that the orientation of the target patch should be reversed
Definition at line 101 of file AMIInterpolation.H.
|
protected |
Threshold weight below which interpolation is deactivated.
Definition at line 104 of file AMIInterpolation.H.
Referenced by AMIInterpolation::interpolateToTarget().
|
protected |
Index of processor that holds all of both sides. -1 in all other cases
Definition at line 108 of file AMIInterpolation.H.
|
protected |
Source face areas.
Definition at line 114 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation().
|
protected |
Addresses of target faces per source face.
Definition at line 117 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation(), and AMIInterpolation::interpolateToTarget().
|
protected |
Weights of target faces per source face.
Definition at line 120 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation().
|
protected |
Sum of weights of target faces per source face.
Definition at line 123 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation().
|
protected |
Centroid of target faces per source face.
Definition at line 126 of file AMIInterpolation.H.
|
protected |
Source patch points if input points are manipulated, e.g. projected
Definition at line 130 of file AMIInterpolation.H.
|
protected |
Source patch using manipulated input points.
Definition at line 133 of file AMIInterpolation.H.
Referenced by advancingFrontAMI::srcPatch(), and AMIInterpolation::srcPatch0().
|
protected |
Source map pointer - parallel running only.
Definition at line 136 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation(), and AMIInterpolation::interpolateToTarget().
|
protected |
Target face areas.
Definition at line 143 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation().
|
protected |
Addresses of source faces per target face.
Definition at line 146 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation(), and AMIInterpolation::interpolateToTarget().
|
protected |
Weights of source faces per target face.
Definition at line 149 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation(), and AMIInterpolation::interpolateToTarget().
|
protected |
Sum of weights of source faces per target face.
Definition at line 152 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation(), and AMIInterpolation::interpolateToTarget().
|
protected |
Centroid of source faces per target face.
Definition at line 155 of file AMIInterpolation.H.
|
protected |
Target patch points if input points are manipulated, e.g. projected
Definition at line 159 of file AMIInterpolation.H.
|
protected |
Target patch using manipulated input points.
Definition at line 162 of file AMIInterpolation.H.
|
protected |
Target map pointer - parallel running only.
Definition at line 165 of file AMIInterpolation.H.
Referenced by AMIInterpolation::AMIInterpolation().
|
protected |
Up-to-date flag.
Definition at line 168 of file AMIInterpolation.H.