YAMLParser
FEAFormat.h
Go to the documentation of this file.
1 /*
2 The YAML-based FEAFormat is defined here.
3 */
4 
5 #pragma once
6 #include <string>
7 #include <vector>
8 #include <map>
9 
10 class FEAFormat
11 {
12 public:
13  FEAFormat();
14  ~FEAFormat();
15 
16  //Data types defined in the format
17  //const std::vector<std::string> data_types = { "NODE", "BEAM", "TRISHELL", "PIPE", "IHPROFILE", "PLTHICK",
18  // "UNITVEC", "ECCENT", "MISOIEP", "NODELOAD", "GRAVITY", "NODTRANS" };
19 
20  //Format definitions, i.e. templates defining the attrubutes comprised in each data type
21  // Nodal data:
22  std::vector<std::string> node_template = { "id", "x", "y", "z", "ix", "iy", "iz", "irx", "iry", "irz", "rotID" };
23  std::vector<std::string> nodtrans_template = { "rotID", "Xx", "Yy", "Zz", "Yx", "Yy", "Yz", "Zx", "Zy", "Zz" };
24  std::vector<std::string> coordsys_template = { "rotID", "Xx", "Xy", "Xz", "Yx", "Yy", "Yz", "Zx", "Zy", "Zz" };
25  std::vector<std::string> pcoordsys_template = { "rotID", "Ox", "Oy", "Oz", "Zx", "Zy", "Zz", "Xx", "Xy", "Xz" };
26  //std::vector<std::string> trannodes_template = { "rotID", "nod1", "nod2", ...};
27  // Element data:
28  std::vector<std::string> beam_template = { "elemID", "node1", "node2", "material", "geoID", "vecID", "ecc1", "ecc2" };
29  std::vector<std::string> trishell_template = { "elemID", "node1", "node2", "node3", "material", "geoID", "vecID", "ecc1", "ecc2" };
30  std::vector<std::string> quadshell_template = { "elemID", "node1", "node2", "node3", "node4", "material", "geoID", "coordID", "ecc1", "ecc2", "ecc3", "ecc4" };
31  // Cross-sectinal data
32  std::vector<std::string> pipe_template = { "geoID", "d_outer", "thickness", "shearY", "shearZ" };
33  std::vector<std::string> ihprofile_template = { "geoID", "height", "T_web", "W_top", "T_top", "W_bot", "T_bot", "shearY", "shearZ" };
34  std::vector<std::string> plthick_template = { "geoID", "thickness" };
35  // Misc data
36  std::vector<std::string> cfemvector_template = { "vecID", "x", "y", "z" }; //template for UNITVEC, ZVECTOR and YVECTOR in CFEM.
37  std::vector<std::string> eccent_template = { "eccID", "eX", "eY", "eZ" };
38  std::vector<std::string> misoiep_template = { "matID", "E-module", "poisson", "yield", "density", "thermalExpansion" };
39  std::vector<std::string> nodeload_template = { "loadCaseID", "nodeID", "fx", "fy", "fz", "mx", "my", "mz", "ecc" };
40  std::vector<std::string> gravity_template = { "loadCaseID", "aX", "aY", "aZ" };
41  //TODO: ADD THE REMAINING DATA TYPES (Remember also adding to data_types).
42 
43  //Mapping the templates to its corresponding data type:
44  std::map<std::string, std::vector<std::string>> data_types_m; // map<data_type, data_type_template>.
45 
46  //Extract all keys from map<std::string, std::vector<std::string>>
47  std::vector<std::string> extract_keys();
48 
49 
50 };
51 
std::vector< std::string > trishell_template
Definition: FEAFormat.h:29
std::vector< std::string > gravity_template
Definition: FEAFormat.h:40
std::vector< std::string > ihprofile_template
Definition: FEAFormat.h:33
std::vector< std::string > pcoordsys_template
Definition: FEAFormat.h:25
std::vector< std::string > misoiep_template
Definition: FEAFormat.h:38
std::vector< std::string > plthick_template
Definition: FEAFormat.h:34
Definition: FEAFormat.h:10
FEAFormat()
Definition: FEAFormat.cpp:5
~FEAFormat()
Definition: FEAFormat.cpp:41
std::vector< std::string > nodtrans_template
Definition: FEAFormat.h:23
std::vector< std::string > quadshell_template
Definition: FEAFormat.h:30
std::vector< std::string > nodeload_template
Definition: FEAFormat.h:39
std::map< std::string, std::vector< std::string > > data_types_m
Definition: FEAFormat.h:44
std::vector< std::string > beam_template
Definition: FEAFormat.h:28
std::vector< std::string > extract_keys()
Definition: FEAFormat.cpp:32
std::vector< std::string > pipe_template
Definition: FEAFormat.h:32
std::vector< std::string > coordsys_template
Definition: FEAFormat.h:24
std::vector< std::string > eccent_template
Definition: FEAFormat.h:37
std::vector< std::string > node_template
Definition: FEAFormat.h:22
std::vector< std::string > cfemvector_template
Definition: FEAFormat.h:36