aboutsummaryrefslogtreecommitdiff
path: root/Source/Parser/wp_parser_y.c
diff options
context:
space:
mode:
authorGravatar Dave Grote <grote1@llnl.gov> 2019-07-24 15:54:54 -0700
committerGravatar Dave Grote <grote1@llnl.gov> 2019-07-24 15:54:54 -0700
commit9cfc7888bb7891aa2c0258d84888fb0ba3add612 (patch)
treebab2dd8d0f17e25111d5c7c1e3017395f55a7b21 /Source/Parser/wp_parser_y.c
parent1c45d2b66faff7d2e34c9e8f984614fee07c1f99 (diff)
parentdd40a0f5c5a234c27d2ca0b54d2936d6eec9a89c (diff)
downloadWarpX-9cfc7888bb7891aa2c0258d84888fb0ba3add612.tar.gz
WarpX-9cfc7888bb7891aa2c0258d84888fb0ba3add612.tar.zst
WarpX-9cfc7888bb7891aa2c0258d84888fb0ba3add612.zip
Merge branch 'dev' into push_momentum
Diffstat (limited to 'Source/Parser/wp_parser_y.c')
-rw-r--r--Source/Parser/wp_parser_y.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/Source/Parser/wp_parser_y.c b/Source/Parser/wp_parser_y.c
index 402c4e67b..46cb199db 100644
--- a/Source/Parser/wp_parser_y.c
+++ b/Source/Parser/wp_parser_y.c
@@ -185,6 +185,18 @@ wp_call_f2 (enum wp_f2_t type, double a, double b)
return (a > b) ? 1.0 : 0.0;
case WP_LT:
return (a < b) ? 1.0 : 0.0;
+ case WP_GEQ:
+ return (a >= b) ? 1.0 : 0.0;
+ case WP_LEQ:
+ return (a <= b) ? 1.0 : 0.0;
+ case WP_EQ:
+ return (a == b) ? 1.0 : 0.0;
+ case WP_NEQ:
+ return (a != b) ? 1.0 : 0.0;
+ case WP_AND:
+ return (a && b) ? 1.0 : 0.0;
+ case WP_OR:
+ return (a || b) ? 1.0 : 0.0;
case WP_HEAVISIDE:
return (a < 0.0) ? 0.0 : ((a > 0.0) ? 1.0 : b);
case WP_MIN:
@@ -805,6 +817,24 @@ wp_ast_print_f2 (struct wp_f2* f2)
case WP_LT:
printf("LT\n");
break;
+ case WP_GEQ:
+ printf("GEQ\n");
+ break;
+ case WP_LEQ:
+ printf("LEQ\n");
+ break;
+ case WP_EQ:
+ printf("EQ\n");
+ break;
+ case WP_NEQ:
+ printf("NEQ\n");
+ break;
+ case WP_AND:
+ printf("AND\n");
+ break;
+ case WP_OR:
+ printf("OR\n");
+ break;
case WP_HEAVISIDE:
printf("HEAVISIDE\n");
break;
@@ -1015,4 +1045,3 @@ wp_parser_setconst (struct wp_parser* parser, char const* name, double c)
wp_ast_setconst(parser->ast, name, c);
wp_ast_optimize(parser->ast);
}
-