From f125289427088845a00994dfce6d0e31c1141195 Mon Sep 17 00:00:00 2001 From: Julian Weigt Date: Sun, 21 Dec 2025 17:48:45 +0000 Subject: formulations in charf.c --- charf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charf.c b/charf.c index eaf1c07..a99508e 100644 --- a/charf.c +++ b/charf.c @@ -103,7 +103,7 @@ int N=16; /*length of the domain*/ int D=5*N; -/*order of the derivative to consider*/ +/*order of the derivative to consider. Should not be larger than (D-N)/2 because then the support of f^{(K)} reaches outside of our domain.*/ int K=3; /*exponent p of the L^p norm to consider*/ @@ -135,8 +135,8 @@ for(int k=0;k<=K;k++){ dMf[0] = Mf; /*Allocate memory for integrals*/ -double* intdf = malloc(sizeof(double)*K); -double* intdMf = malloc(sizeof(double)*K); +double* intdf = malloc(K*sizeof(double)); +double* intdMf = malloc(K*sizeof(double)); /*Allocate memory for ||Mf^{(k)}||_p/||f^{(k)}||_p.*/ double r = 0.0; @@ -148,7 +148,7 @@ for(int t=1; t<=(1 << N)-1; t++){ //for(int i=0;i> i) & 1; //if(i%3==0) f[2*N+i+K/2] = 1; } -- cgit v1.2.3