Base class for ensightPartCells and ensightPartFaces. More...

Inheritance diagram for ensightPart:
Collaboration diagram for ensightPart:

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 &)
 Construct as copy. More...
 
 declareRunTimeSelectionTable (autoPtr, ensightPart, istream,(Istream &is),(is))
 
autoPtr< ensightPartclone () 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 stringname () 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 labelListListelemLists () 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 generalized field components More...
 
void operator= (const ensightPart &)
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

static autoPtr< ensightPartNew (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 pointFieldpoints_
 pointField referenced More...
 

Friends

Ostreamoperator<< (Ostream &, const ensightPart &)
 write data (reconstruction information) More...
 
ensightGeoFileoperator<< (ensightGeoFile &, const ensightPart &)
 write geometry More...
 

Detailed Description

Constructor & Destructor Documentation

Construct null.

Definition at line 67 of file ensightPart.C.

Referenced by ensightPart::clone().

Here is the caller graph for this function:

ensightPart ( label  partNumber,
const string partDescription 
)

Construct empty part with number and description.

Definition at line 81 of file ensightPart.C.

ensightPart ( label  partNumber,
const string partDescription,
const pointField points 
)

Construct part with number, description and points reference.

Definition at line 98 of file ensightPart.C.

ensightPart ( const ensightPart part)

Construct as copy.

Definition at line 115 of file ensightPart.C.

~ensightPart ( )
virtual

Destructor.

Definition at line 156 of file ensightPart.C.

Member Function Documentation

void reconstruct ( Istream is)
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, ensightPart::elementTypes(), ensightPart::elemLists_, forAll, dictionary::lookup(), ensightPart::name_, ensightPart::number_, ensightPart::offset_, dictionary::readIfPresent(), ensightPart::size(), and ensightPart::size_.

Referenced by ensightPartCells::ensightPartCells(), and ensightPartFaces::ensightPartFaces().

Here is the call graph for this function:

Here is the caller graph for this function:

bool isFieldDefined ( const List< scalar > &  field) const
protected

check for fully defined fields

Definition at line 44 of file ensightPart.C.

References ensightPart::elemLists_, forAll, and List< T >::size().

Here is the call graph for this function:

void writeHeader ( ensightFile os,
bool  withDescription = false 
) const
protected

write the part header

Definition at line 36 of file ensightPartIO.C.

References name(), ensightFile::newline(), and ensightFile::write().

Here is the call graph for this function:

void writeFieldList ( ensightFile os,
const List< scalar > &  field,
const labelUList idList 
) const
protected

write a scalar field for idList

A null reference for idList writes the perNode values

Definition at line 56 of file ensightPartIO.C.

References forAll, ensightFile::newline(), List< T >::size(), ensightFile::write(), and ensightFile::writeUndef().

Here is the call graph for this function:

virtual localPoints calcLocalPoints ( ) const
inlineprotectedvirtual

track points used

Definition at line 146 of file ensightPart.H.

virtual void writeConnectivity ( ensightGeoFile ,
const word key,
const labelUList idList,
const labelUList pointMap 
) const
inlineprotectedvirtual

write connectivities

Definition at line 153 of file ensightPart.H.

TypeName ( "ensightPart"  )

Runtime type information.

declareRunTimeSelectionTable ( autoPtr  ,
ensightPart  ,
istream  ,
(Istream &is)  ,
(is)   
)
autoPtr<ensightPart> clone ( ) const
inline

Construct and return clone.

Definition at line 203 of file ensightPart.H.

References ensightPart::ensightPart().

Here is the call graph for this function:

Foam::autoPtr< Foam::ensightPart > New ( Istream is)
static

Reconstruct part characteristics on freestore from Istream.

See Also
reconstruct

Definition at line 130 of file ensightPart.C.

References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, and Foam::nl.

Here is the call graph for this function:

virtual const List<word>& elementTypes ( ) const
inlinevirtual

Reimplemented in ensightPartFaces, and ensightPartCells.

Definition at line 219 of file ensightPart.H.

Referenced by ensightPart::reconstruct().

Here is the caller graph for this function:

label size ( ) const
inline

number of elements in this part

Definition at line 228 of file ensightPart.H.

References ensightPart::size_.

Referenced by ensightPartFaces::classify(), and ensightPart::reconstruct().

Here is the caller graph for this function:

bool isCellData ( ) const
inline

represents cell data

Definition at line 234 of file ensightPart.H.

References ensightPart::isCellData_.

bool isFaceData ( ) const
inline

represents face data

Definition at line 240 of file ensightPart.H.

References ensightPart::isCellData_.

label number ( ) const
inline

part number

Definition at line 246 of file ensightPart.H.

References ensightPart::number_.

const string& name ( ) const
inline

part name or description

Definition at line 252 of file ensightPart.H.

References ensightPart::name_.

label materialId ( ) const
inline

material id

Definition at line 258 of file ensightPart.H.

References ensightPart::matId_.

void name ( const string value)
inline

non-const access to part name or description

Definition at line 264 of file ensightPart.H.

References ensightPart::name_.

void materialId ( const label  value)
inline

non-const access to material id

Definition at line 270 of file ensightPart.H.

References ensightPart::matId_.

const labelListList& elemLists ( ) const
inline

simple labelList with a name

Definition at line 276 of file ensightPart.H.

References ensightPart::elemLists_.

label offset ( ) const
inline

offset for element ids

Definition at line 282 of file ensightPart.H.

References ensightPart::offset_.

void renumber ( const labelUList origId)

renumber elements

Definition at line 162 of file ensightPart.C.

References forAll, and Foam::inplaceRenumber().

Here is the call graph for this function:

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, token::END_STATEMENT, Foam::endl(), Foam::incrIndent(), Foam::indent(), Foam::name(), Foam::nl, Foam::type(), and Ostream::writeKeyword().

Here is the call graph for this function:

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, token::END_STATEMENT, Foam::endl(), forAll, Foam::incrIndent(), Foam::indent(), Foam::name(), Foam::nl, Foam::type(), and Ostream::writeKeyword().

Here is the call graph for this function:

virtual void writeGeometry ( ensightGeoFile ) const
inlinevirtual

Write geometry.

Reimplemented in ensightPartFaces, and ensightPartCells.

Definition at line 300 of file ensightPart.H.

Referenced by ensightPartCells::writeGeometry(), and ensightPartFaces::writeGeometry().

Here is the caller graph for this function:

void writeGeometry ( ensightGeoFile os,
const pointField points 
) const

Helper: write geometry given the pointField.

Definition at line 169 of file ensightPartIO.C.

References Foam::component(), forAll, ensightPart::localPoints::list, ensightFile::newline(), ensightPart::localPoints::nPoints, ensightFile::write(), and ensightGeoFile::writeKeyword().

Here is the call graph for this function:

void writeScalarField ( ensightFile os,
const List< scalar > &  field,
const bool  perNode = false 
) const

write scalar field

optionally write data per node

Definition at line 217 of file ensightPartIO.C.

References ensightFile::allowUndef(), forAll, List< T >::size(), and ensightFile::writeKeyword().

Here is the call graph for this function:

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 250 of file ensightPartIO.C.

References ensightFile::allowUndef(), forAll, List< T >::size(), and ensightFile::writeKeyword().

Here is the call graph for this function:

void writeField ( ensightFile os,
const Field< Type > &  field,
const bool  perNode = false 
) const

write generalized field components

optionally write data per node

Definition at line 35 of file ensightPartTemplates.C.

References Field< Type >::component(), forAll, List< T >::size(), and ensightFile::writeKeyword().

Here is the call graph for this function:

void operator= ( const ensightPart )
inline

Disallow default bitwise assignment.

Definition at line 341 of file ensightPart.H.

References notImplemented.

Friends And Related Function Documentation

Ostream& operator<< ( Ostream ,
const ensightPart  
)
friend

write data (reconstruction information)

ensightGeoFile& operator<< ( ensightGeoFile ,
const ensightPart  
)
friend

write geometry

Member Data Documentation

label number_
protected

part number

Definition at line 71 of file ensightPart.H.

Referenced by ensightPart::number(), and ensightPart::reconstruct().

string name_
protected

part name (or description)

Definition at line 74 of file ensightPart.H.

Referenced by ensightPart::name(), and ensightPart::reconstruct().

labelListList elemLists_
protected

simple labelList with a name

Definition at line 77 of file ensightPart.H.

Referenced by ensightPartFaces::classify(), ensightPart::elemLists(), ensightPart::isFieldDefined(), and ensightPart::reconstruct().

label offset_
protected

start offset for elemLists_

Definition at line 80 of file ensightPart.H.

Referenced by ensightPart::offset(), and ensightPart::reconstruct().

label size_
protected

number of elements in this part

Definition at line 83 of file ensightPart.H.

Referenced by ensightPartFaces::classify(), ensightPart::reconstruct(), and ensightPart::size().

bool isCellData_
protected

cell or face data

Definition at line 86 of file ensightPart.H.

Referenced by ensightPartFaces::ensightPartFaces(), ensightPart::isCellData(), and ensightPart::isFaceData().

label matId_
protected

material id (numeric)

Definition at line 89 of file ensightPart.H.

Referenced by ensightPart::materialId().

const pointField& points_
protected

pointField referenced

Definition at line 92 of file ensightPart.H.


The documentation for this class was generated from the following files: