/[escript]/branches/doubleplusgood/finley/src/Mesh.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/finley/src/Mesh.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC revision 97 by jgs, Tue Dec 14 05:39:33 2004 UTC
# Line 25  Finley_Mesh* Finley_Mesh_alloc(char* nam Line 25  Finley_Mesh* Finley_Mesh_alloc(char* nam
25        
26    /*  allocate the return value */    /*  allocate the return value */
27        
28    out=(Finley_Mesh*)MEMALLOC(sizeof(Finley_Mesh));    out=MEMALLOC(1,Finley_Mesh);
29    if (Finley_checkPtr(out)) return NULL;    if (Finley_checkPtr(out)) return NULL;
30    out->Name=NULL;      out->Name=NULL;  
31    out->Nodes=NULL;    out->Nodes=NULL;
# Line 34  Finley_Mesh* Finley_Mesh_alloc(char* nam Line 34  Finley_Mesh* Finley_Mesh_alloc(char* nam
34    out->Points=NULL;          out->Points=NULL;      
35    out->ContactElements=NULL;          out->ContactElements=NULL;      
36    out->reference_counter=0;    out->reference_counter=0;
37    
38      out->FullFullPattern=NULL;
39      out->FullReducedPattern=NULL;
40      out->ReducedFullPattern=NULL;
41      out->ReducedReducedPattern=NULL;
42        
43    /*   copy name: */    /*   copy name: */
44        
45    out->Name=(char*)MEMALLOC((strlen(name)+1)*sizeof(char));    out->Name=MEMALLOC(strlen(name)+1,char);
46    if (Finley_checkPtr(out->Name)) {    if (Finley_checkPtr(out->Name)) {
47        Finley_Mesh_dealloc(out);        Finley_Mesh_dealloc(out);
48        return NULL;        return NULL;
# Line 60  Finley_Mesh* Finley_Mesh_alloc(char* nam Line 65  Finley_Mesh* Finley_Mesh_alloc(char* nam
65    return out;    return out;
66  }  }
67    
68    /* returns a reference to Finley_Mesh in */
69    
70    Finley_Mesh* Finley_Mesh_reference(Finley_Mesh* in) {
71         if (in!=NULL) ++(in->reference_counter);
72         return in;
73    }
74    
75  /*   deallocates a mesh: */  /*   deallocates a mesh: */
76    
77  void Finley_Mesh_dealloc(Finley_Mesh* in) {  void Finley_Mesh_dealloc(Finley_Mesh* in) {
# Line 79  void Finley_Mesh_dealloc(Finley_Mesh* in Line 91  void Finley_Mesh_dealloc(Finley_Mesh* in
91         Finley_ElementFile_dealloc(in->FaceElements);         Finley_ElementFile_dealloc(in->FaceElements);
92         Finley_ElementFile_dealloc(in->ContactElements);         Finley_ElementFile_dealloc(in->ContactElements);
93         Finley_ElementFile_dealloc(in->Points);         Finley_ElementFile_dealloc(in->Points);
94           Finley_SystemMatrixPattern_dealloc(in->FullFullPattern);
95           Finley_SystemMatrixPattern_dealloc(in->FullReducedPattern);
96           Finley_SystemMatrixPattern_dealloc(in->ReducedFullPattern);
97           Finley_SystemMatrixPattern_dealloc(in->ReducedReducedPattern);
98         MEMFREE(in);               MEMFREE(in);      
99       }       }
100    }    }
# Line 115  int Finley_Mesh_getReducedNumDegreesOfFr Line 131  int Finley_Mesh_getReducedNumDegreesOfFr
131  }  }
132  /*  /*
133  * $Log$  * $Log$
134  * Revision 1.1  2004/10/26 06:53:57  jgs  * Revision 1.2  2004/12/14 05:39:30  jgs
135  * Initial revision  * *** empty log message ***
136    *
137    * Revision 1.1.1.1.2.2  2004/11/24 01:37:13  gross
138    * some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now
139    *
140    * Revision 1.1.1.1.2.1  2004/11/12 06:58:18  gross
141    * a lot of changes to get the linearPDE class running: most important change is that there is no matrix format exposed to the user anymore. the format is chosen by the Domain according to the solver and symmetry
142    *
143    * Revision 1.1.1.1  2004/10/26 06:53:57  jgs
144    * initial import of project esys2
145  *  *
146  * Revision 1.1.1.1  2004/06/24 04:00:40  johng  * Revision 1.1.1.1  2004/06/24 04:00:40  johng
147  * Initial version of eys using boost-python.  * Initial version of eys using boost-python.

Legend:
Removed from v.82  
changed lines
  Added in v.97

  ViewVC Help
Powered by ViewVC 1.1.26