Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jauslin <ian.jauslin@roma1.infn.it>2015-10-07 12:51:41 +0000
committerIan Jauslin <ian.jauslin@roma1.infn.it>2015-10-07 13:00:23 +0000
commit469bdc80712dbf9c12562059dc4594620b59a076 (patch)
treec6da40a884899110d102d82a7a778f2b3afae702 /src/flow.c
parente7aa6859f08565d58684fa4b9c40fed716f0ba17 (diff)
Support MPFR floats in numkondov1.4
Remove '-D' option (error tolerance) in numkondo
Diffstat (limited to 'src/flow.c')
-rw-r--r--src/flow.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/flow.c b/src/flow.c
index d271e44..b294bb0 100644
--- a/src/flow.c
+++ b/src/flow.c
@@ -24,13 +24,11 @@ limitations under the License.
#include "number.h"
#include "array.h"
#include "coefficient.h"
-
+#include "rcc.h"
// compute flow numerically, no exponentials
-// inputs: flow_equation
-// init, niter, tol (the allowed error at each step), ls (whether to display the results in terms of ls), display_mode (what to print)
-int numerical_flow(Grouped_Polynomial flow_equation, RCC init, Labels labels, int niter, long double tol, int display_mode){
+int numerical_flow(Grouped_Polynomial flow_equation, RCC init, Labels labels, int niter, int display_mode){
// running coupling contants
RCC rccs=init;
int i,j;
@@ -53,7 +51,7 @@ int numerical_flow(Grouped_Polynomial flow_equation, RCC init, Labels labels, in
for(i=0;i<niter;i++){
// compute a single step
- step_flow(&rccs, flow_equation, tol);
+ step_flow(&rccs, flow_equation);
// convert ls to alphas
if(display_mode==DISPLAY_NUMERICAL){
// print the result
@@ -83,14 +81,9 @@ int numerical_flow(Grouped_Polynomial flow_equation, RCC init, Labels labels, in
}
// single step in the flow no exponentials
-// inputs: flow_equation, tol
-// input/outputs: rccs
-int step_flow(RCC* rccs, Grouped_Polynomial flow_equation, long double tol){
+int step_flow(RCC* rccs, Grouped_Polynomial flow_equation){
int i;
long double* new_rccs=calloc((*rccs).length,sizeof(long double));
- Int_Array computed;
-
- init_Int_Array(&computed, (*rccs).length);
// initialize vectors to 0
for(i=0;i<(*rccs).length;i++){
@@ -101,10 +94,6 @@ int step_flow(RCC* rccs, Grouped_Polynomial flow_equation, long double tol){
for(i=0;i<flow_equation.length;i++){
if(flow_equation.indices[i]<0){
evalcoef(*rccs, flow_equation.coefs[i], new_rccs+i);
- // if the new rcc is too small, then ignore it
- if(fabs(new_rccs[i])<tol){
- new_rccs[i]=0.;
- }
(*rccs).values[i]=new_rccs[i];
}
}
@@ -113,10 +102,6 @@ int step_flow(RCC* rccs, Grouped_Polynomial flow_equation, long double tol){
for(i=0;i<flow_equation.length;i++){
if(flow_equation.indices[i]>=0){
evalcoef(*rccs, flow_equation.coefs[i], new_rccs+i);
- // if the new rcc is too small, then ignore it
- if(fabs(new_rccs[i])<tol){
- new_rccs[i]=0.;
- }
}
}
@@ -126,7 +111,6 @@ int step_flow(RCC* rccs, Grouped_Polynomial flow_equation, long double tol){
}
// free memory
- free_Int_Array(computed);
free(new_rccs);
return(0);
}