aboutsummaryrefslogtreecommitdiff
path: root/ell_relax.h
diff options
context:
space:
mode:
Diffstat (limited to 'ell_relax.h')
-rw-r--r--ell_relax.h32
1 files changed, 3 insertions, 29 deletions
diff --git a/ell_relax.h b/ell_relax.h
index bc5b5fb..6a9ff2c 100644
--- a/ell_relax.h
+++ b/ell_relax.h
@@ -41,37 +41,11 @@
#include <threadpool.h>
#include "log.h"
+#include "mg2d_boundary.h"
#include "mg2d_constants.h"
typedef struct EllRelaxInternal EllRelaxInternal;
-/**
- * Boundary condition definition.
- */
-typedef struct EllRelaxBoundary {
- /**
- * Type of the boundary condition.
- */
- enum MG2DBCType type;
- /**
- * For type = ELL_RELAX_BC_TYPE_FIXVAL:
- * Values of the unknown function on the boundary.
- * The number of boundary layers is equal to fd_stencil.
- * The first boundary layer has the number of points equal to the
- * corresponding domain_size. Each subsequent boundary layer has one
- * more boundary point at each end of the domain.
- *
- * Ignored otherwise.
- */
- double *val;
- /**
- * Number of elements between rows in val. I.e. if val[0] is the first
- * boundary point, then val[val_stride - 1] is the first boundary point in
- * the second row and so on.
- */
- size_t val_stride;
-} EllRelaxBoundary;
-
typedef struct EllRelaxContext {
/**
* Solver private data, not to be accessed in any way by the caller.
@@ -113,10 +87,10 @@ typedef struct EllRelaxContext {
size_t fd_stencil;
/**
- * Boundary specification, indexed by EllRelaxBoundaryLoc.
+ * Boundary specification, indexed by MG2DBoundaryLoc.
* To be filled by the caller before mg2di_ell_relax_init().
*/
- EllRelaxBoundary boundaries[4];
+ MG2DBoundary *boundaries[4];
/**
* The time stepping factor in relaxation.