DYNA Files Reader. More...
#include <ConvertDyna.h>
Public Member Functions | |
ReadDyna (MeshCore::MeshKernel &m, const char *&inputname) | |
Protected Member Functions | |
void | Convert () |
Triangulator. | |
void | PutInMesh (MeshCore::MeshKernel &mesh) |
Loading into Mesh Function... | |
void | ReadConstraints (std::ifstream &inputfile) |
*CONSTRAINTS_ADATIVITY parser | |
void | ReadNode (std::ifstream &inputfile) |
*NODE Keyword Information Parser | |
void | ReadShellThickness (std::ifstream &inputfile) |
Face Reader. |
DYNA Files Reader.
This Function will read in a DYNA file, designated by inputname. Only three Information will be parsed:- NODE, *CONSTRAINTS_ADAPTIVITY, and *ELEMENT_SHELL_THICKNESS (for the third, only first line will be parsed)
From *NODE the coordinates and vertex index will be parsed. From *ELEMENT_SHELL_THICKNESS only the face nodal will be parsed, and from *CONSTRAINTS_ADAPTIVITY the constraints point (flagged by Constrain and Constrained) will be parsed.
As output, a mesh.
TODO:- 1. A face might consists of 2 opposite constraint points, 3 constraint points or 4 constraint points in it's edges. These are not implemented yet. 2. Some other keyword might contain the face information other than *ELEMENT_SHELL_THICKNESS 3. Multiple-PIDS DYNA files is not yet implemented. This program still assumes that it's only a single PID DYNA
Definition at line 87 of file ConvertDyna.h.
ReadDyna::ReadDyna | ( | MeshCore::MeshKernel & | m, | |
const char *& | inputname | |||
) |
Definition at line 32 of file ConvertDyna.cpp.
References Convert(), importOCA::getline(), PutInMesh(), ReadConstraints(), ReadNode(), and ReadShellThickness().
void ReadDyna::Convert | ( | ) | [protected] |
Triangulator.
This will triuangulate the squares, taking note of the constraining point that might come into play.
To date, only three things are considered now:- No constrains in the edges, One Constrain in the edges, and Two Constrains next to each other (not opposite each other!) in the edges
Sparing some commenting... I got lost inside of it too...
Definition at line 277 of file ConvertDyna.cpp.
References draftlibs::fcvec::find(), STLINDEX::PointIndex, FACE::PointIndex, and draftlibs::fcgeo::vec().
Referenced by ReadDyna().
void ReadDyna::PutInMesh | ( | MeshCore::MeshKernel & | mesh | ) | [protected] |
Loading into Mesh Function...
Definition at line 589 of file ConvertDyna.cpp.
References MeshCore::MeshBuilder::AddFacet(), MeshCore::MeshGeomFacet::CalcNormal(), MeshCore::MeshBuilder::Finish(), and MeshCore::MeshBuilder::Initialize().
Referenced by ReadDyna().
void ReadDyna::ReadConstraints | ( | std::ifstream & | inputfile | ) | [protected] |
*CONSTRAINTS_ADATIVITY parser
Definition at line 210 of file ConvertDyna.cpp.
References importOCA::getline().
Referenced by ReadDyna().
void ReadDyna::ReadNode | ( | std::ifstream & | inputfile | ) | [protected] |
*NODE Keyword Information Parser
Definition at line 88 of file ConvertDyna.cpp.
References VERTICES::Constrain, VERTICES::Constrained, VERTICES::Coords, importOCA::getline(), and VERTICES::PointIndex.
Referenced by ReadDyna().
void ReadDyna::ReadShellThickness | ( | std::ifstream & | inputfile | ) | [protected] |
Face Reader.
Inside *ELEMENT_SHELL_THICKNESS there's the information about which points makes up a face. All other infos are ignored.
Maybe it is in other keywords there is such infos, but I dunno...
Definition at line 150 of file ConvertDyna.cpp.
References FACE::FaceIndex, importOCA::getline(), k, and FACE::PointIndex.
Referenced by ReadDyna().