sundials_nvector.h File Reference

#include "sundials_types.h"

Include dependency graph for sundials_nvector.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _generic_N_Vector_Ops
struct  _generic_N_Vector

Typedefs

typedef struct
_generic_N_Vector_Ops
N_Vector_Ops
typedef struct _generic_N_VectorN_Vector
typedef N_VectorN_Vector_S

Functions

N_Vector N_VClone (N_Vector w)
N_Vector N_VCloneEmpty (N_Vector w)
void N_VDestroy (N_Vector v)
void N_VSpace (N_Vector v, long int *lrw, long int *liw)
realtypeN_VGetArrayPointer (N_Vector v)
void N_VSetArrayPointer (realtype *v_data, N_Vector v)
void N_VLinearSum (realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z)
void N_VConst (realtype c, N_Vector z)
void N_VProd (N_Vector x, N_Vector y, N_Vector z)
void N_VDiv (N_Vector x, N_Vector y, N_Vector z)
void N_VScale (realtype c, N_Vector x, N_Vector z)
void N_VAbs (N_Vector x, N_Vector z)
void N_VInv (N_Vector x, N_Vector z)
void N_VAddConst (N_Vector x, realtype b, N_Vector z)
realtype N_VDotProd (N_Vector x, N_Vector y)
realtype N_VMaxNorm (N_Vector x)
realtype N_VWrmsNorm (N_Vector x, N_Vector w)
realtype N_VWrmsNormMask (N_Vector x, N_Vector w, N_Vector id)
realtype N_VMin (N_Vector x)
realtype N_VWL2Norm (N_Vector x, N_Vector w)
realtype N_VL1Norm (N_Vector x)
void N_VCompare (realtype c, N_Vector x, N_Vector z)
booleantype N_VInvTest (N_Vector x, N_Vector z)
booleantype N_VConstrMask (N_Vector c, N_Vector x, N_Vector m)
realtype N_VMinQuotient (N_Vector num, N_Vector denom)
N_VectorN_VCloneEmptyVectorArray (int count, N_Vector w)
N_VectorN_VCloneVectorArray (int count, N_Vector w)
void N_VDestroyVectorArray (N_Vector *vs, int count)


Typedef Documentation

typedef struct _generic_N_Vector* N_Vector

Definition at line 62 of file sundials_nvector.h.

Definition at line 59 of file sundials_nvector.h.

typedef N_Vector* N_Vector_S

Definition at line 65 of file sundials_nvector.h.


Function Documentation

void N_VAbs ( N_Vector  x,
N_Vector  z 
)

Definition at line 92 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvabs, and _generic_N_Vector::ops.

Referenced by CVEwtSetSS(), CVEwtSetSV(), CVUpperBoundH0(), IDAEwtSetSS(), and IDAEwtSetSV().

00093 {
00094   z->ops->nvabs(x, z);
00095   return;
00096 }

Here is the caller graph for this function:

void N_VAddConst ( N_Vector  x,
realtype  b,
N_Vector  z 
)

Definition at line 104 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvaddconst, and _generic_N_Vector::ops.

Referenced by CVEwtSetSS(), and IDAEwtSetSS().

00105 {
00106   z->ops->nvaddconst(x, b, z);
00107   return;
00108 }

Here is the caller graph for this function:

N_Vector N_VClone ( N_Vector  w  ) 

Definition at line 29 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvclone, and _generic_N_Vector::ops.

Referenced by CVAllocVectors(), CVodeReInit(), CVodeSetTolerances(), IDAAllocVectors(), IDACalcIC(), IDAReInit(), IDASetConstraints(), IDASetId(), IDASetTolerances(), and N_VCloneVectorArray().

00030 {
00031   return(w->ops->nvclone(w));
00032 }

Here is the caller graph for this function:

N_Vector N_VCloneEmpty ( N_Vector  w  ) 

Definition at line 34 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvcloneempty, and _generic_N_Vector::ops.

Referenced by N_VCloneEmptyVectorArray().

00035 {
00036   return(w->ops->nvcloneempty(w));
00037 }

Here is the caller graph for this function:

N_Vector* N_VCloneEmptyVectorArray ( int  count,
N_Vector  w 
)

Definition at line 175 of file sundials_nvector.c.

References j, malloc(), N_VCloneEmpty(), N_VDestroyVectorArray(), and NULL.

00176 {
00177   N_Vector *vs;
00178   int j;
00179 
00180   if (count <= 0) return(NULL);
00181 
00182   vs = NULL;
00183   vs = (N_Vector *) malloc(count * sizeof(N_Vector));
00184   if(vs == NULL) return(NULL);
00185 
00186   for (j = 0; j < count; j++) {
00187     vs[j] = NULL;
00188     vs[j] = N_VCloneEmpty(w);
00189     if (vs[j] == NULL) {
00190       N_VDestroyVectorArray(vs, j-1);
00191       return(NULL);
00192     }
00193   }
00194 
00195   return(vs);
00196 }

Here is the call graph for this function:

N_Vector* N_VCloneVectorArray ( int  count,
N_Vector  w 
)

Definition at line 198 of file sundials_nvector.c.

References j, malloc(), N_VClone(), N_VDestroyVectorArray(), and NULL.

00199 {
00200   N_Vector *vs;
00201   int j;
00202 
00203   if (count <= 0) return(NULL);
00204 
00205   vs = NULL;
00206   vs = (N_Vector *) malloc(count * sizeof(N_Vector));
00207   if(vs == NULL) return(NULL);
00208 
00209   for (j = 0; j < count; j++) {
00210     vs[j] = NULL;
00211     vs[j] = N_VClone(w);
00212     if (vs[j] == NULL) {
00213       N_VDestroyVectorArray(vs, j-1);
00214       return(NULL);
00215     }
00216   }
00217 
00218   return(vs);
00219 }

Here is the call graph for this function:

void N_VCompare ( realtype  c,
N_Vector  x,
N_Vector  z 
)

Definition at line 145 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvcompare, and _generic_N_Vector::ops.

Referenced by IDANls().

00146 {
00147   z->ops->nvcompare(c, x, z);
00148   return;
00149 }

Here is the caller graph for this function:

void N_VConst ( realtype  c,
N_Vector  z 
)

Definition at line 68 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvconst, and _generic_N_Vector::ops.

Referenced by cossimdaskr(), CVAdjustAdams(), CVNlsFunctional(), CVNlsNewton(), IDAGetSolution(), IDANewtonIter(), and IDAPredict().

00069 {
00070   z->ops->nvconst(c, z);
00071   return;
00072 }

Here is the caller graph for this function:

booleantype N_VConstrMask ( N_Vector  c,
N_Vector  x,
N_Vector  m 
)

Definition at line 156 of file sundials_nvector.c.

References booleantype, _generic_N_Vector_Ops::nvconstrmask, and _generic_N_Vector::ops.

Referenced by IDAInitialSetup(), IDALineSrch(), and IDANls().

00157 {
00158   return((booleantype) x->ops->nvconstrmask(c, x, m));
00159 }

Here is the caller graph for this function:

void N_VDestroy ( N_Vector  v  ) 

void N_VDestroyVectorArray ( N_Vector vs,
int  count 
)

Definition at line 221 of file sundials_nvector.c.

References free(), j, N_VDestroy(), and NULL.

Referenced by N_VCloneEmptyVectorArray(), and N_VCloneVectorArray().

00222 {
00223   int j;
00224 
00225   for (j = 0; j < count; j++) N_VDestroy(vs[j]);
00226 
00227   free(vs); vs = NULL;
00228 
00229   return;
00230 }

Here is the call graph for this function:

Here is the caller graph for this function:

void N_VDiv ( N_Vector  x,
N_Vector  y,
N_Vector  z 
)

Definition at line 80 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvdiv, and _generic_N_Vector::ops.

Referenced by CVUpperBoundH0(), and IDANls().

00081 {
00082   z->ops->nvdiv(x, y, z);
00083   return;
00084 }

Here is the caller graph for this function:

realtype N_VDotProd ( N_Vector  x,
N_Vector  y 
)

Definition at line 110 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvdotprod, and _generic_N_Vector::ops.

00111 {
00112   return((realtype) y->ops->nvdotprod(x, y));
00113 }

realtype* N_VGetArrayPointer ( N_Vector  v  ) 

Definition at line 51 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvgetarraypointer, and _generic_N_Vector::ops.

Referenced by CVDenseDQJac(), CVDenseSolve(), IDADenseDQJac(), IDADenseSolve(), and Jacobians().

00052 {
00053   return((realtype *) v->ops->nvgetarraypointer(v));
00054 }

Here is the caller graph for this function:

void N_VInv ( N_Vector  x,
N_Vector  z 
)

Definition at line 98 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvinv, and _generic_N_Vector::ops.

Referenced by CVEwtSetSS(), CVEwtSetSV(), CVUpperBoundH0(), IDAEwtSetSS(), and IDAEwtSetSV().

00099 {
00100   z->ops->nvinv(x, z);
00101   return;
00102 }

Here is the caller graph for this function:

booleantype N_VInvTest ( N_Vector  x,
N_Vector  z 
)

Definition at line 151 of file sundials_nvector.c.

References booleantype, _generic_N_Vector_Ops::nvinvtest, and _generic_N_Vector::ops.

00152 {
00153   return((booleantype) z->ops->nvinvtest(x, z));
00154 }

realtype N_VL1Norm ( N_Vector  x  ) 

Definition at line 140 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvl1norm, and _generic_N_Vector::ops.

00141 {
00142   return((realtype) x->ops->nvl1norm(x));
00143 }

void N_VLinearSum ( realtype  a,
N_Vector  x,
realtype  b,
N_Vector  y,
N_Vector  z 
)

realtype N_VMaxNorm ( N_Vector  x  ) 

Definition at line 115 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvmaxnorm, and _generic_N_Vector::ops.

Referenced by CVUpperBoundH0(), and IDASetConstraints().

00116 {
00117   return((realtype) x->ops->nvmaxnorm(x));
00118 }

Here is the caller graph for this function:

realtype N_VMin ( N_Vector  x  ) 

Definition at line 130 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvmin, and _generic_N_Vector::ops.

Referenced by CVEwtSetSS(), CVEwtSetSV(), CVodeMalloc(), CVodeReInit(), CVodeSetTolerances(), IDACalcIC(), IDAEwtSetSS(), IDAEwtSetSV(), IDAMalloc(), IDAReInit(), and IDASetTolerances().

00131 {
00132   return((realtype) x->ops->nvmin(x));
00133 }

Here is the caller graph for this function:

realtype N_VMinQuotient ( N_Vector  num,
N_Vector  denom 
)

Definition at line 161 of file sundials_nvector.c.

References _generic_N_Vector_Ops::nvminquotient, and _generic_N_Vector::ops.

Referenced by IDALineSrch(), and IDANls().

00162 {
00163   return((realtype) num->ops->nvminquotient(num, denom));
00164 }

Here is the caller graph for this function:

void N_VProd ( N_Vector  x,
N_Vector  y,
N_Vector  z 
)

Definition at line 74 of file sundials_nvector.c<