#include <dbcrst.h>
Public Member Functions | |
dbcrst (void) | |
void | mark_used (long ic, long csti) |
marks ic-th corss-section type and its csti-th parameter set as used | |
long | read (XFILE *in) |
reads cross section parameters from the opened text file as strings | |
long | readtc (XFILE *in, transcrsec *mechc, descript *d) |
reads cross section parameters from the opened text file with help of transcrsec procedures | |
void | renumber_id (void) |
renumbers database indeces according with used cross-sections | |
long | search_crs (crsectypet ce, long ci) |
searching cross-section with given type and index | |
~dbcrst (void) | |
Public Attributes | |
csect * | crs |
array with cross-sections | |
long * | crsu |
array with indicators of cross-section usage in the given problem | |
long | ncrsu |
number of cross-sections used in the given problem | |
long | numt |
number of cross-section entries |
Cross-section database class
Created by Tomas Koudelka, koudelka@cml.fsv.cvut.cz
Definition at line 39 of file dbcrst.h.
dbcrst | ( | 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 144 of file dbcrst.cpp.
~dbcrst | ( | void | ) |
Destructor which deletes cross-section database.
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 11. 2001
Definition at line 159 of file dbcrst.cpp.
void mark_used | ( | long | ic, | |
long | csti | |||
) |
marks ic-th corss-section type and its csti-th parameter set as used
The method marks of used cross-section type and its instance(parameters). Eventually, it increases the number of used cs types and instances(property) of the given cs type.
ic | - index of cross-section type in the database | |
csti | - index of cross-section type instance(prarameters) |
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 7. 2009
Definition at line 287 of file dbcrst.cpp.
References crs, crsu, csect::instu, ncrsu, and csect::ninstu.
Referenced by input_elem_crsect(), and input_nod_crsect().
long read | ( | XFILE * | in | ) |
reads cross section parameters from the opened text file as strings
The method reads cross section characteristics from the opened text file.
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 177 of file dbcrst.cpp.
References crs, crsu, memset(), numt, and xfscanf().
Referenced by input_crst().
long readtc | ( | XFILE * | in, | |
transcrsec * | transc, | |||
descript * | d | |||
) |
reads cross section parameters from the opened text file with help of transcrsec procedures
The method reads material characteristics from the opened text file with help of transcrsec procedures.
in | - pointer to the opened file | |
transc | - pointer to the allocated transcrsec 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 cross section type |
Created by TKo, 6.2014
Definition at line 211 of file dbcrst.cpp.
References csect::alloctc(), crs, crsectypet_kwdset(), crsu, transcrsec::cstype, ignore, XFILE::index_created, XFILE::kwdmode, descript::matkwd, memset(), transcrsec::ncst, csect::ninst, no, numt, transcrsec::numtype, transcrsec::readcrsectype(), sect_mode_ignore, csect::type, type, and xfscanf().
Referenced by input_crst().
void renumber_id | ( | void | ) |
renumbers database indeces according with used cross-sections
The method renumbers indeces of used instances of cross-section types.
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 7. 2009
Definition at line 308 of file dbcrst.cpp.
References crs, csect::ninst, numt, and csect::ridx.
Referenced by outputt().
long search_crs | ( | crsectypet | ce, | |
long | ci | |||
) |
searching cross-section with given type and index
This method searches database whether contains cross-section with type number ce and type index number ci.
ce | - cross-section type number | |
ci | - cross-section type index |
Returns :
If | the cross-section with given parameters exists in the database function returns index of given cross-section in the array crs else returns -1. |
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 11. 2001
Definition at line 260 of file dbcrst.cpp.
References crs, numt, and type.
Referenced by input_elem_crsect(), and input_nod_crsect().
array with cross-sections
Definition at line 48 of file dbcrst.h.
Referenced by dbcrst(), mark_used(), read(), readtc(), renumber_id(), search_crs(), wr_crsecst(), wr_elementst(), wr_nodest(), and ~dbcrst().
long* crsu |
long ncrsu |
number of cross-sections used in the given problem
Definition at line 50 of file dbcrst.h.
Referenced by dbcrst(), mark_used(), and wr_crsecst().
long numt |
number of cross-section entries
Definition at line 47 of file dbcrst.h.
Referenced by dbcrst(), read(), readtc(), renumber_id(), search_crs(), and wr_crsecst().