131 #ifndef Foam_sampledSurfaces_H 132 #define Foam_sampledSurfaces_H 153 class sampledSurfaces
155 public functionObjects::fvMeshFunctionObject,
156 public PtrList<sampledSurface>
161 static scalar mergeTol_;
164 enum sampleActionType :
unsigned 176 const bool loadFromFiles_;
185 fileName outputPath_;
191 wordRes fieldSelection_;
194 word sampleFaceScheme_;
197 word sampleNodeScheme_;
203 PtrList<surfaceWriter> writers_;
206 List<unsigned> actions_;
209 List<bool> hasFaces_;
215 const PtrList<sampledSurface>& surfaces() const
noexcept 227 static autoPtr<surfaceWriter> newWriter
230 const dictionary& topDict,
231 const dictionary& surfDict
236 bool performAction(
unsigned request);
240 IOobjectList preCheckFields();
247 const Field<Type>&
values,
248 const word& fieldName
253 void performAction(
const VolumeField<Type>&
fld,
unsigned request);
257 void performAction(
const SurfaceField<Type>&
fld,
unsigned request);
261 template<
class GeoField>
264 const IOobjectList& objects,
270 void storeRegistrySurface(
const sampledSurface&
s);
273 template<
class Type,
class GeoMeshType>
274 void storeRegistryField
276 const sampledSurface&
s,
277 const word& fieldName,
278 const dimensionSet& dims,
284 template<
class Container,
class Predicate>
285 static bool testAny(
const Container& items,
const Predicate& pred);
288 virtual bool needsUpdate()
const;
294 virtual bool expire(
const bool force=
false);
301 sampledSurfaces(
const sampledSurfaces&) =
delete;
304 void operator=(
const sampledSurfaces&) =
delete;
320 const dictionary&
dict 328 const objectRegistry&
obr,
329 const dictionary&
dict,
330 const bool loadFromFiles =
false 348 virtual bool read(
const dictionary&
dict);
354 virtual bool write();
357 virtual void updateMesh(
const mapPolyMesh& mpm);
virtual bool write()
Sample and write.
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/"finiteArea-edgesCentres"))
Forwards and collection of common volume field types.
virtual void movePoints(const polyMesh &mesh)
Update for mesh point-motion - expires the surfaces.
virtual ~sampledSurfaces()=default
Destructor.
virtual void readUpdate(const polyMesh::readUpdateState state)
Update for changes of mesh due to readUpdate - expires the surfaces.
const wordRes & fieldNames() const noexcept
Return names of fields to sample.
const word & name() const noexcept
Return the name of this functionObject.
static scalar mergeTol() noexcept
Get merge tolerance.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
virtual bool read(const dictionary &dict)
Read the sampledSurfaces dictionary.
virtual bool execute()
Sample and store if the sampleOnExecute is enabled.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
bool verbose(bool on) noexcept
Enable/disable verbose output.
TypeName("surfaces")
Runtime type information.
readUpdateState
Enumeration defining the state of the mesh after a read update.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
virtual void updateMesh(const mapPolyMesh &mpm)
Update for changes of mesh - expires the surfaces.