Go to the documentation of this file.
47 label nPatchFaces = 0;
50 label patchI = iter.key();
51 nPatchFaces +=
mesh.boundary()[patchI].size();
59 Info<<
"nearWallFields::calcAddressing() :"
60 <<
" nPatchFaces:" << globalWalls.
size() <<
endl;
71 label patchI = iter.key();
102 start = faceCellCentres[patchFaceI];
111 mesh.findCellFacePt(start, cellI, tetFaceI, tetPtI);
140 /
"wantedTracks_" +
mesh.time().timeName() +
".obj"
142 Info<<
"nearWallFields::calcAddressing() :"
143 <<
"Dumping tracks to " << str.
name() <<
endl;
162 scalar maxTrackLen = 2.0*
mesh.bounds().mag();
169 start.setSize(nPatchFaces);
174 start[nPatchFaces++] =
tp.position();
179 cloud.move(td, maxTrackLen);
203 /
"obtainedTracks_" +
mesh.time().timeName() +
".obj"
205 Info<<
"nearWallFields::calcAddressing() :"
206 <<
"Dumping obtained to " << str.
name() <<
endl;
229 const bool loadFromFiles
238 if (isA<fvMesh>(obr_))
246 <<
"No fvMesh available, deactivating " << name_
259 Info<<
"nearWallFields::~nearWallFields()" <<
endl;
270 Info<<
"nearWallFields::read(const dictionary&)" <<
endl;
275 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
290 reverseFieldMap_.clear();
296 fieldMap_.resize(2*fieldSet_.size());
297 reverseFieldMap_.resize(2*fieldSet_.size());
300 const word& fldName = fieldSet_[setI].first();
301 const word& sampleFldName = fieldSet_[setI].second();
303 fieldMap_.insert(fldName, sampleFldName);
304 reverseFieldMap_.insert(sampleFldName, fldName);
307 Info<<
type() <<
" " << name_ <<
": Sampling " << fieldMap_.size()
308 <<
" fields" <<
endl;
320 Info<<
"nearWallFields:execute()" <<
endl;
331 && vSpheretf_.empty()
336 Info<<
type() <<
" " << name_ <<
": Creating " << fieldMap_.size()
337 <<
" fields" <<
endl;
341 createFields(vSpheretf_);
342 createFields(vSymmtf_);
348 Info<<
type() <<
" " << name_ <<
" output:" <<
nl;
350 Info<<
" Sampling fields to " << obr_.time().timeName()
355 sampleFields(vSpheretf_);
356 sampleFields(vSymmtf_);
378 Info<<
"nearWallFields:write()" <<
endl;
383 Info<<
" Writing sampled fields to " << obr_.time().timeName()
396 vSpheretf_[i].write();
nearWallFields(const nearWallFields &)
Disallow default bitwise copy construct.
A class for handling words, derived from string.
OFstream which keeps track of vertices.
#define forAll(list, i)
Loop across all elements in list.
virtual Ostream & write(const char)
Write character.
labelListList cellToWalls_
From cell to seed patch faces.
bool read(const char *, int32_t &)
List< wordRe > wordReList
A List of wordRe (word or regular expression)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool hit() const
Is there a hit.
volScalarField tp(IOobject("tp", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedScalar("tp", dimensionSet(0, 0, 1, 0, 0, 0, 0), 0))
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< List< point > > cellToSamples_
From cell to tracked end point.
autoPtr< mapDistribute > getPatchDataMapPtr_
Map from cell based data back to patch based data.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Registry of regIOobjects.
tmp< vectorField > nf() const
Return face normals.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
const objectRegistry & obr_
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
labelHashSet patchSet_
Patches to sample.
Intrusive doubly-linked list.
Pre-declare SubField and related Field type.
const Point & hitPoint() const
Return hit point.
Class containing processor-to-processor mapping information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void end()
Execute at the final time-loop, currently does nothing.
Particle class that finds cells by tracking.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
virtual ~nearWallFields()
Destructor.
tmp< vectorField > faceCellCentres() const
Return face cell centres.
void setSize(const label)
Reset size of List.
A cloud is a collection of lagrangian particles.
line< point, const point & > linePointRef
Line using referred points.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
static pointIndexHit facePoint(const polyMesh &, const label faceI, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
label size() const
Global sum of localSizes.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
scalar distance_
Distance away from wall.
label start() const
Return start label of this patch in the polyMesh face list.
const polyPatch & patch() const
Return the polyPatch.
virtual void write()
Write.
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
const fileName & name() const
Return the name of the stream.
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.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
virtual void read(const dictionary &)
Read the field min/max data.
void calcAddressing()
Calculate addressing from cells back to patch faces.
word name(const complex &)
Return a string representation of a complex.
virtual void execute()
Execute, currently does nothing.
Class used to pass tracking data to the trackToFace function.
label toGlobal(const label i) const
From local to global.