Dune Core Modules (2.7.0)

precision.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_PRECISION_HH
4#define DUNE_PRECISION_HH
5
10#include <stdlib.h>
11
12namespace Dune {
13
22 template <class ctype = double>
24 public:
26 static ctype absolute_limit ()
27 {
28 return _absolute;
29 }
30
32 static void set_absolute_limit (ctype absthres)
33 {
34 _absolute = absthres;
35 }
36
37 private:
38 // just to demonstrate some state information
39 static ctype _absolute;
40 };
41
42 template <class ctype>
43 ctype FMatrixPrecision<ctype>::_absolute = 1E-80;
44
47} // end namespace
48
49#endif
Precisions for calculations with FieldMatrix and FieldVector.
Definition: precision.hh:23
static ctype absolute_limit()
return threshold to declare matrix singular
Definition: precision.hh:26
static void set_absolute_limit(ctype absthres)
set singular threshold
Definition: precision.hh:32
Dune namespace.
Definition: alignedallocator.hh:14
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Oct 13, 22:30, 2024)