src/Utilities/GeometricUtilities.hh
//------------------------------------------------------------------------------
// Construct a Tensor with the given diagonal elements, constrained to the 
// given range.
//------------------------------------------------------------------------------
Construct a Tensor with the given diagonal elements, constrained to the
given range.
Construct a Tensor with the given diagonal elements constrained to the given range .
inline
Dim<1>::Tensor
constructTensorWithBoundedDiagonal(const Dim<1>::Vector& vec,
                                   const double minval,
                                   const double maxval) {
  return Dim<1>::Tensor(std::max(minval, std::min(maxval, vec.x())));
}
inline Dim < 1 > :: Tensor constructTensorWithBoundedDiagonal ( const Dim < 1 > :: Vector & vec , const double minval , const double maxval ) { return Dim < 1 > :: Tensor ( std :: max ( minval , std :: min ( maxval , vec . x ( ) ) ) ) ; }
Construct a Tensor with the given diagonal elements, constrained to the
given range.
Construct a Tensor with the given diagonal elements constrained to the given range .