Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/meantools.c')
-rw-r--r--src/meantools.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/meantools.c b/src/meantools.c
index e3e7247..64cf3f1 100644
--- a/src/meantools.c
+++ b/src/meantools.c
@@ -1,5 +1,5 @@
/*
-Copyright 2015 Ian Jauslin
+Copyright 2015-2022 Ian Jauslin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -39,13 +39,13 @@ Utility to perform various operations on flow equations
// string functions
#include "istring.h"
// tools
-#include "meantools_exp.h"
#include "meantools_deriv.h"
#include "meantools_eval.h"
+#include "meantools_expand.h"
-#define EXP_COMMAND 1
-#define DERIV_COMMAND 2
-#define EVAL_COMMAND 3
+#define DERIV_COMMAND 1
+#define EVAL_COMMAND 2
+#define EXPAND_COMMAND 3
// read cli arguments
int read_args_meantools(int argc,const char* argv[], Str_Array* str_args, Meantools_Options* opts);
@@ -63,12 +63,12 @@ int main (int argc, const char* argv[]){
read_args_meantools(argc,argv,&str_args, &opts);
switch(opts.command){
- case EXP_COMMAND: tool_exp(str_args);
- break;
case DERIV_COMMAND: tool_deriv(str_args,opts);
break;
case EVAL_COMMAND: tool_eval(str_args,opts);
break;
+ case EXPAND_COMMAND: tool_expand(str_args,opts);
+ break;
}
//free memory
@@ -86,11 +86,7 @@ int read_args_meantools(int argc,const char* argv[], Str_Array* str_args, Meanto
exit(-1);
}
- if(str_cmp((char*)argv[1],"exp")==1){
- (*opts).command=EXP_COMMAND;
- tool_exp_read_args(argc, argv, str_args);
- }
- else if(str_cmp((char*)argv[1],"derive")==1){
+ if(str_cmp((char*)argv[1],"differentiate")==1){
(*opts).command=DERIV_COMMAND;
tool_deriv_read_args(argc, argv, str_args, opts);
}
@@ -98,6 +94,10 @@ int read_args_meantools(int argc,const char* argv[], Str_Array* str_args, Meanto
(*opts).command=EVAL_COMMAND;
tool_eval_read_args(argc, argv, str_args, opts);
}
+ else if(str_cmp((char*)argv[1],"expand")==1){
+ (*opts).command=EXPAND_COMMAND;
+ tool_expand_read_args(argc, argv, str_args, opts);
+ }
else{
print_usage_meantools();
exit(-1);
@@ -108,9 +108,6 @@ int read_args_meantools(int argc,const char* argv[], Str_Array* str_args, Meanto
// print usage message
int print_usage_meantools(){
- printf("\nusage:\n meantools exp [config_file]\n meantools derive [-d derivatives] [-V variables] [-C] [config_file]\n meantools eval [-R values] [-P precision] [-E max_exponent] [config_file]\n\n");
+ printf("\nusage:\n meantools differentiate [-d derivatives] [-V variables] [-C] [config_file]\n meantools eval [-R values] [-P precision] [-E max_exponent] [config_file]\n meantools expand [-N namespace] [config_file]\n\n");
return(0);
}
-
-
-