Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
WriteNCDF.cpp File Reference
#include "WriteNCDF.hpp"
#include "netcdf.h"
#include <utility>
#include <algorithm>
#include <ctime>
#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cassert>
#include "moab/Interface.hpp"
#include "moab/Range.hpp"
#include "moab/CN.hpp"
#include "moab/FileOptions.hpp"
#include "MBTagConventions.hpp"
#include "Internals.hpp"
#include "ExoIIUtil.hpp"
#include "moab/WriteUtilIface.hpp"
#include "exodus_order.h"
+ Include dependency graph for WriteNCDF.cpp:

Go to the source code of this file.

Namespaces

 moab
 Class representing axis-aligned bounding box.
 

Macros

#define CHAR_STR_LEN   128
 
#define INS_ID(stringvar, prefix, id)   snprintf( stringvar, CHAR_STR_LEN, prefix, id )
 
#define GET_DIM(ncdim, name, val)
 
#define GET_DIMB(ncdim, name, varname, id, val)
 
#define GET_VAR(name, id, dims)
 

Variables

const int moab::TIME_STR_LEN = 11
 

Macro Definition Documentation

◆ CHAR_STR_LEN

#define CHAR_STR_LEN   128

MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.

Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

Definition at line 50 of file WriteNCDF.cpp.

◆ GET_DIM

#define GET_DIM (   ncdim,
  name,
  val 
)
Value:
{ \
int gdfail = nc_inq_dimid( ncFile, name, &( ncdim ) ); \
if( NC_NOERR == gdfail ) \
{ \
size_t tmp_val; \
gdfail = nc_inq_dimlen( ncFile, ncdim, &tmp_val ); \
if( NC_NOERR != gdfail ) \
{ \
MB_SET_ERR( MB_FAILURE, "WriteNCDF:: couldn't get dimension length" ); \
} \
else \
( val ) = tmp_val; \
} \
else \
( val ) = 0; \
}

Definition at line 59 of file WriteNCDF.cpp.

◆ GET_DIMB

#define GET_DIMB (   ncdim,
  name,
  varname,
  id,
  val 
)
Value:
INS_ID( name, CHAR_STR_LEN, varname, id ); \
GET_DIM( ncdim, name, val );

Definition at line 77 of file WriteNCDF.cpp.

◆ GET_VAR

#define GET_VAR (   name,
  id,
  dims 
)
Value:
{ \
( id ) = -1; \
int gvfail = nc_inq_varid( ncFile, name, &( id ) ); \
if( NC_NOERR == gvfail ) \
{ \
int ndims; \
gvfail = nc_inq_varndims( ncFile, id, &ndims ); \
if( NC_NOERR == gvfail ) \
{ \
( dims ).resize( ndims ); \
gvfail = nc_inq_vardimid( ncFile, id, &( dims )[0] ); \
} \
} \
}

Definition at line 81 of file WriteNCDF.cpp.

◆ INS_ID

#define INS_ID (   stringvar,
  prefix,
  id 
)    snprintf( stringvar, CHAR_STR_LEN, prefix, id )

Definition at line 57 of file WriteNCDF.cpp.