00001 #ifndef SELECTION_H 00002 #define SELECTION_H 00003 00004 #include <stdio.h> 00005 #include "galias.h" 00006 #include "xfile.h" 00007 #include "timecontr.h" 00008 #include "siftop.h" 00009 00010 /** 00011 Class manages the selections of steps, nodes, elements, strains, stresses and 00012 other values. It is devoted especially to outdrivers, but generally 00013 it should be used in whatever case where the above quantities are need to select. 00014 00015 created 03.2004 by Tomas Koudelka, koudelka@cml.fsv.cvut.cz 00016 modified 10.10.2007 by Tomas Koudelka, koudelka@cml.fsv.cvut.cz 00017 */ 00018 class sel 00019 { 00020 public: 00021 /// constructor 00022 sel(); 00023 /// destructor 00024 ~sel(); 00025 /// reads data from file 00026 long read(XFILE *in); 00027 /// prints description data to file 00028 void print(FILE *out); 00029 /// checks presence of id at given selection 00030 long presence_id(double id); 00031 /// checks presence of id at given selection 00032 long presence_id(long id); 00033 /// checks presence of ids at given selection 00034 long presence_id(long id, double rid); 00035 /// checks presence of ids at given selection 00036 long presence_id(long id, double rid, timecontr &tc); 00037 /// checks presence of id at given selection 00038 long presence_id(double id, long &ir); 00039 /// checks presence of id at given selection 00040 long presence_id(long id, long &ir); 00041 /// checks presence of id at given selection with index greater than ir 00042 long presence_idgt(long id, long &ir); 00043 /// checks presence of id at given selection with index sid 00044 long presence_id(long id, long sid, long &ir); 00045 /// checks presence of ids at given selection 00046 long presence_id(long id, double rid, long &ir); 00047 /// checks presence of ids at given selection and conjugated selections 00048 long presence_id(sel *consel, long id, long idc); 00049 /// checks presence of ids at given selection and conjugated selections 00050 long presence_id(sel *consel, long id, long idc, long &ir); 00051 /// counts number of selected components in array with length tncomp 00052 long give_nselcomp(long tncomp); 00053 /// returns number of selected objects 00054 long give_num_lst_items(long nobj, long *selobj); 00055 /// returns number of detected ranges in the array selobj 00056 long give_num_range_items(long nobj, long *selobj); 00057 /// convert the given list of objects to the range selection type 00058 void conv2range(long nit, long nobj, long *selobj); 00059 /// convert the given list of objects to the list selection type 00060 void conv2lst(long nit, long nobj, long *selobj); 00061 /// converts selection type of property to selection type of list 00062 long conv_selprop(siftop *top, objtype ot); 00063 00064 /// type of selection 00065 seltype st; 00066 /// number of selections 00067 long n; 00068 /// array with the first indices 00069 long *id1; 00070 /// array with lengthes of selections 00071 long *ncomp; 00072 /// array with begining real values of real range, real list or real period 00073 double *rid1; 00074 /// array with ending real values of real range 00075 double *rid2; 00076 /// required error of real range, real list or real period 00077 double err; 00078 /// initial time for selection of real period 00079 double initime; 00080 /// final time for selection of real period 00081 double fintime; 00082 /// real period 00083 double r; 00084 /// type of entity for property selection of nodes/elements 00085 gentity *ent; 00086 }; 00087 00088 #endif