MOAB: Mesh Oriented datABase  (version 5.4.1)
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

namespace  moab
 

Class representing axis-aligned bounding box.


Defines

#define INS_ID(stringvar, prefix, id)   sprintf( stringvar, 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

Define Documentation

#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 57 of file WriteNCDF.cpp.

Referenced by moab::WriteNCDF::write_poly_faces().

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

Definition at line 75 of file WriteNCDF.cpp.

#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 79 of file WriteNCDF.cpp.

Referenced by moab::WriteNCDF::write_BCs(), moab::WriteNCDF::write_elementblocks(), moab::WriteNCDF::write_exodus_integer_variable(), moab::WriteNCDF::write_file(), moab::WriteNCDF::write_nodes(), moab::WriteNCDF::write_poly_faces(), and moab::WriteNCDF::write_qa_string().

#define INS_ID (   stringvar,
  prefix,
  id 
)    sprintf( stringvar, prefix, id )
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines