DPsim
Loading...
Searching...
No Matches
DirectLinearSolverConfiguration.cpp
Go to the documentation of this file.
1/* Copyright 2017-2021 Institute for Automation of Complex Power Systems,
2* EONERC, RWTH Aachen University
3*
4* This Source Code Form is subject to the terms of the Mozilla Public
5* License, v. 2.0. If a copy of the MPL was not distributed with this
6* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7*********************************************************************************/
8
10
11using namespace DPsim;
12
13namespace DPsim {
21
23 FILL_IN_REDUCTION_METHOD fillInReductionMethod) {
24 mFillInReductionMethod = fillInReductionMethod;
25}
26
28 SCALING_METHOD scalingMethod) {
29 mScalingMethod = scalingMethod;
30}
31
33 PARTIAL_REFACTORIZATION_METHOD partialRefactorizationMethod) {
34 mPartialRefactorizationMethod = partialRefactorizationMethod;
35}
36
38 mUseBTF = useBTF;
39}
40
44
47 return mFillInReductionMethod;
48}
49
52 return mPartialRefactorizationMethod;
53}
54
56DirectLinearSolverConfiguration::DirectLinearSolverConfiguration::getBTF()
57 const {
58 return mUseBTF;
59}
60
62 switch (mScalingMethod) {
64 return "max scaling";
66 return "sum scaling";
68 return "without scaling";
69 default:
70 return "using the solver's default scaling method";
71 }
72}
73
75 switch (mFillInReductionMethod) {
77 return "AMD using a preference for non-varying entries";
79 return "AMD using a right-arranging of varying entries";
81 return "COLAMD";
83 return "AMD";
84 default:
85 return "using the solver's default fill-in reduction";
86 }
87}
88
91 switch (mPartialRefactorizationMethod) {
93 return "with refactorization restart";
95 return "without partial refactorization";
97 return "with factorization path";
98 default:
99 return "with unknown method";
100 }
101}
102
104 switch (mUseBTF) {
105 case USE_BTF::DO_BTF:
106 return "with BTF";
107 case USE_BTF::NO_BTF:
108 default:
109 return "without BTF";
110 }
111}
112} // namespace DPsim
void setPartialRefactorizationMethod(PARTIAL_REFACTORIZATION_METHOD partialRefactorizationMethod)
void setFillInReductionMethod(FILL_IN_REDUCTION_METHOD fillInReductionMethod)
PARTIAL_REFACTORIZATION_METHOD getPartialRefactorizationMethod() const
FILL_IN_REDUCTION_METHOD getFillInReductionMethod() const
CPS::String String
Definition Definitions.h:20