Skip to content

Commit faab4de

Browse files
committed
FEBioStudio: Moved all PreView and PostView libraries to FEBioStudio.
git-svn-id: https://gforge.sci.utah.edu/svn/MRLProjects/FEBioStudio@12461 b505bdfe-9d5c-0410-8600-697d5fc8e487
1 parent bf2d810 commit faab4de

File tree

844 files changed

+216752
-225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

844 files changed

+216752
-225
lines changed

Abaqus/AbaqusImport.cpp

+2,190
Large diffs are not rendered by default.

Abaqus/AbaqusImport.h

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
// FEAbaqusImport.h: interface for the FEAbaqusImport class.
2+
//
3+
//////////////////////////////////////////////////////////////////////
4+
5+
#if !defined(AFX_FEABAQUSIMPORT_H__7EC7CA78_BD57_411C_A3C0_DB61ADC945B1__INCLUDED_)
6+
#define AFX_FEABAQUSIMPORT_H__7EC7CA78_BD57_411C_A3C0_DB61ADC945B1__INCLUDED_
7+
8+
#if _MSC_VER > 1000
9+
#pragma once
10+
#endif // _MSC_VER > 1000
11+
12+
#include <MeshIO/FileReader.h>
13+
#include <MeshTools/FEProject.h>
14+
#include "AbaqusModel.h"
15+
16+
#include <list>
17+
using namespace std;
18+
19+
//-----------------------------------------------------------------------------
20+
// Implements a class to import ABAQUS files
21+
//
22+
class AbaqusImport : public FEFileImport
23+
{
24+
// attributes
25+
struct ATTRIBUTE
26+
{
27+
char szatt[AbaqusModel::Max_Name]; // name of attribute
28+
char szval[AbaqusModel::Max_Name]; // value of attribute
29+
};
30+
31+
public:
32+
class Exception{};
33+
34+
public: // import options
35+
bool m_bnodesets; // read node sets
36+
bool m_belemsets; // read element sets
37+
bool m_bfacesets; // read the surfaces
38+
bool m_bautopart; // auto-partition parts
39+
bool m_bautosurf; // auto-partition surfaces
40+
bool m_breadPhysics; // read the physics (i.e. materials, bcs, etc).
41+
42+
public:
43+
AbaqusImport();
44+
virtual ~AbaqusImport();
45+
46+
bool Load(FEProject& fem, const char* szfile);
47+
48+
protected:
49+
// read a line and increment line counter
50+
bool read_line(char* szline, FILE* fp);
51+
52+
// build the model
53+
bool build_model();
54+
55+
// build a mesh
56+
bool build_mesh();
57+
58+
// build all physics
59+
bool build_physics();
60+
61+
// build a part
62+
GObject* build_part(AbaqusModel::PART* pg);
63+
64+
// build a surface
65+
FESurface* build_surface(AbaqusModel::SURFACE* ps);
66+
67+
// build a nodeset
68+
FENodeSet* build_nodeset(AbaqusModel::NODE_SET* ns);
69+
70+
// Keyword parsers
71+
bool read_heading (char* szline, FILE* fp);
72+
bool read_nodes (char* szline, FILE* fp);
73+
bool read_ngen (char* szline, FILE* fp);
74+
bool read_nfill (char* szline, FILE* fp);
75+
bool read_elements (char* szline, FILE* fp);
76+
bool read_element_sets (char* szline, FILE* fp);
77+
bool read_node_sets (char* szline, FILE* fp);
78+
bool read_surface (char* szline, FILE* fp);
79+
bool read_surface_interaction(char* szline, FILE* fp);
80+
bool read_materials (char* szline, FILE* fp);
81+
bool read_part (char* szline, FILE* fp);
82+
bool read_end_part (char* szline, FILE* fp);
83+
bool read_instance (char* szline, FILE* fp);
84+
bool read_end_instance (char* szline, FILE* fp);
85+
bool read_assembly (char* szline, FILE* fp);
86+
bool read_end_assembly (char* szline, FILE* fp);
87+
bool read_spring_elements (char* szline, FILE* fp);
88+
bool read_step (char* szline, FILE* fp);
89+
bool read_boundary (char* szline, FILE* fp);
90+
bool read_dsload (char* szline, FILE* fp);
91+
bool read_solid_section (char* szline, FILE* fp);
92+
bool read_static (char* szline, FILE* fp);
93+
bool read_orientation (char* szline, FILE* fp);
94+
bool read_distribution (char* szline, FILE* fp);
95+
96+
// skip until we find the next keyword
97+
bool skip_keyword(char* szline, FILE* fp);
98+
99+
protected:
100+
// parse a file for keywords
101+
bool parse_file(FILE* fp);
102+
103+
// parse the line for attributes
104+
int parse_line(const char* szline, ATTRIBUTE* pa);
105+
106+
// find an attribute in a list
107+
const char* find_attribute(ATTRIBUTE* pa, int nmax, const char* szatt);
108+
109+
private:
110+
char m_szTitle[AbaqusModel::Max_Title + 1];
111+
FEProject* m_pprj;
112+
113+
FEModel* m_pfem;
114+
115+
AbaqusModel m_inp;
116+
117+
int m_nline; // current line number
118+
};
119+
120+
#endif // !defined(AFX_FEABAQUSIMPORT_H__7EC7CA78_BD57_411C_A3C0_DB61ADC945B1__INCLUDED_)

0 commit comments

Comments
 (0)