46 const word& engineType,
52 cellsInterpolation_(),
53 srcCellsStabilisation_(),
54 tgtCellsStabilisation_(),
56 patchInterpolations_(),
57 srcPatchStabilisations_(),
58 tgtPatchStabilisations_()
78 !isA<emptyPolyPatch>(srcPp)
79 && !isA<wedgePolyPatch>(srcPp)
80 && !isA<processorPolyPatch>(srcPp)
83 const label tgtPatchi =
89 <<
"Source patch " << srcPp.
name()
90 <<
" not found in target mesh. "
91 <<
"Available target patches are "
100 patchIndices_.transfer(patchIDs);
106 patchIndices_.setSize(patchMap.
size());
110 const word& tgtPatchName = iter.key();
111 const word& srcPatchName = iter();
113 const label srcPatchi =
115 const label tgtPatchi =
121 <<
"Patch " << srcPatchName
122 <<
" not found in source mesh. "
123 <<
"Available source patches are "
130 <<
"Patch " << tgtPatchName
131 <<
" not found in target mesh. "
132 <<
"Available target patches are "
137 patchIndices_[i ++] =
labelPair(srcPatchi, tgtPatchi);
142 Info<<
"Creating cellsToCells between source mesh "
143 << srcMesh_.
name() <<
" and target mesh " << tgtMesh_.
name()
147 cellsInterpolation_->update(srcMesh_, tgtMesh_);
149 srcCellsStabilisation_.clear();
150 tgtCellsStabilisation_.clear();
155 patchInterpolations_.setSize(patchIndices_.size());
156 srcPatchStabilisations_.setSize(patchIndices_.size());
157 tgtPatchStabilisations_.setSize(patchIndices_.size());
160 const label srcPatchi = patchIndices_[i].first();
161 const label tgtPatchi = patchIndices_[i].second();
166 Info<<
"Creating patchToPatch between source patch "
167 << srcPp.
name() <<
" and target patch " << tgtPp.
name()
170 patchInterpolations_.set
176 patchInterpolations_[i].update
198 boolList srcPatchIsMapped(srcMesh_.boundaryMesh().size(),
false);
199 boolList tgtPatchIsMapped(tgtMesh_.boundaryMesh().size(),
false);
204 const label srcPatchi = patchIndices_[i].first();
205 const label tgtPatchi = patchIndices_[i].second();
207 srcPatchIsMapped[srcPatchi] =
true;
208 tgtPatchIsMapped[tgtPatchi] =
true;
212 forAll(srcMesh_.boundaryMesh(), srcPatchi)
218 isA<emptyPolyPatch>(srcPp)
219 || isA<wedgePolyPatch>(srcPp)
220 || isA<processorPolyPatch>(srcPp)
223 srcPatchIsMapped[srcPp.
index()] =
true;
226 forAll(tgtMesh_.boundaryMesh(), tgtPatchi)
232 isA<emptyPolyPatch>(tgtPp)
233 || isA<wedgePolyPatch>(tgtPp)
234 || isA<processorPolyPatch>(tgtPp)
237 tgtPatchIsMapped[tgtPp.
index()] =
true;
244 &&
findIndex(tgtPatchIsMapped,
false) == -1;
250 const label srcCelli,
254 return cellsInterpolation_().srcToTgtPoint(tgtMesh_, srcCelli,
p);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
An STL-conforming hash table.
label size() const
Return number of elements in table.
const word & name() const
Return name.
static autoPtr< cellsToCells > New(const word &cellsToCellsType)
Select from name.
Class to calculate interpolative addressing and weights between the cells and patches of two overlapp...
virtual ~meshToMesh()
Destructor.
remote srcToTgtPoint(const label srcCelli, const point &p) const
Find the target processor and cell associated with a point in a.
bool consistent() const
Is the interpolation between consistent meshes? I.e., are all.
meshToMesh(const polyMesh &srcMesh, const polyMesh &tgtMesh, const word &engineType, const HashTable< word > &patchMap=NullObjectRef< HashTable< word >>())
Construct from source and target meshes. If a patchMap is supplied,.
label index() const
Return the index of this patch in the boundaryMesh.
const word & name() const
Return name.
static autoPtr< patchToPatch > New(const word &patchToPatchType, const bool reverse)
Select from name.
label findIndex(const word &patchName) const
Find patch index given a name.
wordList names() const
Return the list of patch names.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Struct for keeping processor, element (cell, face, point) index.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pair< label > labelPair
Label pair.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
defineTypeNameAndDebug(combustionModel, 0)
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.