Skip to content
Snippets Groups Projects
Commit 8d6f5dab authored by Markus Blatt's avatar Markus Blatt
Browse files

Made fmatrix.hh totally independet of istl.

Before it included headers from istl.
Moved precision.hh to dune/common.

[[Imported from SVN: r212]]
parent 70aa9456
No related branches found
No related tags found
No related merge requests found
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef __DUNE_PRECISION_HH__
#define __DUNE_PRECISION_HH__
#include <stdlib.h>
namespace Dune {
/**
@addtogroup ISTL
@{
*/
template <class ctype = double>
class ISTLPrecision {
public:
//! return threshold to do pivoting
static ctype pivoting_limit ()
{
return _pivoting;
}
//! set pivoting threshold
static void set_pivoting_limit (ctype pivthres)
{
_pivoting = pivthres;
}
//! return threshold to declare matrix singular
static ctype singular_limit ()
{
return _singular;
}
//! set singular threshold
static void set_singular_limit (ctype singthres)
{
_singular = singthres;
}
//! return threshold to declare matrix singular
static ctype absolute_limit ()
{
return _absolute;
}
//! set singular threshold
static void set_absolute_limit (ctype absthres)
{
_absolute = absthres;
}
private:
// just to demonstrate some state information
static ctype _pivoting;
static ctype _singular;
static ctype _absolute;
};
template <class ctype>
ctype ISTLPrecision<ctype>::_pivoting = 1E-8;
template <class ctype>
ctype ISTLPrecision<ctype>::_singular = 1E-14;
template <class ctype>
ctype ISTLPrecision<ctype>::_absolute = 1E-80;
/** @} end documentation */
} // end namespace
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment