#include <WriteEnsight.h>
Public Member Functions | |
WriteEnsight (const String &jobname) | |
~WriteEnsight () | |
template<class NoDe, class ElEmLiSt> | |
void | WriteGeometry (const Array< NoDe > &node, const ElEmLiSt &element, int pid=1, const String &description="mesh generated by Basso") const |
void | WriteScalarField2 (const nArray &d, const String &varname, int step) const |
template<class ElEmLiSt> | |
void | WriteElementScalarField2 (const nArray &d, const ElEmLiSt &elements, const String &varname, int step=0) |
void | WriteVectorField2 (const nArray &d, const String &varname, int sdim, int step) const |
template<class ElEmLiSt> | |
void | WriteElementVectorField2 (const nArray &d, const ElEmLiSt &elements, const String &varname, int sdim, int step) const |
void | WriteCase (const list< String > &scalar_vars, const list< String > &vect_vars, const list< Numeric > ×) const |
void | AddNodalScalarField (const String &fieldname) |
void | AddElementScalarField (const String &fieldname) |
void | AddNodalVectorField (const String &fieldname) |
void | AddElementVectorField (const String &fieldname) |
void | WriteNodalScalarField (const nArray &d, const String &fieldname, Numeric timestep=0.0) |
template<class ElEmLiSt> | |
void | WriteElementScalarField (const nArray &d, const ElEmLiSt &element, const String &fieldname, Numeric timestep=0.0) |
void | WriteNodalVectorField (const nArray &d, int sdim, const String &fieldname, Numeric timestep=0.0) |
template<class ElEmLiSt> | |
void | WriteElementVectorField (const nArray &d, int sdim, const ElEmLiSt &element, const String &fieldname, Numeric timestep=0.0) |
Protected Types | |
typedef map< String, list< Element > > | sorted_element_type |
Protected Member Functions | |
String | ElementName (const Element &e) const |
template<class ElEmLiSt> | |
void | SortElements (const ElEmLiSt &element, sorted_element_type &sortedElem) const |
template<class ElEmLiSt> | |
void | SortElementId (const ElEmLiSt &element) |
template<class ElEmLiSt> | |
void | WriteEnsight::SortElementData (const ElEmLiSt &element, const nArray &val, map< String, list< Numeric > > &sortedVal, int sdim=1) const |
void | WriteElement (FILE *outFile, const Element &elem) const |
Protected Attributes | |
String | fJobname |
String | fGeomFilename |
set< String > | sclr_pernode |
set< String > | vctr_pernode |
set< String > | sclr_perelem |
set< String > | vctr_perelem |
list< Numeric > | time_steps |
map< String, list< int > > | sorted_elemid |
list< Element > * | elementDefPtr |
Definition at line 31 of file WriteEnsight.h.
basso::WriteEnsight::WriteEnsight | ( | const String & | jobname | ) | [inline] |
Constructor
jobname | the title that goes into the file nameing. |
Definition at line 42 of file WriteEnsight.h.
References fGeomFilename, and fJobname.
void basso::WriteEnsight::WriteGeometry | ( | const Array< NoDe > & | node, | |
const ElEmLiSt & | element, | |||
int | pid = 1 , |
|||
const String & | description = "mesh generated by Basso" | |||
) | const [inline] |
Writes unstructured grid geometry file
node | Node coordinates | |
element | Element type and connectivity | |
pid | Part id (optional default=1) | |
description | Adds a short description to the geometry file |
Definition at line 196 of file WriteEnsight.h.
References fGeomFilename, SortElements(), and WriteElement().
void basso::WriteEnsight::WriteScalarField2 | ( | const nArray & | d, | |
const String & | varname, | |||
int | step | |||
) | const |
Writes nodal scalar data (THIS IS NOT A RECOMMENDED METHOD)
d | nodal values | |
varname | Variable name | |
step | the step number in the simulation. This is needed for time dependent data (optional default=0) |
Definition at line 354 of file WriteEnsight.h.
References fJobname, and String.
Referenced by WriteNodalScalarField().
void basso::WriteEnsight::WriteElementScalarField2 | ( | const nArray & | d, | |
const ElEmLiSt & | elements, | |||
const String & | varname, | |||
int | step = 0 | |||
) | [inline] |
Writes element scalar data (THIS IS NOT A RECOMMENDED METHOD)
d | nodal values | |
varname | Variable name | |
step | the step number in the simulation. This is needed for time dependent data (optional default=0) |
Definition at line 376 of file WriteEnsight.h.
References fJobname, sorted_elemid, SortElementId(), and String.
Referenced by WriteElementScalarField().
void basso::WriteEnsight::WriteVectorField2 | ( | const nArray & | d, | |
const String & | varname, | |||
int | sdim, | |||
int | step | |||
) | const |
Writes nodal vector data (THIS IS NOT A RECOMMENDED METHOD)
d | element values the scalar field | |
elements | The element data used to determine element type | |
varname | Variable name | |
step | the step number in the simulation. This is needed for time dependent data (optional default=0) |
Definition at line 409 of file WriteEnsight.h.
References fJobname, and String.
Referenced by WriteNodalVectorField().
void basso::WriteEnsight::WriteElementVectorField2 | ( | const nArray & | d, | |
const ElEmLiSt & | elements, | |||
const String & | varname, | |||
int | sdim, | |||
int | step | |||
) | const [inline] |
Writes element vector data (THIS IS NOT A RECOMMENDED METHOD)
d | nodal values the vector components are assumed to be organized in the following manner d=[ d1x d1y d1z d2x d2y d2z .... dnx dny dnz] (sdim=3) or [ d1x d1y d2x d2y .... dnx dny ] (sdim=2) | |
varname | Variable name | |
elements | The element data used to determine element type | |
sdim | spacial dimension or rank of the vector field (optional default=3) | |
step | the step number in the simulation. This is needed for time dependent data (optional default=0) |
void basso::WriteEnsight::WriteCase | ( | const list< String > & | scalar_vars, | |
const list< String > & | vect_vars, | |||
const list< Numeric > & | times | |||
) | const |
Writes the case file (THIS IS NOT A RECOMMENDED METHOD)
scalar_vals | Names of the scalar data for the model | |
vector_vals | Names of the vector data for the model | |
times | times for each time step written in the model |
Definition at line 450 of file WriteEnsight.h.
References fGeomFilename, fJobname, and String.
void basso::WriteEnsight::AddNodalScalarField | ( | const String & | fieldname | ) | [inline] |
Adds a scalar per node field
fieldname | Name of field |
Definition at line 108 of file WriteEnsight.h.
References sclr_pernode.
void basso::WriteEnsight::AddElementScalarField | ( | const String & | fieldname | ) | [inline] |
Adds a scalar per element field
fieldname | Name of field |
Definition at line 111 of file WriteEnsight.h.
References sclr_perelem.
void basso::WriteEnsight::AddNodalVectorField | ( | const String & | fieldname | ) | [inline] |
Adds a vector per node field
fieldname | Name of field |
Definition at line 114 of file WriteEnsight.h.
References vctr_pernode.
void basso::WriteEnsight::AddElementVectorField | ( | const String & | fieldname | ) | [inline] |
Adds a vector per element field
fieldname | Name of field |
Definition at line 117 of file WriteEnsight.h.
References vctr_perelem.
void basso::WriteEnsight::WriteNodalScalarField | ( | const nArray & | d, | |
const String & | fieldname, | |||
Numeric | timestep = 0.0 | |||
) |
Writes nodal scalar data
d | nodal values | |
varname | Field name | |
timestep | the time in the simulation when the field data is being written |
Definition at line 499 of file WriteEnsight.h.
References sclr_pernode, time_steps, and WriteScalarField2().
void basso::WriteEnsight::WriteElementScalarField | ( | const nArray & | d, | |
const ElEmLiSt & | element, | |||
const String & | fieldname, | |||
Numeric | timestep = 0.0 | |||
) | [inline] |
Writes element scalar data
d | element values | |
varname | Field name | |
timestep | the time in the simulation when the field data is being written |
Definition at line 512 of file WriteEnsight.h.
References sclr_perelem, time_steps, and WriteElementScalarField2().
void basso::WriteEnsight::WriteNodalVectorField | ( | const nArray & | d, | |
int | sdim, | |||
const String & | fieldname, | |||
Numeric | timestep = 0.0 | |||
) |
Writes nodal vector data
d | nodal values the vector components are assumed to be organized in the following manner d=[ d1x d1y d1z d2x d2y d2z .... dnx dny dnz] (sdim=3) or [ d1x d1y d2x d2y .... dnx dny ] (sdim=2) | |
varname | Field name | |
timestep | the time in the simulation when the field data is being written |
Definition at line 527 of file WriteEnsight.h.
References time_steps, vctr_pernode, and WriteVectorField2().
void basso::WriteEnsight::WriteElementVectorField | ( | const nArray & | d, | |
int | sdim, | |||
const ElEmLiSt & | element, | |||
const String & | fieldname, | |||
Numeric | timestep = 0.0 | |||
) | [inline] |
Writes element vector data
d | nodal values the vector components are assumed to be organized in the following manner d=[ d1x d1y d1z d2x d2y d2z .... dnx dny dnz] (sdim=3) or [ d1x d1y d2x d2y .... dnx dny ] (sdim=2) | |
varname | Field name | |
timestep | the time in the simulation when the field data is being written |
Definition at line 539 of file WriteEnsight.h.
String basso::WriteEnsight::ElementName | ( | const Element & | e | ) | const [protected] |
returns the element name used in Ensight for an element
Definition at line 255 of file WriteEnsight.h.
References basso::kHEXA20, basso::kHEXA8, basso::kLINE2, basso::kLINE3, basso::kPOINT1, basso::kPRISM6, basso::kQUAD4, basso::kQUAD8, basso::kQUAD9, basso::kTETRA10, basso::kTETRA4, basso::kTRIA3, basso::kTRIA6, String, and basso::Element::Type().
Referenced by SortElementId(), and SortElements().
void basso::WriteEnsight::SortElements | ( | const ElEmLiSt & | element, | |
sorted_element_type & | sortedElem | |||
) | const [inline, protected] |
sorts elements into common element types
Definition at line 321 of file WriteEnsight.h.
References ElementName(), and String.
Referenced by WriteGeometry().
void basso::WriteEnsight::SortElementId | ( | const ElEmLiSt & | element | ) | [inline, protected] |
gets the sorted element ids
Definition at line 345 of file WriteEnsight.h.
References ElementName(), sorted_elemid, and String.
Referenced by WriteElementScalarField2().
void basso::WriteEnsight::WriteEnsight::SortElementData | ( | const ElEmLiSt & | element, | |
const nArray & | val, | |||
map< String, list< Numeric > > & | sortedVal, | |||
int | sdim = 1 | |||
) | const [inline, protected] |
sorts elements into commone element types as well as element values
void basso::WriteEnsight::WriteElement | ( | FILE * | outFile, | |
const Element & | elem | |||
) | const [protected] |
Writes a given element to the geometry file
Definition at line 233 of file WriteEnsight.h.
References basso::Element::Connectivity(), iArray, basso::kQUAD9, and basso::Element::Type().
Referenced by WriteGeometry().