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_;
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,
271 polySurface* getRegistrySurface(
const sampledSurface&
s)
const;
275 polySurface* storeRegistrySurface(
const sampledSurface&
s);
279 bool removeRegistrySurface(
const sampledSurface&
s);
282 template<
class Type,
class GeoMeshType>
283 bool storeRegistryField
285 const sampledSurface&
s,
286 const word& fieldName,
287 const dimensionSet& dims,
292 template<
class Container,
class Predicate>
293 static bool testAny(
const Container& items,
const Predicate& pred);
296 virtual bool needsUpdate()
const;
302 virtual bool expire(
const bool force=
false);
306 virtual bool update();
309 sampledSurfaces(
const sampledSurfaces&) =
delete;
312 void operator=(
const sampledSurfaces&) =
delete;
328 const dictionary&
dict 336 const objectRegistry&
obr,
337 const dictionary&
dict,
338 const bool loadFromFiles =
false 353 virtual bool read(
const dictionary&
dict);
359 virtual bool write();
362 virtual void updateMesh(
const mapPolyMesh& mpm);
virtual bool write()
Sample and write.
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 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.
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
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))
TypeName("surfaces")
Runtime type information.
bool verbose(const bool on) noexcept
Enable/disable verbose output.
readUpdateState
Enumeration defining the state of the mesh after a read update.
List< label > labelList
A List of labels.
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.