00001 #ifndef ENTITYLOAD_H 00002 #define ENTITYLOAD_H 00003 00004 #include "parser.h" 00005 #include "siftop.h" 00006 #include "iotools.h" 00007 #include "loadel.h" 00008 #include "alias.h" 00009 00010 #include <stdio.h> 00011 00012 /** 00013 This class is used for entity load in the mechprep preprocessor. 00014 Entity load can be defined either as constant load or by parser function. 00015 The parser function has to be defined with three parameters for 00016 x, y, z coordinate in order to compute load values for given nodal coordinates. 00017 */ 00018 class entityload 00019 { 00020 public : 00021 entityload(); 00022 ~entityload(); 00023 00024 /// funtion reads entity load from the opened text file 00025 long read(XFILE *in, long lc, long *slc); 00026 00027 /// function computes values of the entity load at the given node 00028 long getval(snode &tn, double *nv); 00029 00030 /// function returns indeces of x, y and z coordinate parameters in the load function 00031 void var2coord(Equation *eq, long &var_x, long &var_y, long &var_z); 00032 00033 /// function returns pointer to a new loadel structure with edge load created from the given entity load, element and edge property id 00034 loadel *edge2loadel(selement &el, long prop, snode *nodes, long *edgid, long nedgid); 00035 00036 /// function returns pointer to a new loadel structure with surface load created from the given entity load, element and surface property id 00037 loadel *surface2loadel(selement &el, long prop, snode *nodes, long *surfid, long nsurfid); 00038 00039 /// function returns pointer to a new loadel structure with volume load created from the given entity load, element and volume property id 00040 loadel *vol2loadel(selement &el, long prop, snode *nodes); 00041 00042 long ncomp; ///< number of load components (directions) 00043 long nlc; ///< load case number 00044 long nslc; ///< subload case number 00045 generalfunct ft; ///< type of load function 00046 long lgcs; ///< coordinate system on edge (local=1, global=2) 00047 double *val; ///< load values in case of constant load 00048 Equation **func; ///< array of pointers to parsed functions in case of load defined by function on the edge 00049 char **tfunc; ///< array of function defintion strings in case of load defined by function on the edge 00050 }; 00051 00052 #endif