MACSio  0.9
Multi-purpose, Application-Centric, Scalable I/O Proxy App
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
macsio_data.c File Reference
#include <json-c/json.h>
#include <macsio_data.h>
#include <macsio_utils.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

static double noise (double _x, double _y, double _z, double const *bounds)
 Ken Perlin's Improved Noise. More...
 
static json_objectmake_random_int ()
 
static json_objectmake_random_double ()
 
static json_objectmake_random_primitive ()
 
static json_objectmake_random_string (int nthings)
 
static json_objectmake_random_array (int nthings)
 
static json_objectmake_random_extarr (int nthings)
 
static json_objectmake_random_object_recurse (int nthings, int depth)
 
json_objectMACSIO_DATA_MakeRandomObject (int nthings)
 
static json_objectmake_uniform_mesh_coords (int ndims, int const *dims, double const *bounds)
 
static json_objectmake_rect_mesh_coords (int ndims, int const *dims, double const *bounds)
 
static json_objectmake_curv_mesh_coords (int ndims, int const *dims, double const *bounds)
 
static json_objectmake_ucdzoo_mesh_coords (int ndims, int const *dims, double const *bounds)
 
static json_objectmake_arb_mesh_coords (int ndims, int const *dims, double const *bounds)
 
static json_objectmake_structured_mesh_topology (int ndims, int const *dims)
 
static json_objectmake_uniform_mesh_topology (int ndims, int const *dims)
 
static json_objectmake_rect_mesh_topology (int ndims, int const *dims)
 
static json_objectmake_curv_mesh_topology (int ndims, int const *dims)
 
static json_objectmake_ucdzoo_mesh_topology (int ndims, int const *dims)
 
static json_objectmake_scalar_var (int ndims, int const *dims, double const *bounds, char const *centering, char const *dtype, char const *kind)
 
static json_objectmake_vector_var (int ndims, int const *dims, double const *bounds)
 
static json_objectmake_tensor_var (int ndims, int const *dims, double const *bounds)
 
static json_objectmake_subset_var (int ndims, int const *dims, double const *bounds)
 
static json_objectmake_mesh_vars (int ndims, int const *dims, double const *bounds, int nvars)
 
static json_objectmake_arb_mesh_topology (int ndims, int const *dims)
 
static json_objectmake_uniform_mesh_chunk (int chunkId, int ndims, int const *dims, double const *bounds, int nvars)
 
static json_objectmake_rect_mesh_chunk (int chunkId, int ndims, int const *dims, double const *bounds, int nvars)
 
json_objectMACSIO_DATA_BuildRectMeshChunk (int chunkId, int ndims, int const *dims, void const **coords, json_extarr_type dtype)
 
static json_objectmake_curv_mesh_chunk (int chunkId, int ndims, int const *dims, double const *bounds)
 
static json_objectmake_ucdzoo_mesh_chunk (int chunkId, int ndims, int const *dims, double const *bounds, int nvars)
 
static json_objectmake_mesh_chunk (int chunkId, int ndims, int const *dims, double const *bounds, char const *type, int nvars)
 
static int choose_part_count (int K, int mod, int *R, int *Q)
 
json_objectMACSIO_DATA_GenerateTimeZeroDumpObject (json_object *main_obj, int *rank_owning_chunkId)
 
int MACSIO_DATA_GetRankOwningPart (json_object *main_obj, int chunkId)
 
int MACSIO_DATA_ValidateDataRead (json_object *main_obj)
 
int MACSIO_DATA_SimpleAssignKPartsToNProcs (int k, int n, int my_rank, int *my_part_cnt, int **my_part_ids)
 
static double fade (double t)
 Support functions for Perlin noise. More...
 
static double lerp (double t, double a, double b)
 
static double grad (int hash, double x, double y, double z)
 

Function Documentation

static double fade ( double  t)
static

Support functions for Perlin noise.

Definition at line 42 of file macsio_data.c.

static double lerp ( double  t,
double  a,
double  b 
)
static

Definition at line 43 of file macsio_data.c.

static double grad ( int  hash,
double  x,
double  y,
double  z 
)
static

Definition at line 44 of file macsio_data.c.

static double noise ( double  _x,
double  _y,
double  _z,
double const *  bounds 
)
static

Ken Perlin's Improved Noise.

Copyright 2002, Ken Perlin.

Modified by Mark Miller for C and for arbitrary sized spatial domains

Parameters
_xx spatial coordinate
_yy spatial coordinate
_zz spatial coordinate
boundstotal spatial bounds to be mapped to unit cube

Definition at line 59 of file macsio_data.c.

static json_object* make_random_int ( )
static

Definition at line 130 of file macsio_data.c.

static json_object* make_random_double ( )
static

Definition at line 136 of file macsio_data.c.

static json_object* make_random_primitive ( )
static

Definition at line 143 of file macsio_data.c.

static json_object* make_random_string ( int  nthings)
static

Definition at line 153 of file macsio_data.c.

static json_object* make_random_array ( int  nthings)
static

Definition at line 169 of file macsio_data.c.

static json_object* make_random_extarr ( int  nthings)
static

Definition at line 184 of file macsio_data.c.

static json_object* make_random_object_recurse ( int  nthings,
int  depth 
)
static

Definition at line 218 of file macsio_data.c.

static json_object* make_uniform_mesh_coords ( int  ndims,
int const *  dims,
double const *  bounds 
)
static

Definition at line 295 of file macsio_data.c.

static json_object* make_rect_mesh_coords ( int  ndims,
int const *  dims,
double const *  bounds 
)
static

Definition at line 316 of file macsio_data.c.

static json_object* make_curv_mesh_coords ( int  ndims,
int const *  dims,
double const *  bounds 
)
static

Definition at line 357 of file macsio_data.c.

static json_object* make_ucdzoo_mesh_coords ( int  ndims,
int const *  dims,
double const *  bounds 
)
static

Definition at line 397 of file macsio_data.c.

static json_object* make_arb_mesh_coords ( int  ndims,
int const *  dims,
double const *  bounds 
)
static

Definition at line 404 of file macsio_data.c.

static json_object* make_structured_mesh_topology ( int  ndims,
int const *  dims 
)
static

Definition at line 411 of file macsio_data.c.

static json_object* make_uniform_mesh_topology ( int  ndims,
int const *  dims 
)
static

Definition at line 477 of file macsio_data.c.

static json_object* make_rect_mesh_topology ( int  ndims,
int const *  dims 
)
static

Definition at line 483 of file macsio_data.c.

static json_object* make_curv_mesh_topology ( int  ndims,
int const *  dims 
)
static

Definition at line 489 of file macsio_data.c.

static json_object* make_ucdzoo_mesh_topology ( int  ndims,
int const *  dims 
)
static

Definition at line 495 of file macsio_data.c.

static json_object* make_scalar_var ( int  ndims,
int const *  dims,
double const *  bounds,
char const *  centering,
char const *  dtype,
char const *  kind 
)
static

Definition at line 563 of file macsio_data.c.

static json_object* make_vector_var ( int  ndims,
int const *  dims,
double const *  bounds 
)
static

Definition at line 657 of file macsio_data.c.

static json_object* make_tensor_var ( int  ndims,
int const *  dims,
double const *  bounds 
)
static

Definition at line 663 of file macsio_data.c.

static json_object* make_subset_var ( int  ndims,
int const *  dims,
double const *  bounds 
)
static

Definition at line 669 of file macsio_data.c.

static json_object* make_mesh_vars ( int  ndims,
int const *  dims,
double const *  bounds,
int  nvars 
)
static

Definition at line 675 of file macsio_data.c.

static json_object* make_arb_mesh_topology ( int  ndims,
int const *  dims 
)
static

Definition at line 705 of file macsio_data.c.

static json_object* make_uniform_mesh_chunk ( int  chunkId,
int  ndims,
int const *  dims,
double const *  bounds,
int  nvars 
)
static

Definition at line 712 of file macsio_data.c.

static json_object* make_rect_mesh_chunk ( int  chunkId,
int  ndims,
int const *  dims,
double const *  bounds,
int  nvars 
)
static

Definition at line 727 of file macsio_data.c.

json_object* MACSIO_DATA_BuildRectMeshChunk ( int  chunkId,
int  ndims,
int const *  dims,
void const **  coords,
json_extarr_type  dtype 
)

Definition at line 745 of file macsio_data.c.

static json_object* make_curv_mesh_chunk ( int  chunkId,
int  ndims,
int const *  dims,
double const *  bounds 
)
static

Definition at line 751 of file macsio_data.c.

static json_object* make_ucdzoo_mesh_chunk ( int  chunkId,
int  ndims,
int const *  dims,
double const *  bounds,
int  nvars 
)
static

Definition at line 765 of file macsio_data.c.

static json_object* make_mesh_chunk ( int  chunkId,
int  ndims,
int const *  dims,
double const *  bounds,
char const *  type,
int  nvars 
)
static

Definition at line 782 of file macsio_data.c.

static int choose_part_count ( int  K,
int  mod,
int *  R,
int *  Q 
)
static

Definition at line 797 of file macsio_data.c.