44 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
47 label nPatchFaces = 0;
50 label patchI = iter.key();
59 Info<<
"nearWallFields::calcAddressing() :" 60 <<
" nPatchFaces:" << globalWalls.
size() <<
endl;
71 label patchI = iter.key();
102 start = faceCellCentres[patchFaceI];
105 const point end = start-distance_*nf[patchFaceI];
142 Info<<
"nearWallFields::calcAddressing() :" 143 <<
"Dumping tracks to " << str.name() <<
endl;
155 cellToWalls_.setSize(mesh.
nCells());
156 cellToSamples_.setSize(mesh.
nCells());
162 scalar maxTrackLen = 2.0*mesh.
bounds().
mag();
174 start[nPatchFaces++] = tp.
position();
179 cloud.
move(td, maxTrackLen);
184 getPatchDataMapPtr_.reset
198 getPatchDataMapPtr_().distribute(start);
205 Info<<
"nearWallFields::calcAddressing() :" 206 <<
"Dumping obtained to " << str.name() <<
endl;
208 forAll(cellToWalls_, cellI)
211 const labelList& cData = cellToWalls_[cellI];
224 Foam::nearWallFields::nearWallFields
229 const bool loadFromFiles
238 if (isA<fvMesh>(obr_))
247 "nearWallFields::nearWallFields" 250 "const objectRegistry&, " 251 "const dictionary&, " 254 ) <<
"No fvMesh available, deactivating " << name_
267 Info<<
"nearWallFields::~nearWallFields()" <<
endl;
278 Info<<
"nearWallFields::read(const dictionary&)" <<
endl;
283 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
285 dict.
lookup(
"fields") >> fieldSet_;
298 reverseFieldMap_.clear();
304 fieldMap_.resize(2*fieldSet_.size());
305 reverseFieldMap_.resize(2*fieldSet_.size());
308 const word& fldName = fieldSet_[setI].first();
309 const word& sampleFldName = fieldSet_[setI].second();
311 fieldMap_.insert(fldName, sampleFldName);
312 reverseFieldMap_.insert(sampleFldName, fldName);
315 Info<<
type() <<
" " << name_ <<
": Sampling " << fieldMap_.size()
316 <<
" fields" <<
endl;
328 Info<<
"nearWallFields:execute()" <<
endl;
339 && vSpheretf_.empty()
344 Info<<
type() <<
" " << name_ <<
": Creating " << fieldMap_.size()
345 <<
" fields" <<
endl;
349 createFields(vSpheretf_);
350 createFields(vSymmtf_);
356 Info<<
type() <<
" " << name_ <<
" output:" <<
nl;
358 Info<<
" Sampling fields to " << obr_.time().timeName()
363 sampleFields(vSpheretf_);
364 sampleFields(vSymmtf_);
374 Info<<
"nearWallFields:end()" <<
endl;
394 Info<<
"nearWallFields:write()" <<
endl;
399 Info<<
" Writing sampled fields to " << obr_.time().timeName()
412 vSpheretf_[i].write();
OFstream which keeps track of vertices.
label size() const
Global sum of localSizes.
virtual void read(const dictionary &)
Read the field min/max data.
Mesh data needed to do the Finite Volume discretisation.
label size() const
Return the number of elements in the PtrList.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
fileName path() const
Return path.
virtual void end()
Execute at the final time-loop, currently does nothing.
scalar mag() const
The magnitude of the bounding box span.
Class containing processor-to-processor mapping information.
const point & end() const
Point to track to.
List< wordRe > wordReList
A List of wordRe (word or regular expression)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
bool hit() const
Is there a hit.
void move(TrackData &td, const scalar trackTime)
Move the particles.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const Point & hitPoint() const
Return hit point.
const Time & time() const
Return the top-level database.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const polyPatch & patch() const
Return the polyPatch.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(const label)
Reset size of List.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
Particle class that finds cells by tracking.
const vector & position() const
Return current particle position.
tmp< vectorField > faceCellCentres() const
Return face cell centres.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
A cloud is a collection of lagrangian particles.
virtual ~nearWallFields()
Destructor.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
tmp< vectorField > nf() const
Return face normals.
label toGlobal(const label i) const
From local to global.
Class used to pass tracking data to the trackToFace function.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const boundBox & bounds() const
Return mesh bounding box.
Registry of regIOobjects.
bool read(const char *, int32_t &)
virtual void write()
Write.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
line< point, const point & > linePointRef
Line using referred points.
void calcAddressing()
Calculate addressing from cells back to patch faces.
void addParticle(ParticleType *pPtr)
Transfer particle to cloud.
label start() const
Return start label of this patch in the polyMesh face list.
virtual void execute()
Execute, currently does nothing.
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
void findCellFacePt(const point &p, label &celli, label &tetFacei, label &tetPti) const
Find the cell, tetFacei and tetPti for point p.
static pointIndexHit facePoint(const polyMesh &, const label faceI, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
defineTypeNameAndDebug(combustionModel, 0)
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.