summaryrefslogtreecommitdiff
path: root/ell_relax.h
diff options
context:
space:
mode:
Diffstat (limited to 'ell_relax.h')
-rw-r--r--ell_relax.h78
1 files changed, 3 insertions, 75 deletions
diff --git a/ell_relax.h b/ell_relax.h
index 5f57a3b..bc5b5fb 100644
--- a/ell_relax.h
+++ b/ell_relax.h
@@ -41,79 +41,7 @@
#include <threadpool.h>
#include "log.h"
-
-/**
- * Type of the boundary condition on a given boundary.
- */
-enum EllRelaxBCType {
- /**
- * The value of the unknown function is fixed on the boundary.
- */
- ELL_RELAX_BC_TYPE_FIXVAL,
- /**
- * The normal derivative of the unkown function is fixed on the boundary.
- *
- * TODO: the only supported value of the derivative is currently zero, i.e.
- * periodic boundary conditions.
- */
- ELL_RELAX_BC_TYPE_FIXDIFF,
-};
-
-/**
- * Location of the boundary.
- */
-enum EllRelaxBoundaryLoc {
- /**
- * coord0 lower
- */
- ELL_RELAX_BOUNDARY_0L,
- /**
- * coord0 upper
- */
- ELL_RELAX_BOUNDARY_0U,
- /**
- * coord1 lower
- */
- ELL_RELAX_BOUNDARY_1L,
- /**
- * coord1 upper
- */
- ELL_RELAX_BOUNDARY_1U,
-};
-
-/**
- * Derivative specifier.
- */
-enum EllRelaxDiffCoeff {
- /**
- * Zeroth derivative, i.e. function value.
- */
- ELL_RELAX_DIFF_COEFF_00,
- /**
- * First derivative wrt coord1.
- */
- ELL_RELAX_DIFF_COEFF_01,
- /**
- * First derivative wrt coord0.
- */
- ELL_RELAX_DIFF_COEFF_10,
- /**
- * Second derivative, once wrt coord0 and once wrt coord1
- */
- ELL_RELAX_DIFF_COEFF_11,
- /**
- * Second derivative wrt coord1
- */
- ELL_RELAX_DIFF_COEFF_02,
- /**
- * Second derivative wrt coord0
- */
- ELL_RELAX_DIFF_COEFF_20,
- /**
- * Total number of allowed derivatives.
- */
- ELL_RELAX_DIFF_COEFF_NB,
-};
+#include "mg2d_constants.h"
typedef struct EllRelaxInternal EllRelaxInternal;
@@ -124,7 +52,7 @@ typedef struct EllRelaxBoundary {
/**
* Type of the boundary condition.
*/
- enum EllRelaxBCType type;
+ enum MG2DBCType type;
/**
* For type = ELL_RELAX_BC_TYPE_FIXVAL:
* Values of the unknown function on the boundary.
@@ -245,7 +173,7 @@ typedef struct EllRelaxContext {
* Allocated by the solver in mg2di_ell_relax_alloc(), owned by the solver.
* Must be filled by the caller before mg2di_ell_relax_init().
*/
- double *diff_coeffs[ELL_RELAX_DIFF_COEFF_NB];
+ double *diff_coeffs[MG2D_DIFF_COEFF_NB];
/**
* Distance between neighbouring gridpoints along coord1.
*/