#include <dbmatt.h>
Public Member Functions | |
void | alloc (long ni) |
allocates memory for material paramaters stored as strings | |
void | alloctm (long ni) |
allocates memory for material paramaters read/stored by transmat procedures | |
matrt (void) | |
long | read (XFILE *in) |
reads material parameters from the opened text file as strings | |
~matrt (void) | |
Public Attributes | |
char ** | inst |
array of strings with material properties (material indeces) | |
long * | instu |
array indicators of indeces which are used | |
long | ninst |
number of indeces | |
long | ninstu |
counter used indeces this material type | |
long * | ridx |
array with renumbered used indeces | |
mattypet | type |
material type number |
Material class
Created by Tomas Koudelka, koudelka@cml.fsv.cvut.cz Modified 04.2008 by Tomas Koudelka, koudelka@cml.fsv.cvut.cz
Definition at line 16 of file dbmatt.h.
matrt | ( | void | ) |
Constructor which initializes data members with null or zero values.
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 11. 2001
Definition at line 15 of file dbmatt.cpp.
~matrt | ( | void | ) |
Destructor which deletes each string with material properties.
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 11. 2001
Definition at line 32 of file dbmatt.cpp.
void alloc | ( | long | ni | ) |
allocates memory for material paramaters stored as strings
The function allocates memory for ni sets of material parameters that will be read as strings.
ni | - number of allocated instances |
Created by Tomas Koudelka, 30.6.2014
Definition at line 57 of file dbmatt.cpp.
References inst, instu, memset(), ninst, and ridx.
Referenced by read().
void alloctm | ( | long | ni | ) |
allocates memory for material paramaters read/stored by transmat procedures
The function allocates memory for ni sets of material parameters that will be read/stored via transmat procedures.
ni | - number of allocated instances |
Created by Tomas Koudelka, 30.6.2014
Definition at line 80 of file dbmatt.cpp.
References instu, memset(), ninst, and ridx.
Referenced by dbmatt::readtm().
long read | ( | XFILE * | in | ) |
reads material parameters from the opened text file as strings
This method reads one type of material with different parameters from the opened text file in.
in | - opened text file with material data. |
Returns:
0 | - on succes | |
1 | - error reading index of material type instance |
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 7. 2009
Definition at line 102 of file dbmatt.cpp.
References alloc(), XFILE::col, XFILE::fname, inst, XFILE::line, mattypet_kwdset(), memset(), ninst, print_err(), skipline(), type, and xfscanf().
char** inst |
long* instu |
array indicators of indeces which are used
Definition at line 22 of file dbmatt.h.
Referenced by alloc(), alloctm(), dbmatt::mark_used(), matrt(), wr_materialst(), and ~matrt().
long ninst |
number of indeces
Definition at line 20 of file dbmatt.h.
Referenced by alloc(), alloctm(), matrt(), read(), dbmatt::readtm(), dbmatt::renumber_id(), wr_materialst(), and ~matrt().
long ninstu |
counter used indeces this material type
Definition at line 24 of file dbmatt.h.
Referenced by dbmatt::mark_used(), matrt(), and wr_materialst().
long* ridx |
array with renumbered used indeces
Definition at line 23 of file dbmatt.h.
Referenced by alloc(), alloctm(), matrt(), dbmatt::renumber_id(), wr_elementst(), wr_materialst(), and ~matrt().
material type number
Definition at line 19 of file dbmatt.h.
Referenced by matrt(), read(), dbmatt::readtm(), and wr_materialst().