44 fieldMap.
insert(namePair.first(), namePair.second());
48 for (
const VolFieldType&
fld :
obr_.csorted<VolFieldType>())
53 word& sName = fieldMap[
fld.name()];
55 if (
obr_.found(sName))
57 Log <<
" updating field " << sName <<
endl;
61 Log <<
" interpolating "
62 <<
fld.name() <<
" to create " << sName <<
endl;
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic GeometricField class.
A HashTable similar to std::unordered_map.
bool found(const Key &key) const
Same as contains().
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
const objectRegistry & obr_
Reference to the region objectRegistry.
bool store(word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
Store the field in the (sub) objectRegistry under the given name.
void interpolateFields()
Linearly interpolate volume fields to generate surface fields.
List< Tuple2< word, word > > fieldSet_
Fields to process.
A class for handling words, derived from Foam::string.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)