NAME
enum definitions in BasicTools (incl. LaTools and the whole Diff
pack)
INCLUDE
include "enum.h"
SYNTAX
enum Format_type // type of output format (ASCII vs. Binary)
{
ASCII, // formatted ASCII text
BINARY // binary (unformatted)
};
enum ProbabilityTrans_type // uniform -> non-uniform variate transformation
{
CUMULATIVE_INVERSE = 1, // x = cumInv (u) (standard formula)
BOX_MULLER = 2 // pairwise transf. to gaussian variates
};
enum Norm_type // Types of norms
{
l1, // discrete norm, sqrt(sum_i^n abs(v_i))
L1, // continuous norm, sqrt((1/n)sum_i^n abs(v_i))
l2, // discrete norm, sqrt(sum_i^n v_i^2)
L2, // continuous norm, sqrt((1/n)sum_i^n v_i^2)
Linf // L-infinity norm
};
enum NumItgPoints // sampling points for numerical integration
{
GAUSS_POINTS, // optimal points as in Gauss-Legendre quadrature
NODAL_POINTS // fixed points, e.g. nodal points as in Gauss-Lobatto rules
};
enum NumItgDomain // shape of domain for numerical integration
{
BOX, // hypercube shape (interval, quadrilateral, box)
TRIANGLE, // triangular shape (triangle, tetraedra)
PRISM // prism shape, cylinder with triangluar cross section
};
enum FileMode
{
INFILE, // open Is_ifstream by filename
APPEND, // Os_ofstream/Os_xdr: append data to file
NEWFILE, // Os_ofstream/Os_xdr: store data on new file
MODIFY // Os_ofstream/Os_xdr: Modify existing file
};
enum ExecutionModePDE
{
SINGLE_RUN =1, // single run of simulator
MULTIPLE_RUNS =2, // multiple runs, parameter analysis
MONTE_CARLO =3 // Monte Carlo simulation and PDE
};
enum NonLinEqMethod
{
LINEAR_1IT = 0, // one iteration, just for linear problems
NEWTON_RAPHSON = 1, // Newton-Raphson's method
SUCCESSIVE_SUBST = 2, // sucessive substitutions, A(u)u=b(u)
CONJ_GRADIENTS_NL = 3, // conjugate gradients for nonlinear problems
NON_LIN_DD = 4 // domain decomposition for nonlinear problems
};
enum LinEqStorageMode
{
EXTERNAL_STORAGE = 1, // all LinEq data are allocated by the user
EXTERNAL_SOLUTION = 2, // internal allocation, except for the solution vec.
INTERNAL_STORAGE = 3 // all LinEq data allocation is hidden from the user
};
enum LinEqPrecMode
{
UNKNOWN_PREC = 0, // System in state of build-up, no preconditioner set yet
NO_PREC = 1, // No preconditioners, plain A*x=b
LEFT_PREC = 2, // Only left preconditioner, Cleft*A*x = Cleft*b
RIGHT_PREC = 3, // Only right prec, A*Cright*y = Cleft*b, Cright*y = x
SPLIT_PREC = 4, // Left _and_ right preconditioners
ANY_PREC = 5 // Any preconditioner (no, left, right, both)
};
enum LinEqSysWork
{
TOTAL_WORK = 1, // AXB_WORK + PREC__WORK + ADM_WORK
AXB_WORK = 2, // Work only for plain system A, x, b
PREC_WORK = 3, // Work only for preconditioning
ADM_WORK = 4 // Work for convergence tests etc.
};
enum LinEqSysStorage
{
TOTAL_STORAGE = 1, // AXB_STORAGE + PREC_STORAGE + ADM_STORAGE
AXB_STORAGE = 2, // Storage only for A, x, b
PREC_STORAGE = 3, // Storage only for preconditioning
ADM_STORAGE = 4 // Storage for convergence tests etc.
};
enum PrecondWork
{
APPLY_PREC_WORK = 1, // Work only for application of preconditioner
INIT_PREC_WORK = 2, // Work only for initialization of preconditioner
UPDATE_PREC_WORK = 3 // Work only for update of preconditioner
};
enum MatrixWork
{
PROD_WORK = 1, // Work for matrix by matrix product
MATVEC_WORK = 2, // Work for matrix by vector product
FACTORIZE_WORK = 3, // Work for matrix factorization
FORWBACK_WORK = 4, // Work for triangular solves
SVD_WORK = 5, // Work for SVD factorization
SVDFORWBACK_WORK = 6, // Work for SVD solves
INVERSE_WORK = 7, // Work for matrix inversion
DET_WORK = 8, // Work for matrix determinant
JACOBI_WORK = 9, // Work for a single Jacobi iteration
SOR_WORK = 10, // Work for a single SOR iteration
SSOR_WORK = 11 // Work for a single SSOR iteration
};
enum VectorWork
{
NORM_WORK = 1, // Work for last used vector norm
INNER_WORK = 2 // Work for vector inner product
};
enum StartVectorMode
{
USER_START = 1, // User supplied start vector
RANDOM_START = 2, // Random start vector (entries in [-1:1])
ZERO_START = 3, // Zeros as start vector
RHS_START = 4, // Startvector is x = Cleft*b
RE_START = 5 // algorithm restart (= USER_START)
};
enum Residual_type
{
ORIGINAL_RES = 0, // Original residual r = b-A*x
LEFTPREC_RES = 1, // Left preconditioned residual s = Cleft*(b-A*x)
PSEUDO_RES = 2 // Pseudo-residual z = Cright*Cleft*(b-A*x)
};
enum ConvMon_Relop
{
CM_OR = 0, // Logical OR relation operator for ConvMonitors
CM_AND = 1 // Logical AND relation operator for ConvMonitors
};
enum TransposeMode
{
NOT_TRANSPOSED = 1, // Matrix not transposed
TRANSPOSED = 2, // Matrix transposed
CONJ_TRANSPOSED = 3 // Matrix conjugate transposed
};
enum FactType
{
LU_FACT = 1, // LU factorization of matrix
CHOL_FACT = 2, // Cholesky (LL^T) factorization of matrix
RILU_FACT = 3, // Relaxed incomplete LU factorization of matrix
MILU_FACT = 4, // Modified incomplete LU factorization of matrix
SVD_FACT = 5, // Singular value decomposition of matrix
AMG_FACT = 6 // algebraic multigrid
};
enum ReordType
{
NO_REORD = 0, // No reordering of matrix
RCM_REORD = 1, // Reverse Cuthill-McKee reordering of matrix
ND_REORD = 2, // Nested dissection reordering of matrix
MINDEG_REORD = 3 // Minimum degree reordering of matrix
};
enum PivotType
{
NO_PIVOT = 0, // No pivoting in factorization
PARTIAL_PIVOT = 1, // Partial pivoting in factorization
COMPLETE_PIVOT = 2 // Complete pivoting in factorization
};
enum VerbosityLevel
{
COMPACT = 0, // Compact report format
EXTENDED = 1, // Extended report format
DETAILED = 2 // Detailed report format
};
KEYWORDS
named integer constants, file formats, probability transforma
tions, norms, numerical integration points, numerical integration
domains, file modes, nonlinear equation solvers, storage modes,
preconditioning modes, work counts, storage counts, start vector
modes, residual types, transpose modes, factorization types,
reordering types, pivot types, report verbosity level
DEVELOPED BY
SINTEF Applied Mathematics, Oslo, Norway, and University of Oslo,
Dept. of Mathematics, Norway
AUTHOR
Hans Petter Langtangen, SINTEF/UiO, Are Magnus Bruaset, SINTEF,
Fred Ivar Larsen, SINTEF.