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];
int CalculateError(void *s, void *m)
void GetStringFromInteger(int, char *, int)
int TimeError(void *, void *, double *)
INLINE double ArraySumAbsnD(int, int, int *, int, int *, double *)
MPI related function definitions.
int MPISum_double(double *, double *, int, void *)
int MPIMax_double(double *, double *, int, void *)
#define _MAX_STRING_SIZE_
INLINE double ArraySumSquarenD(int, int, int *, int, int *, double *)
long sum(const std::vector< int > &a_iv)
Contains structure definition for hypar.
int ExactSolution(void *, void *, double *, char *, int *)
Contains function declarations for time integration.
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
Structure of MPI-related variables.
INLINE double ArrayMaxnD(int, int, int *, int, int *, double *)
#define _ArrayAXPY_(x, a, y, size)
Structure containing all solver-specific variables and functions.
Some common functions used here and there.