2
Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
6
This file is part of Silo. For details, see silo.llnl.gov.
8
Redistribution and use in source and binary forms, with or without
9
modification, are permitted provided that the following conditions
12
* Redistributions of source code must retain the above copyright
13
notice, this list of conditions and the disclaimer below.
14
* Redistributions in binary form must reproduce the above copyright
15
notice, this list of conditions and the disclaimer (as noted
16
below) in the documentation and/or other materials provided with
18
* Neither the name of the LLNS/LLNL nor the names of its
19
contributors may be used to endorse or promote products derived
20
from this software without specific prior written permission.
22
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE
26
LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR
27
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
This work was produced at Lawrence Livermore National Laboratory under
36
Contract No. DE-AC52-07NA27344 with the DOE.
38
Neither the United States Government nor Lawrence Livermore National
39
Security, LLC nor any of their employees, makes any warranty, express
40
or implied, or assumes any liability or responsibility for the
41
accuracy, completeness, or usefulness of any information, apparatus,
42
product, or process disclosed, or represents that its use would not
43
infringe privately-owned rights.
45
Any reference herein to any specific commercial products, process, or
46
services by trade name, trademark, manufacturer or otherwise does not
47
necessarily constitute or imply its endorsement, recommendation, or
48
favoring by the United States Government or Lawrence Livermore
49
National Security, LLC. The views and opinions of authors expressed
50
herein do not necessarily state or reflect those of the United States
51
Government or Lawrence Livermore National Security, LLC, and shall not
52
be used for advertising or product endorsement purposes.
60
extern int build_quad(DBfile *dbfile, char *name);
63
main (int argc, char *argv[])
67
static char *filename="quad.pdb";
68
int show_all_errors = FALSE;
70
for (i=1; i<argc; i++) {
71
if (!strncmp(argv[i], "DB_PDB", 6)) {
72
driver = StringToDriver(argv[i]);
73
filename = "quad.pdb";
74
} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
75
driver = StringToDriver(argv[i]);
77
} else if (!strcmp(argv[i], "show-all-errors")) {
79
} else if (argv[i][0] != '\0') {
80
fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
84
DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
88
dbfile = DBCreate(filename, 0, DB_LOCAL,
89
"quad test file", driver);
90
printf("Creating file: '%s'...\n", filename);
93
DBMkDir (dbfile, "/dir1");
94
DBSetDir (dbfile, "/dir1");
95
(void)build_quad (dbfile, "quadmesh");
97
DBMkDir (dbfile, "/dir2");
98
DBSetDir (dbfile, "/dir2");
99
(void)build_quad (dbfile, "quadmesh");
103
meshtypes[0] = DB_QUAD_RECT;
104
meshnames[0] = "quadmesh";
107
mmid = DBPutMultimesh(dbfile, "mmesh", nmesh, meshnames,
112
CleanupDriverStuff();