45 #ifndef Foam_meshToMesh_H 46 #define Foam_meshToMesh_H 142 label singleMeshProc_;
159 template<
class Type,
class CombineOp>
160 void mapInternalSrcToTgt
163 const CombineOp& cop,
165 const bool secondOrder
170 template<
class Type,
class CombineOp>
171 void mapInternalTgtToSrc
174 const CombineOp& cop,
176 const bool secondOrder
181 template<
class Type,
class CombineOp>
182 void mapAndOpSrcToTgt
192 template<
class Type,
class CombineOp>
193 void mapAndOpTgtToSrc
205 void normaliseWeights
207 const word& descriptor,
216 const word& methodName,
222 void calculate(
const word& methodName,
const bool normalise);
225 void calculatePatchAMIs(
const word& amiMethodName);
228 void constructNoCuttingPatches
230 const word& methodName,
231 const word& AMIMethodName,
232 const bool interpAllPatches
236 void constructFromCuttingPatches
238 const word& methodName,
239 const word& AMIMethodName,
249 label calcDistribution
256 label calcOverlappingProcs
287 void distributeAndMergeCells
320 const bool interpAllPatches =
true 328 const word& methodName,
329 const word& AMIMethodName,
331 const bool interpAllPatches =
true 343 const bool normalise =
true 352 const word& methodName,
353 const word& AMIMethodName,
357 const bool normalise =
true 394 inline scalar
V()
const;
434 template<class Type, class CombineOp>
437 const
UList<Type>& srcFld,
438 const CombineOp& cop,
448 template<class Type, class CombineOp>
451 const
UList<Type>& srcField,
453 const CombineOp& cop,
459 template<class Type, class CombineOp>
462 const
Field<Type>& srcFld,
468 template<class Type, class CombineOp>
480 const
Field<Type>& srcFld
497 template<class Type, class CombineOp>
500 const
UList<Type>& tgtFld,
501 const CombineOp& cop,
511 template<class Type, class CombineOp>
514 const
UList<Type>& srcField,
516 const CombineOp& cop,
522 template<class Type, class CombineOp>
525 const
Field<Type>& tgtFld,
531 template<class Type, class CombineOp>
543 const
Field<Type>& tgtFld
561 template<class Type, class CombineOp>
565 const CombineOp& cop,
567 const
bool secondOrder = true
572 template<class Type, class CombineOp>
576 const CombineOp& cop,
577 const
bool secondOrder = true
582 template<class Type, class CombineOp>
586 const CombineOp& cop,
587 const
bool secondOrder = true
596 const
bool secondOrder = true
605 const
bool secondOrder = true
615 template<class Type, class CombineOp>
619 const CombineOp& cop,
621 const
bool secondOrder = true
626 template<class Type, class CombineOp>
630 const CombineOp& cop,
631 const
bool secondOrder = true
636 template<class Type, class CombineOp>
641 const CombineOp& cop,
642 const
bool secondOrder = true
651 const
bool secondOrder = true
660 const
bool secondOrder = true
773 const
Field<scalar>& srcField,
774 Field<scalar>& tgtField,
815 Field<scalar>& srcField,
816 const
Field<scalar>& tgtField,
857 #include "meshToMeshI.H"
Forwards and collection of common volume field types.
bool distributed() const noexcept
Distributed across processors (singleMeshProc == -1)
static const Enum< interpolationMethod > interpolationMethodNames_
static const Enum< procMapMethod > procMapMethodNames_
const polyMesh & srcRegion() const
Return const access to the source mesh.
const PtrList< AMIPatchToPatchInterpolation > & patchAMIs() const
Return the list of AMIs between source and target patches.
A bounding box defined in terms of min/max extrema points.
Generic GeometricField class.
Class to calculate the cell-addressing between two overlapping meshes.
procMapMethod
Enumeration specifying processor parallel map construction method.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const labelListList & srcToTgtCellAddr() const
Return const access to the source to target cell addressing.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
const autoPtr< mapDistribute > & srcMap() const noexcept
Source map pointer - valid if no singleMeshProc.
Generic templated field type.
A class for handling words, derived from Foam::string.
const pointListList & tgtToSrcCellVec() const
Return const access to the target to source offset vectors.
scalar V() const
Return const access to the overlap volume.
A HashTable similar to std::unordered_map.
const mapDistribute * hasSrcMap() const noexcept
Pointer to the source map (if distributed). Can be checked as a bool.
static word interpolationMethodAMI(const interpolationMethod method)
Conversion between mesh and patch interpolation methods.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
TypeName("meshToMesh")
Run-time type information.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const mapDistribute * hasTgtMap() const noexcept
Pointer to the target map (if distributed). Can be checked as a bool.
const labelListList & tgtToSrcCellAddr() const
Return const access to the target to source cell addressing.
Class containing processor-to-processor mapping information.
virtual ~meshToMesh()
Destructor.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
const autoPtr< mapDistribute > & tgtMap() const noexcept
Target map pointer - valid if no singleMeshProc.
const scalarListList & srcToTgtCellWght() const
Return const access to the source to target cell weights.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
interpolationMethod
Enumeration specifying interpolation method.
A class for managing temporary objects.
void mapSrcToTgt(const UList< Type > &srcFld, const CombineOp &cop, List< Type > &result) const
Map field from src to tgt mesh with defined operation.
const polyMesh & tgtRegion() const
Return const access to the target mesh.
Tensor of scalars, i.e. Tensor<scalar>.
const pointListList & srcToTgtCellVec() const
Return const access to the source to target offset vectors.
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.