KASKADE 7 development version
Loading...
Searching...
No Matches
factorizationOptions.hh
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the library KASKADE 7 */
4/* https://www.zib.de/research/projects/kaskade7-finite-element-toolbox */
5/* */
6/* Copyright (C) 2024-2025 Zuse Institute Berlin */
7/* */
8/* KASKADE 7 is distributed under the terms of the ZIB Academic License. */
9/* see $KASKADE/academic.txt */
10/* */
11/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12
13#ifndef FACTORIZATION_OPTIONS
14#define FACTORIZATION_OPTIONS
15
16#include "utilities/enums.hh"
17
18#include <cassert>
19
20namespace Kaskade
21{
37 {
39
41 : matrixProperty(matrixProperty_) {}
42
43 FactorizationOptions(MatrixProperties matrixProperty_, int verbosity_)
44 : matrixProperty(matrixProperty_), verbosity(verbosity_) {}
45
51
64
71 {
72 assert(n>=0);
73 nThreads = n;
74 return *this;
75 }
76
84 int nThreads = 0;
85
91 int verbosity = 0;
92
101
110 {
112 return *this;
113 }
114
118 struct Mumps
119 {
120 bool inertia = false;
121 double zeroPivotThreshold = 0.0;
123 };
124
125
126}
127
128#endif
MatrixProperties
Characterizations of sparse matrix properties.
Definition enums.hh:83
The Mumps struct allows to specify options which are exclusively relevant for the MUMPS solver.
bool inertia
States whether to determine inertia of given matrix, only considered if matrixProperty is SYMMETRIC.
double zeroPivotThreshold
Threshold that defines which pivots will be considered as zero. See CNTL(3) in MUMPS documentation.
MatrixProperties matrixProperty
We can specify the properties of the matrix, which might be taken into account for selecing an orderi...
struct Kaskade::FactorizationOptions::Mumps mumps
FactorizationOptions & setMatrixProperties(MatrixProperties mp)
Convenience method for setting the matrix properties.
FactorizationOptions & setRefinementIterations(int i)
Convenience method for setting the number of refinement iterations.
int refinementIterations
Number of refinement iterations.
FactorizationOptions & setNThreads(int n)
Convenience method for setting the number of threads to be used.
int nThreads
Number of threads to use.
int verbosity
How detailed information should be reported.
FactorizationOptions(MatrixProperties matrixProperty_, int verbosity_)
FactorizationOptions(MatrixProperties matrixProperty_)