basso::GmshInput Class Reference

Reads a Gmsh mesh file. More...

#include <GmshInput.h>

Inheritance diagram for basso::GmshInput:

basso::FEInput basso::Input List of all members.

Public Member Functions

virtual ~GmshInput ()
virtual void ReadNodes (Array< Node > &nodes)
virtual void AddElements (list< Element > &elem, int pid=-999) const
virtual void AddNodeSet (set< int > &nid, int pid) const
constructors


 GmshInput ()
 GmshInput (const String &file)

Protected Member Functions

BasisType GetBasisType (int etype) const
int NumNodesElement (int etype) const

Detailed Description

Reads a Gmsh mesh file.

This class stores data from a Gmsh (http://www.geuz.org/gmsh/) input file. The node ids are renumberd so that they are zero offset and continious. This is done so that the nodes which are stored in an array may be quickly addressed by the element conectivites and node sets. At present this class only deals with msh files generated by GMSH using the ver 2.0 ASCII output format Details on the GMSH ASCII file formats can be found at http://www.geuz.org/gmsh/doc/texinfo/gmsh_10.html#SEC62

Definition at line 45 of file GmshInput.h.


Member Function Documentation

void basso::GmshInput::ReadNodes ( Array< Node > &  nodes  )  [virtual]

read all the nodes defined in the input file

Parameters:
nodes array where nodees are to be read

Implements basso::FEInput.

Definition at line 101 of file GmshInput.h.

References basso::Input::CloseFile(), basso::Input::GotoSection(), basso::FEInput::mNodeMap, Numeric, and basso::Input::OpenFile().

void basso::GmshInput::AddElements ( list< Element > &  elem,
int  pid = -999 
) const [virtual]

read all the elements defined in the input file belonging to a particular part (or physical in GMSH) id number. The elements read are added to the original element list.

Parameters:
elem list of Elements to be augmented with those in the input file
pid Part id number of the elements to be read If the pid is omitted all elements will be read

Implements basso::FEInput.

Definition at line 132 of file GmshInput.h.

References basso::Input::CloseFile(), GetBasisType(), basso::Input::GotoSection(), iArray, basso::FEInput::mNodeMap, NumNodesElement(), and basso::Input::OpenFile().

void basso::GmshInput::AddNodeSet ( set< int > &  nid,
int  pid 
) const [virtual]

read all the node ids defined in the input file belonging to all the elements of a particular physical id number. The node ids read are added to the original node id set.

Parameters:
nid set of int to be augmented with those in the input file
pid physical id number of the node set to be read

Implements basso::FEInput.

Definition at line 178 of file GmshInput.h.

References basso::Input::CloseFile(), basso::Input::GotoSection(), iArray, basso::FEInput::mNodeMap, NumNodesElement(), and basso::Input::OpenFile().

BasisType basso::GmshInput::GetBasisType ( int  etype  )  const [protected]

converts a Gmsh element type to a Basso BasisType

Parameters:
etype Gmsh element type id number

Definition at line 288 of file GmshInput.h.

References basso::kHEXA20, basso::kHEXA27, basso::kHEXA8, basso::kLINE2, basso::kLINE3, basso::kNONE, basso::kPOINT1, basso::kPRISM15, basso::kPRISM18, basso::kPRISM6, basso::kPYRAMID13, basso::kPYRAMID14, basso::kPYRAMID5, basso::kQUAD4, basso::kQUAD8, basso::kQUAD9, basso::kTETRA10, basso::kTETRA4, basso::kTRIA3, and basso::kTRIA6.

Referenced by AddElements().

int basso::GmshInput::NumNodesElement ( int  etype  )  const [protected]

returns the number of nodes per element for a element type id

Parameters:
etype Gmsh element type id

Definition at line 220 of file GmshInput.h.

Referenced by AddElements(), and AddNodeSet().


The documentation for this class was generated from the following file:
Generated on Sat Jan 19 09:03:58 2008 for Basso by  doxygen 1.5.2