[Dune] printvector changes output format

Bernd Flemisch bernd at iws.uni-stuttgart.de
Wed Jan 31 13:19:45 CET 2007


Dear Dune-Users,

the example listing just sent was not correct. It should be this one:

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include<dune/istl/io.hh>

int main(int argc, char** argv)
{
  try{
    typedef Dune::FieldVector<double,1> R1;
    Dune::BlockVector<R1> press(1);

    double small = 1e-7;

    std::cout << std::endl << "before printvector: small = " << small <<
std::endl << std::endl;

    printvector(std::cout,press,"pressure","row",11,1);

    std::cout << std::endl << "after printvector: small = " << small <<
std::endl << std::endl;

    std::cout << "forced format: small = " << std::scientific << small
<< std::endl << std::endl;

    return 0;
  }
  catch (Dune::Exception &e){
    std::cerr << "Dune reported error: " << e << std::endl;
  }
  catch (...){
    std::cerr << "Unknown exception thrown!" << std::endl;
  }
}

Best wishes
Bernd

-- 
_____________________________________________________________________

Bernd Flemisch                               phone: +49 711 685 69162
IWS, Universität Stuttgart                   fax:   +49 711 685 60430
Pfaffenwaldring 61                  email: bernd at iws.uni-stuttgart.de
D-70569 Stuttgart                       url: www.iws.uni-stuttgart.de
_____________________________________________________________________






More information about the Dune mailing list