aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-04-16 15:17:50 +0200
committerAnton Khirnov <anton@khirnov.net>2024-04-16 15:19:46 +0200
commit3054f2d8c4fbd71934864c4d3a70bcf74367df57 (patch)
tree21aa19203e48707b5e5520eebecdbc92ad72bae2
parent52581fdefd8257249768deb837548e9c71eac57e (diff)
mg2d: add MG2DContext.adaptive_step
Unused, for API compatibility with the adaptive step branch.
-rw-r--r--libmg2d.v2
-rw-r--r--mg2d.c6
-rw-r--r--mg2d.h5
3 files changed, 12 insertions, 1 deletions
diff --git a/libmg2d.v b/libmg2d.v
index 526ba87..4eced76 100644
--- a/libmg2d.v
+++ b/libmg2d.v
@@ -1,4 +1,4 @@
-LIBMG2D_14 {
+LIBMG2D_15 {
global: mg2d_*;
local: *;
};
diff --git a/mg2d.c b/mg2d.c
index 58886cd..dec0c18 100644
--- a/mg2d.c
+++ b/mg2d.c
@@ -1495,6 +1495,12 @@ static int mg_levels_alloc(MG2DContext *ctx)
int ret = 0;
+ if (ctx->adaptive_step) {
+ mg2di_log(&priv->logger, MG2D_LOG_ERROR,
+ "Adaptive stepping not supported.\n");
+ return -EINVAL;
+ }
+
/* compute the levels geometries/partitioning */
ret = mg_dh_init(&priv->dh, priv->dg, ctx->step, ctx->max_levels);
if (ret < 0) {
diff --git a/mg2d.h b/mg2d.h
index 8f48361..af83345 100644
--- a/mg2d.h
+++ b/mg2d.h
@@ -246,6 +246,11 @@ typedef struct MG2DContext {
* Set by mg2d_solve() if it returns 0 or MG2D_ERR_MAXITER_REACHED.
*/
double residual_max;
+
+ /**
+ * Unused, do not set.
+ */
+ int adaptive_step;
} MG2DContext;
/**