Exemplo n.º 1
0
Real SphericalBesselGenerator::j(UnsignedInteger n, Real z) const
{
    if(n <= 3)
    {
        return _j_smalln(n, z);
    }

    if(n > getMaxNJ())
    {
        return _j(n, z);
    }
    
    const sb_table::Table* table(getSJTable(n));
    assert(table != 0);

    const Real minz(table->x_start + table->delta_x * 3);
    const Real maxz(table->x_start + table->delta_x * (table->N-3));
    
    if(z >= minz && z < maxz)
    {
        return _j_table(n, z);
    }
    else
    {
        return _j(n, z);
    }
}
Exemplo n.º 2
0
Real CylindricalBesselGenerator::J(UnsignedInteger n, Real z) const
{
    if(n > getMaxNJ())
    {
        return _J(n, z);
    }
    
    const cb_table::Table* table(getCJTable(n));
    assert(table != 0);

    const Real minz(table->x_start + table->delta_x * 3);
    const Real maxz(table->x_start + table->delta_x * (table->N-3));
    
    if(z >= minz && z < maxz)
    {
        return _J_table(n, z);
    }
    else
    {
        return _J(n, z);
    }
}