Exemple #1
0
Real SphericalBesselGenerator::y(const UnsignedInteger n, const Real z) const
{
    if(n <= 2)
    {
        return _y_smalln(n, z);
    }

    if(n > getMaxNY())
    {
        return _y(n, z);
    }
    
    const sb_table::Table* table(getSYTable(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 _y_table(n, z);
    }
    else
    {
        return _y(n, z);
    }
}
Real CylindricalBesselGenerator::Y(const UnsignedInteger n, const Real z) const
{
    if(n > getMaxNY())
    {
        return _Y(n, z);
    }
    
    const cb_table::Table* table(getCYTable(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 _Y_table(n, z);
    }
    else
    {
        return _Y(n, z);
    }
}