71 DynamicList<label> changedFaces(
src.
nFaces()/100 + 100);
72 DynamicList<meshToMeshData> changedFacesInfo(changedFaces.size());
74 List<meshToMeshData> cellData(
src.
nCells());
75 List<meshToMeshData> faceData(
src.
nFaces());
77 meshToMeshData::trackData
td(
tgt);
84 changedFacesInfo.clear();
87 for (; startCelli <
src.
nCells(); startCelli++)
89 if (!cellData[startCelli].valid(
td))
94 if (!tgtBb.contains(cc))
98 cellData[startCelli] = meshToMeshData(-1);
106 label facei =
src.cells()[startCelli][0];
107 changedFaces.append(facei);
108 changedFacesInfo.append(meshToMeshData(tgtCelli));
114 cellData[startCelli] = meshToMeshData(-1);
125 FaceCellWave<meshToMeshData, meshToMeshData::trackData> calc
132 src.globalData().nTotalCells()+1,
142 srcToTgtAddr[celli] = cellData[celli].tgtCell();
159Foam::waveMethod::waveMethod
165 meshToMeshMethod(
src,
tgt)
189 calculate(src_, tgt_, srcToTgt);
190 srcToTgtAddr.
setSize(srcToTgt.size());
191 srcToTgtWght.
setSize(srcToTgt.size());
192 forAll(srcToTgtAddr, celli)
194 srcToTgtAddr[celli].
setSize(1);
195 srcToTgtAddr[celli][0] = srcToTgt[celli];
196 srcToTgtWght[celli].
setSize(1);
197 srcToTgtWght[celli][0] = src_.cellVolumes()[celli];
203 calculate(tgt_, src_, tgtToSrc);
204 tgtToSrcAddr.
setSize(tgtToSrc.size());
205 tgtToSrcWght.
setSize(tgtToSrc.size());
206 forAll(tgtToSrcAddr, celli)
208 tgtToSrcAddr[celli].
setSize(1);
209 tgtToSrcAddr[celli][0] = tgtToSrc[celli];
210 tgtToSrcWght[celli].
setSize(1);
211 tgtToSrcWght[celli][0] = tgt_.cellVolumes()[celli];
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
void append(const T &val)
Copy append an element to the end of this list.
Wave propagation of information through grid. Every iteration information goes through one layer of c...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(label n)
Alias for resize().
bool empty() const noexcept
True if List is empty (ie, size() is zero).
void size(const label n)
Older name for setAddressableSize.
static bool & parRun() noexcept
Test if this a parallel run.
Class used to pass non-cell data to the update function.
Transfers refinement levels such that slow transition between levels is maintained....
Base class for mesh-to-mesh calculation methods.
const polyMesh & tgt_
Reference to the target mesh.
const polyMesh & src() const
Return const access to the source mesh.
const polyMesh & src_
Reference to the source mesh.
const polyMesh & tgt() const
Return const access to the target mesh.
Mesh consisting of general polyhedral cells.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
const indexedOctree< treeDataCell > & cellTree() const
Return the cell search tree.
const vectorField & cellCentres() const
label nCells() const noexcept
Number of mesh cells.
label nFaces() const noexcept
Number of mesh faces.
Standard boundBox with extra functionality for use in octree.
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
Direct (one-to-one cell correspondence) mesh-to-mesh interpolation class.
virtual ~waveMethod()
Destructor.
static void calculate(const polyMesh &src, const polyMesh &tgt, labelList &srcToTgtAddr)
Calculate addressing.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Namespace for handling debugging switches.
List< scalarList > scalarListList
List of scalarList.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool returnReduceAnd(const bool value, const int communicator=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
vector point
Point is a vector.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
List< pointList > pointListList
List of pointList.
#define forAll(list, i)
Loop across all elements in list.