Go to the documentation of this file.
145 template<
class Type,
class CombineOp>
149 const CombineOp& cop,
151 const bool secondOrder
156 template<
class Type,
class CombineOp>
160 const CombineOp& cop,
162 const bool secondOrder
167 template<
class Type,
class CombineOp>
178 template<
class Type,
class CombineOp>
193 const word& descriptor,
202 const word& methodName,
216 const word& methodName,
217 const word& AMIMethodName,
218 const bool interpAllPatches
224 const word& methodName,
225 const word& AMIMethodName,
303 const bool interpAllPatches =
true
311 const word& methodName,
312 const word& AMIMethodName,
313 const bool interpAllPatches =
true
332 const word& methodName,
333 const word& AMIMethodName,
372 inline scalar
V()
const;
393 template<
class Type,
class CombineOp>
397 const CombineOp& cop,
407 template<
class Type,
class CombineOp>
412 const CombineOp& cop,
418 template<
class Type,
class CombineOp>
427 template<
class Type,
class CombineOp>
456 template<
class Type,
class CombineOp>
460 const CombineOp& cop,
470 template<
class Type,
class CombineOp>
475 const CombineOp& cop,
481 template<
class Type,
class CombineOp>
490 template<
class Type,
class CombineOp>
520 template<
class Type,
class CombineOp>
524 const CombineOp& cop,
526 const bool secondOrder =
true
531 template<
class Type,
class CombineOp>
535 const CombineOp& cop,
536 const bool secondOrder =
true
541 template<
class Type,
class CombineOp>
546 const CombineOp& cop,
547 const bool secondOrder =
true
556 const bool secondOrder =
true
566 const bool secondOrder =
true
576 template<
class Type,
class CombineOp>
580 const CombineOp& cop,
582 const bool secondOrder =
true
587 template<
class Type,
class CombineOp>
591 const CombineOp& cop,
592 const bool secondOrder =
true
597 template<
class Type,
class CombineOp>
602 const CombineOp& cop,
603 const bool secondOrder =
true
612 const bool secondOrder =
true
622 const bool secondOrder =
true
interpolationMethod
Enumeration specifying interpolation method.
void mapTgtToSrc(const UList< Type > &tgtFld, const CombineOp &cop, List< Type > &result) const
Map field from tgt to src mesh with defined operation.
const scalarListList & tgtToSrcCellWght() const
Return const access to the target to source cell weights.
label singleMeshProc_
Index of processor that holds all of both sides. -1 in all other.
TypeName("meshToMesh")
Run-time type information.
A class for handling words, derived from string.
meshToMesh(const meshToMesh &)
Disallow default bitwise copy construct.
const PtrList< AMIPatchToPatchInterpolation > & patchAMIs() const
Return the list of AMIs between source and target patches.
scalar V() const
Return const access to the overlap volume.
A class for managing temporary objects.
void distributeAndMergeCells(const mapDistribute &map, const polyMesh &tgt, const globalIndex &globalI, pointField &tgtPoints, faceList &tgtFaces, labelList &tgtFaceOwners, labelList &tgtFaceNeighbours, labelList &tgtCellIDs) const
Collect pieces of tgt mesh from other procssors and restructure.
void calculatePatchAMIs(const word &amiMethodName)
Calculate patch overlap.
List< label > tgtPatchID_
List of source patch IDs per target patch (local index)
void mapAndOpSrcToTgt(const AMIPatchToPatchInterpolation &AMI, const Field< Type > &srcField, Field< Type > &tgtField, const CombineOp &cop) const
Helper function to interpolate patch field. Template.
void constructNoCuttingPatches(const word &methodName, const word &AMIMethodName, const bool interpAllPatches)
Constructor helper.
void distributeCells(const mapDistribute &map, const polyMesh &tgtMesh, const globalIndex &globalI, List< pointField > &points, List< label > &nInternalFaces, List< faceList > &faces, List< labelList > &faceOwner, List< labelList > &faceNeighbour, List< labelList > &cellIDs, List< labelList > &nbrProcIDs, List< labelList > &procLocalFaceIDs) const
Distribute mesh info from 'my' processor to others.
typeOfRank< typename pTraits< arg1 >::cmptType, int(pTraits< arg1 >::rank)+int(pTraits< arg2 >::rank) >::type type
virtual ~meshToMesh()
Destructor.
label calcDistribution(const polyMesh &src, const polyMesh &tgt) const
Determine whether the meshes are split across multiple pocessors.
scalarListList tgtToSrcCellWght_
Target to source cell interpolation weights.
void mapSrcToTgt(const UList< Type > &srcFld, const CombineOp &cop, List< Type > &result) const
Map field from src to tgt mesh with defined operation.
Mesh consisting of general polyhedral cells.
scalarListList srcToTgtCellWght_
Source to target cell interplation weights.
const polyMesh & srcRegion_
Reference to the source mesh.
const labelListList & srcToTgtCellAddr() const
Return const access to the source to target cell addressing.
const pointListList & srcToTgtCellVec() const
Return const access to the source to target offset vectors.
autoPtr< mapDistribute > calcProcMap(const polyMesh &src, const polyMesh &tgt) const
Calculate the mapping between processors.
static const NamedEnum< interpolationMethod, 4 > interpolationMethodNames_
pointListList tgtToSrcCellVec_
Target to source cell offset vectors.
labelList maskCells(const polyMesh &src, const polyMesh &tgt) const
Return src cell IDs for the overlap region.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Class to calculate the cell-addressing between two overlapping meshes.
void mapInternalSrcToTgt(const GeometricField< Type, fvPatchField, volMesh > &field, const CombineOp &cop, GeometricField< Type, fvPatchField, volMesh > &result, const bool secondOrder) const
Helper function to interpolate internal field. Optionally uses.
labelListList tgtToSrcCellAddr_
Target to source cell addressing.
Class containing processor-to-processor mapping information.
void calcAddressing(const word &methodName, const polyMesh &src, const polyMesh &tgt)
Calculate the addressing between overlapping regions of src and tgt.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
List< label > srcPatchID_
List of target patch IDs per source patch (local index)
label calcOverlappingProcs(const List< treeBoundBoxList > &procBb, const boundBox &bb, boolList &overlaps) const
Determine which processor bounding-boxes overlap.
autoPtr< mapDistribute > tgtMapPtr_
Target map pointer - parallel running only.
pointListList srcToTgtCellVec_
Source to target cell offset vectors.
PtrList< AMIPatchToPatchInterpolation > patchAMIs_
List of AMIs between source and target patches.
void operator=(const meshToMesh &)
Disallow default bitwise assignment.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void constructFromCuttingPatches(const word &methodName, const word &AMIMethodName, const HashTable< word > &patchMap, const wordList &cuttingPatches)
Constructor helper.
const polyMesh & srcRegion() const
Return const access to the source mesh.
scalar V_
Cell total volume in overlap region [m3].
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
const polyMesh & tgtRegion_
Reference to the target mesh.
labelListList srcToTgtCellAddr_
Source to target cell addressing.
An STL-conforming hash table.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void calculate(const word &methodName)
Calculate - main driver function.
interpolationMethod
Enumeration specifying interpolation method.
void add(UList< Type > &fld, const label offset) const
Helper function to add a constant offset to a list.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
static AMIPatchToPatchInterpolation::interpolationMethod interpolationMethodAMI(const interpolationMethod method)
Conversion between mesh and patch interpolation methods.
autoPtr< mapDistribute > srcMapPtr_
Source map pointer - parallel running only.
const polyMesh & tgtRegion() const
Return const access to the target mesh.
@ imCorrectedCellVolumeWeight
A bounding box defined in terms of the points at its extremities.
const labelListList & tgtToSrcCellAddr() const
Return const access to the target to source cell addressing.
List< label > cuttingPatches_
Cutting patches whose values are set using a zero-gradient condition.
void mapAndOpTgtToSrc(const AMIPatchToPatchInterpolation &AMI, Field< Type > &srcField, const Field< Type > &tgtField, const CombineOp &cop) const
Helper function to interpolate patch field. Template.
Generic GeometricField class.
const scalarListList & srcToTgtCellWght() const
Return const access to the source to target cell weights.
void normaliseWeights(const word &descriptor, const labelListList &addr, scalarListList &wght) const
Normalise the interpolation weights.
void mapInternalTgtToSrc(const GeometricField< Type, fvPatchField, volMesh > &field, const CombineOp &cop, GeometricField< Type, fvPatchField, volMesh > &result, const bool secondOrder) const
Helper function to interpolate internal field. Optionally uses.
const pointListList & tgtToSrcCellVec() const
Return const access to the target to source offset vectors.