VisIt_UnstructuredMesh.c 11.3 KB
Newer Older
1
2
/*****************************************************************************
*
brugger's avatar
   
brugger committed
3
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
4
* Produced at the Lawrence Livermore National Laboratory
brugger's avatar
   
brugger committed
5
* LLNL-CODE-442911
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
* All rights reserved.
*
* This file is  part of VisIt. For  details, see https://visit.llnl.gov/.  The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution  and  use  in  source  and  binary  forms,  with  or  without
* modification, are permitted provided that the following conditions are met:
*
*  - Redistributions of  source code must  retain the above  copyright notice,
*    this list of conditions and the disclaimer below.
*  - Redistributions in binary form must reproduce the above copyright notice,
*    this  list of  conditions  and  the  disclaimer (as noted below)  in  the
*    documentation and/or other materials provided with the distribution.
*  - Neither the name of  the LLNS/LLNL nor the names of  its contributors may
*    be used to endorse or promote products derived from this software without
*    specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT  HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR  IMPLIED WARRANTIES, INCLUDING,  BUT NOT  LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS FOR A PARTICULAR  PURPOSE
* ARE  DISCLAIMED. IN  NO EVENT  SHALL LAWRENCE  LIVERMORE NATIONAL  SECURITY,
* LLC, THE  U.S.  DEPARTMENT OF  ENERGY  OR  CONTRIBUTORS BE  LIABLE  FOR  ANY
* DIRECT,  INDIRECT,   INCIDENTAL,   SPECIAL,   EXEMPLARY,  OR   CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT  LIMITED TO, PROCUREMENT OF  SUBSTITUTE GOODS OR
* SERVICES; LOSS OF  USE, DATA, OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER
* CAUSED  AND  ON  ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT
* LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY  WAY
* OUT OF THE  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/

whitlocb's avatar
whitlocb committed
39
40
#include <VisItDataInterface_V2.h>
#include "VisItDynamic.h"
41
#include "VisItFortran.h"
whitlocb's avatar
whitlocb committed
42
43
44
45
46

int
VisIt_UnstructuredMesh_alloc(visit_handle *obj)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_alloc,
47
48
                    int, (visit_handle*),
                    (obj))
whitlocb's avatar
whitlocb committed
49
50
51
52
53
54
}

int
VisIt_UnstructuredMesh_free(visit_handle obj)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_free,
55
56
                    int, (visit_handle), 
                    (obj));
whitlocb's avatar
whitlocb committed
57
58
59
60
61
62
}

int
VisIt_UnstructuredMesh_setCoordsXY(visit_handle obj, visit_handle x, visit_handle y)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_setCoordsXY,
63
64
                    int, (visit_handle,visit_handle,visit_handle), 
                    (obj,x,y));
whitlocb's avatar
whitlocb committed
65
66
67
68
69
70
}

int
VisIt_UnstructuredMesh_setCoordsXYZ(visit_handle obj, visit_handle x, visit_handle y, visit_handle z)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_setCoordsXYZ,
71
72
                    int, (visit_handle,visit_handle,visit_handle,visit_handle), 
                    (obj,x,y,z));
whitlocb's avatar
whitlocb committed
73
74
75
76
77
78
}

int
VisIt_UnstructuredMesh_setCoords(visit_handle obj, visit_handle c)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_setCoords,
79
80
                    int, (visit_handle,visit_handle), 
                    (obj,c));
whitlocb's avatar
whitlocb committed
81
82
83
}

int
whitlocb's avatar
whitlocb committed
84
VisIt_UnstructuredMesh_setConnectivity(visit_handle obj, int ncells, visit_handle c)
whitlocb's avatar
whitlocb committed
85
86
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_setConnectivity,
87
88
                    int, (visit_handle,int,visit_handle), 
                    (obj,ncells,c));
whitlocb's avatar
whitlocb committed
89
90
91
92
93
94
}

int
VisIt_UnstructuredMesh_setRealIndices(visit_handle obj, int min, int max)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_setRealIndices,
95
96
                    int, (visit_handle,int,int), 
                    (obj,min,max));
whitlocb's avatar
whitlocb committed
97
98
}

whitlocb's avatar
whitlocb committed
99
100
101
102
int
VisIt_UnstructuredMesh_setGhostCells(visit_handle obj, visit_handle gz)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_setGhostCells,
103
104
                    int, (visit_handle,visit_handle), 
                    (obj,gz));
whitlocb's avatar
whitlocb committed
105
106
}

107
108
109
110
111
112
113
114
int
VisIt_UnstructuredMesh_setGhostNodes(visit_handle obj, visit_handle gn)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_setGhostNodes,
                    int, (visit_handle,visit_handle), 
                    (obj,gn));
}

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
int
VisIt_UnstructuredMesh_setGlobalCellIds(visit_handle obj, visit_handle gz)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_setGlobalCellIds,
                    int, (visit_handle,visit_handle), 
                    (obj,gz));
}

int
VisIt_UnstructuredMesh_setGlobalNodeIds(visit_handle obj, visit_handle gn)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_setGlobalNodeIds,
                    int, (visit_handle,visit_handle), 
                    (obj,gn));
}

whitlocb's avatar
whitlocb committed
131
132
133
134
135
136
int
VisIt_UnstructuredMesh_getCoords(visit_handle obj,
    int *ndims, int *coordMode,
    visit_handle *x, visit_handle *y, visit_handle *z, visit_handle *coords)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_getCoords,
137
138
                    int, (visit_handle,int*,int*,visit_handle*,visit_handle*,visit_handle*,visit_handle*), 
                    (obj,ndims,coordMode,x,y,z,coords));
whitlocb's avatar
whitlocb committed
139
140
141
}

int
whitlocb's avatar
whitlocb committed
142
VisIt_UnstructuredMesh_getConnectivity(visit_handle obj, int *ncells,
whitlocb's avatar
whitlocb committed
143
144
145
    visit_handle *conn)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_getConnectivity,
146
147
                    int, (visit_handle,int*,visit_handle*), 
                    (obj,ncells, conn));
whitlocb's avatar
whitlocb committed
148
149
150
151
152
153
}

int
VisIt_UnstructuredMesh_getRealIndices(visit_handle obj, int *min, int *max)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_getRealIndices,
154
155
                    int, (visit_handle,int*,int*), 
                    (obj,min,max));
whitlocb's avatar
whitlocb committed
156
157
}

whitlocb's avatar
whitlocb committed
158
159
160
161
int
VisIt_UnstructuredMesh_getGhostCells(visit_handle obj, visit_handle *gz)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_getGhostCells,
162
163
                    int, (visit_handle,visit_handle*), 
                    (obj,gz));
whitlocb's avatar
whitlocb committed
164
165
}

166
167
168
169
170
171
172
173
int
VisIt_UnstructuredMesh_getGhostNodes(visit_handle obj, visit_handle *gn)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_getGhostNodes,
                    int, (visit_handle,visit_handle*), 
                    (obj,gn));
}

174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
int
VisIt_UnstructuredMesh_getGlobalCellIds(visit_handle obj, visit_handle *gz)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_getGlobalCellIds,
                    int, (visit_handle,visit_handle*), 
                    (obj,gz));
}

int
VisIt_UnstructuredMesh_getGlobalNodeIds(visit_handle obj, visit_handle *gn)
{
    VISIT_DYNAMIC_EXECUTE(UnstructuredMesh_getGlobalNodeIds,
                    int, (visit_handle,visit_handle*), 
                    (obj,gn));
}

whitlocb's avatar
whitlocb committed
190
/************************** Fortran callable routines *************************/
191
192
193
194
195
196
197
198
/* maxlen 012345678901234567890123456789                                      */
#define F_VISITUCDMESHALLOC              F77_ID(visitucdmeshalloc_,visitucdmeshalloc,VISITUCDMESHALLOC)
#define F_VISITUCDMESHFREE               F77_ID(visitucdmeshfree_,visitucdmeshfree,VISITUCDMESHFREE)
#define F_VISITUCDMESHSETCOORDSXY        F77_ID(visitucdmeshsetcoordsxy_,visitucdmeshsetcoordsxy,VISITUCDMESHSETCOORDSXY)
#define F_VISITUCDMESHSETCOORDSXYZ       F77_ID(visitucdmeshsetcoordsxyz_,visitucdmeshsetcoordsxyz,VISITUCDMESHSETCOORDSXYZ)
#define F_VISITUCDMESHSETCOORDS          F77_ID(visitucdmeshsetcoords_,visitucdmeshsetcoords,VISITUCDMESHSETCOORDS)
#define F_VISITUCDMESHSETCONNECTIVITY    F77_ID(visitucdmeshsetconnectivity_,visitucdmeshsetconnectivity,VISITUCDMESHSETCONNECTIVITY)
#define F_VISITUCDMESHSETREALINDICES     F77_ID(visitucdmeshsetrealindices_,visitucdmeshsetrealindices,VISITUCDMESHSETREALINDICES)
whitlocb's avatar
whitlocb committed
199
#define F_VISITUCDMESHSETGHOSTCELLS      F77_ID(visitucdmeshsetghostcells_,visitucdmeshsetghostcells,VISITUCDMESHSETGHOSTCELLS)
200
#define F_VISITUCDMESHSETGHOSTNODES      F77_ID(visitucdmeshsetghostnodes_,visitucdmeshsetghostnodes,VISITUCDMESHSETGHOSTNODES)
201
202
#define F_VISITUCDMESHSETGLOBALCELLIDS   F77_ID(visitucdmeshsetglobalcellids_,visitucdmeshsetglobalcellids,VISITUCDMESHSETGLOBALCELLIDS)
#define F_VISITUCDMESHSETGLOBALNODEIDS   F77_ID(visitucdmeshsetglobalnodeids_,visitucdmeshsetglobalnodeids,VISITUCDMESHSETGLOBALNODEIDS)
whitlocb's avatar
whitlocb committed
203

whitlocb's avatar
whitlocb committed
204
205
206
#define F_VISITUCDMESHGETCOORDS          F77_ID(visitucdmeshgetcoords_,visitucdmeshgetcoords,VISITUCDMESHGETCOORDS)
#define F_VISITUCDMESHGETCONNECTIVITY    F77_ID(visitucdmeshgetconnectivity_,visitucdmeshgetconnectivity,VISITUCDMESHGETCONNECTIVITY)
#define F_VISITUCDMESHGETREALINDICES     F77_ID(visitucdmeshgetrealindices_,visitucdmeshgetrealindices,VISITUCDMESHGETREALINDICES)
whitlocb's avatar
whitlocb committed
207
#define F_VISITUCDMESHGETGHOSTCELLS      F77_ID(visitucdmeshgetghostcells_,visitucdmeshgetghostcells,VISITUCDMESHGETGHOSTCELLS)
208
#define F_VISITUCDMESHGETGHOSTNODES      F77_ID(visitucdmeshgetghostnodes_,visitucdmeshgetghostnodes,VISITUCDMESHGETGHOSTNODES)
209
210
#define F_VISITUCDMESHGETGLOBALCELLIDS   F77_ID(visitucdmeshgetglobalcellids_,visitucdmeshgetglobalcellids,VISITUCDMESHGETGLOBALCELLIDS)
#define F_VISITUCDMESHGETGLOBALNODEIDS   F77_ID(visitucdmeshgetglobalnodeids_,visitucdmeshgetglobalnodeids,VISITUCDMESHGETGLOBALNODEIDS)
whitlocb's avatar
whitlocb committed
211
212

int
213
F_VISITUCDMESHALLOC(visit_handle *obj)
whitlocb's avatar
whitlocb committed
214
215
216
217
218
{
    return VisIt_UnstructuredMesh_alloc(obj);
}

int
219
F_VISITUCDMESHFREE(visit_handle *obj)
whitlocb's avatar
whitlocb committed
220
221
222
223
224
{
    return VisIt_UnstructuredMesh_free(*obj);
}

int
225
F_VISITUCDMESHSETCOORDSXY(visit_handle *obj, visit_handle *x, visit_handle *y)
whitlocb's avatar
whitlocb committed
226
227
228
229
230
{
    return VisIt_UnstructuredMesh_setCoordsXY(*obj, *x, *y);
}

int
231
F_VISITUCDMESHSETCOORDSXYZ(visit_handle *obj, visit_handle *x, visit_handle *y, visit_handle *z)
whitlocb's avatar
whitlocb committed
232
233
234
235
236
{
    return VisIt_UnstructuredMesh_setCoordsXYZ(*obj, *x, *y, *z);
}

int
237
F_VISITUCDMESHSETCOORDS(visit_handle *obj, visit_handle *c)
whitlocb's avatar
whitlocb committed
238
239
240
241
242
{
    return VisIt_UnstructuredMesh_setCoords(*obj, *c);
}

int
whitlocb's avatar
whitlocb committed
243
F_VISITUCDMESHSETCONNECTIVITY(visit_handle *obj, int *ncells, visit_handle *c)
whitlocb's avatar
whitlocb committed
244
{
whitlocb's avatar
whitlocb committed
245
    return VisIt_UnstructuredMesh_setConnectivity(*obj, *ncells, *c);
whitlocb's avatar
whitlocb committed
246
247
248
}

int
249
F_VISITUCDMESHSETREALINDICES(visit_handle *obj, int *min, int *max)
whitlocb's avatar
whitlocb committed
250
251
252
253
{
    return VisIt_UnstructuredMesh_setRealIndices(*obj, *min, *max);
}

whitlocb's avatar
whitlocb committed
254
255
256
257
258
259
int
F_VISITUCDMESHSETGHOSTCELLS(visit_handle *obj, visit_handle *gz)
{
    return VisIt_UnstructuredMesh_setGhostCells(*obj, *gz);
}

260
261
262
263
264
265
int
F_VISITUCDMESHSETGHOSTNODES(visit_handle *obj, visit_handle *gn)
{
    return VisIt_UnstructuredMesh_setGhostNodes(*obj, *gn);
}

266
267
268
269
270
271
272
273
274
275
276
277
int
F_VISITUCDMESHSETGLOBALCELLIDS(visit_handle *obj, visit_handle *gz)
{
    return VisIt_UnstructuredMesh_setGlobalCellIds(*obj, *gz);
}

int
F_VISITUCDMESHSETGLOBALNODEIDS(visit_handle *obj, visit_handle *gn)
{
    return VisIt_UnstructuredMesh_setGlobalNodeIds(*obj, *gn);
}

whitlocb's avatar
whitlocb committed
278
279
280
281
282
283
284
285
int
F_VISITUCDMESHGETCOORDS(visit_handle *obj, int *ndims, int *coordMode, 
    visit_handle *x, visit_handle *y, visit_handle *z, visit_handle *c)
{
    return VisIt_UnstructuredMesh_getCoords(*obj, ndims, coordMode, x, y, z, c);
}

int
whitlocb's avatar
whitlocb committed
286
F_VISITUCDMESHGETCONNECTIVITY(visit_handle *obj, int *ncells, visit_handle *c)
whitlocb's avatar
whitlocb committed
287
{
whitlocb's avatar
whitlocb committed
288
    return VisIt_UnstructuredMesh_getConnectivity(*obj, ncells, c);
whitlocb's avatar
whitlocb committed
289
290
291
292
293
294
295
}

int
F_VISITUCDMESHGETREALINDICES(visit_handle *obj, int *min, int *max)
{
    return VisIt_UnstructuredMesh_getRealIndices(*obj, min, max);
}
whitlocb's avatar
whitlocb committed
296

whitlocb's avatar
whitlocb committed
297
298
299
300
301
int
F_VISITUCDMESHGETGHOSTCELLS(visit_handle *obj, visit_handle *gz)
{
    return VisIt_UnstructuredMesh_getGhostCells(*obj, gz);
}
302
303
304
305
306
307

int
F_VISITUCDMESHGETGHOSTNODES(visit_handle *obj, visit_handle *gn)
{
    return VisIt_UnstructuredMesh_getGhostNodes(*obj, gn);
}
308
309
310
311
312
313
314
315
316
317
318
319

int
F_VISITUCDMESHGETGLOBALCELLIDS(visit_handle *obj, visit_handle *gz)
{
    return VisIt_UnstructuredMesh_getGlobalCellIds(*obj, gz);
}

int
F_VISITUCDMESHGETGLOBALNODEIDS(visit_handle *obj, visit_handle *gn)
{
    return VisIt_UnstructuredMesh_getGlobalNodeIds(*obj, gn);
}