1 |
/* |
/* |
2 |
****************************************************************************** |
************************************************************ |
3 |
* * |
* Copyright 2006 by ACcESS MNRF * |
4 |
* COPYRIGHT ACcESS 2003,2004,2005 - All Rights Reserved * |
* * |
5 |
* * |
* http://www.access.edu.au * |
6 |
* This software is the property of ACcESS. No part of this code * |
* Primary Business: Queensland, Australia * |
7 |
* may be copied in any form or by any means without the expressed written * |
* Licensed under the Open Software License version 3.0 * |
8 |
* consent of ACcESS. Copying, use or modification of this software * |
* http://www.opensource.org/licenses/osl-3.0.php * |
9 |
* by any unauthorised person is illegal unless that person has a software * |
* * |
10 |
* license agreement with ACcESS. * |
************************************************************ |
|
* * |
|
|
****************************************************************************** |
|
11 |
*/ |
*/ |
12 |
|
|
13 |
/**************************************************************/ |
/**************************************************************/ |
98 |
/* allocate mesh: */ |
/* allocate mesh: */ |
99 |
|
|
100 |
sprintf(name,"Rectangular %d x %d x %d mesh",N0,N1,N2); |
sprintf(name,"Rectangular %d x %d x %d mesh",N0,N1,N2); |
101 |
|
/* TEMPFIX */ |
102 |
|
#ifndef PASO_MPI |
103 |
out=Finley_Mesh_alloc(name,3,order); |
out=Finley_Mesh_alloc(name,3,order); |
104 |
|
#else |
105 |
|
out=Finley_Mesh_alloc(name,3,order,NULL); |
106 |
|
#endif |
107 |
if (! Finley_noError()) return NULL; |
if (! Finley_noError()) return NULL; |
108 |
|
|
109 |
|
#ifndef PASO_MPI |
110 |
out->Elements=Finley_ElementFile_alloc(Hex8,out->order); |
out->Elements=Finley_ElementFile_alloc(Hex8,out->order); |
111 |
if (useElementsOnFace) { |
if (useElementsOnFace) { |
112 |
out->FaceElements=Finley_ElementFile_alloc(Hex8Face,out->order); |
out->FaceElements=Finley_ElementFile_alloc(Hex8Face,out->order); |
116 |
out->ContactElements=Finley_ElementFile_alloc(Rec4_Contact,out->order); |
out->ContactElements=Finley_ElementFile_alloc(Rec4_Contact,out->order); |
117 |
} |
} |
118 |
out->Points=Finley_ElementFile_alloc(Point1,out->order); |
out->Points=Finley_ElementFile_alloc(Point1,out->order); |
119 |
|
#else |
120 |
|
out->Elements=Finley_ElementFile_alloc(Hex8,out->order,NULL); |
121 |
|
if (useElementsOnFace) { |
122 |
|
out->FaceElements=Finley_ElementFile_alloc(Hex8Face,out->order,NULL); |
123 |
|
out->ContactElements=Finley_ElementFile_alloc(Hex8Face_Contact,out->order,NULL); |
124 |
|
} else { |
125 |
|
out->FaceElements=Finley_ElementFile_alloc(Rec4,out->order,NULL); |
126 |
|
out->ContactElements=Finley_ElementFile_alloc(Rec4_Contact,out->order,NULL); |
127 |
|
} |
128 |
|
out->Points=Finley_ElementFile_alloc(Point1,out->order,NULL); |
129 |
|
#endif |
130 |
if (! Finley_noError()) { |
if (! Finley_noError()) { |
131 |
Finley_Mesh_dealloc(out); |
Finley_Mesh_dealloc(out); |
132 |
return NULL; |
return NULL; |
134 |
|
|
135 |
|
|
136 |
/* allocate tables: */ |
/* allocate tables: */ |
137 |
|
#ifndef PASO_MPI |
138 |
Finley_NodeFile_allocTable(out->Nodes,N0*N1*N2); |
Finley_NodeFile_allocTable(out->Nodes,N0*N1*N2); |
139 |
|
#else |
140 |
|
/* TODO */ |
141 |
|
#endif |
142 |
Finley_ElementFile_allocTable(out->Elements,NE0*NE1*NE2); |
Finley_ElementFile_allocTable(out->Elements,NE0*NE1*NE2); |
143 |
Finley_ElementFile_allocTable(out->FaceElements,NFaceElements); |
Finley_ElementFile_allocTable(out->FaceElements,NFaceElements); |
144 |
if (! Finley_noError()) { |
if (! Finley_noError()) { |