00001 #include "endnodet.h"
00002 #include "globalt.h"
00003 #include "globmatt.h"
00004 #include <string.h>
00005
00006 endnodet::endnodet (void)
00007 {
00008
00009 tm1 = NULL;
00010 tm2 = NULL;
00011 idm1 = NULL;
00012 idm2 = NULL;
00013
00014 jump=NULL;
00015 }
00016
00017 endnodet::~endnodet (void)
00018 {
00019 delete [] tm1;
00020 delete [] tm2;
00021 delete [] idm1;
00022 delete [] idm2;
00023
00024 delete [] jump;
00025 }
00026
00027
00028
00029
00030
00031
00032
00033
00034 void endnodet::init (long enid)
00035 {
00036 long i,eid1,eid2,ntm;
00037
00038
00039 eid1=Gtt->endnodes[enid].adjel[0];
00040
00041 eid2=Gtt->endnodes[enid].adjel[1];
00042
00043
00044 ntm=Tp->ntm*Tp->ntm;
00045
00046
00047 tm1 = new mattypet [ntm];
00048 idm1 = new long [ntm];
00049 tm2 = new mattypet [ntm];
00050 idm2 = new long [ntm];
00051
00052 for (i=0;i<ntm;i++){
00053 tm1[i]=Tt->elements[eid1].tm[i];
00054 idm1[i]=Tt->elements[eid1].idm[i];
00055
00056 tm2[i]=Tt->elements[eid2].tm[i];
00057 idm2[i]=Tt->elements[eid2].idm[i];
00058 }
00059
00060 jump = new double [ntm];
00061 }
00062
00063
00064
00065
00066
00067
00068
00069
00070 void endnodet::compute_jump (long enid)
00071 {
00072 long lcid,ndofn,n1,n2;
00073 double *nvf1,*invf1,*nvf2,*invf2;
00074
00075
00076 lcid=0;
00077
00078
00079 n1 = Gtt->endnodes[enid].fn;
00080 n2 = Gtt->endnodes[enid].ln;
00081
00082
00083 ndofn = Gtt->give_ndofn (n1);
00084 nvf1 = new double [ndofn];
00085 nvf2 = new double [ndofn];
00086 invf1 = new double [ndofn];
00087 invf2 = new double [ndofn];
00088
00089 nodalval (lcid,nvf1,n1);
00090 nodalval (lcid,nvf2,n2);
00091
00092 initnodval (lcid,invf1,n1);
00093 initnodval (lcid,invf2,n2);
00094
00095
00096 Tm->values_transformation (tm1[0],idm1[0],nvf1,invf1,tm2[0],idm2[0],nvf2,invf2,jump);
00097
00098
00099
00100
00101
00102
00103
00104 delete [] nvf1;
00105 delete [] nvf2;
00106 delete [] invf1;
00107 delete [] invf2;
00108 }