Dune Core Modules (unstable)

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// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_PRECISION_HH
6#define DUNE_PRECISION_HH
7
12#include <stdlib.h>
13
14namespace Dune {
15
24 template <class ctype = double>
26 public:
28 static ctype absolute_limit ()
29 {
30 return _absolute;
31 }
32
34 static void set_absolute_limit (ctype absthres)
35 {
36 _absolute = absthres;
37 }
38
39 private:
40 // just to demonstrate some state information
41 static ctype _absolute;
42 };
43
44 template <class ctype>
45 ctype FMatrixPrecision<ctype>::_absolute = 1E-80;
46
49} // end namespace
50
51#endif
Precisions for calculations with FieldMatrix and FieldVector.
Definition: precision.hh:25
static ctype absolute_limit()
return threshold to declare matrix singular
Definition: precision.hh:28
static void set_absolute_limit(ctype absthres)
set singular threshold
Definition: precision.hh:34
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)