/*-------------------------------------------------------------------*/
bool NOMAD::SMesh::get_Delta ( NOMAD::Point & Delta ) const
{
    
    Delta.reset ( _n );
    
    // power_of_tau = tau^{ max{0,l0} - max{0,lk} + |lk|/2}:
    NOMAD::Double power_of_tau
    = pow ( _update_basis.value() , abs(_mesh_index) / 2.0             +
           ( (_initial_mesh_index > 0) ? _initial_mesh_index : 0) -
           ( (_mesh_index          > 0) ? _mesh_index          : 0)   );
    
    bool stop    = true;
    bool mps_def = _Delta_min.is_complete();
    
    // Delta^k = power_of_tau * Delta^0:
    for ( int i = 0 ; i < _n ; ++i )
    {
        Delta[i] = _Delta_0[i] * power_of_tau;
        if ( !mps_def || Delta[i] >= _Delta_min[i] )
            stop = false;
        
        if ( _Delta_min.is_defined() && _Delta_min[i].is_defined() && Delta[i] < _Delta_min[i] )
            Delta[i]=_Delta_min[i];
    }
    
    return stop;
}
/*----------------------------------------------------------------*/
bool NOMAD::SMesh::get_delta ( NOMAD::Point & delta ) const
{
    delta.reset ( _n );
    
    // power_of_tau = tau^{ max{0,l0} - max{0,lk} }:
    NOMAD::Double power_of_tau
    = pow ( _update_basis.value() ,
           ( (_initial_mesh_index > 0) ? _initial_mesh_index : 0) -
           ( (_mesh_index          > 0) ? _mesh_index          : 0)   );
    
    bool stop    = false;
    
    // delta^k = power_of_tau * delta^0:
    for ( int i = 0 ; i < _n ; ++i )
    {
        delta[i] = _delta_0[i] * power_of_tau;
        if ( !stop && _delta_min.is_defined() && delta[i] < _delta_min[i] )
            stop = true;
        
    }
    
    return stop;
}