FEDEM Model Database  R8.0
Source code of the FEDEM model database
FFlOldFLMReader.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
8 #ifndef FFL_OLD_FLM_READER_H
9 #define FFL_OLD_FLM_READER_H
10 
11 #include <string>
12 #include <cstdio>
13 
15 
16 #ifdef FF_NAMESPACE
17 namespace FF_NAMESPACE {
18 #endif
19 
20 
22 {
23 public:
24  FFlOldFLMReader (FFlLinkHandler* readIntoLink);
25  virtual ~FFlOldFLMReader ();
26 
27  static void init ();
28  static void identifierCB (const std::string& fileName, int& isFlmFile);
29  static void readerCB (const std::string& fileName, FFlLinkHandler* link);
30 
31 protected:
32  bool read(const std::string& fileName);
33 
34  char* findNextIdentifier(FILE* fp, char* first, ...);
35  int getLine(char* buf, const int n, FILE* fp);
36 
37  bool readNodes(FILE* fp, int count);
38  bool readElements(FILE* fp, int count);
39  bool readBeamData(FILE* fp, int count);
40  bool readSectionData(FILE* fp, int count);
41  bool readElemProp(FILE* fp, int count);
42  bool readElemMat(FILE* fp, int count);
43 
44  enum elementType {
45  UNDEFINED_ELEMENT = -1,
46  BEAM_ELEMENT = 11,
47  FTS_ELEMENT = 21,
48  FQS_ELEMENT = 22,
49  ITET_ELEMENT = 41,
50  IPRI_ELEMENT = 42,
51  IHEX_ELEMENT = 43,
52  HEXA_ELEMENT = 44,
53  CSTET_ELEMENT = 45,
54  WEDGE_ELEMENT = 46,
55  MASS_ELEMENT = 51,
56  RIGID_BEAM_ELEMENT = 61,
57  RIGID_NFOLD_BEAM_ELEMENT = 62
58  };
59 };
60 
61 #ifdef FF_NAMESPACE
62 } // namespace
63 #endif
64 #endif
Container class for finite element models.
Definition: FFlLinkHandler.H:95
Definition: FFlOldFLMReader.H:22
elementType
Definition: FFlOldFLMReader.H:44
Definition: FFlReaderBase.H:23
int read(FILE *fd, std::string &tag, unsigned int &cs, int tagLength=LEN_TAG)
Reads the file tag and checksum from the provided file.
Definition: FFaTag.C:317
void init()
Definition: FmDB.C:518