Added .gitignore and dropped files

lib 2 years ago
parent 3e521e7249
commit 6ce61ef92b
  1. 4
      .gitignore
  2. 2
      SETUP
  3. 50
      cmake/tribits/win_interface/include/gettimeofday.c
  4. 5
      cmake/tribits/win_interface/include/strings.h
  5. 0
      cmake/tribits/win_interface/include/unistd.h
  6. 209
      cmake/tribits/win_interface/include/winmath.h
  7. 11
      cmake/tribits/win_interface/include/winprocess.h
  8. 220
      packages/seacas/doc-source/include/appxexodus.tex
  9. 145
      packages/seacas/doc-source/include/appxgenesis.tex
  10. 109
      packages/seacas/doc-source/include/appxgrafaid.tex
  11. 69
      packages/seacas/doc-source/include/appxplt.tex
  12. 116
      packages/seacas/doc-source/include/appxseaco.tex
  13. 135
      packages/seacas/doc-source/include/cominput.tex
  14. 42
      packages/seacas/doc-source/include/distrinter.tex
  15. 36
      packages/seacas/doc-source/include/distrmemo.tex
  16. 50
      packages/seacas/doc-source/include/distrsand.tex
  17. 5
      packages/seacas/doc-source/include/execsite.tex
  18. 132
      packages/seacas/doc-source/include/genesis.f
  19. 59
      packages/seacas/doc-source/include/intermemo.tex
  20. 5
      packages/seacas/doc-source/include/refblot.tex
  21. 4
      packages/seacas/doc-source/include/refexodus.tex
  22. 3
      packages/seacas/doc-source/include/reff77.tex
  23. 4
      packages/seacas/doc-source/include/refgenesis.tex
  24. 4
      packages/seacas/doc-source/include/refgrope.tex
  25. 4
      packages/seacas/doc-source/include/refseaco.tex
  26. 4
      packages/seacas/doc-source/include/refsupes.tex
  27. 205
      packages/seacas/doc-source/include/setup.tex
  28. 89
      packages/seacas/doc-source/include/timecmd.tex
  29. 19
      packages/seacas/doc-source/include/timeexample.tex
  30. 38
      packages/seacas/doc-source/include/timeintro.tex
  31. 30
      packages/seacas/doc-source/include/timemode.tex
  32. 51
      packages/seacas/doc-source/include/timesum.tex
  33. 64
      packages/seacas/libraries/exodus/include/Exodus-Formats.md
  34. 207
      packages/seacas/libraries/exodus/include/ExodusLargeModel.md
  35. 462
      packages/seacas/libraries/exodus/include/doxygen.h
  36. 278
      packages/seacas/libraries/exodus/include/exodus-element-types.md
  37. 1829
      packages/seacas/libraries/exodus/include/exodusII.h
  38. 20
      packages/seacas/libraries/exodus/include/exodusII_cfg.h.in
  39. 892
      packages/seacas/libraries/exodus/include/exodusII_int.h
  40. 18
      packages/seacas/libraries/exodus/include/exodusII_par.h
  41. 24
      packages/seacas/libraries/exodus/include/exodusII_test.h
  42. 113
      packages/seacas/libraries/exodus/include/nemesis-to-exodus-api-mapping.md
  43. 220
      packages/seacas/libraries/exodus/include/polyhedra.md
  44. 329
      packages/seacas/libraries/exodus_for/include/exodusII.inc
  45. 65
      packages/zoltan/src/include/README
  46. 81
      packages/zoltan/src/include/Zoltan_config.h.in
  47. 52
      packages/zoltan/src/include/lbi_const.h
  48. 3436
      packages/zoltan/src/include/zoltan.h
  49. 74
      packages/zoltan/src/include/zoltan_align.h
  50. 103
      packages/zoltan/src/include/zoltan_comm.h
  51. 196
      packages/zoltan/src/include/zoltan_comm_cpp.h
  52. 694
      packages/zoltan/src/include/zoltan_cpp.h
  53. 112
      packages/zoltan/src/include/zoltan_dd.h
  54. 153
      packages/zoltan/src/include/zoltan_dd_cpp.h
  55. 133
      packages/zoltan/src/include/zoltan_eval.h
  56. 109
      packages/zoltan/src/include/zoltan_mem.h
  57. 173
      packages/zoltan/src/include/zoltan_partition_tree.h
  58. 95
      packages/zoltan/src/include/zoltan_timer.h
  59. 126
      packages/zoltan/src/include/zoltan_timer_cpp.h
  60. 243
      packages/zoltan/src/include/zoltan_types.h

4
.gitignore vendored

@ -0,0 +1,4 @@
build/
lib/
include/
SeacasRepoVersion.txt

@ -6,7 +6,7 @@ then
exit 1
fi
# $2 netcdf-c hdf5
# $2 = NetCDF-C $3 = HDF5
cd $(dirname $0)
libname=$(basename $(pwd))
mkdir -p build

@ -1,50 +0,0 @@
#include <time.h>
#include <Winsock2.h> /* to get timeval struct */
struct timezone
{
int tz_minuteswest; /* minutes W of Greenwich */
int tz_dsttime; /* type of dst correction */
};
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
#else
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
static int gettimeofday(struct timeval *tv, struct timezone *tz)
{
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
if (NULL != tz)
{
if (!tzflag)
{
_tzset();
tzflag++;
}
tz->tz_minuteswest = _timezone / 60;
tz->tz_dsttime = _daylight;
}
return 0;
}

@ -1,5 +0,0 @@
// On windows stricmp and strnicmp
// are strcasecmp and strncasecmp, and are
// include in other header files
#define strcasecmp stricmp
#define strncasecmp strnicmp

@ -1,209 +0,0 @@
#ifndef WINMATH_H
#define WINMATH_H
/**********************************************************************
acosh.c -
$Author$
$Date$
created at: Fri Apr 12 00:34:17 JST 2002
public domain rewrite of acosh(3), asinh(3) and atanh(3)
**********************************************************************/
#include <errno.h>
#include <float.h>
#include <math.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
/* DBL_MANT_DIG must be less than 4 times of bits of int */
#ifndef DBL_MANT_DIG
#define DBL_MANT_DIG 53 /* in this case, at least 12 digit precision */
#endif
#define BIG_CRITERIA_BIT (1<<DBL_MANT_DIG/2)
#if BIG_CRITERIA_BIT > 0
#define BIG_CRITERIA (1.0*BIG_CRITERIA_BIT)
#else
#define BIG_CRITERIA (1.0*(1<<DBL_MANT_DIG/4)*(1<<(DBL_MANT_DIG/2+1-DBL_MANT_DIG/4)))
#endif
#define SMALL_CRITERIA_BIT (1<<(DBL_MANT_DIG/3))
#if SMALL_CRITERIA_BIT > 0
#define SMALL_CRITERIA (1.0/SMALL_CRITERIA_BIT)
#else
#define SMALL_CRITERIA (1.0*(1<<DBL_MANT_DIG/4)*(1<<(DBL_MANT_DIG/3+1-DBL_MANT_DIG/4)))
#endif
inline double acosh(double x)
{
if (x < 1)
x = -1; /* NaN */
else if (x == 1)
return 0;
else if (x > BIG_CRITERIA)
x += x;
else
x += sqrt((x + 1) * (x - 1));
return log(x);
}
inline double asinh(double x)
{
int neg = x < 0;
double z = fabs(x);
if (z < SMALL_CRITERIA) return x;
if (z < (1.0/(1<<DBL_MANT_DIG/5))) {
double x2 = z * z;
z *= 1 + x2 * (-1.0/6.0 + x2 * 3.0/40.0);
}
else if (z > BIG_CRITERIA) {
z = log(z + z);
}
else {
z = log(z + sqrt(z * z + 1));
}
if (neg) z = -z;
return z;
}
inline double atanh(double x)
{
int neg = x < 0;
double z = fabs(x);
if (z < SMALL_CRITERIA) return x;
z = log(z > 1 ? -1 : (1 + z) / (1 - z)) / 2;
if (neg) z = -z;
return z;
}
inline double round(double val)
{
return floor(val + 0.5);
}
inline void srand48(double seed)
{
srand(seed);
}
inline double drand48()
{
return (double(rand()) / RAND_MAX);
}
inline float tgammaf(float z){
static unsigned int c = 9;
static float lanczos_coefficients[] = {1.000000000000000174663f,
5716.400188274341379136f,
-14815.30426768413909044f,
14291.49277657478554025f,
-6348.160217641458813289f,
1301.608286058321874105f,
-108.1767053514369634679f,
2.605696505611755827729f,
-0.7423452510201416151527e-2f,
0.5384136432509564062961e-7f,
-0.4023533141268236372067e-8f
};
float return_val = 0.0f;
z -= 1.0f;
float temp = z + c + 0.5f;
float A = lanczos_coefficients[0];
int i = 0;
for(i = 1; i < c+2; ++i){
A += lanczos_coefficients[i]/(z+i);
}
return_val = sqrt(2 * M_PI)* pow(temp, z + 0.5f) * exp(-temp) * A;
return return_val;
}
inline double tgamma(double z){
static unsigned int c = 9;
static double lanczos_coefficients[] = {1.000000000000000174663,
5716.400188274341379136,
-14815.30426768413909044,
14291.49277657478554025,
-6348.160217641458813289,
1301.608286058321874105,
-108.1767053514369634679,
2.605696505611755827729,
-0.7423452510201416151527e-2,
0.5384136432509564062961e-7,
-0.4023533141268236372067e-8
};
double return_val = 0.0;
z -= 1.0;
double temp = z + c + 0.5;
double A = lanczos_coefficients[0];
int i = 0;
for(i = 1; i < c+2; ++i){
A += lanczos_coefficients[i]/(z+i);
}
return_val = sqrt(2 * M_PI)* pow(temp, z + 0.5) * exp(-temp) * A;
return return_val;
}
inline long double tgammal(long double z){
static unsigned int c = 9;
static long double lanczos_coefficients[] = {1.000000000000000174663,
5716.400188274341379136,
-14815.30426768413909044,
14291.49277657478554025,
-6348.160217641458813289,
1301.608286058321874105,
-108.1767053514369634679,
2.605696505611755827729,
-0.7423452510201416151527e-2,
0.5384136432509564062961e-7,
-0.4023533141268236372067e-8
};
long double return_val = 0.0;
z -= 1.0;
long double temp = z + c + 0.5;
long double A = lanczos_coefficients[0];
int i = 0;
for(i = 1; i < c+2; ++i){
A += lanczos_coefficients[i]/(z+i);
}
return_val = sqrt(2 * M_PI)* pow(temp, z + 0.5) * exp(-temp) * A;
return return_val;
}
// This function was adapted from a public domain implementation of erf
// which is available at http://www.johndcook.com/cpp_erf.html. The only
// changes made were to change the type from double to float.
inline float erff(float x)
{
// constants
float a1 = 0.254829592f;
float a2 = -0.284496736f;
float a3 = 1.421413741f;
float a4 = -1.453152027f;
float a5 = 1.061405429f;
float p = 0.3275911f;
// Save the sign of x
int sign = 1;
if (x < 0)
sign = -1;
x = fabs(x);
// A&S formula 7.1.26
float t = 1.0f/(1.0f + p*x);
float y = 1.0f - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x);
return sign*y;
}
#endif

@ -1,11 +0,0 @@
#ifdef _MSC_VER
# define NOMINMAX
# include <Winsock2.h>
# include <process.h>
# define getpid _getpid
inline void sleep(int sec)
{
Sleep(sec * 1000);
}
#pragma comment(lib, "Ws2_32.lib")
#endif

@ -1,220 +0,0 @@
\chapter{The EXODUS Database Format} \label{appx:exodus}
The following code segment reads an EXODUS database. The first segment
is the GENESIS database format.
\begin{verbatim}
C --Open the EXODUS database file
NDB = 9
OPEN (UNIT=NDB, ..., STATUS='OLD', FORM='UNFORMATTED')
C --Read the title
READ (NDB) TITLE
C --TITLE - the title of the database (CHARACTER*80)
C --Read the database sizing parameters
READ (NDB) NUMNP, NDIM, NUMEL, NELBLK,
& NUMNPS, LNPSNL, NUMESS, LESSEL, LESSNL, NVERSN
C --NUMNP - the number of nodes
C --NDIM - the number of coordinates per node
C --NUMEL - the number of elements
C --NELBLK - the number of element blocks
C --NUMNPS - the number of node sets
C --LNPSNL - the length of the node sets node list
C --NUMESS - the number of side sets
C --LESSEL - the length of the side sets element list
C --LESSNL - the length of the side sets node list
C --NVERSN - the file format version number
C --Read the nodal coordinates
READ (NDB) ((CORD(INP,I), INP=1,NUMNP), I=1,NDIM)
C --Read the element order map (each element must be listed once)
READ (NDB) (MAPEL(IEL), IEL=1,NUMEL)
\end{verbatim}
\newpage
\begin{verbatim}
C --Read the element blocks
DO 100 IEB = 1, NELBLK
C --Read the sizing parameters for this element block
READ (NDB) IDELB, NUMELB, NUMLNK, NATRIB
C --IDELB - the element block identification (must be unique)
C --NUMELB - the number of elements in this block
C -- (the sum of NUMELB for all blocks must equal NUMEL)
C --NUMLNK - the number of nodes defining the connectivity
C -- for an element in this block
C --NATRIB - the number of element attributes for an element
C -- in this block
C --Read the connectivity for all elements in this block
READ (NDB) ((LINK(J,I), J=1,NUMLNK, I=1,NUMELB)
C --Read the attributes for all elements in this block
READ (NDB) ((ATRIB(J,I), J=1,NATRIB, I=1,NUMELB)
100 CONTINUE
\end{verbatim}
\newpage
\begin{verbatim}
C --Read the node sets
READ (NDB) (IDNPS(I), I=1,NUMNPS)
C --IDNPS - the ID of each node set
READ (NDB) (NNNPS(I), I=1,NUMNPS)
C --NNNPS - the number of nodes in each node set
READ (NDB) (IXNNPS(I), I=1,NUMNPS)
C --IXNNPS - the index of the first node in each node set
C -- (in LTNNPS and FACNPS)
READ (NDB) (LTNNPS(I), I=1,LNPSNL)
C --LTNNPS - the nodes in all the node sets
READ (NDB) (FACNPS(I), I=1,LNPSNL)
C --FACNPS - the factor for each node in LTNNPS
C --Read the side sets
READ (NDB) (IDESS(I), I=1,NUMESS)
C --IDESS - the ID of each side set
READ (NDB) (NEESS(I), I=1,NUMESS)
C --NEESS - the number of elements in each side set
READ (NDB) (NNESS(I), I=1,NUMESS)
C --NNESS - the number of nodes in each side set
READ (NDB) (IXEESS(I), I=1,NUMESS)
C --IXEESS - the index of the first element in each side set
C -- (in LTEESS)
READ (NDB) (IXNESS(I), I=1,NUMESS)
C --IXNESS - the index of the first node in each side set
C -- (in LTNESS and FACESS)
READ (NDB) (LTEESS(I), I=1,LESSEL)
C --LTEESS - the elements in all the side sets
READ (NDB) (LTNESS(I), I=1,LESSNL)
C --LTNESS - the nodes in all the side sets
READ (NDB) (FACESS(I), I=1,LESSNL)
C --FACESS - the factor for each node in LTNESS
\end{verbatim}
\newpage
A valid GENESIS database may end at this point or at any point until the
number of variables is read.
\begin{verbatim}
C --Read the QA header information
READ (NDB, END=900) NQAREC
C --NQAREC - the number of QA records (must be at least 1)
DO 110 IQA = 1, MAX(1,NQAREC)
READ (NDB) (QATITL(I,IQA), I=1,4)
C --QATITL - the QA title records; each record contains:
C -- 1) analysis code name (CHARACTER*8)
C -- 2) analysis code qa descriptor (CHARACTER*8)
C -- 3) analysis date (CHARACTER*8)
C -- 4) analysis time (CHARACTER*8)
110 CONTINUE
C --Read the optional header text
READ (NDB, END=900) NINFO
C --NINFO - the number of information records
DO 120 I = 1, NINFO
READ (NDB) INFO(I)
C --INFO - extra information records (optional) that contain
C -- any supportive documentation that the analysis code
C -- developer wishes (CHARACTER*80)
120 CONTINUE
C --Read the coordinate names
READ (NDB, END=900) (NAMECO(I), I=1,NDIM)
C --NAMECO - the coordinate names (CHARACTER*8)
C --Read the element type names
READ (NDB, END=900) (NAMELB(I), I=1,NELBLK)
C --NAMELB - the element type names (CHARACTER*8)
\end{verbatim}
The GENESIS section of the database ends at this point.
\newpage
\begin{verbatim}
C --Read the history, global, nodal, and element variable information
READ (NDB, END=900) NVARHI, NVARGL, NVARNP, NVAREL
C --NVARHI - the number of history variables
C --NVARGL - the number of global variables
C --NVARNP - the number of nodal variables
C --NVAREL - the number of element variables
READ (NDB)
& (NAMEHV(I), I=1,NVARHI),
& (NAMEGV(I), I=1,NVARGL),
& (NAMENV(I), I=1,NVARNP),
& (NAMEEV(I), I=1,NVAREL)
C --NAMEHI - the history variable names (CHARACTER*8)
C --NAMEGV - the global variable names (CHARACTER*8)
C --NAMENV - the nodal variable names (CHARACTER*8)
C --NAMEEV - the element variable names (CHARACTER*8)
READ (NDB) ((ISEVOK(I,J), I=1,NVAREL), J=1,NELBLK)
C --ISEVOK - the name truth table for the element blocks;
C -- ISEVOK(i,j) refers to variable i of element block j;
C -- the value is 0 if and only if data will NOT be output for
C -- variable i for element block j (otherwise the value is 1)
\end{verbatim}
\newpage
\begin{verbatim}
C --Read the time steps
130 CONTINUE
READ (NDB, END=900) TIME, HISTFL
C --TIME - the time step value
C --HISTFL - the time step type flag:
C -- 0.0 for all variables output ("whole" time step) else
C -- only history variables output ("history-only" time step)
C
READ (NDB) (VALHV(IVAR), IVAR=1,NVARGL)
C --VALHV - the history values for the current time step
IF (HISTFL .EQ. 0.0) THEN
READ (NDB) (VALGV(IVAR), IVAR=1,NVARGL)
C --VALGV - the global values for the current time step
DO 140 IVAR = 1, NVARNP
READ (NDB) (VALNV(INP,IVAR), INP=1,NUMNP)
C --VALNV - the nodal variables at each node
C -- for the current time step
140 CONTINUE
DO 160 IBLK = 1, NELBLK
DO 150 IVAR = 1, NVAREL
IF (ISEVOK(IVAR,IBLK) .NE. 0) THEN
READ (NDB) (VALEV(IEL,IVAR,IBLK),
& IEL=1,NUMELB(IBLK))
C --VALEV - the element variables at each element
C -- for the current time step
END IF
150 CONTINUE
160 CONTINUE
END IF
C --Handle time step data
...
GOTO 130
900 CONTINUE
C --Handle end of file on database
...
\end{verbatim}

@ -1,145 +0,0 @@
\chapter{The GENESIS Database Format} \label{appx:genesis}
The following code segment reads a GENESIS database.
\begin{verbatim}
C --Open the GENESIS database file
NDB = 9
OPEN (UNIT=NDB, ..., STATUS='OLD', FORM='UNFORMATTED')
C --Read the title
READ (NDB) TITLE
C --TITLE - the title of the database (CHARACTER*80)
C --Read the database sizing parameters
READ (NDB) NUMNP, NDIM, NUMEL, NELBLK,
& NUMNPS, LNPSNL, NUMESS, LESSEL, LESSNL
C --NUMNP - the number of nodes
C --NDIM - the number of coordinates per node
C --NUMEL - the number of elements
C --NELBLK - the number of element blocks
C --NUMNPS - the number of node sets
C --LNPSNL - the length of the node sets node list
C --NUMESS - the number of side sets
C --LESSEL - the length of the side sets element list
C --LESSNL - the length of the side sets node list
C --Read the nodal coordinates
READ (NDB) ((CORD(INP,I), INP=1,NUMNP), I=1,NDIM)
C --Read the element order map (each element must be listed once)
READ (NDB) (MAPEL(IEL), IEL=1,NUMEL)
\end{verbatim}
\newpage
\begin{verbatim}
C --Read the element blocks
DO 100 IEB = 1, NELBLK
C --Read the sizing parameters for this element block
READ (NDB) IDELB, NUMELB, NUMLNK, NATRIB
C --IDELB - the element block identification (must be unique)
C --NUMELB - the number of elements in this block
C -- (the sum of NUMELB for all blocks must equal NUMEL)
C --NUMLNK - the number of nodes defining the connectivity
C -- for an element in this block
C --NATRIB - the number of element attributes for an element
C -- in this block
C --Read the connectivity for all elements in this block
READ (NDB) ((LINK(J,I), J=1,NUMLNK, I=1,NUMELB)
C --Read the attributes for all elements in this block
READ (NDB) ((ATRIB(J,I), J=1,NATRIB, I=1,NUMELB)
100 CONTINUE
\end{verbatim}
\newpage
\begin{verbatim}
C --Read the node sets
READ (NDB) (IDNPS(I), I=1,NUMNPS)
C --IDNPS - the ID of each node set
READ (NDB) (NNNPS(I), I=1,NUMNPS)
C --NNNPS - the number of nodes in each node set
READ (NDB) (IXNNPS(I), I=1,NUMNPS)
C --IXNNPS - the index of the first node in each node set
C -- (in LTNNPS and FACNPS)
READ (NDB) (LTNNPS(I), I=1,LNPSNL)
C --LTNNPS - the nodes in all the node sets
READ (NDB) (FACNPS(I), I=1,LNPSNL)
C --FACNPS - the factor for each node in LTNNPS
C --Read the side sets
READ (NDB) (IDESS(I), I=1,NUMESS)
C --IDESS - the ID of each side set
READ (NDB) (NEESS(I), I=1,NUMESS)
C --NEESS - the number of elements in each side set
READ (NDB) (NNESS(I), I=1,NUMESS)
C --NNESS - the number of nodes in each side set
READ (NDB) (IXEESS(I), I=1,NUMESS)
C --IXEESS - the index of the first element in each side set
C -- (in LTEESS)
READ (NDB) (IXNESS(I), I=1,NUMESS)
C --IXNESS - the index of the first node in each side set
C -- (in LTNESS and FACESS)
READ (NDB) (LTEESS(I), I=1,LESSEL)
C --LTEESS - the elements in all the side sets
READ (NDB) (LTNESS(I), I=1,LESSNL)
C --LTNESS - the nodes in all the side sets
READ (NDB) (FACESS(I), I=1,LESSNL)
C --FACESS - the factor for each node in LTNESS
\end{verbatim}
\newpage
A valid GENESIS database may end at this point or after any point
described below.
\begin{verbatim}
C --Read the QA header information
READ (NDB, END=...) NQAREC
C --NQAREC - the number of QA records (must be at least 1)
DO 110 IQA = 1, MAX(1,NQAREC)
READ (NDB) (QATITL(I,IQA), I=1,4)
C --QATITL - the QA title records; each record contains:
C -- 1) analysis code name (CHARACTER*8)
C -- 2) analysis code qa descriptor (CHARACTER*8)
C -- 3) analysis date (CHARACTER*8)
C -- 4) analysis time (CHARACTER*8)
110 CONTINUE
C --Read the optional header text
READ (NDB, END=...) NINFO
C --NINFO - the number of information records
DO 120 I = 1, NINFO
READ (NDB) INFO(I)
C --INFO - extra information records (optional) that contain
C -- any supportive documentation that the analysis code
C -- developer wishes (CHARACTER*80)
120 CONTINUE
C --Read the coordinate names
READ (NDB, END=...) (NAMECO(I), I=1,NDIM)
C --NAMECO - the coordinate names (CHARACTER*8)
C --Read the element type names
READ (NDB, END=...) (NAMELB(I), I=1,NELBLK)
C --NAMELB - the element type names (CHARACTER*8)
\end{verbatim}

@ -1,109 +0,0 @@
\chapter{The GRAFAID Neutral File Format} \label{appx:grafaid}
The \caps{GRAFAID} neutral file format is described in Section 9-2 of
the \caps{GRAFAID} Code User Manual~\cite{bib:grafaid}. The
following description covers only those parts that are relevant to the
\caps{\PROGRAM} program.
The neutral file is a sequential file written in \caps{ASCII} format.
Each record is free format with fields separated by a comma.
The general structure of the \caps{GRAFAID} neutral file is:
\cenlinesbegin
Neutral file title record (optional) \\
\nth{1}{st} Curve Definition Record Set \\
\nth{2}{nd} Curve Definition Record Set \\
\ldots\ \\
\nth{N}{th} Curve Definition Record Set \\
\cmd{END NEUTRAL FILE}
\cenlinesend
The neutral file title contains the name of the program which wrote the
neutral file (\caps{\PROGRAM}) and the name, date, and time of the
programs that created and last modified the database.
The format of the records in a curve definition record set is:
\cenlinesbegin
\cmd{BEGIN CURVE},\param{curve-name} \\
\param{ntitle},\param{title$_{1}$} \\
\param{title$_{2}$} \\
\ldots\ \\
\param{title$_{ntitle}$} \\
\param{x-label} \\
\param{y-label} \\
\param{x-min},\param{x-max},\param{y-min},\param{y-max},\param{npts},\param{aux-data}
\\
\param{axis-type},\param{x-type},\param{aux-type} \\
\param{x$_{1}$},\param{y$_{1}$} \\
\param{x$_{2}$},\param{y$_{2}$} \\
\ldots\ \\
\param{x$_{npts}$},\param{y$_{npts}$} \\
\cmd{END CURVE},\param{curve-name}
\cenlinesend
\newpage
\newlength{\graftag}
\newlength{\grafdesc}
\settowidth{\graftag}{\param{curve-name} 15 characters }
\setlength{\grafdesc}{\textwidth}
\addtolength{\grafdesc}{-\graftag}
\addtolength{\grafdesc}{-\tabbingsep}
\begin{tabular}{lcp{\grafdesc}}
%
\multicolumn{1}{c}{Field} &
\multicolumn{1}{c}{Type} &
\multicolumn{1}{c}{Description}
\\ \hline \\
%
\param{curve-name} & 15 characters & The curve name, set by the
\cmd{ACURVE} and \cmd{NCURVE} commands.
\medskip
\\
\param{ntitle} & integer & The number of title lines (5 maximum). \\
\param{title$_{i}$} & 80 characters & The \nth{i}{th} curve title line.
If the user has requested QA information with the \cmd{QA} command, the
database title is the first title line. The caption lines set by the
\cmd{CAPTION} command are the next title lines. The last title line is a
description of the curve.
\medskip
\\
\param{x-label} & 40 characters & The X axis label, set by the
\cmd{XLABEL} command. \\
\param{y-label} & 40 characters & The Y axis label, set by the
\cmd{YLABEL} command.
\medskip
\\
\param{x-min} & real & The X axis lower plot limit, set by the
\cmd{XSCALE} command. \\
\param{x-max} & real & The X axis upper plot limit, set by the
\cmd{XSCALE} command. \\
\param{y-min} & real & The Y axis lower plot limit, set by the
\cmd{YSCALE} command. \\
\param{y-max} & real & The Y axis upper plot limit, set by the
\cmd{YSCALE} command.
\medskip
\\
\param{npts} & integer & The number of curve data X-Y pairs.
\medskip
\\
\param{aux-data} & 1 character & \cmd{F} to indicate that no auxiliary
data exists.
\medskip
\\
\param{axis-type} & 4 characters & \cmd{NOLO} to indicate a linear scale
on both axes.
\medskip
\\
\param{x-type} & 4 characters & \cmd{NONM} if the X data is nonmonotonic
or \cmd{MONO} if the X data is monotonic.
\medskip
\\
\param{aux-type} & 1 character & Blank field to indicate that no
auxiliary data exists.
\medskip
\\
\param{x$_{i}$} & real & The \nth{i}{th} X data value. \\
\param{y$_{i}$} & real & The \nth{i}{th} Y data value.
%
\end{tabular}

@ -1,69 +0,0 @@
\chapter{Special Plot Text Capabilities} \label{appx:plt}
There are several special capabilities available for user-defined text
that appears on a plot (such as the plot caption). For example, the text
can include subscripted text, Greek letters, and special symbols. The
user requests a capability by inserting an ``escape sequence'' in the
text. The escape sequence starts with a backslash (``\verb|\|'') and
(unless otherwise noted) must end with a space which is
deleted from the text string. Escape sequences are translated only when
{\bf software} characters are plotted. If an invalid escape sequence is
entered, an error message appears when the plot is drawn and the
sequence is ignored.
The following escape sequences are available:
\begin{center} \begin{tabbing}
\verb|\|\cmd{XXXXXXX} \= explanation of symbol xx \=
\verb|\|\cmd{XXXXXXX} \= explanation of symbol xx \kill
%
\verb|\|\cmd{SQ} \> square \>
\verb|\|\cmd{CSQ} \> centered square \\
\verb|\|\cmd{DI} \> diamond \>
\verb|\|\cmd{CDI} \> centered diamond \\
\verb|\|\cmd{CS} \> cross \>
\verb|\|\cmd{CCS} \> centered cross \\
\verb|\|\cmd{X} \> X \>
\verb|\|\cmd{CX} \> centered X \\
\verb|\|\cmd{TR} \> triangle \>
\verb|\|\cmd{CTR} \> centered triangle \\
\verb|\|\cmd{CI} \> circle \>
\verb|\|\cmd{CCI} \> centered circle \\
\verb|\|\cmd{DO} \> dot \>
\verb|\|\cmd{CDO} \> centered dot \\
\verb|\|\cmd{LO} \> logo \>
\verb|\|\cmd{CLO} \> centered logo \\
\\
\verb|\|\cmd{SLINE} \> solid line \>
\verb|\|\cmd{DLINE} \> dotted line \\
\verb|\|\cmd{DDLINE} \> dot-dash line \>
\verb|\|\cmd{SDLINE} \> short dash line \\
\verb|\|\cmd{LDLINE} \> long dash line \>
\verb|\|\cmd{MDLINE} \> medium dash line \\
\\
\verb|\|\cmd{NEQ} \> not equal to \\
\verb|\|\cmd{LEQ} \> less than or equal to \>
\verb|\|\cmd{GEQ} \> greater than or equal to \\
\verb|\|\cmd{NLEQ} \> not less than or equal to \>
\verb|\|\cmd{NGEQ} \> not greater than or equal to \\
\verb|\|\cmd{NLT} \> not less than \>
\verb|\|\cmd{NGT} \> not greater than \\
\verb|\|\cmd{LL} \> much less than \>
\verb|\|\cmd{GG} \> much greater than \\
\\
\verb|\|\cmd{PLUSMIN} \> plus or minus \>
\verb|\|\cmd{PRIME} \> prime \\
\verb|\|\cmd{SUM} \> summation \>
\verb|\|\cmd{APPROX} \> approximation sign \\
\verb|\\| \> single backslash (with no ending space) \\
\\
\verb|\|\cmd{GR} \> Greek font \>
\verb|\|\cmd{ENG} \> normal font \\
\\
\verb|\^| \> start superscript (with no ending space) \\
\verb|\_| \> start subscript (with no ending space) \\
\verb|\-| \> end superscript or subscript (with no ending space) \\
\end{tabbing} \end{center}
%\\
%\verb|\|\cmd{CR} \> carriage return \>
%\verb|\|\cmd{LF} \> linefeed \\
%\verb|\|\cmd{CL} \> carriage return and linefeed \\

@ -1,116 +0,0 @@
\chapter{The SEACO Database Format} \label{appx:seaco}
The following code segment reads a SEACO database.
\begin{verbatim}
C --Open the database file
NDB = 11
OPEN (UNIT=NDB, ..., STATUS='OLD', FORM='UNFORMATTED')
C --Read the header information
READ (NDB) TITLE, CNAME, CDATE, CTIME, MNAME, MDATE, MTIME
C --TITLE - the title of the database (CHARACTER*80)
C --CNAME - the program which created the database (CHARACTER*8)
C --CDATE, CTIME - the date (DD-MM-YY) and time (HH:MM:SS)
C -- the database was created (both CHARACTER*8)
C --MNAME - the program which last modified the database
C -- (CHARACTER*8)
C --MDATE, MTIME - the date (DD-MM-YY) and time (HH:MM:SS)
C -- the database was last modified (both CHARACTER*8)
READ (NDB) NDIM, NUMNP, NUMEL, NLINK, NUMMAT,
& NVARNP, NVAREL, NVARGL, IBLKNV, IBLKEV, IPACK
C --NDIM - the number of coordinates per node
C --NUMNP - the number of nodes
C --NUMEL - the number of elements
C --NLINK - the number of nodes per element
C --NUMMAT - the number of materials
C --NVARNP - the number of nodal variables
C --NVAREL - the number of element variables
C --NVARGL - the number of global variables
C --IBLKNV - the nodal variable blocking flag, must be 0
C --IBLKEV - the element variable blocking flag, must be 0
C --IPACK - the packed data flag, must be 1
\end{verbatim}
\newpage
\begin{verbatim}
C --Read the coordinate and variable names
IF (NDIM .GT. 0) THEN
READ (NDB) (NAMECO(I), I=1,NDIM)
C --NAMECO - the names of the coordinates (CHARACTER*8)
END IF
IF (NVARNP .GT. 0) THEN
READ (NDB) (NAMENV(I), I=1,NVARNP)
C --NAMENV - the names of the nodal variables (CHARACTER*8)
END IF
IF (NVAREL .GT. 0) THEN
READ (NDB) (NAMEEV(I), I=1,NVAREL)
C --NAMEEV - the names of the element variables (CHARACTER*8)
END IF
IF (NVARGL .GT. 0) THEN
READ (NDB) (NAMEGV(I), I=1,NVARGL)
C --NAMEGV - the names of the global variables (CHARACTER*8)
END IF
C --Read the coordinate, connectivity, and material arrays
IF (NDIM .GT. 0) THEN
READ (NDB) ((CORD(I,INP), INP=1,NUMNP), I=1,NDIM)
C --CORD - the coordinates for each node
END IF
IF (NUMEL .GT. 0) THEN
DO 100 IEL = 1, NUMEL
READ (NDB) (LINK(I,IEL), I=1,NLINK)
C --LINK - the connectivity array (nodes of each element)
100 CONTINUE
END IF
IF (NUMMAT .GT. 1) THEN
READ (NDB) (MAT(IEL), IEL=1,NUMEL)
C --MAT - the material for each element
END IF
\end{verbatim}
\newpage
\begin{verbatim}
C --Read the time steps
110 CONTINUE
READ (NDB, END=900) TIME
C --TIME - the current time step time
IF (NVARNP .GT. 0) THEN
DO 120 NV = 1, NVARNP
READ (NDB) (VARNP(NV,INP), INP=1,NUMNP)
C --VARNP - the nodal variables at each node
C -- for the current time step
120 CONTINUE
END IF
IF (NVAREL .GT. 0) THEN
DO 130 NV = 1, NVAREL
READ (NDB) (VAREL(NV,IEL), IEL=1,NUMEL)
C --VAREL - the element variables at each element
C -- for the current time step
130 CONTINUE
END IF
IF (NVARGL .GT. 0) THEN
READ (NDB) (GLOBL(NV), NV=1,NVARGL)
C --GLOBL - the global variables for the current time step
END IF
C --Handle time step data
...
GOTO 110
900 CONTINUE
C --Handle end of file on database
...
\end{verbatim}

@ -1,135 +0,0 @@
The commands are in free-format and must adhere to the following syntax
rules.
\setlength{\itemsep}{\medskipamount} \begin{itemize}
\item
Valid delimiters are a comma or one or more blanks.
\item
\ifx\PROGRAM\BLOT
Either lowercase or uppercase letters are acceptable, but lowercase
letters are converted to uppercase except in user-defined text that
appears on a plot (such as the plot caption).
\else
Either lowercase or uppercase letters are acceptable, but lowercase
letters are converted to uppercase.
\fi
\item
\ifx\PROGRAM\ALGEBRA
A ``\verb|'|'' character in any command line starts a comment. The
``\verb|'|'' and any characters following it on the line are ignored.
\else
A ``\cmd{\$}'' character in any command line starts a comment. The
``\cmd{\$}'' and any characters following it on the line are ignored.
\fi
\item
\ifx\PROGRAM\ALGEBRA
A command may be continued over several lines with an ``\verb|>|''
character. The ``\verb|>|'' and any characters following it on the
current line are ignored and the next line is appended to the current
line.
\else
A command may be continued over several lines with an ``\verb|>|''
character. The ``\verb|>|'' and any characters following it on the
current line are ignored and the next line is appended to the current
line.
\fi
\end{itemize}
Each command has an action keyword or ``verb'' followed by a variable
number of parameters.
The command verb is a character string. It may be abbreviated, as long
as enough characters are given to distinguish it from other commands.
The meaning and type of the parameters is dependent on the command verb.
Most command parameters are optional. If an optional parameter field is
blank, a command-dependent default value is supplied. Below is a
description of the valid entries for parameters.
\setlength{\itemsep}{\medskipamount} \begin{itemize}
%
\item
A numeric parameter may be a real number or an integer. A real number
may be in any legal \caps{FORTRAN} numeric format (e.g., \cmd{1},
\cmd{0.2}, \cmd{-1E-2}). An integer parameter may be in any legal
integer format.
\item
A string parameter is a literal character string. Most string parameters
may be abbreviated.
%
\newcommand{\okname}{f}
\ifx\PROGRAM\BLOT \renewcommand{\okname}{t} \fi
\ifx\PROGRAM\ALGEBRA \renewcommand{\okname}{t} \fi
\ifx\PROGRAM\GROPE \renewcommand{\okname}{t} \fi
\if\okname t
\item
Variable names must be fully specified. The blank delimiter creates a
problem with database variable names with embedded blanks. The program
handles this by deleting all embedded blanks from the input database
names. For example, the variable name ``\cmd{SIG~R}'' must be entered as
``\cmd{SIGR}''. The blank must be deleted in any references to the
variable.
\ifx\PROGRAM\GROPE
All database names appear exactly as input in all displays.
\else
All database names appear in uppercase without the embedded blanks in
all displays.
\fi
\fi
\ifx\PROGRAM\BLOT
\item
Screen and mesh positions may be selected with the graphics cursor (also
known as the graphics locator). Cursor input is device-dependent and
uses the VDI graphics locator routines. When the program prompts for the
position, the user positions the graphics cursor (e.g., the crosshairs)
on the screen, then selects the position by pressing any printable
keyboard character (e.g., the space bar).
\fi
\newcommand{\okrange}{f}
\ifx\PROGRAM\BLOT \renewcommand{\okrange}{t} \fi
\ifx\PROGRAM\GROPE \renewcommand{\okrange}{t} \fi
\if\okrange t
\ifx\PROGRAM\GROPE \newpage \fi %%%
\item
Several parameters allow a range of values. A range is in one of the
following forms:
\setlength{\itemsep}{\medskipamount} \begin{itemize}
\item ``\param{n$_{1}$}'' selects value \param{n$_{1}$},
\item ``\param{n$_{1}$} \cmd{TO} \param{n$_{2}$}'' selects all values from
\param{n$_{1}$} to \param{n$_{2}$},
\item ``\param{n$_{1}$} \cmd{TO} \param{n$_{2}$} \cmd{BY} \param{n$_{3}$}''
selects all values from \param{n$_{1}$} to \param{n$_{2}$} stepping by
\param{n$_{3}$}, where \param{n$_{3}$} may be positive or negative.
\end{itemize}
If the upper limit of the range is greater than the maximum allowable
value, the upper limit is changed to the maximum without a message.
\fi
\end{itemize}
\ifx\PROGRAM\ALGEBRA \newpage \fi %%%
The notation conventions used in the command descriptions are:
\setlength{\itemsep}{\medskipamount} \begin{itemize}
\item
The command verb is in \cmdverb{bold} type.
\item
A literal string is in all uppercase \cmd{SANSERIF} type and should be
entered as shown (or abbreviated).
\item
The value of a parameter is represented by the parameter name in
\param{italics}.
\newcommand{\okoptpar}{f}
\ifx\PROGRAM\BLOT \renewcommand{\okoptpar}{t} \fi
\ifx\PROGRAM\ALGEBRA \renewcommand{\okoptpar}{t} \fi
\ifx\PROGRAM\GROPE \renewcommand{\okoptpar}{t} \fi
\if\okoptpar t
\item
A literal string in square brackets (``[~]'') represents a parameter
option which is omitted entirely (including any following comma) if not
appropriate. These parameters are distinct from most parameters in that
they do not require a comma as a place holder to request the default
value.
\fi
\item
The default value of a parameter is in angle brackets (``$<$~$>$''). The
initial value of a parameter set by a command is usually the default
parameter value. If not, the initial setting is given with the default
or in the command description.
\end{itemize}

@ -1,42 +0,0 @@
\cleardoublepage
%
% Distribution list for INTERNAL Memorandum (August 16, 1988)
%
\twocolumn % starts a new page
%
{\bf Distribution:}
\par
%
{\tt % begin typewriter type
\begin{tabbing}
1500xxx \= \kill
1510 \> J. W. Nunziato \\
1511 \> D. K. Gartling \\
1520 \> L. W. Davison \\
1521 \> R. D. Krieg and Staff (12) \\
1522 \> R. C. Reuter, Jr.\ and Staff (15) \\
1523 \> J. H. Biffle and Staff (12) \\
1523 \> A. P. Gilkey (30) \\
1524 \> A. K. Miller and Staff (12) \\
1530 \> W. Herrmann, Actg. \\
1531 \> S. L. Thompson \\
%%% 1531 \> J. M. McGlaun \\
1533 \> S. T. Montgomery \\
1550 \> C. W. Peterson, Jr.\ \\
1556 \> W. L. Oberkampf \\
3141 \> S. A. Landenberger (5) \\
%%% 6248 \> G. W. Brown \\
%%% 6248 \> R. T. McGrath \\
%%% 6248 \> R. D. Watson \\
6258 \> D. S. Preece \\
%%% 6314 \> L. S. Costin \\
6334 \> H. J. Iuzzolino \\
6334 \> R. D. McCurley \\
6334 \> J. S. Rath \\
6334 \> R. P. Rechard \\
6334 \> E. Shepherd \\
8524 \> P. W. Dean \\
\end{tabbing}
}
%
% Issue a "\onecolumn" command to start a new page

@ -1,36 +0,0 @@
%
% Distribution list for MEMO (August 16, 1988)
%
{\bf Distribution:}
\par
%
{\tt % begin typewriter type
\begin{tabbing}
1500xxx \= \kill
1500 \> W. Herrmann \\
1510 \> J. W. Nunziato \\
1511 \> D. K. Gartling \\
1520 \> L. W. Davison \\
1521 \> R. D. Krieg and Staff (12) \\
1522 \> R. C. Reuter, Jr.\ and Staff (15) \\
1523 \> J. H. Biffle and Staff (12) \\
1523 \> A. P. Gilkey (5) \\
1524 \> A. K. Miller and Staff (12) \\
1530 \> W. Herrmann, Actg. \\
1531 \> S. L. Thompson \\
%%% 1531 \> J. M. McGlaun \\
1533 \> S. T. Montgomery \\
1550 \> C. W. Peterson, Jr.\ \\
1556 \> W. L. Oberkampf \\
%%% 6248 \> G. W. Brown \\
%%% 6248 \> R. T. McGrath \\
%%% 6248 \> R. D. Watson \\
6258 \> D. S. Preece \\
%%% 6314 \> L. S. Costin \\
6334 \> H. J. Iuzzolino \\
6334 \> R. D. McCurley \\
6334 \> J. S. Rath \\
6334 \> R. P. Rechard \\
6334 \> E. Shepherd \\
\end{tabbing}
}

@ -1,50 +0,0 @@
\cleardoublepage
%
% Distribution list for SAND Report (August 16, 1988)
%
\twocolumn % starts a new page
%
{\bf Distribution:}
\par
%
{\tt % begin typewriter type
\begin{tabbing}
1500xxx \= \kill
1510 \> J. W. Nunziato \\
1511 \> D. K. Gartling \\
1520 \> L. W. Davison \\
1521 \> R. D. Krieg and Staff (12) \\
1522 \> R. C. Reuter, Jr.\ and Staff (15) \\
1523 \> J. H. Biffle and Staff (12) \\
1523 \> A. P. Gilkey (30) \\
1524 \> A. K. Miller and Staff (12) \\
1530 \> W. Herrmann, Actg. \\
1531 \> S. L. Thompson \\
%%% 1531 \> J. M. McGlaun \\
1533 \> S. T. Montgomery \\
1550 \> C. W. Peterson, Jr.\ \\
1556 \> W. L. Oberkampf \\
3141 \> S. A. Landenberger (5) \\
3151 \> W. I. Klein (3) \\
3154 \> for DOE/OSTI (8) \\
%%% 6248 \> G. W. Brown \\
%%% 6248 \> R. T. McGrath \\
%%% 6248 \> R. D. Watson \\
6258 \> D. S. Preece \\
%%% 6314 \> L. S. Costin \\
6334 \> H. J. Iuzzolino \\
6334 \> R. D. McCurley \\
6334 \> J. S. Rath \\
6334 \> R. P. Rechard \\
6334 \> E. Shepherd \\
8240 \> C. W. Robinson \\
8241 \> G. A. Benedetti \\
8242 \> M. R. Birnbaum \\
8243 \> M. L. Callabresi \\
8244 \> C. M. Hartwig \\
8245 \> R. J. Kee \\
8524 \> P. W. Dean \\
\end{tabbing}
}
%
% Issue a "\onecolumn" command to start a new page

@ -1,5 +0,0 @@
The details of executing \caps{\PROGRAM} are dependent on the system
being used. The system manager of any system that runs \caps{\PROGRAM}
should provide a supplement to this manual that explains how to run the
program on that particular system. Site supplements for all currently
supported systems are in Appendix~\ref{appx:site}.

@ -1,132 +0,0 @@
C --Open the GENESIS database file
NDB = 9
OPEN (UNIT=NDB, ..., STATUS='OLD', FORM='UNFORMATTED')
C --Read the title
READ (NDB) TITLE
C --TITLE - the title of the database (CHARACTER*80)
C --Read the database sizing parameters
READ (NDB) NUMNP, NDIM, NUMEL, NELBLK,
& NUMNPS, LNPSNL, NUMESS, LESSEL, LESSNL
C --NUMNP - the number of nodes
C --NDIM - the number of coordinates per node
C --NUMEL - the number of elements
C --NELBLK - the number of element blocks
C --NUMNPS - the number of node sets
C --LNPSNL - the length of the node sets node list
C --NUMESS - the number of side sets
C --LESSEL - the length of the side sets element list
C --LESSNL - the length of the side sets node list
C --Read the nodal coordinates
READ (NDB) ((CORD(INP,I), INP=1,NUMNP), I=1,NDIM)
C --Read the element order map (each element must be listed once)
READ (NDB) (MAPEL(IEL), IEL=1,NUMEL)
C --Read the element blocks
DO 100 IEB = 1, NELBLK
C --Read the sizing parameters for this element block
READ (NDB) IDELB, NUMELB, NUMLNK, NATRIB
C --IDELB - the element block identification (must be unique)
C --NUMELB - the number of elements in this block
C -- (the sum of NUMELB for all blocks must equal NUMEL)
C --NUMLNK - the number of nodes defining the connectivity
C -- for an element in this block
C --NATRIB - the number of element attributes for an element
C -- in this block
C --Read the connectivity for all elements in this block
READ (NDB) ((LINK(J,I), J=1,NUMLNK, I=1,NUMELB)
C --Read the attributes for all elements in this block
READ (NDB) ((ATRIB(J,I), J=1,NATRIB, I=1,NUMELB)
100 CONTINUE
C --Read the node sets
READ (NDB) (IDNPS(I), I=1,NUMNPS)
C --IDNPS - the ID of each node set
READ (NDB) (NNNPS(I), I=1,NUMNPS)
C --NNNPS - the number of nodes in each node set
READ (NDB) (IXNNPS(I), I=1,NUMNPS)
C --IXNNPS - the index of the first node in each node set
C -- (in LTNNPS and FACNPS)
READ (NDB) (LTNNPS(I), I=1,LNPSNL)
C --LTNNPS - the nodes in all the node sets
READ (NDB) (FACNPS(I), I=1,LNPSNL)
C --FACNPS - the factor for each node in LTNNPS
C --Read the side sets
READ (NDB) (IDESS(I), I=1,NUMESS)
C --IDESS - the ID of each side set
READ (NDB) (NEESS(I), I=1,NUMESS)
C --NEESS - the number of elements in each side set
READ (NDB) (NNESS(I), I=1,NUMESS)
C --NNESS - the number of nodes in each side set
READ (NDB) (IXEESS(I), I=1,NUMESS)
C --IXEESS - the index of the first element in each side set
C -- (in LTEESS)
READ (NDB) (IXNESS(I), I=1,NUMESS)
C --IXNESS - the index of the first node in each side set
C -- (in LTNESS and FACESS)
READ (NDB) (LTEESS(I), I=1,LESSEL)
C --LTEESS - the elements in all the side sets
READ (NDB) (LTNESS(I), I=1,LESSNL)
C --LTNESS - the nodes in all the side sets
READ (NDB) (FACESS(I), I=1,LESSNL)
C --FACESS - the factor for each node in LTNESS
C ...A valid GENESIS database may end at this point or after any point
C ...described below.
C --Read the QA header information
READ (NDB, END=...) NQAREC
C --NQAREC - the number of QA records (must be at least 1)
DO 110 IQA = 1, MAX(1,NQAREC)
READ (NDB) (QATITL(I,IQA), I=1,4)
C --QATITL - the QA title records; each record contains:
C -- 1) analysis code name (CHARACTER*8)
C -- 2) analysis code qa descriptor (CHARACTER*8)
C -- 3) analysis date (CHARACTER*8)
C -- 4) analysis time (CHARACTER*8)
110 CONTINUE
C --Read the optional header text
READ (NDB, END=...) NINFO
C --NINFO - the number of information records
DO 120 I = 1, NINFO
READ (NDB) INFO(I)
C --INFO - extra information records (optional) that contain
C -- any supportive documentation that the analysis code
C -- developer wishes (CHARACTER*80)
120 CONTINUE
C --Read the coordinate names
READ (NDB, END=...) (NAMECO(I), I=1,NDIM)
C --NAMECO - the coordinate names (CHARACTER*8)
C --Read the element type names
READ (NDB, END=...) (NAMELB(I), I=1,NELBLK)
C --NAMELB - the element type names (CHARACTER*8)

@ -1,59 +0,0 @@
%
\newcommand{\Covertitle}{}
\renewcommand{\title}[1] {\newcommand{\Title}{#1}
\renewcommand{\Covertitle}{\Title}}
\newcommand{\covertitle}[1] {\renewcommand{\Covertitle}{#1}}
\newcommand{\division}[1] {\newcommand{\Division}{#1}}
\renewcommand{\author}[1] {\newcommand{\Author}{#1}}
\renewcommand{\abstract}[1] {\newcommand{\Abstract}{#1}}
\newcommand{\Date}{\Month}
\renewcommand{\date}[1] {\renewcommand{\Date}{#1}}
\renewcommand{\Release}[1] {\newcommand{\Rlse}{#1}}
\newcommand{\Previous}[1] {\newcommand{\Prerel}{#1}}
\newcommand{\RS}[1] {\newcommand{\Rs}{RS#1}}
%
%%% \memocover creates a cover page and title page for an internal memorandum.
\newcommand{\memocover}{
%
\setcounter{page}{0} \pagestyle{empty}
\par \Rs \\
Internal Distribution Only \\
\vspace*{0.5in}
\par \Covertitle\ (U) \\
\vspace*{0.5in}
\par \Author \\
\\
Printed \Month \\
%-% \vspace*{2.1in}
\vfill
%-% \openin2={\Abstract}
%-% \ifeof2
%-% \typeout{File \Abstract\ not open}
%-% \relax
%-% \else
%-% \closein2
%-% \typeout{File \Abstract\ open}
\par \begin{center} Abstract \end{center}
\vspace*{\smallskipamount}
\par \input{\Abstract}
%-% \fi
\vspace*{0.5in}
\clearpage \pagestyle{plain}
}
%%% \memotitle creates a title page for an internal memorandum.
\newcommand{\memotitle}{
%
\setcounter{page}{0} \pagestyle{empty}
\vspace*{0.5in}
\par \begin{flushright} {\Rs} \end{flushright}
\vspace*{2.0in}
\begin{center}
\par {\Large\bf \Title}
\vspace*{0.5in}
\large
\par \Author \\
\Division \\
\normalsize
\end{center}
\clearpage \pagestyle{plain}
}

@ -1,5 +0,0 @@
\bibitem{bib:blot}
Amy P. Gilkey,
``BLOT -- A Mesh and Curve Plot Program
for the Output of a Finite Element Analysis,''
SAND88-1432, \SNLA, in preparation.

@ -1,4 +0,0 @@
\bibitem{bib:exodus}
William C. Mills-Curran, Amy P. Gilkey, Dennis P. Flanagan,
``EXODUS: A Finite Element File Format for Pre- and Post-Processing,''
SAND87-2997, \SNLA, in preparation.

@ -1,3 +0,0 @@
\bibitem{bib:f77}
{\em American National Standard Programming Language FORTRAN},
American National Standards Institute, ANSI X3.9-1978, New York, 1978.

@ -1,4 +0,0 @@
\bibitem{bib:genesis}
Lee M. Taylor, Dennis P. Flanagan, and William C. Curran,
``The GENESIS Finite Element Mesh File Format,''
SAND86-0910, \SNLA, May 1986.

@ -1,4 +0,0 @@
\bibitem{bib:grope}
Amy P. Gilkey,
``GROPE -- A GENESIS / EXODUS Database Examination Program,''
Internal Memorandum RS1523/88/02, \SNL, in preparation.

@ -1,4 +0,0 @@
\bibitem{bib:seaco}
Zelma E. Beisinger,
``SEACO: Sandia Engineering Analysis Department Code Output Data Base,''
SAND84-2004, \SNLA, in preparation.

@ -1,4 +0,0 @@
\bibitem{bib:supes}
John R. Red-Horse, William C. Curran, and Dennis P. Flanagan,
``SUPES Version 2.1 -- A Software Utility Package for the Engineering
Sciences ,'' SAND90--0247, \SNLA, May 1990.

@ -1,205 +0,0 @@
%
% STANDARD SETUP FOR MANUALS
%
%%% set up so item does not have so much space between items and top
\setlength{\parindent}{0pt}
\setlength{\topsep}{0pt} \setlength{\parsep}{0pt}
%%% \setlength{\itemsep}{\smallskipamount} \begin{itemize} ...
%
%%% \myindent is a nice amount to indent
\newlength{\myindent}
\setlength{\myindent}{30pt}
\newlength{\myhalfind}
\setlength{\myhalfind}{15pt}
%
%%% \cenlinesbegin and end start a block of centered text (each line to left)
\newcommand{\cenlinesbegin}
{ \begin{center} \begin{tabular}{l} }
\newcommand{\cenlinesend}
{ \end{tabular} \end{center} }
%
%%% these commands are used for all-capital-letter words (\caps),
%%% typed literals (\cmd), parameters (\param), bold font (\bold)
\newcommand{\caps}[1]
{\uppercase{#1}\null}
\newcommand{\cmd}[1]
{\mbox{\sf\uppercase{#1}}\null}
\newcommand{\lcmd}[1]
{\mbox{\sf#1}\null}
\newcommand{\param}[1]
{{\em #1}\null}
\newcommand{\optparam}[1]
{[{\em #1\/}]\null}
%
%%% \negmedskip produces a medium negative space
\newcommand{\negmedskip}
{\vspace{-\medskipamount}}
%
%%% \doublehline[#columns] produces a double horizontal line in tabular
\newcommand{\doublehline}[1]
{\hline\multicolumn{#1}{c}{\vspace{-.17in}}\\ \hline}
%
%%% \SNL produces the text "Sandia National Laboratories"
%%% \SNLA adds "Albuquerque, NM"
\def\SNL{Sandia National Laboratories}
\def\SNLA{Sandia National Laboratories, Albuquerque, NM}
%%%
%%% \nth produces text like 1st with the "st" raised
\newcommand{\nth}[2]
{{#1}\raisebox{.6ex}{#2}}
%
%%% \cmdverb is used to produce the command verb
\newfont{\bldsf}{cmssbx10 scaled \magstep1} % bold sans serif
\newcommand{\cmdverb}[1]{\mbox{\bldsf #1}\null}
%
%%% \default produces the command parameter default in braces;
%%% \nodefault is used for a command parameter with no default
\newcommand{\default}[1]{$<${#1}$>$}
\newcommand{\nodefault}[0]{$<$no default$>$}
%
%%% \topicbegin and end indents a block of text
\newcommand{\topicbegin}{
\par\addtolength{\leftskip}{\myindent}
\addtolength{\leftmargin}{\myindent}
\addtolength{\leftmargini}{\myindent}
}
\newcommand{\topicend}{
\par\addtolength{\leftskip}{-\myindent}
\addtolength{\leftmargin}{-\myindent}
\addtolength{\leftmargini}{-\myindent}
}
%
%%% \cmddef produces the command descriptions
\newcommand{\cmddef}[2]{
\par \hangindent=\myhalfind \hangafter=1 {#1}
\par \topicbegin {#2} \topicend
}
%
%%% \cmdnext precedes a second command definition line
\newcommand{\cmdnext}{
\par \hangindent=\myhalfind \hangafter=1 \negmedskip
}
% \newcommand{\cmdnext}{
% \par \hangindent=\myhalfind \hangafter=1 \vspace{-\bigskipamount}
% }
%
%%% \cmdoption produces a heading and an indented block of text
\newcommand{\cmdoption}[2]{
\par \hangindent=\myhalfind \hangafter=1 {#1}
\par \vspace{-\medskipamount}
\topicbegin {#2} \topicend
}
%
%%% \cmdsum produces a command summary line
\newcommand{\cmdsum}[2]{
\par {#1}
\par \vspace{-\medskipamount}
\topicbegin {#2} \topicend
}
%
%%% \errfmt produces a centered error message
\newcommand{\errfmt}[1]{
\begin{center} \vspace{-\smallskipamount}
{#1}
\vspace{-\smallskipamount} \end{center}
}
%
%%% \notetome produces a message to me
\newcommand{\notetome}[1]{
%%% \begin{center} {\bf *** {#1} ***} \end{center}
\typeout{*** #1 ***}
}
%
%%% The following are symbols set up for the names of the manuals.
%%% These symbols are used to check for equality.
\newcommand{\ABAEXO}{ABAEXO}
\newcommand{\ALGEBRA}{ALGEBRA}
\newcommand{\BLOT}{\sf Blot}
\newcommand{\GENTD}{GENTD}
\newcommand{\GJOIN}{GJOIN}
\newcommand{\GROPE}{GROPE}
\newcommand{\NUMBERS}{NUMBERS}
\newcommand{\superscript}[1]{\ensuremath{^{\textrm{#1}}}}
\newcommand{\subscript}[1]{\ensuremath{_{\textrm{#1}}}}
% Welcome to the 21\superscript{st} century.
\renewcommand{\th}[0]{\superscript{th}}
\newcommand{\st}[0]{\superscript{st}}
\newcommand{\nd}[0]{\superscript{nd}}
\newcommand{\rd}[0]{\superscript{rd}}
% Carl took 1\st place. Elly, Tom and Ann came in 2\nd, 3\rd and 4\th.
\newcommand{\texifylineno}[1]{{\footnotesize\hspace{-4em}\makebox[4em][r]{#1\hspace{1.5ex}}}}
\newcommand{\sectionline}{%
\nointerlineskip \vspace{\baselineskip}%
\hspace{\fill}\rule{\linewidth}{.7pt}\hspace{\fill}%
\par\nointerlineskip
}
\def\SNLA{Sandia National Laboratories, Albuquerque, NM}
\newcommand\dash{\raise2.1pt\hbox{\rule{5pt}{0.3pt}}\hspace{1pt}}
\newcommand{\gap}{\hspace{12pt}}
\newcommand{\paramdef}[2]
{\color{red}\begin{tabular}{@{}l@{}p{6.0in}}\bf\tt #1\enspace\enspace &\tt #2\\\index{#1!Parameter}\index{Parameter!#1}\end{tabular}\color{black}}
\newcommand{\funcdef}[2]
{\color{red}\begin{tabular}{@{}l@{}p{0.5in}}\Large\bf\tt int #1\enspace(&\Large\bf\tt #2)\\\index{#1!Definition}\index{Functions!#1!Definition}\end{tabular}\color{black}}
\newcommand{\funcdefv}[2]
{\color{red}\begin{tabular}{@{}l@{}p{3.7in}}\Large\bf\tt void #1\enspace(&\Large\bf\tt #2)\\\index{#1!Definition}\index{Functions!#1!Definition}\end{tabular}\color{black}}
%
% Set left margin and counter
\setlength{\oddsidemargin}{0.25in}
\setlength{\evensidemargin}{0.25in}
\setcounter{secnumdepth}{10}
\setcounter{tocdepth}{3}
\setlength{\textwidth}{6in}
\setlength{\topmargin}{-0.25in}
\setlength{\textheight}{8.5in}
\parskip 0.2cm
\parindent 0.0cm
\newenvironment{syntax}
{\begin{quote}\begin{alltt}\color{blue}}
{\end{alltt}\end{quote}}
\newenvironment{csource}
{\small\begin{quote}\color{blue}\begin{alltt}}
{\end{alltt}\end{quote}\normalsize}
\newenvironment{fsource}
{\small\begin{quote}\color{red}\begin{alltt}}
{\end{alltt}\end{quote}\normalsize}
\newcommand{\api}
{\mbox{\em API Functions:\hspace{0.1in}}\null}
\newcommand{\exo}
{\mbox{\sf Exodus}\null}
\newcommand{\exodiff}
{\mbox{\sf Exodiff}\null}
\newcommand{\epu}
{\mbox{\sf EPU}\null}
\newcommand{\ejoin}
{\mbox{\sf EJoin}\null}
\newcommand{\conjoin}
{\mbox{\sf Conjoin}\null}
\newcommand{\entrylabel}[1]{
{\parbox[b]{\labelwidth-4pt}{\makebox[0pt][l]{\color{red}\tt\textbf{#1}}\vspace{1.0\baselineskip}}}}
\newenvironment{parameters}
{\begin{list}{}
{
\settowidth{\labelwidth}{80pt}
\setlength{\leftmargin}{\labelwidth}
\setlength{\parsep}{-10pt}
\setlength{\itemsep}{24pt} % Between items
\renewcommand{\makelabel}{\entrylabel}
}
}
{\end{list}}

@ -1,89 +0,0 @@
\cmddef{\cmdverb{TMIN}
\param{tmin} \default{minimum database time}
} {
\cmd{TMIN} sets the minimum selected time \param{tmin} to the specified
parameter value. If the user-selected-times mode is in effect, the mode
is changed to the all-available-times mode.
In interval-times mode, if \param{nintv} is selected (by a \cmd{NINTV}
or \cmd{ZINTV} command), \param{delt} is calculated. If \param{delt} is
selected (by a \cmd{DELTIME} command), \param{nintv} is calculated.
}
\cmddef{\cmdverb{TMAX}
\param{tmax} \default{maximum database time}
} {
\cmd{TMAX} sets the maximum selected time \param{tmax} to the specified
parameter value. If the user-selected-times mode is in effect, the mode
is changed to the all-available-times mode.
In interval-times mode, if \param{nintv} is selected (by a \cmd{NINTV}
or \cmd{ZINTV} command), \param{delt} is calculated. If \param{delt} is
selected (by a \cmd{DELTIME} command), \param{nintv} is calculated.
}
\cmddef{\cmdverb{NINTV}
\param{nintv} \default{10 or the number of database time steps $-$ 1,
whichever is smaller}
} {
\cmd{NINTV} sets the number of selected time intervals \param{nintv} to
the specified parameter value and changes the mode to the interval-times
mode with a delta offset. The selected time interval \param{delt} is
calculated.
}
\cmddef{\cmdverb{ZINTV}
\param{nintv} \default{10 or the number of database time steps,
whichever is smaller}
} {
\cmd{ZINTV} sets the number of selected time intervals \param{nintv} to
the specified parameter value and changes the mode to the interval-times
mode with a zero offset. The selected time interval \param{delt} is
calculated.
}
\cmddef{\cmdverb{DELTIME}
\param{delt}
\default{$(tmax-tmin) / (nintv-1)$, where \param{nintv} is 10
or the number of database time steps, whichever is smaller}
} {
\cmd{DELTIME} sets the selected time interval \param{delt} to the
specified parameter value and changes the mode to the interval-times
mode with a zero offset. The number of selected time intervals
\param{nintv} is calculated.
}
\cmddef{\cmdverb{ALLTIMES}
} {
\cmd{ALLTIMES} changes the mode to the all-available-times mode.
}
\newpage
\cmddef{\cmdverb{TIMES}
[\cmd{ADD},]
\param{t$_{1}$}, \param{t$_{2}$}, \ldots\
\default{no times selected}
} {
\cmd{TIMES} changes the mode to the user-selected-times mode and selects
times \param{t$_{1}$}, \param{t$_{2}$}, etc. The closest time step from the
database is selected for each specified time.
Normally, a \cmd{TIMES} command selects only the listed time steps. If
\cmd{ADD} is the first parameter, the listed steps are added to the
current selected times. Any other time step selection command clears all
\cmd{TIMES} selected times.
Up to the maximum number of time steps in the database may be specified.
Times are selected in the order encountered on the database, regardless
of the order the times are specified in the command. Duplicate
references to a time step are ignored.
}
\cmddef{\cmdverb{STEPS}
[\cmd{ADD},]
\param{n$_{1}$}, \param{n$_{2}$}, \ldots\
\default{no steps selected}
} {
The \cmd{STEPS} command is equivalent to the \cmd{TIMES} command except
that it selects time steps by the step number, not by the step time.
}

@ -1,19 +0,0 @@
\bigskip
For example, if the times from the database are 0.0, 0.5, 1.0, 1.5,
etc.\null, the commands
\cenlinesbegin
\cmd{TMIN 0.0} \\
\cmd{TMAX 5.0} \\
\cmd{NINTV 5}
\cenlinesend
select times 1.0, 2.0, 3.0, 4.0, and 5.0. If the \cmd{NINTV} command is
replaced by
\cenlinesbegin
\cmd{ZINTV 3}
\cenlinesend
then times 0.0, 2.5, and 5.0 are selected. If the \cmd{NINTV} command is
replaced by
\cenlinesbegin
\cmd{DELTIME 2.0}
\cenlinesend
then times 0.0, 2.0, 4.0 are selected.

@ -1,38 +0,0 @@
The following are the time step selection parameters:
\negmedskip
\setlength{\itemsep}{0pt} \begin{itemize}
\item \param{tmin} is the minimum selected time,
\item \param{tmax} is the maximum selected time,
\item \param{nintv} is the number of selected time intervals, and
\item \param{delt} is the selected time interval.
\end{itemize}
In the interval-times mode, up to \param{nintv} time steps at interval
\param{delt} between \param{tmin} and \param{tmax} are selected. The
mode may have a delta offset or a zero offset. With a delta offset, the
first selected time is \param{tmin}+\param{delt}; with a zero offset, it
is \param{tmin}.
In the interval-times mode with a delta offset, the number of selected
time intervals \param{nintv} and the selected time interval \param{delt}
are related mathematically by the equations:
\begin{center} \begin{tabular}{cl}
$delt$ = $(tmax-tmin) / nintv$ & (1) \\
$nintv$ = \cmd{int} $((tmin-tmax) / delt)$ & (2) \\
\end{tabular} \end{center}
With a zero offset, \param{nintv} and \param{delt} are related
mathematically by the equations:
\begin{center} \begin{tabular}{cl}
$delt$ = $(tmax-tmin) / (nintv-1)$ & (1) \\
$nintv$ = \cmd{int} $((tmin-tmax) / delt) + 1$ & (2) \\
\end{tabular} \end{center}
The user specifies either \param{nintv} or \param{delt}. If
\param{nintv} is specified, \param{delt} is calculated using equation 1.
If \param{delt} is specified, \param{nintv} is calculated using equation
2.
In the all-available-times mode, all database time steps between
\param{tmin} and \param{tmax} are selected (parameters \param{nintv} and
\param{delt} are ignored). In the user-selected-times mode, the
specified times are selected (all parameters are ignored).

@ -1,30 +0,0 @@
Time step selection is performed in one of the following modes:
\setlength{\itemsep}{\bigskipamount} \begin{itemize}
\item
\ifx\PROGRAM\BLOT
\bold{Interval-Times Mode}
\else
Interval-Times Mode
\fi
selects time steps at uniform intervals between a minimum and a maximum
time. If this mode has a delta offset, the first selected time is not
the minimum time, but the minimum time plus the interval. If this mode
has a zero offset, the first selected time is the minimum time.
\item
\ifx\PROGRAM\BLOT
\bold{All-Available-Times Mode}
\else
All-Available-Times Mode
\fi
selects all time steps between a minimum and a maximum time.
\item
\ifx\PROGRAM\BLOT
\bold{User-Selected-Times Mode}
\else
User-Selected-Times Mode
\fi
selects time steps which are explicitly specified by the user.
\end{itemize}
The nearest time step from the database is chosen for each selected
time.

@ -1,51 +0,0 @@
\cmdsum{\cmd{TMIN}
\param{tmin}
} {
sets the minimum selected time to \param{tmin}.
}
\cmdsum{\cmd{TMAX}
\param{tmax}
} {
sets the maximum selected time to \param{tmax}.
}
\cmdsum{\cmd{NINTV}
\param{nintv}
} {
sets the number of selected time intervals to \param{nintv} (delta
offset).
}
\cmdsum{\cmd{ZINTV}
\param{nintv}
} {
sets the number of selected time intervals to \param{nintv} (zero
offset).
}
\cmdsum{\cmd{DELTIME}
\param{delt}
} {
sets the selected time interval to \param{delt}.
}
\cmdsum{\cmd{ALLTIMES}
} {
selects all time steps between \param{tmin} and \param{tmax}.
}
\ifx\PROGRAM\ALGEBRA \newpage \fi %%%
\cmdsum{\cmd{TIMES}
[\cmd{ADD},]
\param{t$_{1}$}, \param{t$_{2}$}, \ldots\
} {
selects times \param{t$_{1}$}, \param{t$_{2}$}, etc.
}
\cmdsum{\cmd{STEPS}
[\cmd{ADD},]
\param{n$_{1}$}, \param{n$_{2}$}, \ldots\
} {
selects time steps \param{n$_{1}$}, \param{n$_{2}$}, etc.
}

@ -1,64 +0,0 @@
\page exodus_formats Exodus Formats
\section large Large Model (64-bit offset)
This is the current default format for exodus files. In this format,
the size of an *individual* dataset within the file is limited
to 4 GiB (2 GiB for older versions of netcdf library).
Typically, the two largest datasets are an individual component of the
nodal coordinates and the connectivity for an element block.
An individual component of the nodal coordinates stored in double
precision limits the model to about 2^29 (537 Million) nodes.
The other dataset size is the connectivity of a single element
block. For 8-node hexes, the maximum number of elements in an element
block is 2^27 (134 Million) elements; for 27-node hexes, this is
reduced to 39.7 million elements per element block.
Since a complex model typically has many element blocks, the
node count is typically the controlling dataset, but
connectivity datasets can also be the limiting factor.
Note that the model can typically split a large element block
into two or more element blocks to avoid the connectivity
limit, but there is no way to split the node coordinate
dataset, so 2^29 is the hard upper limit on the number of
nodes stored in a Large Model (64-bit offset) format exodus
file.
\section normal Normal, or Classic
The non-transient portion of the model definition is limited to 2 GiB.
This means that the size of the coordinates, connectivtity, nodeset,
sideset, maps, and other datasets must total less than 2 GiB. This
typically limits the model to about 35 million elements.
This is no longer supported for writing by the exodus library, but old
files in this format can still be read.
\section nc4 Netcdf-4 Classic
The netcdf-4 classic format uses HDF5 as the underlying file format
on disk. This format eliminates the dataset size limits. However,
since it only supports the use of 32-bit signed integers, the model
is limited to 2^31 nodes and 2^31 elements.
\section nc4nc Netcdf-4 Non-Classic
This netcdf-4 non-classic format also uses HDF5 as the underlying
file format on disk. There are no dataset size limits and it
supports datasets storing 64-bit integers. With this format, the
maximum model size should be unlimited. Models well in excess of 2
Billion nodes and elements have been defined with this format
verifying that the previous limits do not exist in this format.
Currently when exodus uses this format, the only extension over the
classic model is the use of 64-bit integers in some of the
datasets. In the future, uses of additional netcdf-4 functionality
(groups, compound datatypes) is planned.
\section cdf5 CDF5
A PNetCDF developed format which provides 64-bit integer capability
in a non-HDF5-based file format. Being evaluated at this time.

@ -1,207 +0,0 @@
\page large_model Large model modifications to the Exodus library
\section large_model_ Large model modifications to the Exodus library
\note The changes documented below are now the default method for
storing an Exodus database. There is no reason to write a "non-large"
model database.
The changes are to support the storage of larger models. There are two
pieces of this. The first is the setting of the type of netCDF file
that will be created; either one with 32-bit offsets or one with
64-bit offsets. (Note that this is *not* related to storing 64-bit
integers). This can be specified in a couple ways:
1. Pass the `EX_LARGE_MODEL` flag in the mode argument to ex_create.
2. Set the environment variable `EXODUS_LARGE_MODEL`.
If either of these are set, then the library will pass the
`NC_64BIT_OFFSET` flag to the netCDF library. See the commit log for
netCDF library for more details.
The other change is to reduce the size of some of the datasets in an
Exodus library. Even with the netCDF changes, the maximum dataset
size is still 2 GiB. To reduce the size of the datasets, the nodal
coordinates and the nodal variables have been split to store by
component. The old behavior stored all x, y, and z coordinates in a
single dataset; in the new behavior, each component is stored
separately -- there is a coordx, coordy, and coordz dataset.
The nodal variables used to be stored in a single blob of dimension
`(#times,#nodes,#variables)`. This has now been split into `#variable`
datasets of size `(#times,#nodes)`.
These two changes should increase the maximum model sizes
significantly. Prior to the change, the maximum number of nodes that
could be stored in the coordinate dataset was about 90 Million nodes;
the new storage permits 270 Million nodes in double precision. The old
model was more restrictive if there were multiple nodal variables, but
the new storage should not depend on the number of nodal variables.
These changes were made such that the new library would create
old-style files by default and would read either old or new style
files. The version has been changed to 3.01 for the file version and
4.01 for the API version.
An additional attribute is now written to the file. It is called
"file_size" or `ATT_FILESIZE`. If it is 0 or not present, then the old
format is assumed; if it is 1, then the new format is assumed.
There is also a new internal function called `ex_large_model(int exoid)`
which will return 1 if new version; 0 if old version.
If the function is passed a negative exoid, then it will check the
environment variable `EXODUS_LARGE_MODEL` and return 1 if it is
defined. It also currently prints a warning message saying that the
large model size was selected via the environment variable.
If you are using the Exodus api, then the only change to the client
application is the passing of the `EX_LARGE_MODEL` flag to `ex_create` or
the setting of the `EXODUS_LARGE_MODEL` environment variable. If your
client application is reading the database, no changes are needed.
========================================================================
If your client application bypasses some or all of the Exodus API
and makes direct netCDF calls, you will need to modify the calls. The
changes that were made are shown below along with the name of the
Exodus API function in which the changes were made.
Alternatively, you can look at the changes that were made to the API at
http://github.com/sandialabs/seacas/packages/seacas/libraries/exodus/src.
The files that were changed are:
\note The filenames have been changed since this was written.
* exgnvt.c
* expcor.c
* expini.c
* expnv.c
* expvp.c
* expvpc.c
* ex_utils.c
* excopy.c
* excre.c
* exgcor.c
* exgnv.c
\section ex_create ex_create():
-- Check whether the `EX_LARGE_MODEL` mode was set. If so, then the
mode passed to nccreate must have the `NC_64BIT_OFFSET` bit set. For
example, `mode |= NC_64BIT_OFFSET;`
NOTE: `NC_64BIT_OFFSET` is defined in the Sandia's netCDF version
"3.4-snl10X". It should also be in netCDF-3.6.0 once it is released.
-- Write the exodus file size `ATT_FILESIZE` attribute (1=large, 0=normal):
```
filesiz = (nclong)(((cmode & EX_LARGE_MODEL) != 0) || (ex_large_model(-1) == 1));
if (ncattput (exoid, NC_GLOBAL, ATT_FILESIZE, NC_LONG, 1, &filesiz) == -1)
... handle errors...
```
\section ex_put_init ex_put_init():
-- If writing a "large model" capable database, then the coordinates
are defined as components instead of an array. The variables are
`VAR_COORD_X`, `VAR_COORD_Y` (if 2D or 3D), `VAR_COORD_Z` (if 3D). If not,
define the `VAR_COORD` variable as is currently done.
```
if (ex_large_model(exoid) == 1) {
/* node coordinate arrays -- separate storage... */
dim[0] = numnoddim;
if (ncvardef (exoid, VAR_COORD_X, nc_flt_code(exoid), 1, dim) == -1)
{ ... handle error }
if (num_dim > 1) {
if (ncvardef (exoid, VAR_COORD_Y, nc_flt_code(exoid), 1, dim) == -1)
{ ... handle error }
}
if (num_dim > 2) {
if (ncvardef (exoid, VAR_COORD_Z, nc_flt_code(exoid), 1, dim) == -1)
{ ... handle error }
}
} else {
/* node coordinate arrays: -- all stored together (old method) */
.... define the old way...
}
```
\section ex_put_coord ex_put_coord():
-- If writing a "large model" capable database, then the coordinates
are written a component at a time, otherwise write the old way as a single blob.
```
if (ex_large_model(exoid) == 0) {
... write coordinates old way...
} else {
if ((coordidx = ncvarid (exoid, VAR_COORD_X)) == -1)
{ ... handle error }
if (num_dim > 1) {
if ((coordidy = ncvarid (exoid, VAR_COORD_Y)) == -1)
{ ... handle error }
} else {
coordidy = 0;
}
if (num_dim > 2) {
if ((coordidz = ncvarid (exoid, VAR_COORD_Z)) == -1)
{ ... handle error }
} else {
coordidz = 0;
}
/* write out the coordinates */
for (i=0; i<= num_vars; i++) {
dims[0] = time_dim;
dims[1] = num_nod_dim;
if ((ncvardef (exoid, VAR_NOD_VAR_NEW(i),
nc_flt_code(exoid), 2, dims)) == -1)
{ ... handle error ... }
}
}
```
\section ex_put_nodal_var ex_put_nodal_var():
-- If the large model method, write the nodal variable data to the correct variable;
if the old method, determine the location within the blob
```
if (ex_large_model(exoid) == 0) {
/* write values of the nodal variable */
if ((varid = ncvarid (exoid, VAR_NOD_VAR)) == -1) {
... handle error...
}
start[0] = --time_step;
start[1] = --nodal_var_index;
start[2] = 0;
count[0] = 1;
count[1] = 1;
count[2] = num_nodes;
} else {
/* nodal variables stored separately, find variable for this variable
index */
if ((varid = ncvarid (exoid, VAR_NOD_VAR_NEW(nodal_var_index))) == -1) {
... handle error ...
}
start[0] = --time_step;
start[1] = 0;
count[0] = 1;
count[1] = num_nodes;
}
if (ncvarput (exoid, varid, start, count,
ex_conv_array(exoid,WRITE_CONVERT,nodal_var_vals,num_nodes)) == -1) {
...handle error ...
}
```
There are similar modifications to the reading of the nodal coordinates
and the reading of nodal variables. If interested in those functions, see the viewcvs URL
listed above.
If there are any questions, contact:
Greg Sjaardema
gdsjaar@sandia.gov
505-844-2701

@ -1,462 +0,0 @@
/* clang-format off */
/*! \mainpage Exodus API Documentation
\section intro Introduction
EXODUS is the successor of the widely used finite element (FE) data file format EXODUS
(henceforth referred to as EXODUS I) developed by Mills-Curran and Flanagan. It
continues the concept of a common database for multiple application codes (mesh generators,
analysis codes, visualization software, etc.) rather than code-specific utilities, affording
flexibility and robustness for both the application code developer and application code user.
By using the EXODUS data model, a user inherits the flexibility of using a large array of
application codes (including vendor-supplied codes) which access this common data file
directly or via translators.
The uses of the EXODUS data model include the following:
- Problem definition -- mesh generation, specification of locations of boundary conditions and
load application, specification of material types.
- Simulation -- model input and results output.
- Visualization -- model verification, results postprocessing, data interrogation, and analysis
tracking.
\section avail Availability
The Exodus library source code is available on Github at
https://github.com/sandialabs/seacas
For bug reports, documentation errors, and enhancement suggestions, contact:
- Gregory D. Sjaardema
- WEB: https://github.com/sandialabs/seacas/issues
- EMAIL: gdsjaar@sandia.gov
- EMAIL: gsjaardema@gmail.com
- PHONE: (505) 844-2701 (office)
\section license License
The EXODUS library is licensed under the BSD open source license.
Copyright(C) 1999-2022 National Technology & Engineering Solutions
of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
NTESS, the U.S. Government retains certain rights in this software.
See packages/seacas/LICENSE for details
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 following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of NTESS 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 THE COPYRIGHT
OWNER 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.
\section devel Development of EXODUS
The evolution of the EXODUS data model has been steered by FE application code developers
who desire the advantages of a common data format. The EXODUS model has been
designed to overcome deficiencies in the EXODUS I file format and meet the following
functional requirements as specified by these developers:
- Random read/write access.
- Application programming interface (API) -- provide routines callable from FORTRAN, C, and C++
application codes.
- Extensible -- allow new data objects to be added without modifying the application programs
that use the file format.
- Machine independent -- data should be independent of the machine which generated it.
- Real-time access during analysis -- allow access to the data in a file while the file is
being created.
To address these requirements, the open source database library
NetCDF (http://www.unidata.ucar.edu/software/netcdf/) was selected to handle the low-level data
storage. The EXODUS
II library functions provide the mapping between FE data objects and
NetCDF dimensions, attributes, and variables. Thus, the code developer
interacts with the data model using the vocabulary of an FE analyst
(element connectivity, nodal coordinates, etc.) and is relieved of the
details of the data access mechanism.
Because an EXODUS file is a NetCDF file, an application program can
access data via the EXODUS API or the NetCDF API directly. Although
accessing the data directly via the NetCDF API requires more in-depth
understanding of NetCDF, this capability is a powerful feature that
allows the development of auxiliary libraries of special purpose
functions not offered in the standard EXODUS library. For example,
if an application required access to the coordinates of a single node
(the standard library function returns the coordinates for all of the
nodes in the model), a simple function could be written that calls
NetCDF routines directly to read the data of interest.
\section descrip Description of Data Objects
The data in EXODUS files can be divided into three primary
categories: initialization data, model, and results.
Initialization data includes sizing parameters (number of nodes,
number of elements, etc.), optional quality assurance information
(names of codes that have operated on the data), and optional
informational text.
The model is described by data which are static (do not change through
time). These data include nodal coordinates, element connectivity
(node lists for each element), element attributes, and node sets and
side sets (used to aid in applying loading conditions and boundary
constraints).
The results are optional and include five types of variables -- nodal,
element, nodeset, sideset, and global -- each of which is stored
through time. Nodal results are output (at each time step) for all the
nodes in the model. An example of a nodal variable is displacement in
the X direction. Element, nodeset, and sideset results are output (at
each time step) for all entities (elements, nodes, sides) in one or
more entity block. For example, stress may be an element
variable. Another use of element variables is to record element status
(a binary flag indicating whether each element is "alive" or "dead")
through time. Global results are output (at each time step) for a
single element or node, or for a single property. Linear momentum of a
structure and the acceleration at a particular point are both examples
of global variables. Although these examples correspond to typical FE
applications, the data format is flexible enough to accommodate a
spectrum of uses.
A few conventions and limitations must be cited:
- There are no restrictions on the frequency of results output except
that the time value associated with each successive time step must
increase monotonically.
- To output results at different frequencies (i.e., variable A at
every simulation time step, variable B at every other time step)
multiple EXODUS files must be used.
- There are no limits to the number of each type of results, but once
declared, the number cannot change.
- If the mesh geometry or topology changes in time (i.e., number of
nodes increases, connectivity changes), then the new geometry must be
output to a new EXODUS file.
\section int64 Integer Bulkdata Storage Details (32-bit and 64-bit integers)
The EXODUS database can store integer bulk data, entity map data, and
mesh entity (block/set) ids in either 32-bit or 64-bit integer format. The data
considered "bulk data" are:
- element, face, and edge connectivity lists,
- element, face, edge, and node set entity lists,
The entity map data is any data stored in one of the 'map' objects on
the exodus file. This includes:
- id maps
- number maps
- order maps
- processor node maps
- processor element maps.
A mesh entity id is the id of any block (element block, edge block,
...); set (node set, face set, ...), coordinate frame, and
communication map.
When an EXODUS file is created via the ex_create() function, the
'mode' argument provides the mechanism for specifying how integer data
will be passed as arguments to the API functions and also how the
integer data will be stored on the database. The ex_open() function
also provides a mechanism for specifying how integer data will be
passed as arguments.
The method uses the 'mode' argument to the ex_open() and
ex_create() functions. The mode is a 32-bit integer in which certain
bits are turned on by or'ing certain predefined constants.
exoid = ex_create( "test.exo",
EX_CLOBBER|EX_MAPS_INT64_DB|EX_MAPS_INT64_API,
&appWordSize, &diskWordSize );
The constants related to the integer size (32-bit or 64-bit)
specification are:
| Constant Name | Which data are 64-bit
---------------------|----------------------
| #EX_MAPS_INT64_DB | entity map data
| #EX_IDS_INT64_DB | mesh entity ids
| #EX_BULK_INT64_DB | bulk data
| #EX_ALL_INT64_DB | (the above 3 or'd together)
| #EX_MAPS_INT64_API | entity map data
| #EX_IDS_INT64_API | mesh entity ids
| #EX_BULK_INT64_API | bulk data
| #EX_INQ_INT64_API | integers passed to/from ex_inquire()
| #EX_ALL_INT64_API | (the above 4 or'd together)
The constants that end with `_DB` specify that that particular integer
data is stored on the database as 64-bit integers; the constants that
end with `_API` specify that that particular integer data is passed
to/from API functions as 64-bit integers.
If the range of the data being transmitted is larger than the
permitted integer range (for example, if the data is stored on the
database as 64-bit ints and the application specifies passing data as
32-bit ints), the API function will return an error.
The three types of integer data whose storage can be specified are
- maps (`EX_MAPS_INT64_`),
- "bulk data" including connectivity lists and entity lists (`EX_BULK_INT64_`), and
- entity ids which are the ids of element, face, edge, and node sets
and blocks; and map ids (`EX_IDS_INT64_`)
The function ex_int64_status()(exoid) is used to determine the integer
storage types being used for the EXODUS database `exoid`. It returns
an integer which can be and'ed with the above flags to determine
either the storage type or function parameter type.
For example, if
`(#EX_MAPS_INT64_DB & ex_int64_status()(exoid))` is true, then map data is
being stored as 64-bit integers for that database.
It is not possible to determine the integer data size on a database
without opening the database via an ex_open() call. However, the
integer size specification for API functions can be changed at any
time via the ex_set_int64_status()(exoid, mode) function. The mode is
one or more of `#EX_MAPS_INT64_API`, `#EX_IDS_INT64_API`, or
`#EX_BULK_INT64_API`, or'd together. Any exodus function calls after
that point will use the specified integer size. Note that a call to
ex_set_int64_status()(exoid, mode) overrides any previous setting for
the integer sizes used in the API. The ex_create() function is the
only way to specify the integer sizes specification for database
integers.
\subsection int64_fortran_api Fortran API
The fortran API is uses the same mechanism as was described above for
the C API. If using the "8-byte real and 8-byte int" fortran mode
typically used by the SEACAS applications (the compiler automatically
promotes all integers and reals to 8-byte quantities), then the
fortran exodus library will automatically enable the `EX_*_INT64_API`
options; the client still needs to specify the `EX_*_INT64_DB` options.
\subsection int64_fortran_imp Fortran Implementation
The new capability to pass 64-bit integer data through the fortran and
C API functions simplifies the implementation of the "8-byte real
8-byte int" usage of the exodus library. Previously, the wrapper
routines in addrwrap.F were required to convert the 8-byte integer
data on the client side to/from 4-byte integers on the library
side. This required extra memory allocation and complications that are
now handled at the lowest level in the NetCDF library. The
functions in the fortran API have all been converted to
pass 64-bit integers down to the C API which has removed some code and
simplified those functions.
\section db_options Database Options (Compression, Name Length, File Type)
The ex_set_option() function call is used to set various options on the
database. Valid values for 'option' are:
| Option Name | Option Values |
-------------------------|---------------|
| #EX_OPT_MAX_NAME_LENGTH | Maximum length of names that will be returned/passed via API call. |
| #EX_OPT_COMPRESSION_TYPE | Not currently used; default is gzip |
| #EX_OPT_COMPRESSION_LEVEL | In the range [0..9]. A value of 0 indicates no compression |
| #EX_OPT_COMPRESSION_SHUFFLE | 1 if enabled, 0 if disabled |
| #EX_OPT_INTEGER_SIZE_API | 4 or 8 indicating byte size of integers used in API functions. |
| #EX_OPT_INTEGER_SIZE_DB | Query only, returns 4 or 8 indicating byte size of integers stored on the database. |
The compression-related options are only available on NetCDF-4 files
since the underlying hdf5 compression functionality is used for the
implementation. The compression level indicates how much effort should
be expended in the compression and the computational expense increases
with higher levels; in many cases, a compression level of 1 is
sufficient.
\section names Variable, Attribute, and Entity Block/Set Names
The length of the Variables, Attributes, and Entity Block/Set names is
variable. The default length is 32 characters to provide backward
compatibility. This is the default on both read and write, so if
there is a database with longer names and the reader does not change
the length of names to be returned, any API call that returns a name
will truncate the name at 32 characters.
To avoid this, the reading application can all
~~~{.c}
// Determine maximum length of names stored on database
int max_name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_USED_NAME_LENGTH);
// Tell the library to return names this length
ex_set_max_name_length(exodusFilePtr, max_name_length);
~~~
On write, you can call:
~~~{.c}
ex_set_option(exoid, EX_OPT_MAX_NAME_LENGTH, {max_name_length});
// or equivalently
ex_set_max_name_length(exoid, {max_name_length});
~~~
which tells the database that you will be using names of that length or shorter.
Following this call, you can define (i.e., read/write) names of any
size; if the names are longer than `{max_name_length}`, then they will be truncated otherwise they will pass through unchanged.
There are three queries that can be made to ex_inquire() or
ex_inquire_int():
- #EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH -- returns the value of the
maximum size that can be specified for `max_name_length`
(netcdf/hdf5 limitation)
- #EX_INQ_DB_MAX_USED_NAME_LENGTH -- returns the size of the longest
name on the database.
- #EX_INQ_MAX_READ_NAME_LENGTH -- returns the maximum name length
size that will be passed back to the client. 32 by default,
set by the previously mentioned ex_set_option() or
ex_set_max_name_length() call.
\note
- The length of the QA records (ex_get_qa(), ex_put_qa()) is not affected by this setting and each entry in the QA record is still limited to 32 characters.
- The length of the `entity_descrip` type passed and returnen in the
ex_get_block() and ex_put_block() calls is still limited to 32 characters.
- The length of the title is limited to 80 characters
(ex_get_init(), ex_get_init_ext(), ex_put_init(), ex_put_init_ext()).
- The length of the info records is limited to 80 characters
(ex_put_info(), ex_get_info()).
\defgroup ResultsData Results Data
@{
This section describes data file utility functions for creating
opening a file, initializing a file with global parameters, reading
writing information text, inquiring on parameters stored in the data
file, and error reporting.
The results are optional and include an optional variable type for
each block and set type (node, edge, face, and element) in addition
there are global variables and sideset variables -- each of which is
stored through time. Nodal results are output (at each time step) for
all the nodes in the model. An example of a nodal variable is
displacement in the X direction. Global results are output (at each
time step) for a single element or node, or for a single
property. Linear momentum of a structure and the acceleration at a
particular point are both examples of global variables. The other
results are output (at each time step) for all entities (elements,
faces, edges, nodes, or sides) in one or more entity blocks. For
example, stress may be an element variable. Another use of element
variables is to record element status (a binary flag indicating
whether each element is "alive" or "dead") through time. Although
these examples correspond to typical FE applications, the data format
is flexible enough to accommodate a spectrum of uses.
A few conventions and limitations must be cited:
+ There are no restrictions on the frequency of results output except
that the time value associated with each successive time step should
increase monotonically.
+ All variables are output at the same time frequency. To output
results at different frequencies (i.e., variable A at every simulation
time step, variable B at every other time step) multiple files must be
used.
+ There are no limits to the number of each type of results, but once
declared, the number cannot change.
+ If the mesh geometry changes in time (i.e., number of nodes
increases, connectivity changes), the new geometry must be output to a
new file.
@}
\defgroup Utilities Data File Utilities
@{
This section describes data file utility functions for creating
opening a file, initializing a file with global parameters, reading
writing information text, inquiring on parameters stored in the data
file, and error reporting.
@}
\defgroup ModelDescription Model Description
@{
The routines in this section read and write information which
describe an exodus finite element model. This includes nodal
coordinates, element order map, element connectivity arrays,
element attributes, node sets, side sets, and object properties.
@}
@example ../test/CreateEdgeFace.c
@example ../test/ReadEdgeFace.c
@example ../test/create_mesh.c
@example ../test/rd_wt_mesh.c
@example ../test/test-empty.c
@example ../test/test_nemesis.c
@example ../test/test_ts_errval.c
@example ../test/test_ts_files.c
@example ../test/test_ts_nvar.c
@example ../test/test_ts_nvar_rd.c
@example ../test/test_ts_partial_nvar.c
@example ../test/test_ts_partial_nvar_rd.c
@example ../test/testcp.c
@example ../test/testcp_nl.c
@example ../test/testcp_tran.c
@example ../test/testcpd.c
@example ../test/testrd-long-name.c
@example ../test/testrd-nfaced.c
@example ../test/testrd-nsided.c
@example ../test/testrd.c
@example ../test/testrd1.c
@example ../test/testrd_nc.c
@example ../test/testrd_par.c
@example ../test/testrd_ss.c
@example ../test/testrdd.c
@example ../test/testrdwt.c
@example ../test/testwt-compress.c
@example ../test/testwt-groups.c
@example ../test/testwt-long-name.c
@example ../test/testwt-nface-nside.c
@example ../test/testwt-nfaced.c
@example ../test/testwt-nsided.c
@example ../test/testwt-one-attrib.c
@example ../test/testwt-oned.c
@example ../test/testwt-partial.c
@example ../test/testwt-results.c
@example ../test/testwt-zeroe.c
@example ../test/testwt-zeron.c
@example ../test/testwt.c
@example ../test/testwt1.c
@example ../test/testwt2.c
@example ../test/testwt_clb.c
@example ../test/testwt_nc.c
@example ../test/testwt_nossnsdf.c
@example ../test/testwt_ss.c
@example ../test/testwtd.c
@example ../test/testwtm.c
@example ../test/twod.c
@example ../exodus_for/test/test_nem.f
@example ../exodus_for/test/testcp.f
@example ../exodus_for/test/testcpd.f
@example ../exodus_for/test/testcpnl.f
@example ../exodus_for/test/testrd.f
@example ../exodus_for/test/testrd1.f
@example ../exodus_for/test/testrd_nsid.f
@example ../exodus_for/test/testrdd.f
@example ../exodus_for/test/testwt.f
@example ../exodus_for/test/testwt1.f
@example ../exodus_for/test/testwt2.f
@example ../exodus_for/test/testwt3.f
@example ../exodus_for/test/testwt_nsid.f
@example ../exodus_for/test/testwtd.f
@example ../exodus_for/test/testwtm.f
*/
/* clang-format on */

@ -1,278 +0,0 @@
\page element_types Exodus Element Types
\tableofcontents
\section types Element Types
The following table shows the element types supported in the Exodus
library, the IOSS library, nem_slice, and nem_spread.
Element |Nodes|Exodus| IOSS | nem_slice | nem_spread |
--------|:---:|:----:|:-----:|:---------:|:----------:|
|circle | 1 | X | X | X | X |
|sphere | 1 | X | X | X | X |
| | | | | | |
|beam | 2 | X | X | X | X |
| | 3 | X | X | X | X |
| | 4 | X | X | | |
| | | | | | |
quad | 4 | X | X | X | X |
| | 5 | X | | | |
| | 8 | X | X | | |
| | 9 | X | X | X | X |
| | 12 | X | X | | |
| | 16 | X | X | | |
| | | | | | |
tri (2D)| 3 | X | X | X | X |
| | 4 | X | X | X | X |
| | 6 | X | X | X | X |
| | 7 | X | X | X | X |
| | 9 | X | X | | |
| | 13 | X | X | | |
| | | | | | |
tri (3D)| 3 | X | X | X | X |
| | 4 | X | X | X | X |
| | 6 | X | X | X | X |
| | 7 | X | X | X | X |
| | 9 | X | X | | |
| | 13 | X | X | | |
| | | | | | |
shell | 2 | X | X | X | X |
| | 3 | tri3 | X | X | X |
| | 4 | X | X | X | X |
| | 8 | X | X | X | X |
| | 9 | X | X | X | X |
| | | | | | |
tet | 4 | X | X | X | X |
| | 5 | X | | | |
| | 7 | | X | | |
| | 8 | X | X | X | X |
| | 10 | X | X | X | X |
| | 11 | X | X | | |
| | 14 | X | X | X | X |
| | 15 | X | X | X | X |
| | 16 | X | X | | |
| | 40 | X | X | | |
| | | | | | |
pyramid | 5 | X | X | X | X |
| | 13 | X | X | X | X |
| | 14 | X | X | X | X |
| | 18 | X | X | X | X |
| | 19 | X | X | X | X |
| | | | | | |
wedge | 6 | X | X | X | X |
| | 12 | X | X | X | X |
| | 15 | X | X | X | X |
| | 16 | X | X | X | X |
| | 18 | X | X | | |
| | 20 | X | X | X | X |
| | 21 | X | X | X | X |
| | 24 | X | X | | |
| | 52 | X | X | | |
| | | | | | |
hex | 8 | X | X | X | X |
| | 9 | X | X | | |
| | 16 | X | X | X | X |
| | 20 | X | X | X | X |
| | 27 | X | X | X | X |
| | 32 | X | X | | |
| | 64 | X | X | | |
Only the base topology name is required for the element type. For example, all
elements of a `hex` toplogy can be referred to by the name `hex` no
matter how many nodes there are. However, it is also correct to
append the node count to the topology type for the element name. For
example, a 20-node hex could be named `hex20`.
The IOSS library, nem_slice, and nem_spread cannot correctly handle a
mesh unless it contains elements of a known type.
However, the exodus library can store elements of an unknown type with
a few limitations. For an unsupported element type, the exodus library
will not:
* return the side set node list.
* return the side set node list node count.
* convert side set nodes to sides or vice versa.
If none of the above functions are required, then an element unknown
to the exodus library can can be written to and read from an exodus
file with no loss of information.
\section ordering Exodus Node Ordering Convention
Node ordering follows the conventions illustrated in the figures
below. The node ordering conventions follow the element topology used
in PATRAN. Thus, for higher-order elements than those illustrated, use
the ordering prescribed in the PATRAN Element Library Manual Manual
<https://web.mscsoftware.com/training_videos/patran/reverb3/index.html#page/Finite%2520Element%2520Modeling/elem_lib_topics.16.1.html#ww33606>.
-------------------------
\section circle Circle and Sphere
For elements of type circle or sphere, the topology is one node at the center of the circle or sphere element.
A circle or sphere element has no sides.
![Circle](../topology/circle.png)
![Sphere](../topology/sphere.png)
-------------------------
\section bar Bar, Truss, Beam
The element name for this element type can be "bar", "beam", "truss".
For the "beam", the boundaries are the "top" and "bottom" edges; for
the "bar" or "truss", the boundaries are the end nodes.
![Bar2](../topology/bar2.png)
![Bar3](../topology/bar3.png)
![Bar4](../topology/bar4.png)
-------------------------
\section tri Triangular
These are usable in 2D or 3D meshes. In a 3D mesh, they would represent triangular shells. The element name is "triangle" or "tri" in either case.
![Tri3](../topology/tri3.png)
![Tri4](../topology/tri4.png)
![Tri6](../topology/tri6.png)
![Tri7](../topology/tri7.png)
![Tri9](../topology/tri9.png)
![Tri13](../topology/tri13.png)
The side numbering for a tri element is shown below. For a triangular shell, there are five sides. Side 1 is the "top" of the triangle given by nodes 1-2-3 and side 2 is the "bottom" of the triangle given by nodes 3-2-1. Sides 3,4,5 correspond to sides 1,2,3 of the 2D triangle.
Element Type |Side \#|Node Order |
-------------|:-----:|:----------:|
TRI (2D) | 1 | 1, 2 |
| | 2 | 2, 3 |
| | 3 | 3, 1 |
Element Type |Side \#|Node Order |
--------------|:-----:|:----------:|
TRI (3D) | 1 | 1, 2, 3 |
| | 2 | 1, 3, 2 |
(Edges) | 3 | 1, 2 |
| | 4 | 2, 3 |
| | 5 | 3, 1 |
![Tri-Number](../topology/triangle-face-numbering.png)
-------------------------
\section quad Quadrilateral
These are usable in 2D or 3D meshes. In a 3D mesh, they represent a quadrilateral shell element and the element name is "shell"; in a 2D mesh, the element name is "quad".
![Quad4](../topology/quad4.png)
![Quad5](../topology/quad5.png)
![Quad8](../topology/quad8.png)
![Quad9](../topology/quad9.png)
![Quad12](../topology/quad12.png)
![Quad16](../topology/quad16.png)
The side numbering for a 2D quadrilateral element and a 3D quadrilateral shell element are shown below.
Element Type |Side \#|Node Order |
-------------|:-----:|:----------:|
QUAD (2D) | 1 | 1, 2 |
| | 2 | 2, 3 |
| | 3 | 3, 4 |
| | 4 | 4, 1 |
![Quad-Number](../topology/quad-face-numbering.png)
Element Type |Side \#|Node Order |
--------------|:-----:|:----------:|
SHELL (3D) | 1 | 1, 2, 3, 4 |
| | 2 | 1, 4, 3, 2 |
(Edges) | 3 | 1, 2 |
| | 4 | 2, 3 |
| | 5 | 3, 4 |
| | 6 | 4, 1 |
![Shell-Number](../topology/shell-face-numbering.png)
-------------------------
\section tet Tetrahedral
![Tet4](../topology/tet04.png)
![Tet5](../topology/tet05.png)
![Tet10](../topology/tet10.png)
![Tet11](../topology/tet11.png)
![Tet14](../topology/tet14.png)
![Tet15](../topology/tet15.png)
![Tet16](../topology/tet16.png)
![Tet40](../topology/tet40.png)
The side numbering for a tetrahedral element type is shown below.
Element Type |Side \#|Node Order |
--------------|:-----:|:----------:|
TETRA | 1 | 1, 2, 4 |
| | 2 | 2, 3, 4 |
| | 3 | 1, 4, 3 |
| | 4 | 1, 3, 2 |
![Tet-Number](../topology/tet-face-numbering.png)
-------------------------
\section pyr Pyramidal
![Pyramid](../topology/pyramid.png)
The `pyramid18` adds mid-face nodes to the triangular faces and the `pyramid19` adds a mid-volume node.
The side numbering for a pyramidal element type is shown below.
Element Type |Side \#|Node Order |
--------------|:-----:|:----------:|
PYRAMID| 1 | 1, 2, 5 |
| | 2 | 2, 3, 5 |
| | 3 | 3, 4, 5 |
| | 4 | 4, 1, 5 |
| | 5 | 1, 4, 3, 2 |
![Pyramid-Number](../topology/pyramid-face-numbering.png)
-------------------------
\section wedge Wedge
![Wedge6](../topology/wedge06.png)
![Wedge12](../topology/wedge12.png)
![Wedge15](../topology/wedge15.png)
![Wedge16](../topology/wedge16.png)
![Wedge20](../topology/wedge20.png)
![Wedge21](../topology/wedge21.png)
![Wedge24](../topology/wedge24.png)
![Wedge52](../topology/wedge52.png)
The side numbering for a wedge element type is shown below. Note that
the face mapping for this element does not match the MSC/Patran face
mapping. In exodus, sides 1,2,3 are quadrilateral and sides 4,5 are
triangular; in MSC/Patran, sides 1,2 are triangular and sides 4,5,6
are quadrilateral. It is unclear when and why this digression
occurred.
Element Type |Side \#|Node Order | Patran Side |
--------------|:-----:|:----------:|:-----------:|
WEDGE | 1 | 1, 2, 5, 4 | 3 |
| | 2 | 2, 3, 6, 5 | 5 |
| | 3 | 1, 4, 6, 3 | 4 |
| | 4 | 1, 3, 2 | 1 |
| | 5 | 4, 5, 6 | 2 |
![Wedge-Number](../topology/wedge-face-numbering.png)
-------------------------
\section hex Hexahedral
![Hex8](../topology/hex08.png)
![Hex9](../topology/hex09.png)
![Hex16](../topology/hex16.png)
![Hex20](../topology/hex20.png)
![Hex27](../topology/hex27.png)
![Hex32](../topology/hex32.png)
![Hex64](../topology/hex64.png)
The side numbering for a hexahedral element type is shown below.
Element Type |Side \#|Node Order |
--------------|:-----:|:----------:|
HEX | 1 | 1, 2, 6, 5 |
| | 2 | 2, 3, 7, 6 |
| | 3 | 3, 4, 8, 7 |
| | 4 | 1, 5, 8, 4 |
| | 5 | 1, 4, 3, 2 |
| | 6 | 5, 6, 7, 8 |
![Hex-Number](../topology/hex-face-numbering.png)

File diff suppressed because it is too large Load Diff

@ -1,20 +0,0 @@
# Copyright(C) 1999-2022 National Technology & Engineering Solutions
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
# NTESS, the U.S. Government retains certain rights in this software.
#
# See packages/seacas/LICENSE for details
#pragma once
#cmakedefine EXODUSII_BUILD_SHARED_LIBS
#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || \
defined(__MINGW32__) || defined(_WIN64) || defined(__MINGW64__)
#if defined(EXODUSII_BUILD_SHARED_LIBS)
# if defined(exoIIc_EXPORTS)
# define EXODUS_EXPORT __declspec( dllexport ) extern
# else
# define EXODUS_EXPORT __declspec( dllimport ) extern
# endif
#endif
#else
# define EXODUS_EXPORT extern
#endif

@ -1,892 +0,0 @@
/*
* Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
* See packages/seacas/LICENSE for details
*/
/*****************************************************************************
*
* exodusII_int.h - ExodusII header file for internal Exodus call use only
*
*/
#pragma once
#include <stdbool.h>
#include "exodus_config.h"
#if defined(EXODUS_THREADSAFE)
#include <pthread.h>
#endif
#include "netcdf.h"
#if defined(NC_HAVE_META_H)
#include "netcdf_meta.h"
#endif
#if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1900
#define PRId64 "I64d"
#else
#include <inttypes.h>
#endif
#include <assert.h>
#include <ctype.h>
#include <string.h>
#ifndef __APPLE__
#if defined __STDC__ || defined __cplusplus
#include <stdlib.h>
#endif
#endif
#ifdef _MSC_VER
#pragma warning(disable : 4127)
#pragma warning(disable : 4706)
#pragma warning(disable : 4701)
#endif
#if defined(__BORLANDC__)
#pragma warn - 8004 /* "assigned a value that is never used" */
#endif
#include <stdio.h>
#if defined(_MSC_VER) && _MSC_VER < 1900
#define __func__ __FUNCTION__
#define snprintf _snprintf
#endif
#define snprintf_nowarn(...) (snprintf(__VA_ARGS__) < 0 ? abort() : (void)0)
#ifdef __cplusplus
extern "C" {
#endif
/**
* \defgroup Internal Internal Functions and Defines
* \internal
*
* Variables and functions used internally in the library
*@{
*/
#define MAX_VAR_NAME_LENGTH 32 /**< Internal use only */
/* Default "filesize" for newly created files.
* Set to 0 for normal filesize setting.
* Set to 1 for EXODUS_LARGE_MODEL setting to be the default
*/
#define EXODUS_DEFAULT_SIZE 1
/* Used to map between root (file id) and group ids when using groups */
#define EX_FILE_ID_MASK (0xffff0000) /**< Must match FILE_ID_MASK in NetCDF nc4internal.h */
#define EX_GRP_ID_MASK (0x0000ffff) /**< Must match GRP_ID_MASK in NetCDF nc4internal.h */
void ex__reset_error_status(void);
#if defined(EXODUS_THREADSAFE)
#if !defined(exerrval)
/* In both exodusII.h and exodusII_int.h */
typedef struct EX_errval
{
int errval;
char last_pname[MAX_ERR_LENGTH];
char last_errmsg[MAX_ERR_LENGTH];
int last_err_num;
} EX_errval_t;
EXODUS_EXPORT EX_errval_t *ex_errval;
#define exerrval ex_errval->errval
#endif
extern pthread_once_t EX_first_init_g;
typedef struct EX_mutex_struct
{
pthread_mutex_t atomic_lock; /**< lock for atomicity of new mechanism */
pthread_mutexattr_t attribute;
} EX_mutex_t;
extern EX_mutex_t EX_g;
extern int ex__mutex_lock(EX_mutex_t *mutex);
extern int ex__mutex_unlock(EX_mutex_t *mutex, const char *func, int line);
extern void ex__pthread_first_thread_init(void);
extern EX_errval_t *exerrval_get();
#define EX_FUNC_ENTER() \
do { \
/* Initialize the thread-safe code */ \
pthread_once(&EX_first_init_g, ex__pthread_first_thread_init); \
\
/* Grab the mutex for the library */ \
ex__mutex_lock(&EX_g); \
ex_errval = exerrval_get(); \
exerrval = 0; \
ex_errval->last_err_num = 0; \
} while (0)
#define EX_FUNC_ENTER_INT() \
do { \
/* Initialize the thread-safe code */ \
pthread_once(&EX_first_init_g, ex__pthread_first_thread_init); \
\
/* Grab the mutex for the library */ \
ex__mutex_lock(&EX_g); \
ex_errval = exerrval_get(); \
} while (0)
#define EX_FUNC_LEAVE(error) \
do { \
ex__mutex_unlock(&EX_g, __func__, __LINE__); \
return error; \
} while (0)
#define EX_FUNC_VOID() \
do { \
ex__mutex_unlock(&EX_g, __func__, __LINE__); \
return; \
} while (0)
#define EX_FUNC_UNLOCK() \
do { \
ex__mutex_unlock(&EX_g, __func__, __LINE__); \
} while (0)
#else
/* Enable this to output tracing information from the API functions */
#if 0
EXODUS_EXPORT int indent;
#define EX_FUNC_ENTER() \
do { \
ex__reset_error_status(); \
fprintf(stderr, "%d Enter: %s\n", indent, __func__); \
indent++; \
} while (0)
#define EX_FUNC_ENTER_INT() \
do { \
fprintf(stderr, "%d Enter: %s\n", indent, __func__); \
indent++; \
} while (0)
#define EX_FUNC_LEAVE(error) \
do { \
indent--; \
fprintf(stderr, "%d Leave: %s\n", indent, __func__); \
return error; \
} while (0)
#define EX_FUNC_VOID() \
do { \
indent--; \
fprintf(stderr, "%d Leave: %s\n", indent, __func__); \
return; \
} while (0)
#define EX_FUNC_UNLOCK() \
do { \
indent--; \
fprintf(stderr, "%d Unlock: %s\n", indent, __func__); \
} while (0)
#else
#define EX_FUNC_ENTER() \
do { \
ex__reset_error_status(); \
} while (0)
#define EX_FUNC_ENTER_INT()
#define EX_FUNC_LEAVE(error) return error
#define EX_FUNC_VOID() return
#define EX_FUNC_UNLOCK()
#endif
#endif
#define EX_UNUSED(A) \
do { \
(void)(A); \
} while (0)
/*
* This file contains defined constants that are used internally in the
* EXODUS API.
*
* The first group of constants refer to NetCDF variables, attributes, or
* dimensions in which the EXODUS data are stored. Using the defined
* constants will allow the names of the NetCDF entities to be changed easily
* in the future if needed. The first three letters of the constant identify
* the NetCDF entity as a variable (VAR), dimension (DIM), or attribute (ATT).
*
* NOTE: The entity name should not have any blanks in it. Blanks are
* technically legal but some NetCDF utilities (ncgen in particular)
* fail when they encounter a blank in a name.
*
*/
#define ATT_TITLE "title" /**< the database title */
#define ATT_API_VERSION "api_version" /**< the EXODUS api vers number */
/*! the EXODUS api vers # used for db version 2.01 and earlier */
#define ATT_API_VERSION_BLANK "api version"
#define ATT_VERSION "version" /**< the EXODUS file vers number */
#define ATT_FILESIZE "file_size" /**< 1=large, 0=normal */
/*! word size of floating point numbers in file */
#define ATT_FLT_WORDSIZE "floating_point_word_size"
/*! word size of floating point numbers in file used for db version
2.01 and earlier */
#define ATT_FLT_WORDSIZE_BLANK "floating point word size"
#define ATT_MAX_NAME_LENGTH "maximum_name_length"
#define ATT_INT64_STATUS "int64_status"
#define ATT_NEM_API_VERSION "nemesis_api_version"
#define ATT_NEM_FILE_VERSION "nemesis_file_version"
#define ATT_PROCESSOR_INFO "processor_info"
#define ATT_LAST_WRITTEN_TIME "last_written_time"
#define DIM_NUM_ASSEMBLY "num_assembly" /**< number of assemblies */
#define DIM_NUM_BLOB "num_blob" /**< number of blobs */
#define DIM_NUM_NODES "num_nodes" /**< number of nodes */
#define DIM_NUM_DIM "num_dim" /**< number of dimensions; 2- or 3-d*/
#define DIM_NUM_EDGE "num_edge" /**< number of edges (over all blks)*/
#define DIM_NUM_FACE "num_face" /**< number of faces (over all blks)*/
#define DIM_NUM_ELEM "num_elem" /**< number of elements */
#define DIM_NUM_EL_BLK "num_el_blk" /**< number of element blocks */
#define DIM_NUM_ED_BLK "num_ed_blk" /**< number of edge blocks */
#define DIM_NUM_FA_BLK "num_fa_blk" /**< number of face blocks */
#define VAR_COORD "coord" /**< nodal coordinates */
#define VAR_COORD_X "coordx" /**< X-dimension coordinate */
#define VAR_COORD_Y "coordy" /**< Y-dimension coordinate */
#define VAR_COORD_Z "coordz" /**< Z-dimension coordinate */
#define VAR_NAME_COOR "coor_names" /**< names of coordinates */
#define VAR_NAME_EL_BLK "eb_names" /**< names of element blocks */
#define VAR_NAME_NS "ns_names" /**< names of node sets */
#define VAR_NAME_SS "ss_names" /**< names of side sets */
#define VAR_NAME_EM "emap_names" /**< names of element maps */
#define VAR_NAME_EDM "edmap_names" /**< names of edge maps */
#define VAR_NAME_FAM "famap_names" /**< names of face maps */
#define VAR_NAME_NM "nmap_names" /**< names of node maps */
#define VAR_NAME_ED_BLK "ed_names" /**< names of edge blocks */
#define VAR_NAME_FA_BLK "fa_names" /**< names of face blocks */
#define VAR_NAME_ES "es_names" /**< names of edge sets */
#define VAR_NAME_FS "fs_names" /**< names of face sets */
#define VAR_NAME_ELS "els_names" /**< names of element sets */
#define VAR_STAT_EL_BLK "eb_status" /**< element block status */
#define VAR_STAT_ECONN "econn_status" /**< element block edge status */
#define VAR_STAT_FCONN "fconn_status" /**< element block face status */
#define VAR_STAT_ED_BLK "ed_status" /**< edge block status */
#define VAR_STAT_FA_BLK "fa_status" /**< face block status */
#define VAR_ID_EL_BLK "eb_prop1" /**< element block ids props */
#define VAR_ID_ED_BLK "ed_prop1" /**< edge block ids props */
#define VAR_ID_FA_BLK "fa_prop1" /**< face block ids props */
#define DIM_NUM_ENTITY_ASSEMBLY(num) ex__catstr("num_entity_assembly", num)
#define VAR_ENTITY_ASSEMBLY(num) ex__catstr("assembly_entity", num)
#define DIM_NUM_VALUES_BLOB(num) ex__catstr("num_values_blob", num)
#define VAR_ENTITY_BLOB(num) ex__catstr("blob_entity", num)
#define EX_ATTRIBUTE_TYPE "_type"
#define EX_ATTRIBUTE_TYPENAME "_typename"
#define EX_ATTRIBUTE_NAME "_name"
#define EX_ATTRIBUTE_ID "_id"
/*! element type names for each element block */
#define ATT_NAME_ELB "elem_type"
/*! number of elements in element block num */
#define DIM_NUM_EL_IN_BLK(num) ex__catstr("num_el_in_blk", num)
/*! number of nodes per element in element block num */
#define DIM_NUM_NOD_PER_EL(num) ex__catstr("num_nod_per_el", num)
/*! number of attributes in element block num */
#define DIM_NUM_ATT_IN_BLK(num) ex__catstr("num_att_in_blk", num)
/*! number of edges in edge block num */
#define DIM_NUM_ED_IN_EBLK(num) ex__catstr("num_ed_in_blk", num)
/*! number of nodes per edge in edge block num */
#define DIM_NUM_NOD_PER_ED(num) ex__catstr("num_nod_per_ed", num)
/*! number of edges per element in element block num */
#define DIM_NUM_EDG_PER_EL(num) ex__catstr("num_edg_per_el", num)
/*! number of attributes in edge block num */
#define DIM_NUM_ATT_IN_EBLK(num) ex__catstr("num_att_in_eblk", num)
/*! number of faces in face block num */
#define DIM_NUM_FA_IN_FBLK(num) ex__catstr("num_fa_in_blk", num)
/*! number of nodes per face in face block num */
#define DIM_NUM_NOD_PER_FA(num) ex__catstr("num_nod_per_fa", num)
/*! number of faces per element in element block num */
#define DIM_NUM_FAC_PER_EL(num) ex__catstr("num_fac_per_el", num)
/*! number of attributes in face block num */
#define DIM_NUM_ATT_IN_FBLK(num) ex__catstr("num_att_in_fblk", num)
/*! element connectivity for element block num */
#define VAR_CONN(num) ex__catstr("connect", num)
/*! array containing number of entity per */
/* entity for n-sided face/element blocks */
#define VAR_EBEPEC(num) ex__catstr("ebepecnt", num)
/*! list of attributes for element block num */
#define VAR_ATTRIB(num) ex__catstr("attrib", num)
/*! list of attribute names for element block num */
#define VAR_NAME_ATTRIB(num) ex__catstr("attrib_name", num)
/*! list of the numth property for all element blocks */
#define VAR_EB_PROP(num) ex__catstr("eb_prop", num)
/*! edge connectivity for element block num */
#define VAR_ECONN(num) ex__catstr("edgconn", num)
/*! edge connectivity for edge block num */
#define VAR_EBCONN(num) ex__catstr("ebconn", num)
/*! list of attributes for edge block num */
#define VAR_EATTRIB(num) ex__catstr("eattrb", num)
/*! list of attribute names for edge block num */
#define VAR_NAME_EATTRIB(num) ex__catstr("eattrib_name", num)
#define VAR_NATTRIB "nattrb"
#define VAR_NAME_NATTRIB "nattrib_name"
#define DIM_NUM_ATT_IN_NBLK "num_att_in_nblk"
#define VAR_NSATTRIB(num) ex__catstr("nsattrb", num)
#define VAR_NAME_NSATTRIB(num) ex__catstr("nsattrib_name", num)
#define DIM_NUM_ATT_IN_NS(num) ex__catstr("num_att_in_ns", num)
#define VAR_SSATTRIB(num) ex__catstr("ssattrb", num)
#define VAR_NAME_SSATTRIB(num) ex__catstr("ssattrib_name", num)
#define DIM_NUM_ATT_IN_SS(num) ex__catstr("num_att_in_ss", num)
#define VAR_ESATTRIB(num) ex__catstr("esattrb", num)
#define VAR_NAME_ESATTRIB(num) ex__catstr("esattrib_name", num)
#define DIM_NUM_ATT_IN_ES(num) ex__catstr("num_att_in_es", num)
#define VAR_FSATTRIB(num) ex__catstr("fsattrb", num)
#define VAR_NAME_FSATTRIB(num) ex__catstr("fsattrib_name", num)
#define DIM_NUM_ATT_IN_FS(num) ex__catstr("num_att_in_fs", num)
#define VAR_ELSATTRIB(num) ex__catstr("elsattrb", num)
#define VAR_NAME_ELSATTRIB(num) ex__catstr("elsattrib_name", num)
#define DIM_NUM_ATT_IN_ELS(num) ex__catstr("num_att_in_els", num)
/*! list of the numth property for all edge blocks */
#define VAR_ED_PROP(num) ex__catstr("ed_prop", num)
/*! face connectivity for element block num */
#define VAR_FCONN(num) ex__catstr("facconn", num)
/*! face connectivity for face block num */
#define VAR_FBCONN(num) ex__catstr("fbconn", num)
/*! array containing number of entity per entity for n-sided face/element blocks */
#define VAR_FBEPEC(num) ex__catstr("fbepecnt", num)
/*! list of attributes for face block num */
#define VAR_FATTRIB(num) ex__catstr("fattrb", num)
/*! list of attribute names for face block num */
#define VAR_NAME_FATTRIB(num) ex__catstr("fattrib_name", num)
/*! list of the numth property for all face blocks */
#define VAR_FA_PROP(num) ex__catstr("fa_prop", num)
/*! name attached to element block, node set, side set, element map,
or map properties */
#define ATT_PROP_NAME "name"
#define VAR_MAP "elem_map" /**< element order map */
#define DIM_NUM_SS "num_side_sets" /**< number of side sets */
#define VAR_SS_STAT "ss_status" /**< side set status */
#define VAR_SS_IDS "ss_prop1" /**< side set id properties */
/*! number of sides in side set num*/
#define DIM_NUM_SIDE_SS(num) ex__catstr("num_side_ss", num)
/*! number of distribution factors in side set num */
#define DIM_NUM_DF_SS(num) ex__catstr("num_df_ss", num)
/*! the distribution factors for each node in side set num */
#define VAR_FACT_SS(num) ex__catstr("dist_fact_ss", num)
/*! list of elements in side set num */
#define VAR_ELEM_SS(num) ex__catstr("elem_ss", num)
/*! list of sides in side set */
#define VAR_SIDE_SS(num) ex__catstr("side_ss", num)
/*! list of the numth property for all side sets */
#define VAR_SS_PROP(num) ex__catstr("ss_prop", num)
#define DIM_NUM_ES "num_edge_sets" /**< number of edge sets */
#define VAR_ES_STAT "es_status" /**< edge set status */
#define VAR_ES_IDS "es_prop1" /**< edge set id properties */
/*! number of edges in edge set num*/
#define DIM_NUM_EDGE_ES(num) ex__catstr("num_edge_es", num)
/*! number of distribution factors in edge set num */
#define DIM_NUM_DF_ES(num) ex__catstr("num_df_es", num)
/*! the distribution factors for each node in edge set num */
#define VAR_FACT_ES(num) ex__catstr("dist_fact_es", num)
/*! list of edges in edge set num */
#define VAR_EDGE_ES(num) ex__catstr("edge_es", num)
/*! list of orientations in the edge set. */
#define VAR_ORNT_ES(num) ex__catstr("ornt_es", num)
/*! list of the numth property for all edge sets */
#define VAR_ES_PROP(num) ex__catstr("es_prop", num)
#define DIM_NUM_FS "num_face_sets" /**< number of face sets */
#define VAR_FS_STAT "fs_status" /**< face set status */
#define VAR_FS_IDS "fs_prop1" /**< face set id properties */
/*! number of faces in side set num*/
#define DIM_NUM_FACE_FS(num) ex__catstr("num_face_fs", num)
/*! number of distribution factors in face set num */
#define DIM_NUM_DF_FS(num) ex__catstr("num_df_fs", num)
/*! the distribution factors for each node in face set num */
#define VAR_FACT_FS(num) ex__catstr("dist_fact_fs", num)
/*! list of elements in face set num */
#define VAR_FACE_FS(num) ex__catstr("face_fs", num)
/*! list of sides in side set */
#define VAR_ORNT_FS(num) ex__catstr("ornt_fs", num)
/*! list of the numth property for all face sets */
#define VAR_FS_PROP(num) ex__catstr("fs_prop", num)
#define DIM_NUM_ELS "num_elem_sets" /**< number of elem sets */
/*! number of elements in elem set num */
#define DIM_NUM_ELE_ELS(num) ex__catstr("num_ele_els", num)
/*! number of distribution factors in element set num */
#define DIM_NUM_DF_ELS(num) ex__catstr("num_df_els", num)
#define VAR_ELS_STAT "els_status" /**< elem set status */
#define VAR_ELS_IDS "els_prop1" /**< elem set id properties */
/*! list of elements in elem set num */
#define VAR_ELEM_ELS(num) ex__catstr("elem_els", num)
/*! list of distribution factors in elem set num */
#define VAR_FACT_ELS(num) ex__catstr("dist_fact_els", num)
/*! list of the numth property for all elem sets */
#define VAR_ELS_PROP(num) ex__catstr("els_prop", num)
#define DIM_NUM_NS "num_node_sets" /**< number of node sets */
/*! number of nodes in node set num */
#define DIM_NUM_NOD_NS(num) ex__catstr("num_nod_ns", num)
/*! number of distribution factors in node set num */
#define DIM_NUM_DF_NS(num) ex__catstr("num_df_ns", num)
#define VAR_NS_STAT "ns_status" /**< node set status */
#define VAR_NS_IDS "ns_prop1" /**< node set id properties */
/*! list of nodes in node set num */
#define VAR_NODE_NS(num) ex__catstr("node_ns", num)
/*! list of distribution factors in node set num */
#define VAR_FACT_NS(num) ex__catstr("dist_fact_ns", num)
/*! list of the numth property for all node sets */
#define VAR_NS_PROP(num) ex__catstr("ns_prop", num)
#define DIM_NUM_QA "num_qa_rec" /**< number of QA records */
#define VAR_QA_TITLE "qa_records" /**< QA records */
#define DIM_NUM_INFO "num_info" /**< number of information records */
#define VAR_INFO "info_records" /**< information records */
#define VAR_WHOLE_TIME "time_whole" /**< simulation times for whole time steps */
#define VAR_ASSEMBLY_TAB "assembly_var_tab" /**< assembly variable truth table */
#define VAR_BLOB_TAB "blob_var_tab" /**< blob variable truth table */
#define VAR_ELEM_TAB "elem_var_tab" /**< element variable truth table */
#define VAR_EBLK_TAB "edge_var_tab" /**< edge variable truth table */
#define VAR_FBLK_TAB "face_var_tab" /**< face variable truth table */
#define VAR_ELSET_TAB "elset_var_tab" /**< elemset variable truth table */
#define VAR_SSET_TAB "sset_var_tab" /**< sideset variable truth table */
#define VAR_FSET_TAB "fset_var_tab" /**< faceset variable truth table */
#define VAR_ESET_TAB "eset_var_tab" /**< edgeset variable truth table */
#define VAR_NSET_TAB "nset_var_tab" /**< nodeset variable truth table */
#define DIM_NUM_GLO_VAR "num_glo_var" /**< number of global variables */
#define VAR_NAME_GLO_VAR "name_glo_var" /**< names of global variables */
#define VAR_GLO_VAR "vals_glo_var" /**< values of global variables*/
#define DIM_NUM_NOD_VAR "num_nod_var" /**< number of nodal variables */
#define VAR_NAME_NOD_VAR "name_nod_var" /**< names of nodal variables */
#define VAR_NOD_VAR "vals_nod_var" /**< values of nodal variables \deprecated */
/*! values of nodal variables */
#define VAR_NOD_VAR_NEW(num) ex__catstr("vals_nod_var", num)
#define DIM_NUM_ASSEMBLY_VAR "num_assembly_var" /**< number of assembly variables */
#define VAR_NAME_ASSEMBLY_VAR "name_assembly_var" /**< names of assembly variables*/
#define VAR_ASSEMBLY_VAR(num1, num2) ex__catstr2("vals_assembly_var", num1, "assembly", num2)
#define DIM_NUM_BLOB_VAR "num_blob_var" /**< number of blob variables */
#define VAR_NAME_BLOB_VAR "name_blob_var" /**< names of blob variables*/
#define VAR_BLOB_VAR(num1, num2) ex__catstr2("vals_blob_var", num1, "blob", num2)
#define DIM_NUM_ELE_VAR "num_elem_var" /**< number of element variables */
#define VAR_NAME_ELE_VAR "name_elem_var" /**< names of element variables*/
/*! values of element variable num1 in element block num2 */
#define VAR_ELEM_VAR(num1, num2) ex__catstr2("vals_elem_var", num1, "eb", num2)
#define DIM_NUM_EDG_VAR "num_edge_var" /**< number of edge variables */
#define VAR_NAME_EDG_VAR "name_edge_var" /**< names of edge variables */
/*! values of edge variable num1 in edge block num2 */
#define VAR_EDGE_VAR(num1, num2) ex__catstr2("vals_edge_var", num1, "eb", num2)
#define DIM_NUM_FAC_VAR "num_face_var" /**< number of face variables */
#define VAR_NAME_FAC_VAR "name_face_var" /**< names of face variables */
/*! values of face variable num1 in face block num2 */
#define VAR_FACE_VAR(num1, num2) ex__catstr2("vals_face_var", num1, "fb", num2)
#define DIM_NUM_NSET_VAR "num_nset_var" /**< number of nodeset variables */
#define VAR_NAME_NSET_VAR "name_nset_var" /**< names of nodeset variables*/
/*! values of nodeset variable num1 in nodeset num2 */
#define VAR_NS_VAR(num1, num2) ex__catstr2("vals_nset_var", num1, "ns", num2)
#define DIM_NUM_ESET_VAR "num_eset_var" /**< number of edgeset variables */
/*! values of edgeset variable num1 in edgeset num2 */
#define VAR_NAME_ESET_VAR "name_eset_var" /**< names of edgeset variables*/
#define VAR_ES_VAR(num1, num2) ex__catstr2("vals_eset_var", num1, "es", num2)
#define DIM_NUM_FSET_VAR "num_fset_var" /**< number of faceset variables */
#define VAR_NAME_FSET_VAR "name_fset_var" /**< names of faceset variables*/
/*! values of faceset variable num1 in faceset num2 */
#define VAR_FS_VAR(num1, num2) ex__catstr2("vals_fset_var", num1, "fs", num2)
#define DIM_NUM_SSET_VAR "num_sset_var" /**< number of sideset variables */
#define VAR_NAME_SSET_VAR "name_sset_var" /**< names of sideset variables*/
/*! values of sideset variable num1 in sideset num2 */
#define VAR_SS_VAR(num1, num2) ex__catstr2("vals_sset_var", num1, "ss", num2)
#define DIM_NUM_ELSET_VAR "num_elset_var" /**< number of element set variables*/
#define VAR_NAME_ELSET_VAR "name_elset_var" /**< names of elemset variables*/
/*! values of elemset variable num1 in elemset num2 */
#define VAR_ELS_VAR(num1, num2) ex__catstr2("vals_elset_var", num1, "es", num2)
/**
* \defgroup ReductionVariables Variables controlling storage of reduction variables
*@{
*/
#define DIM_NUM_ASSEMBLY_RED_VAR "num_assembly_red_var" /**< number of assembly variables */
#define VAR_NAME_ASSEMBLY_RED_VAR "name_assembly_red_var" /**< names of assembly variables*/
#define VAR_ASSEMBLY_RED_VAR(num) ex__catstr("vals_red_var_assembly", num)
#define DIM_NUM_BLOB_RED_VAR "num_blob_red_var" /**< number of blob variables */
#define VAR_NAME_BLOB_RED_VAR "name_blob_red_var" /**< names of blob variables*/
#define VAR_BLOB_RED_VAR(num) ex__catstr("vals_red_var_blob", num)
#define DIM_NUM_ELE_RED_VAR "num_elem_red_var" /**< number of element variables */
#define VAR_NAME_ELE_RED_VAR "name_elem_red_var" /**< names of element variables*/
/*! values of element variable num in element block num */
#define VAR_ELEM_RED_VAR(num) ex__catstr("vals_red_var_eb", num)
#define DIM_NUM_EDG_RED_VAR "num_edge_red_var" /**< number of edge variables */
#define VAR_NAME_EDG_RED_VAR "name_edge_red_var" /**< names of edge variables */
/*! values of edge variable num in edge block num */
#define VAR_EDGE_RED_VAR(num) ex__catstr("vals_red_var_edb", num)
#define DIM_NUM_FAC_RED_VAR "num_face_red_var" /**< number of face variables */
#define VAR_NAME_FAC_RED_VAR "name_face_red_var" /**< names of face variables */
/*! values of face variable num in face block num */
#define VAR_FACE_RED_VAR(num) ex__catstr("vals_red_var_fb", num)
#define DIM_NUM_NSET_RED_VAR "num_nset_red_var" /**< number of nodeset variables */
#define VAR_NAME_NSET_RED_VAR "name_nset_red_var" /**< names of nodeset variables*/
/*! values of nodeset variable num in nodeset num */
#define VAR_NS_RED_VAR(num) ex__catstr("vals_red_var_nset", num)
#define DIM_NUM_ESET_RED_VAR "num_eset_red_var" /**< number of edgeset variables */
/*! values of edgeset variable num in edgeset num */
#define VAR_NAME_ESET_RED_VAR "name_eset_red_var" /**< names of edgeset variables*/
#define VAR_ES_RED_VAR(num) ex__catstr("vals_red_var_eset", num)
#define DIM_NUM_FSET_RED_VAR "num_fset_red_var" /**< number of faceset variables */
#define VAR_NAME_FSET_RED_VAR "name_fset_red_var" /**< names of faceset variables*/
/*! values of faceset variable num in faceset num */
#define VAR_FS_RED_VAR(num) ex__catstr("vals_red_var_fset", num)
#define DIM_NUM_SSET_RED_VAR "num_sset_red_var" /**< number of sideset variables */
#define VAR_NAME_SSET_RED_VAR "name_sset_red_var" /**< names of sideset variables*/
/*! values of sideset variable num in sideset num */
#define VAR_SS_RED_VAR(num) ex__catstr("vals_red_var_sset", num)
#define DIM_NUM_ELSET_RED_VAR "num_elset_red_var" /**< number of element set variables*/
#define VAR_NAME_ELSET_RED_VAR "name_elset_red_var" /**< names of elemset variables*/
/*! values of elemset variable num in elemset num */
#define VAR_ELS_RED_VAR(num) ex__catstr("vals_red_var_elset", num)
/** @}*/
/*! general dimension of length MAX_STR_LENGTH used for some string lengths */
#define DIM_STR "len_string"
/*! general dimension of length MAX_NAME_LENGTH used for name lengths */
#define DIM_STR_NAME "len_name"
/*! general dimension of length MAX_LINE_LENGTH used for long strings */
#define DIM_LIN "len_line"
#define DIM_N4 "four"
#define DIM_N1 "blob_entity"
/*! unlimited (expandable) dimension for time steps*/
#define DIM_TIME "time_step"
#define VAR_ELEM_NUM_MAP "elem_num_map" /**< element numbering map */
#define VAR_FACE_NUM_MAP "face_num_map" /**< face numbering map */
#define VAR_EDGE_NUM_MAP "edge_num_map" /**< edge numbering map */
#define VAR_NODE_NUM_MAP "node_num_map" /**< node numbering map */
#define DIM_NUM_EM "num_elem_maps" /**< number of element maps */
/*! the numth element map */
#define VAR_ELEM_MAP(num) ex__catstr("elem_map", num)
/*! list of the numth property for all element maps */
#define VAR_EM_PROP(num) ex__catstr("em_prop", num)
#define DIM_NUM_EDM "num_edge_maps" /**< number of edge maps */
/*! the numth edge map */
#define VAR_EDGE_MAP(num) ex__catstr("edge_map", num)
/* list of the numth property for all edge maps */
#define VAR_EDM_PROP(num) ex__catstr("edm_prop", num)
#define DIM_NUM_FAM "num_face_maps" /**< number of face maps */
/*! the numth face map */
#define VAR_FACE_MAP(num) ex__catstr("face_map", num)
/*! list of the numth property for all face maps */
#define VAR_FAM_PROP(num) ex__catstr("fam_prop", num)
#define DIM_NUM_NM "num_node_maps" /**< number of node maps */
/*! the numth node map */
#define VAR_NODE_MAP(num) ex__catstr("node_map", num)
/*! list of the numth property for all node maps */
#define VAR_NM_PROP(num) ex__catstr("nm_prop", num)
/*! list of the numth property for all assemblies */
#define VAR_ASSEMBLY_PROP(num) ex__catstr("assembly_prop", num)
#define VAR_BLOB_PROP(num) ex__catstr("blob_prop", num)
#define DIM_NUM_CFRAMES "num_cframes"
#define DIM_NUM_CFRAME9 "num_cframes_9"
#define VAR_FRAME_COORDS "frame_coordinates"
#define VAR_FRAME_IDS "frame_ids"
#define VAR_FRAME_TAGS "frame_tags"
#define VAR_ELBLK_IDS_GLOBAL "el_blk_ids_global"
#define VAR_ELBLK_CNT_GLOBAL "el_blk_cnt_global"
#define VAR_NS_IDS_GLOBAL "ns_ids_global"
#define VAR_NS_NODE_CNT_GLOBAL "ns_node_cnt_global"
#define VAR_NS_DF_CNT_GLOBAL "ns_df_cnt_global"
#define VAR_SS_IDS_GLOBAL "ss_ids_global"
#define VAR_SS_SIDE_CNT_GLOBAL "ss_side_cnt_global"
#define VAR_SS_DF_CNT_GLOBAL "ss_df_cnt_global"
#define VAR_FILE_TYPE "nem_ftype"
#define VAR_COMM_MAP "comm_map"
#define VAR_NODE_MAP_INT "node_mapi"
#define VAR_NODE_MAP_INT_IDX "node_mapi_idx"
#define VAR_NODE_MAP_BOR "node_mapb"
#define VAR_NODE_MAP_BOR_IDX "node_mapb_idx"
#define VAR_NODE_MAP_EXT "node_mape"
#define VAR_NODE_MAP_EXT_IDX "node_mape_idx"
#define VAR_ELEM_MAP_INT "elem_mapi"
#define VAR_ELEM_MAP_INT_IDX "elem_mapi_idx"
#define VAR_ELEM_MAP_BOR "elem_mapb"
#define VAR_ELEM_MAP_BOR_IDX "elem_mapb_idx"
#define VAR_INT_N_STAT "int_n_stat"
#define VAR_BOR_N_STAT "bor_n_stat"
#define VAR_EXT_N_STAT "ext_n_stat"
#define VAR_INT_E_STAT "int_e_stat"
#define VAR_BOR_E_STAT "bor_e_stat"
#define VAR_N_COMM_IDS "n_comm_ids"
#define VAR_N_COMM_STAT "n_comm_stat"
#define VAR_N_COMM_INFO_IDX "n_comm_info_idx"
#define VAR_E_COMM_IDS "e_comm_ids"
#define VAR_E_COMM_STAT "e_comm_stat"
#define VAR_E_COMM_INFO_IDX "e_comm_info_idx"
#define VAR_N_COMM_NIDS "n_comm_nids"
#define VAR_N_COMM_PROC "n_comm_proc"
#define VAR_N_COMM_DATA_IDX "n_comm_data_idx"
#define VAR_E_COMM_EIDS "e_comm_eids"
#define VAR_E_COMM_SIDS "e_comm_sids"
#define VAR_E_COMM_PROC "e_comm_proc"
#define VAR_E_COMM_DATA_IDX "e_comm_data_idx"
#define DIM_NUM_INT_NODES "num_int_node"
#define DIM_NUM_BOR_NODES "num_bor_node"
#define DIM_NUM_EXT_NODES "num_ext_node"
#define DIM_NUM_INT_ELEMS "num_int_elem"
#define DIM_NUM_BOR_ELEMS "num_bor_elem"
#define DIM_NUM_PROCS "num_processors"
#define DIM_NUM_PROCS_F "num_procs_file"
#define DIM_NUM_NODES_GLOBAL "num_nodes_global"
#define DIM_NUM_ELEMS_GLOBAL "num_elems_global"
#define DIM_NUM_NS_GLOBAL "num_ns_global"
#define DIM_NUM_SS_GLOBAL "num_ss_global"
#define DIM_NUM_ELBLK_GLOBAL "num_el_blk_global"
#define DIM_NUM_N_CMAPS "num_n_cmaps"
#define DIM_NUM_E_CMAPS "num_e_cmaps"
#define DIM_NCNT_CMAP "ncnt_cmap"
#define DIM_ECNT_CMAP "ecnt_cmap"
enum ex__element_type {
EX_EL_UNK = -1, /**< unknown entity */
EX_EL_NULL_ELEMENT = 0,
EX_EL_TRIANGLE = 1, /**< Triangle entity */
EX_EL_QUAD = 2, /**< Quad entity */
EX_EL_HEX = 3, /**< Hex entity */
EX_EL_WEDGE = 4, /**< Wedge entity */
EX_EL_TETRA = 5, /**< Tetra entity */
EX_EL_TRUSS = 6, /**< Truss entity */
EX_EL_BEAM = 7, /**< Beam entity */
EX_EL_SHELL = 8, /**< Shell entity */
EX_EL_SPHERE = 9, /**< Sphere entity */
EX_EL_CIRCLE = 10, /**< Circle entity */
EX_EL_TRISHELL = 11, /**< Triangular Shell entity */
EX_EL_PYRAMID = 12 /**< Pyramid entity */
};
typedef enum ex__element_type ex__element_type;
/* Internal structure declarations */
struct ex__file_item
{
int file_id;
nc_type netcdf_type_code;
int int64_status;
int maximum_name_length;
int time_varid; /* Store to avoid lookup each timestep */
unsigned int assembly_count;
unsigned int blob_count;
unsigned int
compression_algorithm : 2; /**< GZIP/ZLIB, SZIP, more may be supported by NetCDF soon */
unsigned int compression_level : 6; /**< 0 (disabled) to 9 (maximum) compression level for
gzip, 4..32 and even for szip; NetCDF-4 only */
unsigned int user_compute_wordsize : 1; /**< 0 for 4 byte or 1 for 8 byte reals */
unsigned int shuffle : 1; /**< 1 true, 0 false */
unsigned int
file_type : 2; /**< 0 - classic, 1 -- 64 bit classic, 2 --NetCDF4, 3 --NetCDF4 classic */
unsigned int is_write : 1; /**< for output or append */
unsigned int is_parallel : 1; /**< 1 true, 0 false */
unsigned int is_hdf5 : 1; /**< 1 true, 0 false */
unsigned int is_pnetcdf : 1; /**< 1 true, 0 false */
unsigned int has_nodes : 1; /**< for input only at this time */
unsigned int has_edges : 1; /**< for input only at this time */
unsigned int has_faces : 1; /**< for input only at this time */
unsigned int has_elems : 1; /**< for input only at this time */
struct ex__file_item *next;
};
struct ex__elem_blk_parm
{
char elem_type[33];
int64_t elem_blk_id;
int64_t num_elem_in_blk;
int num_nodes_per_elem;
int num_sides;
int num_nodes_per_side[6];
int num_attr;
int64_t elem_ctr;
ex__element_type elem_type_val;
};
/* Used in exo_jack.c for fortran interface */
enum ex__coordinate_frame_type {
EX_CF_RECTANGULAR = 1,
EX_CF_CYLINDRICAL = 2,
EX_CF_SPHERICAL = 3
};
typedef enum ex__coordinate_frame_type ex__coordinate_frame_type;
struct ex__list_item
{ /* for use with ex_get_file_item */
int exo_id;
int value;
struct ex__list_item *next;
};
struct ex__obj_stats
{
int64_t *id_vals;
int *stat_vals;
size_t num;
int exoid;
char valid_ids;
char valid_stat;
char sequential;
struct ex__obj_stats *next;
};
#ifndef EXODUS_EXPORT
#define EXODUS_EXPORT extern
#endif /* EXODUS_EXPORT */
EXODUS_EXPORT void ex__iqsort(int v[], int iv[], size_t N);
EXODUS_EXPORT void ex__iqsort64(int64_t v[], int64_t iv[], int64_t N);
EXODUS_EXPORT char *ex__catstr(const char * /*string*/, int /*num*/);
EXODUS_EXPORT char *ex__catstr2(const char * /*string1*/, int /*num1*/, const char * /*string2*/,
int /*num2*/);
EXODUS_EXPORT char *ex__dim_num_entries_in_object(ex_entity_type /*obj_type*/, int /*idx*/);
EXODUS_EXPORT char *ex__dim_num_objects(ex_entity_type obj_type);
EXODUS_EXPORT char *ex__name_var_of_object(ex_entity_type /*obj_type*/, int /*i*/, int /*j*/);
EXODUS_EXPORT char *ex__name_red_var_of_object(ex_entity_type /*obj_type*/, int /*indx*/);
EXODUS_EXPORT char *ex__name_of_map(ex_entity_type /*map_type*/, int /*map_index*/);
EXODUS_EXPORT int ex__conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_wordsize,
int int64_status, bool is_parallel, bool is_hdf5, bool is_pnetcdf,
bool is_write);
EXODUS_EXPORT void ex__conv_exit(int exoid);
EXODUS_EXPORT nc_type nc_flt_code(int exoid);
EXODUS_EXPORT int ex__comp_ws(int exoid);
EXODUS_EXPORT int ex__get_cpu_ws(void);
EXODUS_EXPORT int ex__is_parallel(int exoid);
EXODUS_EXPORT struct ex__list_item **ex__get_counter_list(ex_entity_type obj_type);
EXODUS_EXPORT int ex__get_file_item(int /*exoid*/, struct ex__list_item **/*list_ptr*/);
EXODUS_EXPORT int ex__inc_file_item(int /*exoid*/, struct ex__list_item **/*list_ptr*/);
EXODUS_EXPORT void ex__rm_file_item(int /*exoid*/, struct ex__list_item ** /*list_ptr*/);
extern struct ex__obj_stats *exoII_eb;
extern struct ex__obj_stats *exoII_ed;
extern struct ex__obj_stats *exoII_fa;
extern struct ex__obj_stats *exoII_ns;
extern struct ex__obj_stats *exoII_es;
extern struct ex__obj_stats *exoII_fs;
extern struct ex__obj_stats *exoII_ss;
extern struct ex__obj_stats *exoII_els;
extern struct ex__obj_stats *exoII_em;
extern struct ex__obj_stats *exoII_edm;
extern struct ex__obj_stats *exoII_fam;
extern struct ex__obj_stats *exoII_nm;
struct ex__file_item *ex__find_file_item(int exoid);
struct ex__file_item *ex__add_file_item(int exoid);
struct ex__obj_stats *ex__get_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr);
EXODUS_EXPORT void ex__rm_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr);
EXODUS_EXPORT void ex__set_compact_storage(int exoid, int varid);
EXODUS_EXPORT void ex__compress_variable(int exoid, int varid, int type);
EXODUS_EXPORT int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num);
EXODUS_EXPORT int ex__check_valid_file_id(
int exoid, const char *func); /** Return fatal error if exoid does not refer to valid file */
EXODUS_EXPORT int ex__check_multiple_open(const char *path, int mode, const char *func);
EXODUS_EXPORT int ex__check_file_type(const char *path, int *type);
EXODUS_EXPORT char *ex__canonicalize_filename(const char *path);
EXODUS_EXPORT int ex__get_dimension(int exoid, const char *DIMENSION, const char *label,
size_t *count, int *dimid, const char *routine);
EXODUS_EXPORT int ex__get_nodal_var(int exoid, int time_step, int nodal_var_index,
int64_t num_nodes, void *nodal_var_vals);
EXODUS_EXPORT int ex__put_nodal_var(int exoid, int time_step, int nodal_var_index,
int64_t num_nodes, const void *nodal_var_vals);
EXODUS_EXPORT int ex__get_nodal_var_time(int exoid, int nodal_var_index, int64_t node_number,
int beg_time_step, int end_time_step,
void *nodal_var_vals);
EXODUS_EXPORT int ex__get_partial_nodal_var(int exoid, int time_step, int nodal_var_index,
int64_t start_node, int64_t num_nodes, void *var_vals);
EXODUS_EXPORT int ex__put_partial_nodal_var(int exoid, int time_step, int nodal_var_index,
int64_t start_node, int64_t num_nodes,
const void *nodal_var_vals);
EXODUS_EXPORT int ex__get_glob_vars(int exoid, int time_step, int num_glob_vars,
void *glob_var_vals);
EXODUS_EXPORT int ex__get_glob_var_time(int exoid, int glob_var_index, int beg_time_step,
int end_time_step, void *glob_var_vals);
EXODUS_EXPORT int ex__get_name(int exoid, int varid, size_t index, char *name, int name_size,
ex_entity_type obj_type, const char *routine);
EXODUS_EXPORT int ex__get_names(int exoid, int varid, size_t num_entity, char **names,
ex_entity_type obj_type, const char *routine);
EXODUS_EXPORT int ex__put_name(int exoid, int varid, size_t index, const char *name,
ex_entity_type obj_type, const char *subtype, const char *routine);
EXODUS_EXPORT int ex__put_names(int exoid, int varid, size_t num_entity, char *const *names,
ex_entity_type obj_type, const char *subtype, const char *routine);
EXODUS_EXPORT void ex__trim(char *name);
EXODUS_EXPORT void ex__update_max_name_length(int exoid, int length);
EXODUS_EXPORT int ex__leavedef(int exoid, /* NemesisI file ID */
const char *call_rout /* Name of calling function */
);
EXODUS_EXPORT int ex__check_version(int run_version);
EXODUS_EXPORT int ex__handle_mode(unsigned int my_mode, int is_parallel, int run_version);
EXODUS_EXPORT int ex__populate_header(int exoid, const char *path, int my_mode, int is_parallel,
int *comp_ws, int *io_ws);
EXODUS_EXPORT int ex__get_block_param(int exoid, ex_entity_id id, int ndim,
struct ex__elem_blk_parm *elem_blk_parm);
EXODUS_EXPORT int ex__get_file_type(int exoid, char *ftype);
EXODUS_EXPORT int ex__put_nemesis_version(int exoid);
EXODUS_EXPORT int ex__put_homogenous_block_params(int exoid, size_t block_count,
const struct ex_block *blocks);
EXODUS_EXPORT int ne__check_file_version(int exoid);
EXODUS_EXPORT int ne__id_lkup(int exoid, /* NetCDF/Exodus file ID */
const char *ne_var_name, /* Nemesis variable name */
int64_t *idx, /* index variable for variable, length 2 */
ex_entity_id ne_var_id /* NetCDF variable ID */
);
/**
* For output databases, the maximum length of any entity, variable,
* property, attribute, or coordinate name to be written (not
* including the NULL terminator). If a name is longer than this
* value, a warning message will be output to stderr and the name
* will be truncated. Must be set (via call to
* ex_set_max_name_length()(exoid, int len) prior to calling ex_create().
*
* For input databases, the size of the name arrays that the client
* code will be passing to API routines that retrieve names (not
* including the NULL terminator). This defaults to 32 for
* compatibility with older clients. The value used at the time of
* creation of the database can be queried by ex_inquire with the
* #EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH argument. The current value for this
* variable can be queried with #EX_INQ_MAX_READ_NAME_LENGTH argument.
*
* Note that this is a global setting for all databases. If you are
* accessing multiple databases, they will all use the same value.
*/
EXODUS_EXPORT int ex__default_max_name_length;
/*! @} */
#ifdef __cplusplus
}
#endif

@ -1,18 +0,0 @@
/*
* Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
* See packages/seacas/LICENSE for details
*/
/*
* NOTE: Contents of this include file have been moved to exodusII.h
* Retained here just for backward compatibility
*/
#pragma once
#include "exodusII.h"
#if !defined(PARALLEL_AWARE_EXODUS)
#error "Parallel-aware exodusII_par.h included in non-parallel context"
#endif

@ -1,24 +0,0 @@
/*
* Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
* See packages/seacas/LICENSE for details
*/
#pragma once
#include "exodusII.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int cCreateEdgeFace(int, char *[]);
int cReadEdgeFace(int, char *[]);
#ifdef __cplusplus
}
#endif /* __cplusplus */
inline int CreateEdgeFace(int argc, char *argv[]) { return cCreateEdgeFace(argc, argv); }
inline int ReadEdgeFace(int argc, char *argv[]) { return cReadEdgeFace(argc, argv); }

@ -1,113 +0,0 @@
\page nemesis-mapping Mapping of nemesis API functions to Exodus API functions
The nemesis library was originally an extension to the ExodusII
library which provided routines required to support use of Exodus
databases in a parallel setting; typically with a file-per-processor
usage.
Since the use of Exodus in parallel executions is now very common, the
Nemesis library routines have been integrated into the Exodus library
API. In most cases, the exodus API function corresponding to a nemesis
API function is obtained by replacing the `ne_` prefix with an `ex_`
prefix. There are a few routines where this results in a name
collision or confusion (e.g. ne_put_version() is ex_put_nemesis_version() since
it would be confusing to call it ex_put_version()). The partial read/write
functions which in nemesis are indicated by a `_n_` in the function
name have been in replaced by `_partial_` (although the corresponding
`ex_*_n_*` function does exist in the deprecated functions).
The tables below list all Nemesis API functions and the corresponding
Exodus API function. In many cases, the only change needed is
replacing `ne_` by `ex_`, but the routines which were made more
"generic" (e.g. ne_get_n_side_set() and ne_get_n_node_set() directly
map to ex_get_n_side_set() and ex_get_n_node_set() which are
deprecated, so the table below shows the recommended
ex_get_partial_set()) additional arguments are required.
The nemesis library can still be used since it is still built upon
request and its implementation is simply wrapper routines which
forward all existing nemesis function calls to the appropriate Exodus
function call (with needed argument changes).
\section initial Initial Information Routines
Nemesis API | Exodus API
------------------------|------------------------------
ne_get_init_info | ex_get_init_info()
ne_put_init_info | ex_put_init_info()
ne_get_init_global | ex_get_init_global()
ne_put_init_global | ex_put_init_global()
ne_put_version | ex_put_nemesis_version()
\section lb Loadbalance Parameter Routines
Nemesis API | Exodus API
------------------------|------------------------------
ne_get_loadbal_param | ex_get_loadbal_param()
ne_put_loadbal_param | ex_put_loadbal_param()
ne_put_loadbal_param_cc | ex_put_loadbal_param_cc()
\section param Nodeset, Sideset & Element Block Global Parameter Routines
Nemesis API | Exodus API
------------------------|------------------------------
ne_get_ns_param_global | ex_get_ns_param_global()
ne_put_ns_param_global | ex_put_ns_param_global()
ne_get_ss_param_global | ex_get_ss_param_global()
ne_put_ss_param_global | ex_put_ss_param_global()
ne_get_eb_info_global | ex_get_eb_info_global()
ne_put_eb_info_global | ex_put_eb_info_global()
\section subset Nodeset, Sideset & Element Block Subset Routines
Nemesis API | Exodus API
------------------------|------------------------------
ne_get_n_side_set | ex_get_partial_set()
ne_put_n_side_set | ex_put_partial_set()
ne_get_n_side_set_df | ex_get_partial_set_dist_fact()
ne_put_n_side_set_df | ex_put_partial_set_dist_fact()
ne_get_n_node_set | ex_get_partial_set()
ne_put_n_node_set | ex_put_partial_set()
ne_get_n_node_set_df | ex_get_partial_set_dist_fact()
ne_put_n_node_set_df | ex_put_partial_set_dist_fact()
ne_get_n_coord | ex_get_partial_coord()
ne_put_n_coord | ex_put_partial_coord()
ne_get_n_elem_conn | ex_get_partial_conn()
ne_put_n_elem_conn | ex_put_partial_conn()
ne_get_n_elem_attr | ex_get_partial_attr()
ne_put_n_elem_attr | ex_put_partial_attr()
ne_get_elem_type | ex_get_elem_type()
\section variable Variable Routines
Nemesis API | Exodus API
------------------------|------------------------------
ne_get_n_elem_var | ex_get_partial_var()
ne_put_elem_var_slab | ex_put_partial_var()
ne_get_n_nodal_var | ex_get_partial_var()
ne_put_nodal_var_slab | ex_put_partial_var()
\section map Number Map Routines
Nemesis API | Exodus API
------------------------|------------------------------
ne_get_n_elem_num_map | ex_get_partial_id_map()
ne_put_n_elem_num_map | ex_put_partial_id_map()
ne_get_n_node_num_map | ex_get_partial_id_map()
ne_put_n_node_num_map | ex_put_partial_id_map()
ne_get_node_map | ex_get_processor_node_maps()
ne_put_node_map | ex_put_processor_node_maps()
ne_get_elem_map | ex_get_processor_elem_maps()
ne_put_elem_map | ex_put_processor_elem_maps()
\section comm Communications Maps Routines
Nemesis API | Exodus API
------------------------|------------------------------
ne_get_cmap_params | ex_get_cmap_params()
ne_put_cmap_params | ex_put_cmap_params()
ne_put_cmap_params_cc | ex_put_cmap_params_cc()
ne_get_node_cmap | ex_get_node_cmap()
ne_put_node_cmap | ex_put_node_cmap()
ne_get_elem_cmap | ex_get_elem_cmap()
ne_put_elem_cmap | ex_put_elem_cmap()
ne_get_idx | ex_get_idx()

@ -1,220 +0,0 @@
\page polyhedra Polyhedral Element Support
\section poly Storage of 3D arbitrary polyhedra elements in Exodus.
The 3D polyhedra elements are represented as elements with a variable
number of faces in their connectivity. The faces can either be
regular faces such as quadrilateral or triangles; or they can be
topologically two-dimensional arbitrary polyhedra themselves.
An arbitrary polyhedra 3D element block will have an element type of
"nfaced" or "NFACED".
The faces that are used in the connectivity of this block should be
defined in one or more face blocks. If the faces are arbitrary
polyhedra, then they will have a face type of "nsided" or "NSIDED".
An annotated example of defining an arbitrary polyhedral element block
consisting of 3 elements is shown below.
The three elements have the following geometry:
* Element 1: 5 faces.
* Face 1: triangle with nodes 5, 6, 8
* Face 2: triangle with nodes 2, 1, 4
* Face 3: quadrilateral with nodes 6, 2, 4, 8
* Face 4: quadrilateral with nodes 8, 4, 1, 5
* Face 5: quadrilateral with nodes 1, 2, 6, 5
* Element 2: 5 faces.
* Face 6: triangle with nodes 5, 8, 7
* Face 7: triangle with nodes 1, 3, 4
* Face 8: quadrilateral with nodes 7, 8, 4, 3
* Face 9: quadrilateral with nodes 7, 3, 1, 5
* Face 4: quadrilateral with nodes 8, 4, 1, 5 (shared with element 1)
* Element 3: 7 faces.
* Face 8: quadrilateral with nodes 7, 8, 4, 3 (shared with element 2)
* Face 10: pentagonal with nodes 8, 4, 14, 10, 12
* Face 11: pentagonal with nodes 7, 11, 9, 13, 3
* Face 12: quadrilateral with nodes 7, 8, 12, 11
* Face 13: quadrilateral with nodes 11, 12, 10, 9
* Face 14: quadrilateral with nodes 9, 10, 14, 13
* Face 15: quadrilateral with nodes 12, 14, 4, 3
The Exodus model is created via the following calls:
* Output the initial information. Since the model contains faces and
a face block, the "extended" version of the `ex_put_init_ext()` call must be used:
~~~~C
ex_init_params par;
ex_copy_string(par.title, "This is the title", MAX_LINE_LENGTH + 1);
par.num_dim = 3;
par.num_nodes = 14;
par.num_edge = 0;
par.num_edge_blk = 0;
par.num_face = 15;
par.num_face_blk = 1;
par.num_elem = 3;
par.num_elem_blk = 1;
par.num_node_sets = 0;
par.num_edge_sets = 0;
par.num_face_sets = 0;
par.num_side_sets = 0;
par.num_elem_sets = 0;
par.num_node_maps = 0;
par.num_edge_maps = 0;
par.num_face_maps = 0;
par.num_elem_maps = 0;
ex_put_init_ext (exoid, &par);
~~~~
* Coordinate output is normal...
* Define the face block.
~~~~C
block_name = "face_block_1";
num_face_in_block[0] = 15;
num_total_nodes_per_blk[0] = 58;
block_id = 10;
ex_put_block (exoid, EX_FACE_BLOCK, block_id, "nsided",
num_face_in_block[0],
num_total_nodes_per_blk[0],
0, 0, 0);
ex_put_name(exoid, EX_FACE_BLOCK, block_id, block_name);
~~~~
* Output the face connectivity for "face_block_1".
The data for the face connectivity is listed above; a portion is shown below...
~~~~C
connect = (int *) calloc(num_total_nodes_per_blk[0], sizeof(int));
i = 0
connect[i++] = 5;
connect[i++] = 6;
connect[i++] = 8; /* connectivity of face 1 of element 1 */
connect[i++] = 2;
connect[i++] = 1;
connect[i++] = 4; /* face 2 of element 1 */
connect[i++] = 6;
connect[i++] = 2;
connect[i++] = 4;
connect[i++] = 8; /* face 3 of element 1 */
connect[i++] = 8;
connect[i++] = 4;
connect[i++] = 1;
connect[i++] = 5; /* face 4 of element 1 */
connect[i++] = 1;
connect[i++] = 2;
connect[i++] = 6;
connect[i++] = 5; /* face 5 of element 1 */
connect[i++] = 5;
connect[i++] = 8;
connect[i++] = 7; /* connectivity of face 1 of element 2 */
... and so on....
assert(i == num_total_nodes_per_blk[0]);
ex_put_conn (exoid, EX_FACE_BLOCK, block_id, connect, NULL, NULL);
~~~~
* Output the number of nodes per face count for "face_block_1":
~~~~C
j = 0;
nnpe[ 1] = 3; /* Face 1 */
nnpe[ 2] = 3;
nnpe[ 3] = 4;
nnpe[ 4] = 4;
nnpe[ 5] = 4;
nnpe[ 6] = 3;
nnpe[ 7] = 3;
nnpe[ 8] = 4;
nnpe[ 9] = 4;
nnpe[10] = 5;
nnpe[11] = 5;
nnpe[12] = 4;
nnpe[13] = 4;
nnpe[14] = 4;
nnpe[15] = 4;
ex_put_entity_count_per_polyhedra(exoid, EX_FACE_BLOCK, block_id, nnpe);
~~~~
* The face block is now fully defined; now define the nfaced element
block which uses these faces.
~~~~C
block_name = "nfaced_1";
num_elem_in_block = 3;
num_total_faces_per_blk = 5 + 5 + 7;
block_id = 10;
ex_put_block (exoid, EX_ELEM_BLOCK, block_id, "nfaced",
num_elem_in_block,
0, /* nodes */
0, /* edges */
num_total_faces_per_blk,
0); /* attribute count */
ex_put_name(exoid, EX_ELEM_BLOCK, block_id, block_name);
~~~~
In the `ex_put_block()` function, the element type is "nfaced". The
connectivity is defined in terms of the faces, so the node and edge
arguments are passed zeros. The nodal connectivity can be defined,
but it isn't required. The face connectivity argument for an
nfaced block is the total number of faces in the connectivity for all
elements in the nfaced block.
* Write the face connectivity:
~~~~C
/* write element-face connectivity */
connect = (int *) calloc(num_total_faces_per_blk, sizeof(int));
i = 0;
connect[i++] = 1;
connect[i++] = 2;
connect[i++] = 3;
connect[i++] = 4;
connect[i++] = 5;
connect[i++] = 4;
connect[i++] = 6;
connect[i++] = 7;
connect[i++] = 8;
connect[i++] = 9;
connect[i++] = 8;
connect[i++] = 10;
connect[i++] = 11;
connect[i++] = 12;
connect[i++] = 13;
connect[i++] = 14;
connect[i++] = 15;
assert(i == num_total_faces_per_blk);
ex_put_conn (exoid, EX_ELEM_BLOCK, block_id, NULL, NULL, connect);
~~~~
* Output the number of faces per element count for "nfaced_1":
~~~~C
nnpe[1] = 5; /* Number of faces per element 1 */
nnpe[2] = 5; /* Number of faces per element 2 */
nnpe[3] = 7; /* Number of faces per element 3 */
ex_put_entity_count_per_polyhedra(exoid, EX_ELEM_BLOCK, block_id, nnpe);
~~~~
* That's all; the rest of the calls are the same as normal Exodus except:
* There is a similar `ex_get_entity_count_per_polyhedra()` function for read.
* The `ex_get_block()` functions return the total number of nodes or
faces for all faces or element for "nfaced" and "nsided" blocks
and not the number per element
* An example read/write usage is shown in the
[testwt-nfaced.c](../test/testwt-nfaced.c) and [testrd-nfaced](../test/testrd-nfaced.c) files.
* These changes are in Exodus version v4.93 and later.

@ -1,329 +0,0 @@
! -*- mode: fortran -*-
!
! Copyright(C) 1999-2020 National Technology & Engineering Solutions
! of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
! NTESS, the U.S. Government retains certain rights in this software.
!
! See packages/seacas/LICENSE for details
!***************************************************************
!
! Name: exodusII.inc - Exodus II Application include file
!
! Use this include file to define general Exodus II parameters
!
!*****************************************************************************
!
! Define Exodus functions that return values
!
integer excre,exopen,exlgmd, exinqi
external excre, exopen, exlgmd, exinqi
!
! Define access modes
!
integer EXNOCL,EXCLOB,EXREAD,EXWRIT,EXWRT,EXNORM,EXLARG
integer EXNET4, EXNOSH, EXSHAR
integer EX_READ,EX_WRITE,EX_NOCLOBBER,EX_CLOBBER,EX_NORMAL_MODEL
integer EX_LARGE_MODEL,EX_NETCDF4,EX_NOSHARE,EX_SHARE
integer EX_NOCLASSIC,EX_MAPS_INT64_DB,EX_IDS_INT64_DB
integer EX_BULK_INT64_DB,EX_ALL_INT64_DB
integer EX_MAPS_INT64_API
integer EX_IDS_INT64_API,EX_BULK_INT64_API,EX_ALL_INT64_API
integer EX_DISKLESS, EX_MMAP, EX_64BIT_OFFSET, EX_64BIT_DATA
integer EX_OPT_MAX_NAME_LENGTH
integer EX_OPT_COMPRESSION_TYPE
integer EX_OPT_COMPRESSION_LEVEL
integer EX_OPT_COMPRESSION_SHUFFLE
integer EX_OPT_INTEGER_SIZE_API
integer EX_OPT_INTEGER_SIZE_DB
parameter (EXWRIT = 1) ! EXWRIT - File open for write
parameter (EXWRT = 1) ! EXWRT - File open for write (alternate to EXWRIT)
parameter (EXREAD = 2) ! EXREAD - File open for read
parameter (EXNOCL = 4) ! EXNOCL - File create with no overwrite (no clobber), default
parameter (EXCLOB = 8) ! EXCLOB - File create with overwrite (clobber)
parameter (EXNORM = 16) ! EXNORM - Disable large model modifications
parameter (EXLARG = 32) ! EXLARG - Large model modifications
parameter (EXNET4 = 64) ! EXNET4 - use the hdf5-based netcdf4 output
parameter (EXNOSH = 128) ! EXNOSH - Do not open netcdf file in "share" mode
parameter (EXSHAR = 256) ! EXSHAR - Do open netcdf file in "share" mode
! Some of these are repeated from above, but use the same name as the C/C++ versions...
parameter (EX_READ = 0) !ex_open(): open file for reading (default)
parameter (EX_WRITE = 1) ! ex_open(): open existing file for appending.
parameter (EX_NOCLOBBER = 4) ! Don't overwrite existing database, default
parameter (EX_CLOBBER = 8) ! Overwrite existing database if it exists
parameter (EX_NORMAL_MODEL = 16) ! disable mods that permit storage of larger models
parameter (EX_LARGE_MODEL = 32) ! enable mods that permit storage of larger models
parameter (EX_NETCDF4 = 64) ! use the hdf5-based netcdf4 output
parameter (EX_64BIT_OFFSET = 32) ! enable mods that permit storage of larger models
parameter (EX_64BIT_DATA =4194304) ! CDF-5 format: classic model but 64 bit dimensions and sizes
parameter (EX_NOSHARE = 128) ! Do not open netcdf file in "share" mode
parameter (EX_SHARE = 256) ! Do open netcdf file in "share" mode
parameter (EX_NOCLASSIC = 512) ! Do not force netcdf to classic mode in netcdf4 mode
parameter (EX_DISKLESS =1048576) ! Experimental
parameter (EX_MMAP =2097152) ! Experimental
! Need to distinguish between storage on database (DB in name) and
! passed through the API functions (API in name).
parameter (EX_MAPS_INT64_DB = 1024) ! All maps (id, order, ...) store int64_t values
parameter (EX_IDS_INT64_DB = 2048) ! All entity ids (sets, blocks, maps) are int64_t values
parameter (EX_BULK_INT64_DB = 4096) ! All integer bulk data (local indices, counts, maps); not ids
parameter (EX_ALL_INT64_DB = 1024+2048+4096) ! All of the above...
parameter (EX_MAPS_INT64_API= 8192) ! All maps (id, order, ...) store int64_t values
parameter (EX_IDS_INT64_API = 16384) ! All entity ids (sets, blocks, maps) are int64_t values
parameter (EX_BULK_INT64_API= 32768) ! All integer bulk data (local indices, counts, maps); not ids
parameter (EX_ALL_INT64_API = 8192+16384+32768) ! All of the above...
!
! -- For EXSETOPT Calls
parameter (EX_OPT_MAX_NAME_LENGTH = 1)
parameter (EX_OPT_COMPRESSION_TYPE = 2) !Currently not used. GZip by default
parameter (EX_OPT_COMPRESSION_LEVEL = 3) ! 0 (disabled/fastest) ... 9 (best/slowest)
parameter (EX_OPT_COMPRESSION_SHUFFLE = 4) ! 0 (disabled); 1 (enabled)
parameter (EX_OPT_INTEGER_SIZE_API = 5) ! See *_INT64_* values above
parameter (EX_OPT_INTEGER_SIZE_DB = 6) ! (query only)
!
! --INQUIRE FLAGS
integer EX_INQ_FILE_TYPE, EX_INQ_API_VERS, EX_INQ_DB_VERS
integer EX_INQ_TITLE, EX_INQ_DIM, EX_INQ_NODES
integer EX_INQ_ELEM, EX_INQ_ELEM_BLK, EX_INQ_NODE_SETS
integer EX_INQ_NS_NODE_LEN, EX_INQ_SIDE_SETS
integer EX_INQ_SS_NODE_LEN, EX_INQ_SS_ELEM_LEN, EX_INQ_QA
integer EX_INQ_INFO, EX_INQ_TIME, EX_INQ_EB_PROP
integer EX_INQ_NS_PROP, EX_INQ_SS_PROP, EX_INQ_NS_DF_LEN
integer EX_INQ_SS_DF_LEN, EX_INQ_LIB_VERS
integer EX_INQ_EM_PROP, EX_INQ_NM_PROP, EX_INQ_ELEM_MAP
integer EX_INQ_NODE_MAP, EX_INQ_EDGE
integer EX_INQ_EDGE_BLK, EX_INQ_EDGE_SETS, EX_INQ_ES_LEN
integer EX_INQ_ES_DF_LEN, EX_INQ_EDGE_PROP
integer EX_INQ_ES_PROP, EX_INQ_FACE, EX_INQ_FACE_BLK
integer EX_INQ_FACE_SETS, EX_INQ_FS_LEN
integer EX_INQ_FS_DF_LEN, EX_INQ_FACE_PROP, EX_INQ_FS_PROP
integer EX_INQ_ELEM_SETS, EX_INQ_ELS_LEN
integer EX_INQ_ELS_DF_LEN, EX_INQ_ELS_PROP, EX_INQ_EDGE_MAP
integer EX_INQ_FACE_MAP, EX_INQ_COORD_FRAMES
integer EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH
integer EX_INQ_DB_MAX_USED_NAME_LENGTH
integer EX_INQ_MAX_READ_NAME_LENGTH
integer EX_INQ_DB_FLOAT_SIZE, EX_INQ_NUM_CHILD_GROUPS
integer EX_INQ_GROUP_PARENT, EX_INQ_GROUP_ROOT
integer EX_INQ_GROUP_NAME_LEN, EX_INQ_GROUP_NAME
integer EX_INQ_FULL_GROUP_NAME_LEN, EX_INQ_FULL_GROUP_NAME
integer EX_INQ_THREADSAFE, EX_INQ_INVALID
parameter (EX_INQ_FILE_TYPE = 1) ! inquire EXODUS file type
parameter (EX_INQ_API_VERS = 2) ! inquire API version number
parameter (EX_INQ_DB_VERS = 3) ! inquire database version number
parameter (EX_INQ_TITLE = 4) ! inquire database title
parameter (EX_INQ_DIM = 5) ! inquire number of dimensions
parameter (EX_INQ_NODES = 6) ! inquire number of nodes
parameter (EX_INQ_ELEM = 7) ! inquire number of elements
parameter (EX_INQ_ELEM_BLK = 8) ! inquire number of element blocks
parameter (EX_INQ_NODE_SETS = 9) ! inquire number of node sets
parameter (EX_INQ_NS_NODE_LEN = 10) ! inquire length of node set node list
parameter (EX_INQ_SIDE_SETS = 11) ! inquire number of side sets
parameter (EX_INQ_SS_NODE_LEN = 12) ! inquire length of side set node list
parameter (EX_INQ_SS_ELEM_LEN = 13) ! inquire length of side set element list
parameter (EX_INQ_QA = 14) ! inquire number of QA records
parameter (EX_INQ_INFO = 15) ! inquire number of info records
parameter (EX_INQ_TIME = 16) ! inquire number of time steps in the database
parameter (EX_INQ_EB_PROP = 17) ! inquire number of element block properties
parameter (EX_INQ_NS_PROP = 18) ! inquire number of node set properties
parameter (EX_INQ_SS_PROP = 19) ! inquire number of side set properties
parameter (EX_INQ_NS_DF_LEN = 20) ! inquire length of node set distribution factor list
parameter (EX_INQ_SS_DF_LEN = 21) ! inquire length of side set distribution factor list
parameter (EX_INQ_LIB_VERS = 22) ! inquire API Lib vers number
parameter (EX_INQ_EM_PROP = 23) ! inquire number of element map properties
parameter (EX_INQ_NM_PROP = 24) ! inquire number of node map properties
parameter (EX_INQ_ELEM_MAP = 25) ! inquire number of element maps
parameter (EX_INQ_NODE_MAP = 26) ! inquire number of node maps
parameter (EX_INQ_EDGE = 27) ! inquire number of edges
parameter (EX_INQ_EDGE_BLK = 28) ! inquire number of edge blocks
parameter (EX_INQ_EDGE_SETS = 29) ! inquire number of edge sets
parameter (EX_INQ_ES_LEN = 30) ! inquire length of concat edge set edge list
parameter (EX_INQ_ES_DF_LEN = 31) ! inquire length of concat edge set dist factor list
parameter (EX_INQ_EDGE_PROP = 32) ! inquire number of properties stored per edge block
parameter (EX_INQ_ES_PROP = 33) ! inquire number of properties stored per edge set
parameter (EX_INQ_FACE = 34) ! inquire number of faces
parameter (EX_INQ_FACE_BLK = 35) ! inquire number of face blocks
parameter (EX_INQ_FACE_SETS = 36) ! inquire number of face sets
parameter (EX_INQ_FS_LEN = 37) ! inquire length of concat face set face list
parameter (EX_INQ_FS_DF_LEN = 38) ! inquire length of concat face set dist factor list
parameter (EX_INQ_FACE_PROP = 39) ! inquire number of properties stored per face block
parameter (EX_INQ_FS_PROP = 40) ! inquire number of properties stored per face set
parameter (EX_INQ_ELEM_SETS = 41) ! inquire number of element sets
parameter (EX_INQ_ELS_LEN = 42) ! inquire length of concat element set element list
parameter (EX_INQ_ELS_DF_LEN = 43) ! inquire length of concat element set dist factor list
parameter (EX_INQ_ELS_PROP = 44) ! inquire number of properties stored per elem set
parameter (EX_INQ_EDGE_MAP = 45) ! inquire number of edge maps
parameter (EX_INQ_FACE_MAP = 46) ! inquire number of face maps
parameter (EX_INQ_COORD_FRAMES = 47) ! inquire number of coordinate frames
parameter (EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH = 48) !inquire size of MAX_NAME_LENGTH dimension on database
parameter (EX_INQ_DB_MAX_USED_NAME_LENGTH = 49) ! inquire size of MAX_NAME_LENGTH dimension on database
parameter (EX_INQ_MAX_READ_NAME_LENGTH = 50) ! inquire client-specified max size of returned names
parameter (EX_INQ_DB_FLOAT_SIZE = 51) ! inquire size of floating-point values stored on database
parameter (EX_INQ_NUM_CHILD_GROUPS = 52) ! inquire number of groups contained in this (exoid) group
parameter (EX_INQ_GROUP_PARENT = 53) ! inquire id of parent of this (exoid) group; returns exoid if at root
parameter (EX_INQ_GROUP_ROOT = 54) ! inquire id of root group "/" of this (exoid) group; returns exoid if at root
parameter (EX_INQ_GROUP_NAME_LEN = 55) ! inquire length of name of group exoid
parameter (EX_INQ_GROUP_NAME = 56) ! inquire name of group exoid. "/" returned for root group
parameter (EX_INQ_FULL_GROUP_NAME_LEN = 57) ! inquire length of full path name of this (exoid) group
parameter (EX_INQ_FULL_GROUP_NAME = 58) ! inquire full "/"-separated path name of this (exoid) group
parameter (EX_INQ_THREADSAFE = 59) ! Returns 1 if library is thread-safe; 0 otherwise
parameter (EX_INQ_INVALID = -1)
integer EXTYPE, EXVERS, EXDBVR, EXTITL, EXDIM, EXNODE
integer EXELEM, EXELBL, EXNODS, EXSIDS, EXQA, EXINFO
integer EXTIMS, EXSSNL, EXSSEL, EXNSNL, EXNEBP, EXNNSP
integer EXNSSP, EXNSDF, EXSSDF, EXLBVR, EXNEMP, EXNNMP
integer EXNEM, EXNNM, EXNEDG, EXNEDB, EXNEDS, EXESL
integer EXESDL, EXEDBP, EXEDSP, EXNFAC, EXNFB , EXNFS
integer EXFSL , EXFSDL, EXFABP, EXFASP, EXNELS, EXELSL
integer EXELSD, EXELSP, EXNEDM, EXNFAM, EXNCF, EXDBMXALNM
integer EXDBMXUSNM, EXMXRDNM
!
parameter (EXTYPE = 1) ! -- inquire EXODUS II file type
parameter (EXVERS = 2) ! -- inquire API version number
parameter (EXDBVR = 3) ! -- inquire database version number
parameter (EXTITL = 4) ! -- inquire database title
parameter (EXDIM = 5) ! -- inquire number of dimensions
parameter (EXNODE = 6) ! -- inquire number of nodes
parameter (EXELEM = 7) ! -- inquire number of elements
parameter (EXELBL = 8) ! -- inquire number of element blocks
parameter (EXNODS = 9) ! -- inquire number of node sets
parameter (EXNSNL = 10) ! -- inquire length of node set node list
parameter (EXSIDS = 11) ! -- inquire number of side sets
parameter (EXSSNL = 12) ! -- inquire length of side set node list
parameter (EXSSEL = 13) ! -- inquire length of side set element list
parameter (EXQA = 14) ! -- inquire number of QA records
parameter (EXINFO = 15) ! -- inquire number of info records
parameter (EXTIMS = 16) ! -- inquire number of time steps in the database
parameter (EXNEBP = 17) ! -- inquire number of element block properties
parameter (EXNNSP = 18) ! -- inquire number of node set properties
parameter (EXNSSP = 19) ! -- inquire number of side set properties
parameter (EXNSDF = 20) ! -- inquire length of node set distribution factor list
parameter (EXSSDF = 21) ! -- inquire length of side set distribution factor list
parameter (EXLBVR = 22) ! -- inquire API Lib vers number
parameter (EXNEMP = 23) ! -- inquire number of element map properties
parameter (EXNNMP = 24) ! -- inquire number of node map properties
parameter (EXNEM = 25) ! -- inquire number of element maps
parameter (EXNNM = 26) ! -- inquire number of node maps
parameter (EXNEDG = 27) ! -- inquire number of edges
parameter (EXNEDB = 28) ! -- inquire number of edge blocks
parameter (EXNEDS = 29) ! -- inquire number of edge sets
parameter (EXESL = 30) ! -- inquire length of concat edge set edge list
parameter (EXESDL = 31) ! -- inquire length of concat edge set dist factor list
parameter (EXEDBP = 32) ! -- inquire number of properties stored per edge block
parameter (EXEDSP = 33) ! -- inquire number of properties stored per edge set
Parameter (EXNFAC = 34) ! -- inquire number of faces
parameter (EXNFB = 35) ! -- inquire number of face blocks
parameter (EXNFS = 36) ! -- inquire number of face sets
parameter (EXFSL = 37) ! -- inquire length of concat face set face list
parameter (EXFSDL = 38) ! -- inquire length of concat face set dist factor list
parameter (EXFABP = 39) ! -- inquire number of properties stored per face block
parameter (EXFASP = 40) ! -- inquire number of properties stored per face set
parameter (EXNELS = 41) ! -- inquire number of element sets
parameter (EXELSL = 42) ! -- inquire length of concat element set element list
parameter (EXELSD = 43) ! -- inquire length of concat element set dist factor list
parameter (EXELSP = 44) ! -- inquire number of properties stored per elem set
parameter (EXNEDM = 45) ! -- inquire number of edge maps
parameter (EXNFAM = 46) ! -- inquire number of face maps
parameter (EXNCF = 47) ! -- inquire number of coordinate frames
parameter (EXDBMXALNM = 48)! -- inquire size of MAX_NAME_LENGTH dimension on database
parameter (EXDBMXUSNM = 49)! -- inquire max size of any name existing on database
parameter (EXMXRDNM = 50) ! -- inquire user-specified max size of names returned; truncated if longer
!
! Define limits
!
integer MXSTLN, MXLNLN, MXNAME
! MXSTLN - Maximum string length: used for store strings
parameter (MXSTLN = 32)
! MXLNLN - Maximum line string length
parameter (MXLNLN = 80)
! MXNAME - Maximum possible length of a name (due to netcdf NC_MAX_NAME)
parameter (MXNAME = 256)
!
! properties
!
integer EXEBLK, EXNSET, EXSSET, EXEMAP, EXNMAP
parameter (EXEBLK = 1) ! EXEBLK - element block property code
parameter (EXNSET = 2) ! EXNSPR - node set property code
parameter (EXSSET = 3) ! EXSSPR - side set property code
parameter (EXEMAP = 4) ! EXEMAP - element map property code
parameter (EXNMAP = 5) ! EXNMAP - node map property code
! Define values for type
!
integer EX_NODAL, EX_NODE_BLOCK, EX_NODE_SET, EX_EDGE_BLOCK
integer EX_EDGE_SET, EX_FACE_BLOCK, EX_FACE_SET, EX_ELEM_BLOCK
integer EX_ELEM_SET, EX_SIDE_SET, EX_ELEM_MAP, EX_NODE_MAP
integer EX_EDGE_MAP, EX_FACE_MAP, EX_GLOBAL, EX_COORDINATE
integer EX_INVALID
parameter (EX_NODAL = 14) ! nodal "block" for variables
parameter (EX_NODE_BLOCK = 14) ! alias for EX_NODAL
parameter (EX_NODE_SET = 2) ! node set property code
parameter (EX_EDGE_BLOCK = 6) ! edge block property code
parameter (EX_EDGE_SET = 7) ! edge set property code
parameter (EX_FACE_BLOCK = 8) ! face block property code
parameter (EX_FACE_SET = 9) ! face set property code
parameter (EX_ELEM_BLOCK = 1) ! element block property code
parameter (EX_ELEM_SET = 10) ! face set property code
parameter (EX_SIDE_SET = 3) ! side set property code
parameter (EX_ELEM_MAP = 4) ! element map property code
parameter (EX_NODE_MAP = 5) ! node map property code
parameter (EX_EDGE_MAP = 11) ! edge map property code
parameter (EX_FACE_MAP = 12) ! face map property code
parameter (EX_GLOBAL = 13) ! global "block" for variables
parameter (EX_COORDINATE = 15) ! kluge so some internal wrapper functions work
parameter (EX_INVALID = -1)
!
! Define options codes
!
integer EXVRBS, EXDEBG, EXABRT
parameter (EXVRBS = 1) ! EXVRBS - verbose mode message flag
parameter (EXDEBG = 2) ! EXDEBG - debug mode message flag
parameter (EXABRT = 4) ! EXABRT - abort mode flag
!
! Define coordinate frames
!
integer EXCFREC, EXCFCYL, EXCFSPH
parameter (EXCFREC = 1) ! Rectangular
parameter (EXCFCYL = 2) ! Cylindrical
parameter (EXCFSPH = 3) ! Spherical
!
! Define error return codes
!
integer EXFATL, EXOK, EXWARN
parameter (EXFATL = -1) ! EXFATL - fatal error flag def
parameter (EXOK = 0) ! EXOK - no err (success) flag def
parameter (EXWARN = 1) ! EXWARN - warning flag def
!
! Define error return codes and flags
!
integer EXMEMF, EXBFMD, EXBFID, EXBTID, EXBPRM, EXNULL
integer EXPMSG, EXLMSG
parameter (EXMEMF = 1000) ! EXMEMF - memory allocation failure flag def
parameter (EXBFMD = 1001) ! EXBFMD - wrong file mode
parameter (EXBFID = 1002) ! EXBFID - bad file id def
parameter (EXBTID = 1004) ! EXBTID - id table lookup failed
parameter (EXBPRM = 1005) ! EXBPRM - bad parameter passed
parameter (EXNULL = -1006) ! EXNULL - null entity found
parameter (EXPMSG = -1000) ! EXPMSG - message print code - no error implied
parameter (EXLMSG = -1001) ! EXLMSG - print last error message msg code

@ -1,65 +0,0 @@
# @HEADER
#
########################################################################
#
# Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
# Copyright 2012 Sandia Corporation
#
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Corporation nor the names of the
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
# 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.
#
# Questions? Contact Karen Devine kddevin@sandia.gov
# Erik Boman egboman@sandia.gov
#
########################################################################
#
# @HEADER
Include files for the Zoltan interface.
Only interface functions and definitions that are application-visible
should be in this directory.
zoltan.h -- Main include file for all Zoltan functionality.
zoltan_mem.h -- Interface for Zoltan Memory package.
(Copied from Utilities/Memory/zoltan_mem.h.)
zoltan_comm.h -- Interface for Zoltan Communication package.
(Copied from Utilities/Communication/zoltan_comm.h.)
zoltan_dd.h -- Interface for Zoltan Distributed Directory package.
(Copied from Utilities/DDirectory/zoltan_dd.h.)
zoltan_types.h -- Data types for Zoltan IDs and error codes.
zoltan_align.h -- Prototype for data alignment functions used by Zoltan.

@ -1,81 +0,0 @@
/* src/include/Zoltan_config.h.in. Generated from configure.ac by autoheader. */
/* Define to dummy `main' function (if any) required to link to the Fortran
libraries. */
#undef FC_DUMMY_MAIN
/* Define if F77 and FC dummy `main' functions are identical. */
#undef FC_DUMMY_MAIN_EQ_F77
/* Define to a macro mangling the given C identifier (in lower and upper
case), which must not contain underscores, for linking with Fortran. */
#undef FC_FUNC
/* As FC_FUNC, but for C identifiers containing underscores. */
#undef FC_FUNC_
/* Define if want to build examples */
#undef HAVE_EXAMPLES
/* Define if you want to build export makefiles. */
#undef HAVE_EXPORT_MAKEFILES
/* Define if want to build with f90interface enabled */
#undef HAVE_F90INTERFACE
/* Define if you are using gnumake - this will shorten your link lines. */
#undef HAVE_GNUMAKE
/* Define if want to build with gzip enabled */
#undef ZHAVE_GZIP
/* define if we want to use MPI */
#undef HAVE_MPI
/* Define if want to build with nemesis_exodus enabled */
#undef HAVE_NEMESIS_EXODUS
/* Define if want to build with parmetis enabled */
#undef HAVE_PARMETIS
/* Define if want to build with patoh enabled */
#undef HAVE_PATOH
/* Define if want to build with scotch enabled */
#undef HAVE_SCOTCH
/* Define if want to build tests */
#undef HAVE_TESTS
/* Define if want to build zoltan-cppdriver */
#undef HAVE_ZOLTAN_CPPDRIVER
/* Define if want to build zoltan-examples */
#undef HAVE_ZOLTAN_EXAMPLES
/* Define if want to build with octreepartitioning enabled */
#undef HAVE_ZOLTAN_OCT
/* Define if want to build zoltan-tests */
#undef HAVE_ZOLTAN_TESTS
/* software host will be cygwin */
#undef HOST_CYGWIN
/* software host will be linux */
#undef HOST_LINUX
/* software host will be solaris */
#undef HOST_SOLARIS
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* define if ZOLTAN_ID_TYPE is unsigned int */
#undef UNSIGNED_INT_GLOBAL_IDS
/* define if ZOLTAN_ID_TYPE is unsigned long */
#undef UNSIGNED_LONG_GLOBAL_IDS
/* define if ZOLTAN_ID_TYPE is unsigned long long */
#undef UNSIGNED_LONG_LONG_GLOBAL_IDS

@ -1,52 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
#ifndef __LBI_CONST_H
#define __LBI_CONST_H
#error "ERROR: Use of Zoltan include file lbi_const.h is not supported in Trilinos v11. Update your code to include zoltan.h instead. See instructions at http://www.cs.sandia.gov/Zoltan/Zoltan_FAQ.html"
#endif /* !__LBI_CONST_H */

File diff suppressed because it is too large Load Diff

@ -1,74 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
#ifndef __ZOLTAN_ALIGN_H
#define __ZOLTAN_ALIGN_H
#ifdef __cplusplus
/* if C++, define the rest of this header file as extern C */
extern "C" {
#endif
/*
* Plauger alignment algorithm, The Standard C Library.
* Forces malloc'ed variable size struct alignment.
* ZOLTAN_ALIGN_VAL is defined in Zoltan/include/zoltan_align.h;
* values are 0,1,3,7U depending upon machine.
* (E.g., 7U == 8 byte alignment.)
*/
#ifndef ZOLTAN_ALIGN_VAL
#define ZOLTAN_ALIGN_VAL 7U
#endif
extern int Zoltan_Align(int);
extern size_t Zoltan_Align_size_t(size_t);
#ifdef __cplusplus
} /* closing bracket for extern "C" */
#endif
#endif

@ -1,103 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
#ifndef __COMM_CONST_H
#define __COMM_CONST_H
#include <mpi.h>
#ifdef __cplusplus
/* if C++, define the rest of this header file as extern C */
extern "C" {
#endif
/* Interface to the Zoltan Communication Package. */
/* This file should be included by user's of the */
/* Communication package. */
struct Zoltan_Comm_Obj;
typedef struct Zoltan_Comm_Obj ZOLTAN_COMM_OBJ;
/* function prototypes */
int Zoltan_Comm_Create(ZOLTAN_COMM_OBJ**, int, int*, MPI_Comm, int, int*);
int Zoltan_Comm_Copy_To(ZOLTAN_COMM_OBJ **toptr, ZOLTAN_COMM_OBJ *from);
ZOLTAN_COMM_OBJ *Zoltan_Comm_Copy(ZOLTAN_COMM_OBJ *from);
int Zoltan_Comm_Destroy(ZOLTAN_COMM_OBJ**);
int Zoltan_Comm_Invert_Map(int*, int*, int, int, int**, int**, int*, int, int,
int, int, MPI_Comm);
int Zoltan_Comm_Sort_Ints(int*, int*, int);
int Zoltan_Comm_Exchange_Sizes(int*, int*, int, int, int*, int*, int, int*, int,
int, MPI_Comm);
int Zoltan_Comm_Resize(ZOLTAN_COMM_OBJ*, int*, int, int*);
int Zoltan_Comm_Do (ZOLTAN_COMM_OBJ*, int, char*, int, char*);
int Zoltan_Comm_Do_Post(ZOLTAN_COMM_OBJ*, int, char*, int, char*);
int Zoltan_Comm_Do_Wait(ZOLTAN_COMM_OBJ*, int, char*, int, char*);
int Zoltan_Comm_Do_AlltoAll(ZOLTAN_COMM_OBJ*, char*, int, char*);
int Zoltan_Comm_Do_Reverse (ZOLTAN_COMM_OBJ*, int, char*, int, int*, char*);
int Zoltan_Comm_Do_Reverse_Post(ZOLTAN_COMM_OBJ*, int, char*, int, int*, char*);
int Zoltan_Comm_Do_Reverse_Wait(ZOLTAN_COMM_OBJ*, int, char*, int, int*, char*);
int Zoltan_Comm_Info(ZOLTAN_COMM_OBJ*, int*, int*, int*, int*, int*, int*, int*,
int*, int*, int*, int*, int*, int*);
int Zoltan_Comm_Invert_Plan(ZOLTAN_COMM_OBJ**);
#ifdef __cplusplus
} /* closing bracket for extern "C" */
#endif
#endif

@ -1,196 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
//
// ************************************************************************
//
// C++ wrappers for Zoltan communication library.
//
// Two styles of initialization:
//
// C++ style: Zoltan_Comm comm(nvals, assign, comm, tag, pnvals_recv);
//
// C style: Zoltan_Comm comm;
// comm.Create(nvals, assign, comm, tag, pnvals_recv);
//
// ************************************************************************
#ifndef ZOLTAN_COMM_CPP_H_
#define ZOLTAN_COMM_CPP_H_
#include "zoltan_comm.h"
class Zoltan_Comm {
public:
Zoltan_Comm(const int &nvals, int *assign, const MPI_Comm &comm,
const int &tag, int *pnvals_recv)
{
// Assumption: MPI has been initialized prior to this call.
Zoltan_Comm_Create(&this->Plan, nvals, assign, comm, tag, pnvals_recv);
}
Zoltan_Comm()
{
this->Plan = NULL;
// Caller will have to call Create to finish initialization of object
}
int Create(const int &nvals, int *assign, const MPI_Comm &comm,
const int &tag, int *pnvals_recv)
{
if (this->Plan)
{
Zoltan_Comm_Destroy(&this->Plan);
this->Plan = NULL;
}
int rc = Zoltan_Comm_Create(&this->Plan, nvals, assign, comm, tag, pnvals_recv);
return rc;
}
Zoltan_Comm (const Zoltan_Comm &plan) // Copy constructor
{
this->Plan = Zoltan_Comm_Copy(plan.Plan);
}
~Zoltan_Comm()
{
Zoltan_Comm_Destroy(&this->Plan);
}
Zoltan_Comm & operator= (const Zoltan_Comm &plan) // Copy operator
{
Zoltan_Comm_Copy_To(&this->Plan, plan.Plan);
return *this;
}
int Resize(int *sizes, const int &tag, int *sum_recv_sizes)
{
return Zoltan_Comm_Resize( this->Plan, sizes, tag, sum_recv_sizes);
}
int Do(const int &tag, char *send_data, const int &nbytes, char *recv_data)
{
return Zoltan_Comm_Do(this->Plan, tag, send_data, nbytes, recv_data);
}
int Do_Post( const int &tag, char *send_data, const int &nbytes, char *recv_data)
{
return Zoltan_Comm_Do_Post(this->Plan, tag, send_data, nbytes, recv_data);
}
int Do_Wait(const int &tag, char *send_data, const int &nbytes, char *recv_data)
{
return Zoltan_Comm_Do_Wait(this->Plan, tag, send_data, nbytes, recv_data);
}
int Do_Reverse(const int &tag, char *send_data, const int &nbytes, int *sizes, char *recv_data)
{
return Zoltan_Comm_Do_Reverse(this->Plan, tag, send_data, nbytes, sizes,
recv_data);
}
int Do_Reverse_Post(const int &tag, char *send_data, const int &nbytes, int *sizes,
char *recv_data)
{
return Zoltan_Comm_Do_Reverse_Post(this->Plan, tag, send_data, nbytes, sizes,
recv_data);
}
int Do_Reverse_Wait(const int &tag, char *send_data, const int &nbytes, int *sizes,
char *recv_data)
{
return Zoltan_Comm_Do_Reverse_Wait(this->Plan, tag, send_data, nbytes, sizes,
recv_data);
}
int Info( int *nsends, int *send_procs,
int *send_lengths, int *send_nvals, int *send_max_size, int *send_list,
int *nrecvs, int *recv_procs, int *recv_lengths, int *recv_nvals,
int *recv_total_size, int *recv_list, int *self_msg) const
{
return Zoltan_Comm_Info( this->Plan, nsends, send_procs, send_lengths,
send_nvals, send_max_size, send_list, nrecvs, recv_procs, recv_lengths,
recv_nvals, recv_total_size, recv_list, self_msg);
}
int Invert_Plan()
{
return Zoltan_Comm_Invert_Plan(&this->Plan);
}
// Static methods
static int Invert_Map( int *lengths_to, int *procs_to,
const int &nsends, const int &self_msg,
int * &plengths_from, int * &pprocs_from, int &pnrecvs,
const int &my_proc, const int &nprocs, const int &out_of_mem,
const int &tag, const MPI_Comm &comm)
{
return Zoltan_Comm_Invert_Map( lengths_to, procs_to, nsends, self_msg,
&plengths_from, &pprocs_from, &pnrecvs, my_proc, nprocs, out_of_mem,
tag, comm);
}
static int Exchange_Sizes( int *sizes_to, int *procs_to,
const int &nsends, const int &self_msg,
int *sizes_from, int *procs_from, const int &nrecvs, int *total_recv_size,
const int &my_proc, const int &tag, const MPI_Comm &comm)
{
return Zoltan_Comm_Exchange_Sizes(sizes_to, procs_to, nsends, self_msg,
sizes_from, procs_from, nrecvs, total_recv_size, my_proc, tag,
comm);
}
private:
ZOLTAN_COMM_OBJ *Plan;
};
#endif

@ -1,694 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
// ************************************************************************
// C++ class representing a Zoltan_Struct object.
//
// Assumption: Zoltan_Initialize has been called prior to creating
// a Zoltan object.
// ************************************************************************
#ifndef ZOLTAN_CPP_H_
#define ZOLTAN_CPP_H_
#include "zoltan.h"
#include "zoltan_comm_cpp.h"
#include "zoltan_dd_cpp.h"
#include <cstdlib>
/* F90 names must be less than 31 characters, support old name */
#define Set_HG_Size_Edge_Weights_Fn Set_HG_Size_Edge_Wts_Fn
#define Set_HG_Edge_Weights_Fn Set_HG_Edge_Wts_Fn
#ifdef TFLOP
#include <string.h>
#else
#include <string>
#endif
class Zoltan {
public:
// Constructor
Zoltan (const MPI_Comm &communicator = MPI_COMM_WORLD)
{
this->ZZ_Ptr = Zoltan_Create(communicator);
// int fail = (this->ZZ_Ptr == NULL); should catch this exception
}
// Copy constructor
Zoltan (const Zoltan &zz)
{
this->ZZ_Ptr = Zoltan_Copy(zz.ZZ_Ptr);
}
// Destructor
~Zoltan()
{
// Warning: Zoltan_Destroy calls MPI.
// Do not call MPI_Finalize() before this destructor gets called.
// Ensure that ZoltanObject's created on the stack are deleted
// before MPI_Finalize().
// Alternatively, you can allocate and destroy Zoltans explicitly:
//
// MPI_Init(...);
// Zoltan_Initialize(...);
// Zoltan *zz = new Zoltan();
// ... more code ...
// delete zz;
// MPI_Finalize();
Zoltan_Destroy( &(this->ZZ_Ptr) );
}
// Copy operator
Zoltan & operator= (const Zoltan &zz)
{
Zoltan_Copy_To(this->ZZ_Ptr, zz.ZZ_Ptr);
return *this;
}
// Wrappers for Zoltan functions
static int LB_Free_Part( ZOLTAN_ID_PTR *global_ids,
ZOLTAN_ID_PTR *local_ids,
int **procs,
int **to_part )
{
return Zoltan_LB_Free_Part( global_ids, local_ids, procs, to_part );
}
int Set_Param( const std::string & param, const std::string & value )
{
return Zoltan_Set_Param( ZZ_Ptr, param.c_str(), value.c_str() );
}
//! Replaces Zoltan_Set_Param_Vec
int Set_Param_Vec( const std::string & param, const std::string & value,
const int &index )
{
return Zoltan_Set_Param_Vec( ZZ_Ptr, param.c_str(), value.c_str(), index);
}
int LB_Partition ( int &changes,
int &num_gid_entries,
int &num_lid_entries,
int &num_import,
ZOLTAN_ID_PTR &import_global_ids,
ZOLTAN_ID_PTR &import_local_ids,
int * &import_procs,
int * &import_to_part,
int &num_export,
ZOLTAN_ID_PTR &export_global_ids,
ZOLTAN_ID_PTR &export_local_ids,
int * &export_procs,
int * &export_to_part )
{
return Zoltan_LB_Partition( ZZ_Ptr, &changes,
&num_gid_entries, &num_lid_entries,
&num_import, &import_global_ids, &import_local_ids,
&import_procs, &import_to_part,
&num_export, &export_global_ids, &export_local_ids,
&export_procs, &export_to_part );
}
int LB_Set_Part_Sizes( const int &global_num,
const int &len,
int * part_ids,
int * wgt_idx,
float * part_sizes )
{
return Zoltan_LB_Set_Part_Sizes( ZZ_Ptr,
global_num, len,
part_ids, wgt_idx, part_sizes );
}
/* This method is deprecated */
int Order ( int num_gid_entries,
int num_objs,
ZOLTAN_ID_PTR global_ids,
int *rank,
int * /* iperm */ )
{
return Order( num_gid_entries, num_objs, global_ids,
(ZOLTAN_ID_PTR)rank);
}
int Order ( int num_gid_entries,
int num_objs,
ZOLTAN_ID_PTR global_ids,
ZOLTAN_ID_PTR permuted_global_ids)
{
return Zoltan_Order( ZZ_Ptr,
num_gid_entries, num_objs, global_ids,
permuted_global_ids);
}
int Order_Get_Num_Blocks() {
return Zoltan_Order_Get_Num_Blocks(ZZ_Ptr);
}
int Order_Get_Block_Bounds(int block_num, int &first, int &last) {
return Zoltan_Order_Get_Block_Bounds(ZZ_Ptr, block_num, &first, &last);
}
int Order_Get_Block_Size(int block_num) {
return Zoltan_Order_Get_Block_Size(ZZ_Ptr, block_num);
}
int Order_Get_Block_Parent(int block_num) {
return Zoltan_Order_Get_Block_Parent(ZZ_Ptr, block_num);
}
int Order_Get_Num_Leaves() {
return Zoltan_Order_Get_Num_Leaves(ZZ_Ptr);
}
void Order_Get_Block_Leaves(int *leaves) {
return Zoltan_Order_Get_Block_Leaves(ZZ_Ptr, leaves);
}
int Color (int &num_gid_entries,
const int &num_objs,
ZOLTAN_ID_PTR global_ids,
int *color_exp )
{
return Zoltan_Color(ZZ_Ptr, num_gid_entries,
num_objs, global_ids, color_exp);
}
/* Simpler method to do coloring */
/* int Color (int *color_exp); */
int Color_Test (int &num_gid_entries,
int &num_lid_entries,
const int &num_objs,
ZOLTAN_ID_PTR global_ids,
ZOLTAN_ID_PTR local_ids,
int *color_exp )
{
return Zoltan_Color_Test(ZZ_Ptr, &num_gid_entries, &num_lid_entries,
num_objs, global_ids, local_ids, color_exp);
}
int LB_Eval_Balance(int print_stats, ZOLTAN_BALANCE_EVAL *eval)
{
return Zoltan_LB_Eval_Balance(ZZ_Ptr, print_stats, eval);
}
int LB_Eval_Graph(int print_stats, ZOLTAN_GRAPH_EVAL *graph)
{
return Zoltan_LB_Eval_Graph(ZZ_Ptr, print_stats, graph);
}
int LB_Eval_HG(int print_stats, ZOLTAN_HG_EVAL *hg)
{
return Zoltan_LB_Eval_HG(ZZ_Ptr, print_stats, hg);
}
int LB_Eval( const int &print_stats, ZOLTAN_BALANCE_EVAL *eval,
ZOLTAN_GRAPH_EVAL *graph, ZOLTAN_HG_EVAL *hg)
{
return Zoltan_LB_Eval( ZZ_Ptr, print_stats, eval, graph, hg);
}
int RCB_Box( const int &part,
int &ndim,
double &xmin,
double &ymin,
double &zmin,
double &xmax,
double &ymax,
double &zmax )
{
return Zoltan_RCB_Box( ZZ_Ptr,part,&ndim,&xmin,&ymin,&zmin,&xmax,&ymax,&zmax);
}
int Set_Fn ( const ZOLTAN_FN_TYPE &fn_type,
void (*fn_ptr)(),
void * data = 0 )
{
return Zoltan_Set_Fn( ZZ_Ptr, fn_type, fn_ptr, data );
}
// Individual callback support
///--------------------------
int Set_Part_Multi_Fn ( ZOLTAN_PART_MULTI_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Part_Multi_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Part_Fn ( ZOLTAN_PART_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Part_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Num_Edges_Multi_Fn ( ZOLTAN_NUM_EDGES_MULTI_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Num_Edges_Multi_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Num_Edges_Fn ( ZOLTAN_NUM_EDGES_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Num_Edges_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Edge_List_Multi_Fn ( ZOLTAN_EDGE_LIST_MULTI_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Edge_List_Multi_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Edge_List_Fn ( ZOLTAN_EDGE_LIST_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Edge_List_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Num_Geom_Fn ( ZOLTAN_NUM_GEOM_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Num_Geom_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Geom_Multi_Fn ( ZOLTAN_GEOM_MULTI_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Geom_Multi_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Geom_Fn ( ZOLTAN_GEOM_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Geom_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Num_Obj_Fn ( ZOLTAN_NUM_OBJ_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Num_Obj_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Obj_List_Fn ( ZOLTAN_OBJ_LIST_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Obj_List_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_First_Obj_Fn ( ZOLTAN_FIRST_OBJ_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_First_Obj_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Next_Obj_Fn ( ZOLTAN_NEXT_OBJ_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Next_Obj_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Num_Coarse_Obj_Fn ( ZOLTAN_NUM_COARSE_OBJ_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Num_Coarse_Obj_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Coarse_Obj_List_Fn ( ZOLTAN_COARSE_OBJ_LIST_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Coarse_Obj_List_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_First_Coarse_Obj_Fn( ZOLTAN_FIRST_COARSE_OBJ_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_First_Coarse_Obj_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Next_Coarse_Obj_Fn ( ZOLTAN_NEXT_COARSE_OBJ_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Next_Coarse_Obj_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Num_Child_Fn ( ZOLTAN_NUM_CHILD_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Num_Child_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Child_List_Fn ( ZOLTAN_CHILD_LIST_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Child_List_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Child_Weight_Fn ( ZOLTAN_CHILD_WEIGHT_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Child_Weight_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_HG_Size_CS_Fn ( ZOLTAN_HG_SIZE_CS_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_HG_Size_CS_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_HG_CS_Fn ( ZOLTAN_HG_CS_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_HG_CS_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_HG_Size_Edge_Wts_Fn ( ZOLTAN_HG_SIZE_EDGE_WTS_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_HG_Size_Edge_Wts_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_HG_Edge_Wts_Fn ( ZOLTAN_HG_EDGE_WTS_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_HG_Edge_Wts_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Hier_Num_Levels_Fn( ZOLTAN_HIER_NUM_LEVELS_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Hier_Num_Levels_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Hier_Part_Fn( ZOLTAN_HIER_PART_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Hier_Part_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Hier_Method_Fn( ZOLTAN_HIER_METHOD_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Hier_Method_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Num_Fixed_Obj_Fn ( ZOLTAN_NUM_FIXED_OBJ_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Num_Fixed_Obj_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Fixed_Obj_List_Fn ( ZOLTAN_FIXED_OBJ_LIST_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Fixed_Obj_List_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Pre_Migrate_PP_Fn ( ZOLTAN_PRE_MIGRATE_PP_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Pre_Migrate_PP_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Mid_Migrate_PP_Fn ( ZOLTAN_MID_MIGRATE_PP_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Mid_Migrate_PP_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Post_Migrate_PP_Fn ( ZOLTAN_POST_MIGRATE_PP_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Post_Migrate_PP_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Obj_Size_Multi_Fn ( ZOLTAN_OBJ_SIZE_MULTI_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Obj_Size_Multi_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Obj_Size_Fn ( ZOLTAN_OBJ_SIZE_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Obj_Size_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Pack_Obj_Multi_Fn ( ZOLTAN_PACK_OBJ_MULTI_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Pack_Obj_Multi_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Pack_Obj_Fn ( ZOLTAN_PACK_OBJ_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Pack_Obj_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Unpack_Obj_Multi_Fn( ZOLTAN_UNPACK_OBJ_MULTI_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Unpack_Obj_Multi_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Unpack_Obj_Fn ( ZOLTAN_UNPACK_OBJ_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Unpack_Obj_Fn( ZZ_Ptr, fn_ptr, data );
}
/// Backward compatibility with v3.0
///--------------------------
int Set_Partition_Multi_Fn ( ZOLTAN_PART_MULTI_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Part_Multi_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Partition_Fn ( ZOLTAN_PART_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Part_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
int Set_Hier_Partition_Fn( ZOLTAN_HIER_PART_FN * fn_ptr,
void * data = 0 )
{
return Zoltan_Set_Hier_Part_Fn( ZZ_Ptr, fn_ptr, data );
}
///--------------------------
/// Version that returns only part assignment
int LB_Point_PP_Assign ( double * const coords,
int &part )
{
return Zoltan_LB_Point_PP_Assign( ZZ_Ptr, coords, NULL, &part );
}
///--------------------------
/// Version that returns part assignment and mapping to proc as well
int LB_Point_PP_Assign ( double * const coords,
int &proc,
int &part )
{
return Zoltan_LB_Point_PP_Assign( ZZ_Ptr, coords, &proc, &part );
}
///--------------------------
int LB_Box_PP_Assign ( const double &xmin,
const double &ymin,
const double &zmin,
const double &xmax,
const double &ymax,
const double &zmax,
int * const procs,
int &numprocs,
int * const parts,
int &numparts )
{
return Zoltan_LB_Box_PP_Assign( ZZ_Ptr,
xmin, ymin, zmin,
xmax, ymax, zmax,
procs, &numprocs,
parts, &numparts );
}
///--------------------------
int Invert_Lists ( const int &num_known,
ZOLTAN_ID_PTR const known_global_ids,
ZOLTAN_ID_PTR const known_local_ids,
int * const known_procs,
int * const known_to_part,
int &num_found,
ZOLTAN_ID_PTR &found_global_ids,
ZOLTAN_ID_PTR &found_local_ids,
int * &found_procs,
int * &found_to_part )
{
return Zoltan_Invert_Lists( ZZ_Ptr,
num_known, known_global_ids, known_local_ids,
known_procs, known_to_part,
&num_found, &found_global_ids, &found_local_ids,
&found_procs, &found_to_part );
}
///--------------------------
int Migrate ( const int &num_import,
ZOLTAN_ID_PTR const import_global_ids,
ZOLTAN_ID_PTR const import_local_ids,
int * const import_procs,
int * const import_to_part,
const int &num_export,
ZOLTAN_ID_PTR const export_global_ids,
ZOLTAN_ID_PTR const export_local_ids,
int * const export_procs,
int * const export_to_part )
{
return Zoltan_Migrate( ZZ_Ptr,
num_import, import_global_ids, import_local_ids,
import_procs, import_to_part,
num_export, export_global_ids, export_local_ids,
export_procs, export_to_part );
}
///--------------------------
int Generate_Files( std::string & fname,
const int &base_index,
const int &gen_geom,
const int &gen_graph,
const int &gen_hg )
{
// c_str() is a "const char *", and Zoltan_Generate_Files may re-write
// the name passed in, so in order to compile we need a non-const
// "char *" file name to pass to Zoltan_Generate_Files.
#ifdef TFLOP
char *fn = strdup((char *)fname.c_str());
#else
char *fn = strdup(fname.c_str());
#endif
int rc = Zoltan_Generate_Files( ZZ_Ptr, fn, base_index,
gen_geom, gen_graph, gen_hg );
std::free(fn);
return rc;
}
//---------------------------------------------------
// Expert functions; see zoltan.h for details
int Serialize_Size() {
return Zoltan_Serialize_Size( ZZ_Ptr );
}
int Serialize(size_t bufSize, char *buf) {
return Zoltan_Serialize( ZZ_Ptr, bufSize, buf);
}
int Deserialize(size_t bufSize, char *buf) {
return Zoltan_Deserialize( ZZ_Ptr, bufSize, buf);
}
//---------------------------------------------------
// Access to the "C" language structure, required for use of
// Zoltan "C" functions. (Deprecated "C" functions were not
// included in the C++ interface.)
Zoltan_Struct *Get_C_Handle(void)
{
return ZZ_Ptr;
}
private:
Zoltan_Struct * ZZ_Ptr;
};
#endif

@ -1,112 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
#ifndef ZOLTAN_DD_DDIRECTORY_H
#define ZOLTAN_DD_DDIRECTORY_H
#include "zoltan_types.h"
#include <mpi.h>
/*
** Must define this function prototype before #ifdef __cplusplus
** to avoid warning when compiling with C++ on solaris
*/
typedef unsigned int ZOLTAN_HASH_FN(ZOLTAN_ID_PTR, int, unsigned int);
#ifdef __cplusplus
/* if C++, define the rest of this header file as extern C */
extern "C" {
#endif
struct Zoltan_DD_Struct;
typedef struct Zoltan_DD_Struct Zoltan_DD_Directory;
/*********** Distributed Directory Function Prototypes ************/
int Zoltan_DD_Create(Zoltan_DD_Directory **dd, MPI_Comm comm,
int num_gid, int num_lid, int user_length,
int table_length, int debug_level);
int Zoltan_DD_Copy_To(Zoltan_DD_Directory **toptr, Zoltan_DD_Directory *from);
Zoltan_DD_Directory *Zoltan_DD_Copy(Zoltan_DD_Directory *from);
void Zoltan_DD_Destroy(Zoltan_DD_Directory **dd);
int Zoltan_DD_Update(Zoltan_DD_Directory *dd, ZOLTAN_ID_PTR gid,
ZOLTAN_ID_PTR lid, char *user, int *partition, int count);
int Zoltan_DD_Find(Zoltan_DD_Directory *dd, ZOLTAN_ID_PTR gid,
ZOLTAN_ID_PTR lid, char *data, int *partition, int count,
int *owner);
int Zoltan_DD_Remove(Zoltan_DD_Directory *dd, ZOLTAN_ID_PTR gid,
int count);
int Zoltan_DD_Set_Hash_Fn(Zoltan_DD_Directory *dd, ZOLTAN_HASH_FN *hash);
void Zoltan_DD_Stats(Zoltan_DD_Directory *dd);
int Zoltan_DD_Set_Neighbor_Hash_Fn1(Zoltan_DD_Directory *dd, int size);
int Zoltan_DD_Set_Neighbor_Hash_Fn2(Zoltan_DD_Directory *dd, int *proc,
int *low, int *high, int count);
int Zoltan_DD_Set_Neighbor_Hash_Fn3(Zoltan_DD_Directory *dd, int total);
int Zoltan_DD_Print(Zoltan_DD_Directory *dd);
int Zoltan_DD_GetLocalKeys(Zoltan_DD_Directory *dd, ZOLTAN_ID_PTR* gid,
int* size);
#ifdef __cplusplus
} /* closing bracket for extern "C" */
#endif
#endif

@ -1,153 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
// ************************************************************************
//
// C++ wrappers for Zoltan's Distributed Directory utility
//
// Two styles of initialization:
//
// C++ style: Zoltan_DD dd(comm, num_gid, num_lid, len1, len2, debug);
//
// C style: Zoltan_DD dd;
// dd.Create(comm, num_gid, num_lid, len1, len2, debug);
//
// ************************************************************************
#ifndef ZOLTAN_DD_CPP_H_
#define ZOLTAN_DD_CPP_H_
#include "zoltan_dd.h"
class Zoltan_DD {
public:
Zoltan_DD(const MPI_Comm &comm, const int &num_gid, const int &num_lid,
const int &user_length, const int &table_length, const int &debug_level)
{
Zoltan_DD_Create (&this->DD, comm, num_gid,
num_lid, user_length, table_length, debug_level);
}
Zoltan_DD()
{
this->DD = NULL;
// Creator of this object must call Zoltan_DD::Create to finish
// initialization.
}
int Create(const MPI_Comm &comm, const int &num_gid, const int &num_lid,
const int &user_length_in_chars, const int &table_length, const int &debug_level)
{
if (this->DD)
{
Zoltan_DD_Destroy(&this->DD);
this->DD = NULL;
}
int rc = Zoltan_DD_Create (&this->DD, comm, num_gid,
num_lid, user_length_in_chars, table_length, debug_level);
return rc;
}
~Zoltan_DD()
{
Zoltan_DD_Destroy (&this->DD) ;
}
Zoltan_DD (const Zoltan_DD &dd) // Copy constructor
{
this->DD = Zoltan_DD_Copy(dd.DD);
}
Zoltan_DD & operator= (const Zoltan_DD &dd) // Copy operator
{
Zoltan_DD_Copy_To(&this->DD, dd.DD);
return *this;
}
int Update (ZOLTAN_ID_PTR gid, ZOLTAN_ID_PTR lid,
char *user, int *partition, const int &count)
{
return Zoltan_DD_Update (this->DD, gid, lid, user, partition, count) ;
}
int Find (ZOLTAN_ID_PTR gid, ZOLTAN_ID_PTR lid, char *data,
int *partition, const int &count, int *owner) const
{
return Zoltan_DD_Find (this->DD, gid, lid, data, partition, count, owner);
}
int Remove (ZOLTAN_ID_PTR gid, const int &count)
{
return Zoltan_DD_Remove (this->DD, gid, count);
}
int Set_Hash_Fn (unsigned int (*hash) (ZOLTAN_ID_PTR, int, unsigned int))
{
return Zoltan_DD_Set_Hash_Fn (this->DD, hash);
}
void Stats () const
{
Zoltan_DD_Stats (this->DD) ;
}
int Print () const
{
return Zoltan_DD_Print (this->DD) ;
}
private:
Zoltan_DD_Directory *DD;
};
#endif

@ -1,133 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
#ifndef __ZOLTAN_EVAL_H
#define __ZOLTAN_EVAL_H
#ifdef __cplusplus
/* if C++, define the rest of this header file as extern C */
extern "C" {
#endif
struct Zoltan_Struct;
#define EVAL_LOCAL_SUM 0 /* calculated for nobj, obj_wgt, xtra_obj_wgt only */
#define EVAL_GLOBAL_SUM 1
#define EVAL_GLOBAL_MIN 2
#define EVAL_GLOBAL_MAX 3
#define EVAL_GLOBAL_AVG 4
#define EVAL_SIZE 5 /* must be last definition */
#define EVAL_MAX_XTRA_VWGTS 4
#define EVAL_MAX_XTRA_EWGTS 4
struct _eval_hg_struct{
float obj_imbalance; /* vertex number imbalance */
float imbalance; /* vertex weight imbalance */
float cutl[EVAL_SIZE]; /* ConCut measure */
float cutn[EVAL_SIZE]; /* NetCut measure */
float nobj[EVAL_SIZE]; /* number of partition vertices */
float obj_wgt[EVAL_SIZE]; /* partition vertex weights */
float xtra_imbalance[EVAL_MAX_XTRA_VWGTS];
float xtra_obj_wgt[EVAL_MAX_XTRA_VWGTS][EVAL_SIZE];
};
typedef struct _eval_hg_struct ZOLTAN_HG_EVAL;
struct _eval_graph_struct{
float cuts[EVAL_SIZE]; /* The number of cut edges */
float cut_wgt[EVAL_SIZE] ; /* The sum of the weights of the cut edges */
float nnborparts[EVAL_SIZE]; /* The number of neighboring partitions */
float obj_imbalance; /* vertex number imbalance */
float imbalance; /* vertex weight imbalance */
float nobj[EVAL_SIZE]; /* number of partition vertices */
float obj_wgt[EVAL_SIZE]; /* partition vertex weights */
float num_boundary[EVAL_SIZE];/* the number of objects with a remote neighbor */
float xtra_imbalance[EVAL_MAX_XTRA_VWGTS];
float xtra_obj_wgt[EVAL_MAX_XTRA_VWGTS][EVAL_SIZE];
float xtra_cut_wgt[EVAL_MAX_XTRA_EWGTS][EVAL_SIZE];
};
typedef struct _eval_graph_struct ZOLTAN_GRAPH_EVAL;
struct _eval_balance_struct{
float obj_imbalance; /* vertex number imbalance */
float imbalance; /* vertex weight imbalance */
float nobj[EVAL_SIZE]; /* number of partition vertices */
float obj_wgt[EVAL_SIZE]; /* partition vertex weights */
float xtra_imbalance[EVAL_MAX_XTRA_VWGTS];
float xtra_obj_wgt[EVAL_MAX_XTRA_VWGTS][EVAL_SIZE];
};
typedef struct _eval_balance_struct ZOLTAN_BALANCE_EVAL;
int Zoltan_LB_Eval_Balance(struct Zoltan_Struct *zz, int print_stats, ZOLTAN_BALANCE_EVAL *eval);
int Zoltan_LB_Eval_Graph(struct Zoltan_Struct *zz, int print_stats, ZOLTAN_GRAPH_EVAL *graph);
int Zoltan_LB_Eval_HG(struct Zoltan_Struct *zz, int print_stats, ZOLTAN_HG_EVAL *hg);
int Zoltan_LB_Eval(struct Zoltan_Struct *zz, int print_stats,
ZOLTAN_BALANCE_EVAL *obj, ZOLTAN_GRAPH_EVAL *graph, ZOLTAN_HG_EVAL *hg);
void Zoltan_LB_Eval_Print_Graph(ZOLTAN_GRAPH_EVAL *graph);
void Zoltan_LB_Eval_Print_HG(ZOLTAN_HG_EVAL *hg);
void Zoltan_LB_Eval_Print_Balance(ZOLTAN_BALANCE_EVAL *lb);
#ifdef __cplusplus
} /* closing bracket for extern "C" */
#endif
#endif

@ -1,109 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
#ifndef __MEM_CONST_H
#define __MEM_CONST_H
#include <string.h>
#ifdef __cplusplus
/* if C++, define the rest of this header file as extern C */
extern "C" {
#endif
#ifndef HAVE_PROTOTYPES
# if defined(__STDC__) || defined(__GNUC__) || defined(__cplusplus) || defined(c_plusplus)
# define HAVE_PROTOTYPES
# endif
#endif
#undef PROTO
#ifdef HAVE_PROTOTYPES
# define PROTO(x) x
#else
# define PROTO(x) ()
#endif
#define ZOLTAN_MALLOC(a) Zoltan_Malloc((a), __FILE__, __LINE__)
#define ZOLTAN_CALLOC(a, b) Zoltan_Calloc((a), (b), __FILE__, __LINE__)
#define ZOLTAN_FREE(a) Zoltan_Free((void**)(void*) (a), __FILE__, __LINE__)
#define ZOLTAN_REALLOC(a, b) Zoltan_Realloc((a), (b), __FILE__, __LINE__)
#define ZOLTAN_MEM_STAT_TOTAL 0
#define ZOLTAN_MEM_STAT_MAXIMUM 1
/* function declarations for dynamic array allocation */
#ifdef __STDC__
extern double *Zoltan_Array_Alloc(char *file, int lineno, int numdim, ...);
#else
extern double *Zoltan_Array_Alloc();
#endif
extern void Zoltan_Memory_Debug(int);
extern int Zoltan_Memory_Get_Debug(void);
extern void Zoltan_Free(void **, char *, int);
extern double *Zoltan_Calloc(size_t, size_t, char *, int);
extern double *Zoltan_Malloc(size_t, char *, int);
extern double *Zoltan_Realloc(void *, size_t, char *, int);
extern void Zoltan_Memory_Stats(void);
extern size_t Zoltan_Memory_Usage(int);
extern void Zoltan_Memory_Reset(int);
#ifdef __STDC__
extern void Zoltan_Multifree(char *, int, int n, ...);
#else
extern void Zoltan_Multifree();
#endif
#ifdef __cplusplus
} /* closing bracket for extern "C" */
#endif
#endif

@ -1,173 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
#ifndef ZOLTAN_PARTITION_TREE_H
#define ZOLTAN_PARTITION_TREE_H
#ifdef __cplusplus
/* if C++, define the rest of this header file as extern C */
extern "C" {
#endif
/*****************************************************************************/
/*
* Function to return the partition tree info generated by RCB.
* Input:
* zz -- The Zoltan structure returned by Zoltan_Create.
* treeNodeIndex -- The array index into the tree. Valid indices will
* be from 1 to numParts-1 inclusive. RCB will not
* have a node for terminal nodes. A terminal node
* is indicated by a left_leaf or right_leaf set to
* the negative value of the part ID. A node may be
* connected to both another node (positive) and
* point to a terminal (negative).
* Output:
* parent -- parent index number - this will be positive or
* negative based on whether it is the left or right
* leaf and also have an extra +1 applied to the
* magnitude, so to get the treeNodeIndex of the
* parent take the absolute value of parent and do -1.
* The root node will return a parent value of
* -1 or 1 and for zoltan2. That is the only
* case where zoltan2 actually needs the parent value.
* left_leaf -- left leaf index number - Greater than 0 is a
* treeNodeIndex which will start from index 1.
* 0 or negative means the negative of a part ID
* so indicates the terminal. The purpose of starting
* at index 1 is so that 0 is not ambiguous between
* describing a node index or a terminal part ID.
* right_leaf -- right leaf index number - See left_leaf for rules.
* Returned value: -- Error code
*/
int Zoltan_RCB_Partition_Tree(
struct Zoltan_Struct *zz,
int treeNodeIndex,
int *parent,
int *left_leaf,
int *right_leaf
);
/*****************************************************************************/
/*
* Function to get the PHG tree size.
* Input:
* zz -- The Zoltan structure returned by Zoltan_Create.
* Output:
* tree_size -- will be set to the size of the tree. The tree size
* is the number of pairs of ints in the tree. Each
* pair provides a lo and hi index corresponding to
* the part numbers found below that node. Let N be
* the tree size returned by this function. Then in
* zoltan the phg tree (tree->array) was allocated as
* an array of ints with size N*2. However zoltan phg
* conventions also apply a memory offset of -2 to
* the array ptr so tree->array[0] is not valid
* memory. This means we should request the tree
* elements starting from index 1 in the below method
* Zoltan_PHG_Partition_Tree. The last valid request
* index is N (not N-1). Also note that the phg
* tree can include some 'empty' nodes. These are
* gaps with no data determined by hi_index = -1.
* The purpose of these gaps and the offset of -2
* is to allow an efficient scheme for converting
* from the array index to the parent. See
* Zoltan_PHG_Partition_Tree_Size comments for more
* detail. These conventions were preserved in the
* zoltan2 interface so that Zoltan2_AlgZoltan
* calculates parent indices efficiently. Note that
* the first element (index 1) is always the root.
* Returned value: -- Error code
*/
int Zoltan_PHG_Partition_Tree_Size(
struct Zoltan_Struct * zz,
int * tree_size
);
/*****************************************************************************/
/*
* Function to access a node of the PHG tree.
* Input:
* zz -- The Zoltan structure returned by Zoltan_Create.
* treeNodeIndex -- The array index into the tree. This should be
* in the inclusive range (1..N) where N is the size
* returned by Zoltan_RCB_Partition_Tree. See the
* above comments for explanation of this +1 offset.
* Output:
* lo_index -- lo index of included parts - inclusive. See
* hi_index below for more complete description.
* hi_index -- hi index of included parts - inclusive. Each
* call to Zoltan_PHG_Partition_Tree_Size returns a
* pair (lo_index and hi_index) which is the
* inclusive range of all parts contained under that
* node. This can include terminal nodes in which
* case lo_index = hi_index. The parts will start
* from index 0 and do not have sign conventions so
* they can be interpreted 'naturally'. However
* there is 1 special case since phg can have gaps in
* the tree. These gaps are determined by checking if
* hi_index = -1. The gaps exists because phg is laid
* out in memeory so that there is always a simple
* relationship between the treeNodeIndex and the
* parent index. If treeNodeIndex is even then the
* parent node has index treeNodeIndex/2. If
* treeNodeIndex is odd then the parent index is
* (treeNodeIndex-1)/2. Note that for phg the root
* will always be the first element which is
* treeNodeIndex 1.
* Returned value: -- Error code
*/
int Zoltan_PHG_Partition_Tree(
struct Zoltan_Struct * zz,
int treeNodeIndex, /* tree node index in zoltan PHG */
int *lo_index, /* low index */
int *hi_index /* high index */
);
#ifdef __cplusplus
} /* closing bracket for extern "C" */
#endif
#endif

@ -1,95 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
#ifndef __ZOLTANTIMER_H
#define __ZOLTANTIMER_H
#include <stdio.h>
#include <mpi.h>
#ifdef __cplusplus
/* if C++, define the rest of this header file as extern C */
extern "C" {
#endif
/* Constants used in Zoltan timer routines */
#define ZOLTAN_TIME_WALL 1
#define ZOLTAN_TIME_CPU 2
#define ZOLTAN_TIME_USER 3
/* Macros to add line/file info */
#define ZOLTAN_TIMER_START(a, b, c) \
Zoltan_Timer_Start(a, b, c, __FILE__, __LINE__)
#define ZOLTAN_TIMER_STOP(a, b, c) \
Zoltan_Timer_Stop(a, b, c, __FILE__, __LINE__)
/* Function prototypes */
struct Zoltan_Timer;
struct Zoltan_Timer *Zoltan_Timer_Create(int);
int Zoltan_Timer_Init(struct Zoltan_Timer *, int, const char *);
struct Zoltan_Timer *Zoltan_Timer_Copy(struct Zoltan_Timer *zt);
int Zoltan_Timer_Copy_To(struct Zoltan_Timer **to, struct Zoltan_Timer *from);
int Zoltan_Timer_Reset(struct Zoltan_Timer *, int, int, const char*);
int Zoltan_Timer_ChangeFlag(struct Zoltan_Timer *, int);
int Zoltan_Timer_Start(struct Zoltan_Timer *, int, MPI_Comm, char *, int);
int Zoltan_Timer_Stop(struct Zoltan_Timer *, int, MPI_Comm, char *, int);
int Zoltan_Timer_Print(struct Zoltan_Timer *, int, int, MPI_Comm, FILE *);
int Zoltan_Timer_PrintAll(struct Zoltan_Timer *, int, MPI_Comm, FILE *);
void Zoltan_Timer_Destroy(struct Zoltan_Timer **);
extern double Zoltan_Time(int);
extern double Zoltan_Time_Resolution(int);
#ifdef __cplusplus
} /* closing bracket for extern "C" */
#endif
#endif

@ -1,126 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
//
// ************************************************************************
//
// C++ wrappers for Zoltan Timer library.
//
// ************************************************************************
#ifndef ZOLTAN_TIMER_CPP_H_
#define ZOLTAN_TIMER_CPP_H_
#include "zoltan_timer.h"
#include <stdio.h>
#ifdef TFLOP
#include <string.h>
#else
#include <string>
#endif
class Zoltan_Timer_Object {
public:
// Constructor
Zoltan_Timer_Object(int flag = ZOLTAN_TIME_WALL) {
// Assumption: MPI has been initialized prior to this call.
ZTStruct = Zoltan_Timer_Create(flag);
}
// Copy constructor
Zoltan_Timer_Object(const Zoltan_Timer_Object &zt)
{
this->ZTStruct = Zoltan_Timer_Copy(zt.ZTStruct);
}
// Copy operator
Zoltan_Timer_Object & operator= (const Zoltan_Timer_Object &zt)
{
Zoltan_Timer_Copy_To(&(this->ZTStruct), zt.ZTStruct);
return *this;
}
// Destructor
~Zoltan_Timer_Object() {
Zoltan_Timer_Destroy(&ZTStruct);
}
int Init(const int &use_barrier, const std::string & name) {
return Zoltan_Timer_Init(this->ZTStruct, use_barrier, name.c_str());
}
int Reset(const int &ts_idx, const int &use_barrier,
const std::string & name) {
return Zoltan_Timer_Reset(this->ZTStruct, ts_idx, use_barrier, name.c_str());
}
int Start(const int &ts_idx, const MPI_Comm &comm) {
return Zoltan_Timer_Start(this->ZTStruct, ts_idx, comm,
(char *) __FILE__, __LINE__);
}
int Stop(const int &ts_idx, const MPI_Comm &comm) {
return Zoltan_Timer_Stop(this->ZTStruct, ts_idx, comm,
(char *) __FILE__, __LINE__);
}
int Print(const int &ts_idx, const int &proc,
const MPI_Comm &comm, FILE *os) const {
return Zoltan_Timer_Print(this->ZTStruct, ts_idx, proc, comm, os);
}
int PrintAll(const int &proc, const MPI_Comm &comm, FILE *os) const {
return Zoltan_Timer_PrintAll(this->ZTStruct, proc, comm, os);
}
private:
struct Zoltan_Timer *ZTStruct;
};
#endif

@ -1,243 +0,0 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
* 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.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
#ifndef __ZOLTAN_TYPES_H
#define __ZOLTAN_TYPES_H
#include <mpi.h>
#include <stddef.h>
#ifndef _WIN32
#include <unistd.h>
#endif
#include <limits.h>
/* int64_t is needed by 64-bit PT-Scotch header file .
*
* intptr_t is needed by code that uses ints and pointers interchangably
* with Zoltan_Map. ZOLTAN_NOT_FOUND is an invalid intptr_t.
*
* ssize_t is needed for the definition of ZOLTAN_GNO_TYPE.
*/
#ifndef _MSC_VER
#include <stdint.h> /* for int64_t and intptr_t */
#define ZOLTAN_NOT_FOUND INTPTR_MAX /* safe to say never a valid pointer? */
#else
#include <BaseTsd.h> /* for ssize_t, int64, int_ptr */
typedef INT64 int64_t;
typedef INT_PTR intptr_t;
typedef SSIZE_T ssize_t;
#define ZOLTAN_NOT_FOUND LONG_MAX /* safe to say never a valid pointer? */
#endif
#ifdef __cplusplus
/* if C++, define the rest of this header file as extern C */
extern "C" {
#endif
#include "Zoltan_config.h"
/* The default ZOLTAN_ID_TYPE is "unsigned int" but this can be over-ridden on the compile command line.
*
* The type of a Zoltan object global ID is ZOLTAN_ID_TYPE. A pointer to it is ZOLTAN_ID_PTR.
*
* It's decimal type specifier: printf(ZOLTAN_ID_SPEC "\n", global_id);
*
* A constant of the same type: ZOLTAN_ID_TYPE global_id = ZOLTAN_ID_CONSTANT(0); (Do we need this?)
*
* The MPI_Datatype for a ZOLTAN_ID_TYPE is a ZOLTAN_ID_MPI_TYPE.
*
* We assume the local number of objects fits in a 32 bit integer, but the global number may require
* the maximum integer width available on the machine.
*
* ZOLTAN_GNO_TYPE is the global number/count type.
*
* The underlying type is: ssize_t (signed size_t). This will be 32 or 64
* bits depending on whether the machine is a 32 or 64 bit machine. (We use ssize_t
* instead of intmax_t because intmax_t may still be
* 64 bits on a 32 bit machine because the compiler constructs a 64 bit int.)
*
* The MPI_Datatype for ssize_t is returned by Zoltan_mpi_gno_type().
*
* We don't assume a pointer is the same size as any size of int. If we want to store
* a pointer in an int we use types intptr_t or uintptr_t.
*/
#undef HAVE_LONG_LONG_INT
#ifdef ULLONG_MAX
#define HAVE_LONG_LONG_INT
#endif
#undef ZOLTAN_ID_MPI_TYPE
#undef ZOLTAN_ID_SPEC
#undef ZOLTAN_ID_CONSTANT
/*
* Autoconf build: --with-id-type={uint, ulong, ullong}
*
* CMake build: -D Zoltan_ENABLE_UINT_IDS:Bool=ON
* -D Zoltan_ENABLE_ULONG_IDS:Bool=ON
* -D Zoltan_ENABLE_ULLONG_IDS:Bool=ON
*
*/
#ifndef UNSIGNED_INT_GLOBAL_IDS
#ifndef UNSIGNED_LONG_GLOBAL_IDS
#ifndef UNSIGNED_LONG_LONG_GLOBAL_IDS
#define UNSIGNED_INT_GLOBAL_IDS
#endif
#endif
#endif
#ifdef UNSIGNED_LONG_LONG_GLOBAL_IDS
#ifndef HAVE_LONG_LONG_INT
#undef UNSIGNED_LONG_LONG_GLOBAL_IDS
#define UNSIGNED_LONG_GLOBAL_IDS
#warning Global ID type "unsigned long long int" was requested at configure time.
#warning The compiler does not fully support this data type.
#warning Instead ZOLTAN_ID_TYPE will be "unsigned long".
#endif
#endif
#ifdef UNSIGNED_LONG_GLOBAL_IDS
typedef unsigned long ZOLTAN_ID_TYPE;
#define ZOLTAN_ID_MPI_TYPE MPI_UNSIGNED_LONG
#define zoltan_mpi_id_datatype_name "MPI_UNSIGNED_LONG"
#define zoltan_id_datatype_name "unsigned long"
#define ZOLTAN_ID_SPEC "%lu"
#define ZOLTAN_ID_CONSTANT(z) z ## L
#define ZOLTAN_ID_INVALID ULONG_MAX
#endif
#ifdef UNSIGNED_LONG_LONG_GLOBAL_IDS
typedef unsigned long long ZOLTAN_ID_TYPE;
#define ZOLTAN_ID_MPI_TYPE MPI_LONG_LONG_INT
#define zoltan_mpi_id_datatype_name "MPI_LONG_LONG_INT"
#define zoltan_id_datatype_name "unsigned long long"
#define ZOLTAN_ID_SPEC "%llu"
#define ZOLTAN_ID_CONSTANT(z) z ## LL
#define ZOLTAN_ID_INVALID ULLONG_MAX
#endif
#ifdef UNSIGNED_INT_GLOBAL_IDS
typedef unsigned int ZOLTAN_ID_TYPE;
#define ZOLTAN_ID_MPI_TYPE MPI_UNSIGNED
#define zoltan_mpi_id_datatype_name "MPI_UNSIGNED"
#define zoltan_id_datatype_name "unsigned int"
#define ZOLTAN_ID_SPEC "%u"
#define ZOLTAN_ID_CONSTANT(z) z
#define ZOLTAN_ID_INVALID UINT_MAX
#endif
typedef ZOLTAN_ID_TYPE *ZOLTAN_ID_PTR;
/*
* The MPI_Datatype for ZOLTAN_GNO_TYPE is returned by Zoltan_mpi_gno_type().
*/
#define ZOLTAN_GNO_TYPE ssize_t
#define zoltan_gno_datatype_name "ssize_t"
/*
* 06/26/13: Use the correct specifier %zd if possible,
* fall back to %ld otherwise.
*/
#if defined(__STDC_VERSION__)
# if (__STDC_VERSION__ >= 199901L)
# define ZOLTAN_GNO_SPEC "%zd"
# else
# define ZOLTAN_GNO_SPEC "%ld"
# endif
#else
# define ZOLTAN_GNO_SPEC "%ld"
#endif
/*****************************************************************************/
/*
* Error codes for Zoltan library
* ZOLTAN_OK - no errors
* ZOLTAN_WARN - some warning occurred in Zoltan library;
* application should be able to continue running
* ZOLTAN_FATAL - a fatal error occurred
* ZOLTAN_MEMERR - memory allocation failed; with this error, it could be
* possible to try a different, more memory-friendly,
* algorithm.
*/
/*****************************************************************************/
#define ZOLTAN_OK 0
#define ZOLTAN_WARN 1
#define ZOLTAN_FATAL -1
#define ZOLTAN_MEMERR -2
/*****************************************************************************/
/* Hypergraph query function types
*/
/*****************************************************************************/
#define ZOLTAN_COMPRESSED_EDGE 1
#define ZOLTAN_COMPRESSED_VERTEX 2
#ifdef __cplusplus
} /* closing bracket for extern "C" */
#endif
#endif /* !__ZOLTAN_TYPES_H */
Loading…
Cancel
Save