32 int exact_flag = 0, i, size;
33 double sum = 0, global_sum = 0;
38 for (i = 0; i < solver->
ndims; i++)
40 uex = (
double*) calloc (size,
sizeof(
double));
43 if (solver->
nsims > 1) {
46 strcat(fname_root,
"_");
47 strcat(fname_root, index);
50 static const double tolerance = 1e-15;
68 double solution_norm[3] = {0.0,0.0,0.0};
78 solution_norm[1] = sqrt(global_sum/((
double)solver->
npoints_global));
83 solution_norm[2] = global_sum;
104 solver->
error[2] = global_sum;
110 if ( (solution_norm[0] > tolerance)
111 && (solution_norm[1] > tolerance)
112 && (solution_norm[2] > tolerance) ) {
113 solver->
error[0] /= solution_norm[0];
114 solver->
error[1] /= solution_norm[1];
115 solver->
error[2] /= solution_norm[2];
Some common functions used here and there.
MPI related function definitions.
int MPISum_double(double *, double *, int, void *)
long sum(const std::vector< int > &a_iv)
Some basic definitions and macros.
Contains function declarations for time integration.
int ExactSolution(void *, void *, double *, char *, int *)
INLINE double ArraySumAbsnD(int, int, int *, int, int *, double *)
Structure containing all solver-specific variables and functions.
#define _MAX_STRING_SIZE_
int MPIMax_double(double *, double *, int, void *)
#define _ArrayAXPY_(x, a, y, size)
Contains structure definition for hypar.
int CalculateError(void *s, void *m)
void GetStringFromInteger(int, char *, int)
INLINE double ArrayMaxnD(int, int, int *, int, int *, double *)
Structure of MPI-related variables.
INLINE double ArraySumSquarenD(int, int, int *, int, int *, double *)
Contains macros and function definitions for common array operations.
int TimeError(void *, void *, double *)