// NOTE that "length" here is the full height of the core! static double form_volume(double r_minor, double x_core, double thick_rim, double thick_face, double length) { return M_PI*( (r_minor + thick_rim)*(r_minor*x_core + thick_rim)* length + square(r_minor)*x_core*2.0*thick_face ); } static void Fq(double q, double *F1, double *F2, double r_minor, double x_core, double thick_rim, double thick_face, double length, double rhoc, double rhoh, double rhor, double rhosolv, double sigma) { // core_shell_bicelle_elliptical_belt, RKH 5th Oct 2017, core_shell_bicelle_elliptical // tested briefly against limiting cases of cylinder, hollow cylinder & elliptical cylinder models // const double uplim = M_PI_4; const double halfheight = 0.5*length; //const double va = 0.0; //const double vb = 1.0; // inner integral limits //const double vaj=0.0; //const double vbj=M_PI; const double r_major = r_minor * x_core; const double r2A = 0.5*(square(r_major) + square(r_minor)); const double r2B = 0.5*(square(r_major) - square(r_minor)); const double vol1 = M_PI*r_minor*r_major*(2.0*halfheight); const double vol2 = M_PI*(r_minor+thick_rim)*(r_major+thick_rim)*2.0*halfheight; const double vol3 = M_PI*r_minor*r_major*2.0*(halfheight+thick_face); // dr1,2,3 are now for Vcore, Vcore+rim, Vcore+face, const double dr1 = vol1*(-rhor - rhoh + rhoc + rhosolv); const double dr2 = vol2*(rhor-rhosolv); const double dr3 = vol3*(rhoh-rhosolv); //initialize integral double outer_total_F1 = 0.0; double outer_total_F2 = 0.0; for(int i=0;i