23C_LPoly(
const double M,
const double W,
const double M_e) :
57 psum[0]=0.0; psum[1]=1.0;
58 for(
int i=2; i<500; i++){psum[i]=psum[i-1]+1.0/((double) (i*i));}
60 double intg_psum(
int n1,
int n2){
61 double n1d=((double) n1);
double n2d=((double) n2);
62 double n1dsq=n1d*n1d;
double n2dsq=n2d*n2d;
63 double val=1.0/n1d - 1.0/n2d + 0.50*(1.0/n1dsq + 1.0/n2dsq);
64 val+=(1.0/(n1d*n1dsq) - 1.0/(n2d*n2dsq))/6.0;
67 double operator()(
int Z){
68 if(Z < 500){
return psum[Z];}
69 else{
return psum[499]+intg_psum(500,Z);}
71 double operator()(
int Z1,
int Z2){
73 if(Z1 <= 500){s1=psum[Z1-1];}
74 else{s1=psum[499]+intg_psum(500,Z1-1);}
75 if(Z2 < 500){s2=psum[Z2];}
76 else{s2=psum[499]+intg_psum(500,Z2);}
83#include "./routines.h"
double mass
Definition: LP2R.h:26
bool relax_free_Rouse
Definition: LP2R.h:32
int p_max
Definition: LP2R.h:38
double Z_rept
Definition: LP2R.h:36
int p_next
Definition: LP2R.h:39
double Z_chain
Definition: LP2R.h:28
double rept_wt
Definition: LP2R.h:37
double z
Definition: LP2R.h:29
double tau_d_0
Definition: LP2R.h:35
double wt
Definition: LP2R.h:27
bool alive
Definition: LP2R.h:31
double t_FRouse
Definition: LP2R.h:41
bool rept_set
Definition: LP2R.h:34
Class to hold and retrieve partial sums of the form 1/p^2 .
Definition: LP2R.h:53