Go to the documentation of this file.
32 #include "PatchTools.H"
71 else if (
s.faces().size())
92 const bool loadFromFiles
98 loadFromFiles_(loadFromFiles),
106 if (setActive<fvMesh>())
113 outputPath_ = obr_.time().path()/
".."/
"postProcessing"/name_;
117 outputPath_ = obr_.time().path()/
"postProcessing"/name_;
134 verbose_ = verbosity;
163 const label nFields = classifyFields();
167 if (nFields == 0 || formatter_->separateGeometry())
172 const IOobjectList objects(obr_, obr_.time().timeName());
174 sampleAndWrite<volScalarField>(objects);
175 sampleAndWrite<volVectorField>(objects);
176 sampleAndWrite<volSphericalTensorField>(objects);
177 sampleAndWrite<volSymmTensorField>(objects);
178 sampleAndWrite<volTensorField>(objects);
180 sampleAndWrite<surfaceScalarField>(objects);
181 sampleAndWrite<surfaceVectorField>(objects);
182 sampleAndWrite<surfaceSphericalTensorField>(objects);
183 sampleAndWrite<surfaceSymmTensorField>(objects);
184 sampleAndWrite<surfaceTensorField>(objects);
191 bool surfacesFound =
dict.
found(
"surfaces");
197 dict.
lookup(
"interpolationScheme") >> interpolationScheme_;
208 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
219 mergeList_.setSize(size());
227 Info<<
"Reading surface description:" <<
nl;
230 Info<<
" " << operator[](surfI).name() <<
nl;
238 Pout<<
"sample fields:" << fieldSelection_ <<
nl
239 <<
"sample surfaces:" <<
nl <<
"(" <<
nl;
243 Pout<<
" " << operator[](surfI) <<
endl;
277 if (
operator[](surfI).needsUpdate())
289 bool justExpired =
false;
293 if (
operator[](surfI).expire())
301 mergeList_[surfI].clear();
312 bool updated =
false;
324 Info <<
"current model name is :" << operator[](surfI).name()<<
endl;
325 if (
operator[](surfI).update())
334 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
341 Pout<<
nl <<
"Merging all points within "
342 << mergeDim <<
" metre" <<
endl;
347 Info <<
"current model name is :" << operator[](surfI).name()<<
endl;
368 mergeList_[surfI].faces,
369 mergeList_[surfI].pointsMap
385 scalar oldTol = mergeTol_;
fileName outputPath_
Output path.
autoPtr< surfaceWriter > formatter_
Surface formatter.
scalar mag() const
The magnitude of the bounding box span.
const Field< PointType > & points() const
Return reference to global points.
static scalar mergeTol_
Tolerance for merging points (fraction of mesh bounding box)
A class for handling words, derived from string.
A class for handling file names.
Base class for function objects, adding functionality to read/write state information (data required ...
virtual void readUpdate(const polyMesh::readUpdateState state)
Update for changes of mesh due to readUpdate - expires the surfaces.
#define forAll(list, i)
Loop across all elements in list.
virtual ~sampledSurfaces()
Destructor.
const objectRegistry & obr_
Const reference to database.
virtual bool needsUpdate() const
Does any of the surfaces need an update?
bool read(const char *, int32_t &)
A List obtained as a section of another List.
List< mergeInfo > mergeList_
Information for merging surfaces.
const Time & time() const
Return time.
static bool & parRun()
Is this a parallel run?
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static scalar mergeTol()
Get merge tolerance.
Mesh consisting of general polyhedral cells.
virtual bool update()
Update the surfaces as required and merge surface points (parallel).
sampledSurfaces(const sampledSurfaces &)
Disallow default bitwise copy construct and assignment.
Registry of regIOobjects.
void verbose(const bool verbosity=true)
Set verbosity 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.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Istream and Ostream manipulators taking arguments.
const T & operator[](const label) const
Return element const reference.
An abstract class for surfaces with sampling.
void writeGeometry() const
Write geometry only.
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.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
List of IOobjects with searching and retrieving facilities.
static const fileName null
An empty fileName.
virtual void execute()
Execute, currently does nothing.
static bool master(const label communicator=0)
Am I the master process.
readUpdateState
Enumeration defining the state of the mesh after a read update.
const boundBox & bounds() const
Return mesh bounding box.
virtual void read(const dictionary &)
Read the sampledSurfaces dictionary.
prefixOSstream Pout(cout, "Pout")
static autoPtr< surfaceWriter > New(const word &writeType)
Return a reference to the selected surfaceWriter.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
static bool verbose_
Output verbosity.
Class used for the PtrLists read-construction.
virtual void movePoints(const polyMesh &)
Update for mesh point-motion - expires the surfaces.
const dimensionedScalar e
Elementary charge.
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
virtual void write()
Sample and write.
static const word null
An empty word.
virtual void end()
Execute at the final time-loop, currently does nothing.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh - expires the surfaces.
defineTypeNameAndDebug(combustionModel, 0)
virtual bool expire()
Mark the surfaces as needing an update.
word name(const complex &)
Return a string representation of a complex.
A list of faces which address into the list of points.