<commit_before>// 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 double
radius_from_volume(double r_minor, double x_core, double thick_rim, double thick_face, double length)
{
    const double volume_bicelle = form_volume(r_minor, x_core, thick_rim,thick_face,length);
    return cbrt(0.75*volume_bicelle/M_PI);
}

static double
radius_from_diagonal(double r_minor, double x_core, double thick_rim, double thick_face, double length)
{
    const double radius_max = (x_core < 1.0 ? r_minor : x_core*r_minor);
    const double radius_max_tot = radius_max + thick_rim;
    const double length_tot = length + 2.0*thick_face;
    return sqrt(radius_max_tot*radius_max_tot + 0.25*length_tot*length_tot);
}

static double
effective_radius(int mode, double r_minor, double x_core, double thick_rim, double thick_face, double length)
{
    switch (mode) {
    case 1: // equivalent sphere
        return radius_from_volume(r_minor, x_core, thick_rim, thick_face, length);
    case 2: // outer rim average radius
        return 0.5*r_minor*(1.0 + x_core) + thick_rim;
    case 3: // outer rim min radius
        return (x_core < 1.0 ? x_core*r_minor+thick_rim : r_minor+thick_rim);
    case 4: // outer max radius
        return (x_core > 1.0 ? x_core*r_minor+thick_rim : r_minor+thick_rim);
    case 5: // half outer thickness
        return 0.5*length + thick_face;
    case 6: // half diagonal
        return radius_from_diagonal(r_minor,x_core,thick_rim,thick_face,length);
    }
}

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<commit_msg>expanded a commenton ER calc in core_shell_bicell_elliptical_belt_rough<commit_after>// 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 double
radius_from_volume(double r_minor, double x_core, double thick_rim, double thick_face, double length)
{
    const double volume_bicelle = form_volume(r_minor, x_core, thick_rim,thick_face,length);
    return cbrt(0.75*volume_bicelle/M_PI);
}

static double
radius_from_diagonal(double r_minor, double x_core, double thick_rim, double thick_face, double length)
{
    const double radius_max = (x_core < 1.0 ? r_minor : x_core*r_minor);
    const double radius_max_tot = radius_max + thick_rim;
    const double length_tot = length + 2.0*thick_face;
    return sqrt(radius_max_tot*radius_max_tot + 0.25*length_tot*length_tot);
}

static double
effective_radius(int mode, double r_minor, double x_core, double thick_rim, double thick_face, double length)
{
    switch (mode) {
    case 1: // equivalent sphere
        return radius_from_volume(r_minor, x_core, thick_rim, thick_face, length);
    case 2: // outer rim average radius
        return 0.5*r_minor*(1.0 + x_core) + thick_rim;
    case 3: // outer rim min radius
        return (x_core < 1.0 ? x_core*r_minor+thick_rim : r_minor+thick_rim);
    case 4: // outer max radius
        return (x_core > 1.0 ? x_core*r_minor+thick_rim : r_minor+thick_rim);
    case 5: // half outer thickness
        return 0.5*length + thick_face;
    case 6: // half diagonal (this ignores the missing "corners", so may give unexpected answer if thick_face
            //  or thick_rim is extremely large)
        return radius_from_diagonal(r_minor,x_core,thick_rim,thick_face,length);
    }
}

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
{'fraction_non_alphanumeric': 0.08509234828496043, 'fraction_numerical': 0.015391380826737027, 'mean_word_length': 3.2198515769944343, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6538949', 'n_tokens_mistral': 1612, 'n_tokens_neox': 1493, 'n_words': 398}