Functions
AMA_Visit.c File Reference
#include <AMA.h>

Functions

long int AMA_VisitMltv (AMA_OPTIONS *options, const char *approx, const char *datname, long int nind, long int n, double **x, double *z, AMA_SPLINE *spline)
 Write VisIt files for AMA Spline Library Multivariate Random Data Functions. More...
 
long int AMA_VisitMltvGrd (AMA_OPTIONS *options, const char *approx, const char *datname, long int nind, long int *ng, double **x, double *z, AMA_SPLINE *spline)
 Write VisIt files for AMA Spline Library Multivariate Gridded Data Functions. More...
 
long int AMA_VisitOptions (AMA_OPTIONS *options, CNSPLA_VISIT *visit)
 Read VisIt options. More...
 
long int AMA_VisitSpline (AMA_OPTIONS *options, const char *splroot, AMA_SPLINE *spline, AMA_SPLINE *partial, AMA_SPLINE *integral)
 Write VisIt files for AMA Spline Library Spline Functions. More...
 
long int AMA_VisitUnv (AMA_OPTIONS *options, const char *approx, const char *datname, long int n, double *x, double *z, AMA_SPLINE *spline)
 Write VisIt files for AMA Spline Library Univariate Data Functions. More...
 

Function Documentation

long int AMA_VisitMltv ( AMA_OPTIONS options,
const char *  approx,
const char *  datname,
long int  nind,
long int  n,
double **  x,
double *  z,
AMA_SPLINE spline 
)

Write VisIt files for AMA Spline Library Multivariate Random Data Functions.

This function writes VisIt files for AMA Spline Library functions which compute spline approximations of independent variable data ${\bf X}\in{\rm R}^n$ and dependent variable data ${\bf Z}\in{\rm R}^1$. The data is given as $({\bf X}_\ell, z_\ell)$, for $\ell=1,\ldots,N$.

This function performs the following tasks:

  • Reads VisIt options, see AMA_VisitOptions().
  • Writes a VisIt data file named datname_approx_Data_Rn.silo.
  • Writes a VisIt grid file named datname_approx_Grid_Rn.silo.
  • Writes a VisIt surface file named datname_approx_Surf_Rn.silo.

The value of n is the number of independent variables for the spline. These files can be used within VisIt to produce the figures presented in Multivariate Random Data Functions.

Parameter Note: In the parameter definitions given below the limits on $k$ are $1\le k\le n$ and k = $k-1$.

Parameters
options[in] Pointer to AMA_OPTIONS. Should be initialized with AMA_Options() prior to calling AMA_VisitMltv().
approx[in] Approximation function. Should be one of AMA_MltvApprox, AMA_MltvInterp, AMA_MltvLstsqr, AMA_MltvMonoApprox or AMA_MltvMonoInterp.
datname[in] The data file name. Should satisfy datname $\ne$ NULL.
nind[in] The number of independent variables $n$. Should satisfy $2\le$ nind $\le 3$.
n[in] The number of data points $N$. Should satisfy n $\ge 2$.
x[in] Array of size nind containing arrays of size n where x[k] contains the independent variable data $x_{k,\ell}$, for $\ell=1,\ldots,N$.
z[in] Array of size n containing the dependent variable data $z_\ell$, for $\ell=1,\ldots,N$.
spline[in] Pointer to AMA_SPLINE containing the spline approximation. Should be a valid AMA_SPLINE structure.
Returns
Success/Error Code

User Support Function - Documented 110715 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!

long int AMA_VisitMltvGrd ( AMA_OPTIONS options,
const char *  approx,
const char *  datname,
long int  nind,
long int *  ng,
double **  x,
double *  z,
AMA_SPLINE spline 
)

Write VisIt files for AMA Spline Library Multivariate Gridded Data Functions.

This function writes VisIt files for AMA Spline Library functions which compute spline approximations of independent variable data ${\bf X}\in{\rm R}^n$ and dependent variable data ${\bf Z}\in{\rm R}^1$. The independent variable data is given as $x_{k,\ell_k}$, for $\ell_k=1,\ldots,N^g_k$ and $1\le k\le n$, and it defines the rectilinear grid

\[ (x_{1,1},x_{1,2},\cdots,x_{1,N^g_1-1},x_{1,N^g_1})\times\cdots\times(x_{n,1},x_{n,2},\cdots,x_{n,N^g_n-1},x_{n,N^g_n}). \]

The dependent variable data lies on the grid and is given as $z_{\ell_1,\cdots,\ell_n}$, for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$.

This function performs the following tasks:

  • Reads VisIt options, see AMA_VisitOptions().
  • Writes a VisIt data file named datname_approx_Data_Rn.silo.
  • Writes a VisIt grid file named datname_approx_Grid_Rn.silo.
  • Writes a VisIt surface file named datname_approx_Surf_Rn.silo.

The value of n is the number of independent variables for the spline. These files can be used within VisIt to produce the figures presented in Multivariate Gridded Data Functions.

Parameter Note: In the parameter definitions given below the limits on $k$ are $1\le k\le n$ and k = $k-1$.

Parameters
options[in] Pointer to AMA_OPTIONS. Should be initialized with AMA_Options() prior to calling AMA_VisitMltvGrd().
approx[in] Approximation function. Should be one of AMA_MltvGrdApprox, AMA_MltvGrdInterp, AMA_MltvGrdLstsqr, AMA_MltvGrdMonoApprox or AMA_MltvGrdMonoInterp.
datname[in] The data file name. Should satisfy datname $\ne$ NULL.
nind[in] The number of independent variables $n$. Should satisfy $2\le$ nind $\le 3$.
ng[in] Array of size nind containing the number of points $N^g_k$ where ng[k] $= N^g_k$. Should satisfy ng[k] $\ge 2$.
x[in] Array of size nind containing arrays of size ng[k] where x[k] contains the independent variable data $x_{k,\ell_k}$, $\ell_k=1,\ldots,N^g_k$ .The values of x[k] should be in strictly ascending order.
z[in] Array of size $N$ containing the dependent variable data $z_{\ell_1,\cdots,\ell_n}$, for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$.
spline[in] Pointer to AMA_SPLINE containing the spline approximation. Should be a valid AMA_SPLINE structure.
Returns
Success/Error Code

User Support Function - Documented 110715 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!

long int AMA_VisitOptions ( AMA_OPTIONS options,
CNSPLA_VISIT *  visit 
)

Read VisIt options.

This function reads the file VisIt.opt which specifies plot options employed by AMA_VisitMltv(), AMA_VisitMltvGrd() and AMA_VisitUnv().

The file VisIt.opt consists of several, optional, sections which specify options for writing VisIt plot files. It has the following structure:

\[ \begin{array}{l} {\bf Visit\_Options} \cr {\bf Visit\_Norm:\rm nrmflg} \cr {\bf End\_Visit\_Options} \cr \end{array} \]

The normalization flag ${\rm nrmflg}$ has the following values:

  • If ${\rm nrmflg}$ equals None, then the plots are not normalized.
  • If ${\rm nrmflg}$ equals Both, then the plots are normalized by the minimum and maximum values of the data and spline parameters.
  • If ${\rm nrmflg}$ equals Data, then the plots are normalized by the minimum and maximum data values.
  • If ${\rm nrmflg}$ equals Surface, then the plots are normalized by the minimum and maximum spline parameters.

See AMA_VisitNorm for additional information about the four normalization options.

The bold keywords are case sensitive and the string values for the approximation options are case insensitive.

Parameters
options[in] Pointer to AMA_OPTIONS. Should be initialized with AMA_Options() prior to calling AMA_VisitOptions().
visit[in] Pointer to CNSPLA_VISIT containing the VisIt file options.
Returns
Success/Error Code

User Support Function - Documented 110715 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!

long int AMA_VisitSpline ( AMA_OPTIONS options,
const char *  splroot,
AMA_SPLINE spline,
AMA_SPLINE partial,
AMA_SPLINE integral 
)

Write VisIt files for AMA Spline Library Spline Functions.

This function writes the following files:

  • splroot_Spline_Surf_Rn.silo,
  • splroot_Partial_Surf_Rn.silo,
  • splroot_Integral_Surf_Rn.silo,

where n is the number of independent variables for the spline. These files can be used within VisIt to produce the figures presented in Spline Functions.

Parameters
options[in] Pointer to AMA_OPTIONS. Should be initialized with AMA_Options() prior to calling AMA_VisitSpline().
splroot[in] The root of spline file names. Should satisfy splroot $\ne$ NULL.
spline[in] Pointer to AMA_SPLINE containing the spline $s({\bf X})$.
partial[in] Pointer to AMA_SPLINE containing the partial derivative of $s({\bf X})$.
integral[in] Pointer to AMA_SPLINE containing the indefinite integral of $s({\bf X})$.
Returns
Success/Error Code.
Note
If spline $=$ NULL, then the file splroot_Spline_Surf_Rn.silo is not written.
If partial $=$ NULL, then the file splroot_Partial_Surf_Rn.silo is not written.
If integral $=$ NULL, then the file splroot_Integral_Surf_Rn.silo is not written.

User Support Function - Documented 012915 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!

long int AMA_VisitUnv ( AMA_OPTIONS options,
const char *  approx,
const char *  datname,
long int  n,
double *  x,
double *  z,
AMA_SPLINE spline 
)

Write VisIt files for AMA Spline Library Univariate Data Functions.

This function writes VisIt files for AMA Spline Library functions which compute spline approximations of independent variable data ${\bf X}\in{\rm R}^1$ and dependent variable data ${\bf Z}\in{\rm R}^1$. The data is given as $(x_\ell,z_\ell)$, for $\ell=1,\ldots,N$.

This function performs the following tasks:

  • Reads VisIt options, see AMA_VisitOptions().
  • Writes a VisIt data file named datname_approx_Data_R1.silo.
  • Writes a VisIt grid file named datname_approx_Grid_R1.silo.
  • Writes a VisIt surface file named datname_approx_Surf_R1.silo.

These files can be used within VisIt to produce the figures presented in Univariate Data Functions.

Parameters
options[in] Pointer to AMA_OPTIONS initialized with AMA_Options(). Should be initialized with AMA_Options() prior to calling AMA_VisitUnv().
approx[in] Approximation function. Should be one of AMA_UnvApprox, AMA_UnvInterp, AMA_UnvLstsqr, AMA_UnvMonoApprox or AMA_UnvMonoInterp.
datname[in] The data file name. Should satisfy datname $\ne$ NULL.
n[in] The number of data points $N$. Should satisfy n $\ge 2$.
x[in] Array of size n containing the independent variable data $x_\ell$, for $\ell=1,\ldots,N$. Should be in strictly ascending order.
z[in] Array of size n containing the dependent variable data $z_\ell$, for $\ell=1,\ldots,N$.
spline[in] Pointer to AMA_SPLINE containing the spline approximation. Should be a valid AMA_SPLINE structure.
Returns
Success/Error Code

User Support Function - Documented 110715 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!