00001 #ifndef GSURF_H 00002 #define GSURF_H 00003 00004 #include <iostream> 00005 #include <stdio.h> 00006 #include "gnode.h" 00007 #include "vector.h" 00008 00009 /** 00010 class gsurf 00011 00012 this class defines general surface, which can be 00013 used in connection with general finite elements 00014 only topological informations are collected 00015 00016 the class is motivated by solution of hemivariational 00017 inequalities, 00018 in 3D problems, there is a contact between two parts of a body 00019 matching mesh is assumed and therefore two elements share 00020 00021 JK, 16.3.2009 00022 */ 00023 00024 class gsurf 00025 { 00026 public: 00027 00028 gsurf (); 00029 ~gsurf (); 00030 00031 void normal_vector (gnode *gnodes); 00032 00033 void print (FILE *out); 00034 00035 void give_norvect (double *v); 00036 00037 void check_normal (vector &x,vector &y,ivector &nod); 00038 00039 void alloc_cn (long nccnfn,long nccnln); 00040 00041 void give_first_node_numbers (long *fnn); 00042 void give_last_node_numbers (long *lnn); 00043 00044 void give_mult_code_numbers (long fln,long *mcn); 00045 00046 /// vypis 00047 //friend std::ostream& operator<<(std::ostream &os, gsurface &gs); 00048 00049 00050 00051 /// number of nodes on surface 00052 long nn; 00053 00054 /// number of DOFs defined on nodes 00055 /// the same number of DOFs has to be defined on both side of the surface 00056 long *ndofn; 00057 00058 /// number of adjacent elements 00059 long nae; 00060 00061 /// number of reference element 00062 long re; 00063 /// numbers of adjacent elements 00064 long *adjel; 00065 00066 /// node multiplicity 00067 long nm; 00068 /// list of nodes on surface (on the first side and second side) 00069 long *nlistfn; 00070 long *nlistln; 00071 /// array of code numbers of Lagrange Multipliers 00072 /// k=cnmult[i][j] - the j-th multiplier on the i-th node has number k 00073 long **cnmult; 00074 00075 /// normal %vector 00076 double *nv; 00077 00078 /// threshold 00079 double threshold; 00080 00081 }; 00082 00083 #endif