37 void Foam::sampledSurfaces::writeSurface
58 template<
class Type,
class GeoMeshType>
59 bool Foam::sampledSurfaces::storeRegistryField
61 const sampledSurface&
s,
62 const word& fieldName,
63 const dimensionSet& dims,
67 return s.storeRegistryField<Type, GeoMeshType>
79 void Foam::sampledSurfaces::performAction
81 const VolumeField<Type>&
fld,
86 autoPtr<interpolation<Type>> samplePtr;
89 autoPtr<interpolation<Type>> interpPtr;
91 const word& fieldName =
fld.name();
93 const dimensionSet& dims =
fld.dimensions();
97 const sampledSurface&
s = operator[](surfi);
118 values =
s.interpolate(*interpPtr);
134 if ((request & actions_[surfi]) & ACTION_WRITE)
136 writeSurface<Type>(writers_[surfi],
values, fieldName);
139 if ((request & actions_[surfi]) & ACTION_STORE)
143 storeRegistryField<Type, polySurfacePointGeoMesh>
145 s, fieldName, dims, std::move(
values)
150 storeRegistryField<Type, polySurfaceGeoMesh>
152 s, fieldName, dims, std::move(
values)
161 void Foam::sampledSurfaces::performAction
163 const SurfaceField<Type>&
fld,
167 const word& fieldName =
fld.name();
169 const dimensionSet& dims =
fld.dimensions();
173 const sampledSurface&
s = (*this)[surfi];
183 if ((request & actions_[surfi]) & ACTION_WRITE)
185 writeSurface<Type>(writers_[surfi],
values, fieldName);
188 if ((request & actions_[surfi]) & ACTION_STORE)
190 storeRegistryField<Type, polySurfaceGeoMesh>
192 s, fieldName, dims, std::move(
values)
199 template<
class GeoField>
200 void Foam::sampledSurfaces::performAction
202 const IOobjectList& objects,
209 fieldNames = objects.sortedNames<GeoField>(fieldSelection_);
213 fieldNames = mesh_.thisDb().sortedNames<GeoField>(fieldSelection_);
216 for (
const word& fieldName : fieldNames)
220 Info<<
"sampleWrite: " << fieldName <<
endl;
237 performAction(
fld, request);
243 mesh_.thisDb().lookupObject<GeoField>(fieldName),
251 template<
class Container,
class Predicate>
252 bool Foam::sampledSurfaces::testAny
254 const Container& items,
255 const Predicate& pred
258 for (
const auto& item : items)
static autoPtr< interpolation< Type > > New(const word &interpolationType, const GeometricField< Type, fvPatchField, volMesh > &psi)
Return a reference to the specified interpolation scheme.
Fields (face and point) for polySurface.
Ostream & endl(Ostream &os)
Add newline and flush stream.
fileName relativePath(const fileName &input, const bool caseTag=false) const
Return the input relative to the globalPath by stripping off a leading value of the globalPath...
IOdictionary propsDict(dictIO)
#define forAll(list, i)
Loop across all elements in list.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
word outputName("finiteArea-edges.obj")
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
void setProperty(const word &entryName, const Type &value)
Add generic property.
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))
List< word > wordList
A List of words.
messageStream Info
Information stream (stdout output on master, null elsewhere)
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))
const Time & time_
Reference to the time database.