commit dca80d79691eee8d52b0bbb5688b7d1046064444
parent 43034a6741317a99a565b894a59f499d7a60c184
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 5 Nov 2021 16:52:20 +0100
Check picard order when evaluating the green evaluation
Picard order must be set to 1
Diffstat:
4 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/src/sdis_solve_boundary_Xd.h b/src/sdis_solve_boundary_Xd.h
@@ -119,6 +119,14 @@ XD(solve_boundary)
res = RES_BAD_ARG;
goto error;
}
+ if(out_green && scene_get_picard_order(scn) != 1) {
+ log_err(scn->dev, "%s: the evaluation of the green function does not make "
+ "sense when dealing with the non-linearities of the system; i.e. picard "
+ "order must be set to 1 while it is currently set to %lu.\n",
+ FUNC_NAME, (unsigned long)scene_get_picard_order(scn));
+ res = RES_BAD_ARG;
+ goto error;
+ }
#if SDIS_XD_DIMENSION == 2
if(scene_is_2d(scn) == 0) { res = RES_BAD_ARG; goto error; }
diff --git a/src/sdis_solve_medium_Xd.h b/src/sdis_solve_medium_Xd.h
@@ -240,6 +240,15 @@ XD(solve_medium)
}
}
+ if(out_green && scene_get_picard_order(scn) != 1) {
+ log_err(scn->dev, "%s: the evaluation of the green function does not make "
+ "sense when dealing with the non-linearities of the system; i.e. picard "
+ "order must be set to 1 while it is currently set to %lu.\n",
+ FUNC_NAME, (unsigned long)scene_get_picard_order(scn));
+ res = RES_BAD_ARG;
+ goto error;
+ }
+
#if SDIS_XD_DIMENSION == 2
if(scene_is_2d(scn) == 0) { res = RES_BAD_ARG; goto error; }
#else
diff --git a/src/sdis_solve_probe_Xd.h b/src/sdis_solve_probe_Xd.h
@@ -70,6 +70,14 @@ XD(solve_probe)
res = RES_BAD_ARG;
goto error;
}
+ if(out_green && scene_get_picard_order(scn) != 1) {
+ log_err(scn->dev, "%s: the evaluation of the green function does not make "
+ "sense when dealing with the non-linearities of the system; i.e. picard "
+ "order must be set to 1 while it is currently set to %lu.\n",
+ FUNC_NAME, (unsigned long)scene_get_picard_order(scn));
+ res = RES_BAD_ARG;
+ goto error;
+ }
#if SDIS_XD_DIMENSION == 2
if(scene_is_2d(scn) == 0) { res = RES_BAD_ARG; goto error; }
diff --git a/src/sdis_solve_probe_boundary_Xd.h b/src/sdis_solve_probe_boundary_Xd.h
@@ -70,6 +70,14 @@ XD(solve_probe_boundary)
res = RES_BAD_ARG;
goto error;
}
+ if(out_green && scene_get_picard_order(scn) != 1) {
+ log_err(scn->dev, "%s: the evaluation of the green function does not make "
+ "sense when dealing with the non-linearities of the system; i.e. picard "
+ "order must be set to 1 while it is currently set to %lu.\n",
+ FUNC_NAME, (unsigned long)scene_get_picard_order(scn));
+ res = RES_BAD_ARG;
+ goto error;
+ }
#if SDIS_XD_DIMENSION == 2
if(scene_is_2d(scn) == 0) { res = RES_BAD_ARG; goto error; }