25 |
|
|
26 |
/* allocate the return value */ |
/* allocate the return value */ |
27 |
|
|
28 |
out=MEMALLOC(1,Finley_Mesh); |
out=(Finley_Mesh*)MEMALLOC(sizeof(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; |
34 |
out->Points=NULL; |
out->Points=NULL; |
35 |
out->ContactElements=NULL; |
out->ContactElements=NULL; |
36 |
out->reference_counter=0; |
out->reference_counter=0; |
|
|
|
|
out->FullFullPattern=NULL; |
|
|
out->FullReducedPattern=NULL; |
|
|
out->ReducedFullPattern=NULL; |
|
|
out->ReducedReducedPattern=NULL; |
|
37 |
|
|
38 |
/* copy name: */ |
/* copy name: */ |
39 |
|
|
40 |
out->Name=MEMALLOC(strlen(name)+1,char); |
out->Name=(char*)MEMALLOC((strlen(name)+1)*sizeof(char)); |
41 |
if (Finley_checkPtr(out->Name)) { |
if (Finley_checkPtr(out->Name)) { |
42 |
Finley_Mesh_dealloc(out); |
Finley_Mesh_dealloc(out); |
43 |
return NULL; |
return NULL; |
60 |
return out; |
return out; |
61 |
} |
} |
62 |
|
|
|
/* returns a reference to Finley_Mesh in */ |
|
|
|
|
|
Finley_Mesh* Finley_Mesh_reference(Finley_Mesh* in) { |
|
|
if (in!=NULL) ++(in->reference_counter); |
|
|
return in; |
|
|
} |
|
|
|
|
63 |
/* deallocates a mesh: */ |
/* deallocates a mesh: */ |
64 |
|
|
65 |
void Finley_Mesh_dealloc(Finley_Mesh* in) { |
void Finley_Mesh_dealloc(Finley_Mesh* in) { |
79 |
Finley_ElementFile_dealloc(in->FaceElements); |
Finley_ElementFile_dealloc(in->FaceElements); |
80 |
Finley_ElementFile_dealloc(in->ContactElements); |
Finley_ElementFile_dealloc(in->ContactElements); |
81 |
Finley_ElementFile_dealloc(in->Points); |
Finley_ElementFile_dealloc(in->Points); |
|
Finley_SystemMatrixPattern_dealloc(in->FullFullPattern); |
|
|
Finley_SystemMatrixPattern_dealloc(in->FullReducedPattern); |
|
|
Finley_SystemMatrixPattern_dealloc(in->ReducedFullPattern); |
|
|
Finley_SystemMatrixPattern_dealloc(in->ReducedReducedPattern); |
|
82 |
MEMFREE(in); |
MEMFREE(in); |
83 |
} |
} |
84 |
} |
} |
115 |
} |
} |
116 |
/* |
/* |
117 |
* $Log$ |
* $Log$ |
118 |
* Revision 1.2 2004/12/14 05:39:30 jgs |
* Revision 1.3 2004/12/15 03:48:45 jgs |
119 |
* *** empty log message *** |
* *** empty log message *** |
120 |
* |
* |
|
* Revision 1.1.1.1.2.2 2004/11/24 01:37:13 gross |
|
|
* some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now |
|
|
* |
|
|
* Revision 1.1.1.1.2.1 2004/11/12 06:58:18 gross |
|
|
* 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 |
|
|
* |
|
121 |
* Revision 1.1.1.1 2004/10/26 06:53:57 jgs |
* Revision 1.1.1.1 2004/10/26 06:53:57 jgs |
122 |
* initial import of project esys2 |
* initial import of project esys2 |
123 |
* |
* |