40 return wordHashSet(*fileExtensionConstructorTablePtr_);
47 return wordHashSet(*writefileExtensionMemberFunctionTablePtr_);
58 return fileFormats::surfaceFormatsCore::checkSupport
60 readTypes() | ParentType::readTypes(),
75 return fileFormats::surfaceFormatsCore::checkSupport
97 return canReadType(ext, verbose);
115 typename writefileExtensionMemberFunctionTable::iterator mfIter =
116 writefileExtensionMemberFunctionTablePtr_->find(ext);
118 if (mfIter == writefileExtensionMemberFunctionTablePtr_->end())
123 if (supported.
found(ext))
130 <<
"Unknown file extension " << ext <<
nl <<
nl 131 <<
"Valid types are :" <<
endl 132 << (supported | writeTypes())
138 mfIter()(
name, surf);
163 zoneToc_(move(zoneTofc))
178 if (zoneSizes.
size())
180 if (zoneNames.
size())
306 zoneName = zoneToc_[0].name();
308 if (zoneName.empty())
326 zoneToc_.setSize(zoneLst.
size());
331 zoneToc_[zoneI] = zone;
348 zoneToc_.setSize(sizes.
size());
359 start += sizes[zoneI];
371 zoneToc_.setSize(sizes.
size());
386 start += sizes[zoneI];
400 if (zoneToc_.empty())
404 else if (zoneToc_.size() == 1)
415 newZones[facei] = zoneIds_[faceMap[facei]];
430 zoneIds_.
setSize(s, zoneToc_.size() - 1);
453 zoneNames.
insert(zoneI, zoneToc_[zoneI].
name());
466 const label origId = zoneIds_[facei];
469 if (fnd != lookup.
end())
486 label origId = iter.key();
490 if (fnd != zoneNames.
end())
519 label zoneI = lookup[zoneIds_[facei]];
520 faceMap[facei] = zoneLst[zoneI].start() + zoneLst[zoneI].
size()++;
548 newPoints[pointi] = locPoints[pointMap[pointi]];
549 oldToNew[pointMap[pointi]] = pointi;
558 const label origFacei = faceMap[facei];
559 newFaces[facei] = Face(locFaces[origFacei]);
562 Face&
f = newFaces[facei];
565 f[fp] = oldToNew[f[fp]];
568 newZones[facei] = zoneIds_[origFacei];
590 return subsetMesh(include, pointMap, faceMap);
606 NullObjectMove<surfZoneList>()
628 NullObjectMove<surfZoneList>()
648 NullObjectMove<surfZoneList>()
652 zoneToc_.transfer(surf.zoneToc_);
668 NullObjectMove<surfZoneList>()
684 return read(unzipName, unzipName.
ext());
688 return read(name, ext);
723 void Foam::UnsortedMeshedSurface<Face>::operator=
732 zoneIds_ = surf.zoneIds_;
733 zoneToc_ = surf.zoneToc_;
738 Foam::UnsortedMeshedSurface<Face>::operator
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
virtual void clear()
Clear all storage.
bool read(const fileName &, const word &ext)
Read from file. Chooses reader based on explicit extension.
A HashTable with keys but without contents.
#define forAll(list, i)
Loop across all elements in list.
virtual void reset(pointField &&, List< Face > &&, List< label > &&zoneIds)
Transfer components (points, faces, zone ids).
A class for handling file names.
An identifier for a surface zone on a meshed surface.
An STL-conforming const_iterator.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static wordHashSet writeTypes()
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
A surface zone on a MeshedSurface.
void size(const label)
Override size to be inconsistent with allocated storage.
const List< label > & zoneIds() const
Return const access to the zone ids.
virtual void clear()
Clear all storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void transfer(UnsortedMeshedSurface< Face > &)
Transfer the contents of the argument and annul the argument.
static bool canRead(const fileName &, const bool verbose=false)
Can we read this file format?
label size() const
Return size of this zone in the face list.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual ~UnsortedMeshedSurface()
Destructor.
word ext() const
Return file name extension (part after last .)
label size() const
Return number of elements in table.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
label size() const
The surface size is the number of faces.
bool insert(const label &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
UnsortedMeshedSurface subsetMesh(const labelHashSet &include, labelList &pointMap, labelList &faceMap) const
Return new surface.
A List obtained as a section of another List.
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))
stressControl lookup("compactNormalStress") >> compactNormalStress
List< Face > & storedFaces()
Non-const access to the faces.
bool found(const Key &) const
Return true if hashedEntry is found in table.
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from string.
static wordHashSet readTypes()
pointField & storedPoints()
Non-const access to global points.
const Field< PointType > & points() const
Return reference to global points.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
virtual void remapFaces(const labelUList &faceMap)
Set new zones from faceMap.
HashSet wordHashSet
A HashSet with word keys.
UnsortedMeshedSurface()
Construct null.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
virtual void reset(pointField &&points, List< Face > &&faces, surfZoneList &&zones)
Reset primitive data (points, faces and zones)
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats...
word name(const complex &)
Return a string representation of a complex.
const List< Face > & faces() const
Return const access to the faces.
const List< surfZoneIdentifier > & zoneToc() const
Return const access to the zone table-of-contents.
surfZoneList sortedZones(labelList &faceMap) const
Sort faces according to zoneIds.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
void setSize(const label)
Reset size of List.
static void write(const fileName &, const MeshedSurfaceProxy< Face > &)
Write to file.
label start() const
Return start label of this zone in the face list.
static bool canReadType(const word &ext, const bool verbose=false)
Can we read this file format?
void setZones(const surfZoneList &)
Set zone ids and zones.
static void write(const fileName &, const UnsortedMeshedSurface< Face > &)
Write to file.
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
fileName lessExt() const
Return file name without extension (part before last .)
static bool canWriteType(const word &ext, const bool verbose=false)
Can we write this file format?
label size() const
Return the number of elements in the UList.
static autoPtr< UnsortedMeshedSurface > New(const fileName &, const word &ext)
Select constructed from filename (explicit extension)
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
const List< surfZone > & surfZones() const
Const access to the surface zones.
A HashTable to objects of type <T> with a label key.
void setOneZone()
Set zones to 0 and set a single zone.
#define InfoInFunction
Report an information message using Foam::Info.