#include <dbmatt.h>
Public Member Functions | |
dbmatt (void) | |
void | mark_used (long ic, long csti) |
marks used materials | |
long | read (XFILE *in) |
reads materials from the text file as strings | |
long | readtm (XFILE *in, transmat *mechm, descript *d) |
reads materials from the text file via mechmat procedures | |
void | renumber_id (void) |
renumbers instance indeces of particular material types | |
long | search_mat (mattypet ce, long ci) |
searches for given material type and index | |
~dbmatt (void) | |
Public Attributes | |
matrt * | mat |
array with materials | |
long * | matu |
array with indicators of material usage in the given problem | |
long | nmatu |
number of used materials in the given problem | |
long | numt |
number of material entries |
Material database class
Created by Tomas Koudelka, koudelka@cml.fsv.cvut.cz
Definition at line 48 of file dbmatt.h.
dbmatt | ( | 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 146 of file dbmatt.cpp.
~dbmatt | ( | void | ) |
Destructor which deletes material database.
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 11. 2001
Definition at line 161 of file dbmatt.cpp.
void mark_used | ( | long | im, | |
long | mti | |||
) |
marks used materials
The method marks of used material type and its instance(parameters). Eventually, it increases the number of used material types and instances(properties) of the given material type.
im | - index of material type in the database | |
mti | - index of material type instance(prarameters) |
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 7. 2009
Definition at line 289 of file dbmatt.cpp.
References matrt::instu, mat, matu, matrt::ninstu, and nmatu.
Referenced by input_elem_matt().
long read | ( | XFILE * | in | ) |
reads materials from the text file as strings
The method reads material characteristics from the opened text file. The characteristic are stored as strings.
in | - pointer to the opened file |
0 | - on success | |
i>0 | - in case of failure in the reading of i-th material type |
Created by TKo, 6.2014
Definition at line 180 of file dbmatt.cpp.
References mat, matu, memset(), numt, and xfscanf().
Referenced by input_materialst().
reads materials from the text file via mechmat procedures
The method reads material characteristics from the opened text file with help of transmat procedures.
in | - pointer to the opened file | |
mechm | - pointer to the allocated mechmat structure | |
d | - pointer to structure with description of preprocessor setup |
0 | - on success | |
i>0 | - in case of failure in the reading of i-th material type |
Created by TKo, 6.2014
Definition at line 214 of file dbmatt.cpp.
References matrt::alloctm(), ignore, XFILE::index_created, XFILE::kwdmode, mat, descript::matkwd, transmat::mattype, mattypet_kwdset(), matu, memset(), matrt::ninst, transmat::nmt, no, numt, transmat::numtype, transmat::readmattype(), sect_mode_ignore, matrt::type, type, and xfscanf().
Referenced by input_materialst().
void renumber_id | ( | void | ) |
renumbers instance indeces of particular material types
The method renumbers indeces of used instances of material types.
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 7. 2009
Definition at line 310 of file dbmatt.cpp.
References mat, matrt::ninst, numt, and matrt::ridx.
Referenced by outputt().
long search_mat | ( | mattypet | ce, | |
long | ci | |||
) |
searches for given material type and index
This method searches database whether contains material with type number ce and type index number ci.
ce | - material type number | |
ci | - material type index |
Returns :
If | the material with given parameters exists in the database function returns index of given material in the array crs else returns -1. |
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 11. 2001
Definition at line 263 of file dbmatt.cpp.
References mat, numt, and type.
Referenced by input_elem_matt().
array with materials
Definition at line 52 of file dbmatt.h.
Referenced by dbmatt(), mark_used(), read(), readtm(), renumber_id(), search_mat(), wr_elementst(), wr_materialst(), and ~dbmatt().
long* matu |
long nmatu |
number of used materials in the given problem
Definition at line 54 of file dbmatt.h.
Referenced by dbmatt(), mark_used(), and wr_materialst().
long numt |
number of material entries
Definition at line 51 of file dbmatt.h.
Referenced by dbmatt(), read(), readtm(), renumber_id(), search_mat(), and wr_materialst().