Base class for ensightPartCells and ensightPartFaces. More...
Classes | |
class | localPoints |
Track the points used by the part and map global to local indices. More... | |
Public Member Functions | |
TypeName ("ensightPart") | |
Runtime type information. More... | |
ensightPart () | |
Construct null. More... | |
ensightPart (label partNumber, const string &partDescription) | |
Construct empty part with number and description. More... | |
ensightPart (label partNumber, const string &partDescription, const pointField &points) | |
Construct part with number, description and points reference. More... | |
ensightPart (const ensightPart &) | |
Copy constructor. More... | |
declareRunTimeSelectionTable (autoPtr, ensightPart, istream,(Istream &is),(is)) | |
autoPtr< ensightPart > | clone () const |
Construct and return clone. More... | |
virtual | ~ensightPart () |
Destructor. More... | |
virtual const List< word > & | elementTypes () const |
label | size () const |
Number of elements in this part. More... | |
bool | isCellData () const |
Represents cell data. More... | |
bool | isFaceData () const |
Represents face data. More... | |
label | number () const |
Part number. More... | |
const string & | name () const |
Part name or description. More... | |
label | materialId () const |
Material id. More... | |
void | name (const string &value) |
non-const access to part name or description More... | |
void | materialId (const label value) |
non-const access to material id More... | |
const labelListList & | elemLists () const |
Simple labelList with a name. More... | |
label | offset () const |
Offset for element ids. More... | |
void | renumber (const labelUList &) |
Renumber elements. More... | |
bool | writeSummary (Ostream &) const |
Write summary information about the object. More... | |
bool | writeData (Ostream &) const |
Write reconstruction information for the object. More... | |
virtual void | writeGeometry (ensightGeoFile &) const |
Write geometry. More... | |
void | writeGeometry (ensightGeoFile &, const pointField &) const |
Helper: write geometry given the pointField. More... | |
void | writeScalarField (ensightFile &, const List< scalar > &field, const bool perNode=false) const |
Write scalar field. More... | |
void | writeVectorField (ensightFile &, const List< scalar > &field0, const List< scalar > &field1, const List< scalar > &field2, const bool perNode=false) const |
Write vector field components. More... | |
template<class Type > | |
void | writeField (ensightFile &, const Field< Type > &, const bool perNode=false) const |
Write generalised field components. More... | |
void | operator= (const ensightPart &)=delete |
Disallow default bitwise assignment. More... | |
Static Public Member Functions | |
static autoPtr< ensightPart > | New (Istream &) |
Reconstruct part characteristics on freestore from Istream. More... | |
Protected Member Functions | |
void | reconstruct (Istream &) |
Reconstruct part characteristics (eg, element types) from Istream. More... | |
bool | isFieldDefined (const List< scalar > &) const |
Check for fully defined fields. More... | |
void | writeHeader (ensightFile &, bool withDescription=false) const |
Write the part header. More... | |
void | writeFieldList (ensightFile &os, const List< scalar > &field, const labelUList &idList) const |
Write a scalar field for idList. More... | |
virtual localPoints | calcLocalPoints () const |
Track points used. More... | |
virtual void | writeConnectivity (ensightGeoFile &, const word &key, const labelUList &idList, const labelUList &pointMap) const |
Write connectivities. More... | |
Protected Attributes | |
label | number_ |
Part number. More... | |
string | name_ |
Part name (or description) More... | |
labelListList | elemLists_ |
Simple labelList with a name. More... | |
label | offset_ |
Start offset for elemLists_. More... | |
label | size_ |
Number of elements in this part. More... | |
bool | isCellData_ |
Cell or face data. More... | |
label | matId_ |
Material id (numeric) More... | |
const pointField & | points_ |
pointField referenced More... | |
Friends | |
Ostream & | operator<< (Ostream &, const ensightPart &) |
Write data (reconstruction information) More... | |
ensightGeoFile & | operator<< (ensightGeoFile &, const ensightPart &) |
Write geometry. More... | |
Base class for ensightPartCells and ensightPartFaces.
Definition at line 65 of file ensightPart.H.
ensightPart | ( | ) |
Construct null.
Definition at line 66 of file ensightPart.C.
Referenced by ensightPart::clone().
ensightPart | ( | label | partNumber, |
const string & | partDescription | ||
) |
Construct empty part with number and description.
Definition at line 80 of file ensightPart.C.
ensightPart | ( | label | partNumber, |
const string & | partDescription, | ||
const pointField & | points | ||
) |
Construct part with number, description and points reference.
Definition at line 97 of file ensightPart.C.
ensightPart | ( | const ensightPart & | part | ) |
Copy constructor.
Definition at line 115 of file ensightPart.C.
|
virtual |
Destructor.
Definition at line 155 of file ensightPart.C.
|
protected |
Reconstruct part characteristics (eg, element types) from Istream.
A part reconstructed in this manner can be used when writing fields, but cannot be used to write a new geometry
Definition at line 101 of file ensightPartIO.C.
References IOstream::check(), dict, forAll, dictionary::lookup(), and dictionary::readIfPresent().
Referenced by ensightPartCells::ensightPartCells(), and ensightPartFaces::ensightPartFaces().
|
protected |
Check for fully defined fields.
Definition at line 44 of file ensightPart.C.
References ensightPart::elemLists_, forAll, and List< T >::size().
|
protected |
Write the part header.
Definition at line 35 of file ensightPartIO.C.
References ensightPart::name(), ensightFile::newline(), ensightPart::number(), and ensightFile::write().
Referenced by ensightPart::writeField().
|
protected |
Write a scalar field for idList.
A null reference for idList writes the perNode values
Definition at line 55 of file ensightPartIO.C.
References forAll, ensightFile::newline(), Foam::notNull(), List< T >::size(), ensightFile::write(), and ensightFile::writeUndef().
Referenced by ensightPart::writeField().
|
inlineprotectedvirtual |
Track points used.
Definition at line 153 of file ensightPart.H.
|
inlineprotectedvirtual |
Write connectivities.
Definition at line 159 of file ensightPart.H.
TypeName | ( | "ensightPart" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
ensightPart | , | ||
istream | , | ||
(Istream &is) | , | ||
(is) | |||
) |
|
inline |
Construct and return clone.
Definition at line 210 of file ensightPart.H.
References ensightPart::ensightPart().
|
static |
Reconstruct part characteristics on freestore from Istream.
Definition at line 130 of file ensightPart.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::nl.
Reimplemented in ensightPartFaces, and ensightPartCells.
Definition at line 226 of file ensightPart.H.
Referenced by ensightPart::writeField().
|
inline |
Number of elements in this part.
Definition at line 235 of file ensightPart.H.
References ensightPart::size_.
Referenced by ensightPartFaces::classify(), and ensightPart::writeField().
|
inline |
Represents cell data.
Definition at line 241 of file ensightPart.H.
References ensightPart::isCellData_.
|
inline |
Represents face data.
Definition at line 247 of file ensightPart.H.
References ensightPart::isCellData_.
|
inline |
Part number.
Definition at line 253 of file ensightPart.H.
References ensightPart::number_.
Referenced by ensightPart::writeHeader().
|
inline |
Part name or description.
Definition at line 259 of file ensightPart.H.
References ensightPart::name_.
Referenced by ensightPart::writeHeader().
|
inline |
|
inline |
non-const access to part name or description
Definition at line 271 of file ensightPart.H.
References ensightPart::name_.
|
inline |
non-const access to material id
Definition at line 277 of file ensightPart.H.
References ensightPart::matId_.
|
inline |
Simple labelList with a name.
Definition at line 283 of file ensightPart.H.
References ensightPart::elemLists_.
|
inline |
Offset for element ids.
Definition at line 289 of file ensightPart.H.
References ensightPart::offset_.
void renumber | ( | const labelUList & | origId | ) |
Renumber elements.
Definition at line 161 of file ensightPart.C.
References forAll, Foam::inplaceRenumber(), and UList< T >::size().
bool writeSummary | ( | Ostream & | os | ) | const |
Write summary information about the object.
Definition at line 127 of file ensightPartIO.C.
References token::BEGIN_BLOCK, Foam::decrIndent(), token::END_BLOCK, Foam::endl(), Foam::incrIndent(), Foam::indent(), Foam::name(), Foam::nl, Foam::offset(), Foam::type(), and Foam::writeEntry().
bool writeData | ( | Ostream & | os | ) | const |
Write reconstruction information for the object.
Definition at line 144 of file ensightPartIO.C.
References token::BEGIN_BLOCK, Foam::decrIndent(), token::END_BLOCK, Foam::endl(), forAll, Foam::incrIndent(), Foam::indent(), Foam::name(), Foam::nl, Foam::offset(), Foam::type(), and Foam::writeEntry().
|
inlinevirtual |
Write geometry.
Reimplemented in ensightPartFaces, and ensightPartCells.
Definition at line 307 of file ensightPart.H.
Referenced by ensightPartCells::writeGeometry(), and ensightPartFaces::writeGeometry().
void writeGeometry | ( | ensightGeoFile & | os, |
const pointField & | points | ||
) | const |
Helper: write geometry given the pointField.
Definition at line 168 of file ensightPartIO.C.
References Foam::component(), forAll, ensightPart::localPoints::list, VectorSpace< Form, Cmpt, Ncmpts >::nComponents, ensightFile::newline(), ensightPart::localPoints::nPoints, points, ensightFile::write(), Foam::vtkWriteOps::writeHeader(), and ensightGeoFile::writeKeyword().
void writeScalarField | ( | ensightFile & | os, |
const List< scalar > & | field, | ||
const bool | perNode = false |
||
) | const |
Write scalar field.
optionally write data per node
Definition at line 216 of file ensightPartIO.C.
References ensightFile::allowUndef(), forAll, UList< label >::null(), UList< T >::size(), List< T >::size(), Foam::vtkWriteOps::writeHeader(), and ensightFile::writeKeyword().
void writeVectorField | ( | ensightFile & | os, |
const List< scalar > & | field0, | ||
const List< scalar > & | field1, | ||
const List< scalar > & | field2, | ||
const bool | perNode = false |
||
) | const |
Write vector field components.
optionally write data per node
Definition at line 249 of file ensightPartIO.C.
References ensightFile::allowUndef(), forAll, UList< label >::null(), UList< T >::size(), List< T >::size(), Foam::vtkWriteOps::writeHeader(), and ensightFile::writeKeyword().
void writeField | ( | ensightFile & | os, |
const Field< Type > & | field, | ||
const bool | perNode = false |
||
) | const |
Write generalised field components.
optionally write data per node
Definition at line 34 of file ensightPartTemplates.C.
References Field< Type >::component(), ensightPart::elementTypes(), ensightPart::elemLists_, forAll, UList< label >::null(), UList< T >::size(), ensightPart::size(), List< T >::size(), ensightPart::writeFieldList(), ensightPart::writeHeader(), and ensightFile::writeKeyword().
|
delete |
Disallow default bitwise assignment.
|
friend |
Write data (reconstruction information)
|
friend |
Write geometry.
|
protected |
|
protected |
Part name (or description)
Definition at line 81 of file ensightPart.H.
Referenced by ensightPart::name().
|
protected |
Simple labelList with a name.
Definition at line 84 of file ensightPart.H.
Referenced by ensightPartFaces::classify(), ensightPart::elemLists(), ensightPart::isFieldDefined(), and ensightPart::writeField().
|
protected |
Start offset for elemLists_.
Definition at line 87 of file ensightPart.H.
Referenced by ensightPartFaces::ensightPartFaces(), and ensightPart::offset().
|
protected |
Number of elements in this part.
Definition at line 90 of file ensightPart.H.
Referenced by ensightPartFaces::classify(), ensightPartFaces::ensightPartFaces(), and ensightPart::size().
|
protected |
Cell or face data.
Definition at line 93 of file ensightPart.H.
Referenced by ensightPartFaces::ensightPartFaces(), ensightPart::isCellData(), and ensightPart::isFaceData().
|
protected |
Material id (numeric)
Definition at line 96 of file ensightPart.H.
Referenced by ensightPart::materialId().
|
protected |
pointField referenced
Definition at line 99 of file ensightPart.H.