00001 #include "endnode.h"
00002 #include "gnode.h"
00003 #include "gtopology.h"
00004 #include <math.h>
00005
00006 endnode::endnode (void)
00007 {
00008
00009 nn=0;
00010
00011 fn=-1;
00012
00013 ln=-1;
00014
00015 nm=0;
00016
00017 ndofn=0;
00018
00019
00020
00021 re=-1;
00022
00023 adjel=NULL;
00024
00025
00026 cnm = NULL;
00027
00028
00029 threshold=1.0e-6;
00030 }
00031
00032
00033 endnode::~endnode (void)
00034 {
00035 delete [] adjel;
00036 delete [] cnm;
00037 }
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 void endnode::print (FILE *out)
00048 {
00049 fprintf (out,"\n");
00050 fprintf (out,"\n number of nodes %ld",nn);
00051 fprintf (out,"\n node multiplicity %ld",nm);
00052 }
00053
00054
00055
00056
00057
00058
00059
00060
00061 void endnode::alloc_cnm (long nccn)
00062 {
00063
00064 ndofn=nccn;
00065
00066 if (cnm!=NULL)
00067 delete [] cnm;
00068 cnm = new long [ndofn];
00069 }
00070
00071
00072
00073
00074
00075
00076
00077
00078 void endnode::give_node_numbers (long *nid)
00079 {
00080 nid[0]=fn;
00081 nid[1]=ln;
00082
00083 }
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 void endnode::give_mult_code_numbers (long *mcn)
00094 {
00095 long i;
00096
00097 for (i=0;i<ndofn;i++){
00098 mcn[i]=cnm[i];
00099 }
00100 }