Linux GNU 11.4.0 Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 0.0% 0 / 0 / 4
Functions: 0.0% 0 / 0 / 1
Branches: 0.0% 0 / 0 / 4

OMCompiler/SimulationRuntime/cpp/Solver/LinearSolver/FactoryExport.cpp
Line Branch Exec Source
1 /*
2 * This file belongs to the OpenModelica Run-Time System
3 *
4 * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), c/o Linköpings
5 * universitet, Department of Computer and Information Science, SE-58183 Linköping, Sweden. All rights
6 * reserved.
7 *
8 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE
9 * AGPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. ANY
10 * USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
11 * ACCEPTANCE OF THE BSD NEW LICENSE OR THE OSMC PUBLIC LICENSE OR THE AGPL
12 * VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
13 *
14 * The OpenModelica software and the OSMC (Open Source Modelica Consortium) Public License
15 * (OSMC-PL) are obtained from OSMC, either from the above address, from the URLs:
16 * http://www.openmodelica.org or https://github.com/OpenModelica/ or
17 * http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica distribution. GNU
18 * AGPL version 3 is obtained from: https://www.gnu.org/licenses/licenses.html#GPL. The BSD NEW
19 * License is obtained from: http://www.opensource.org/licenses/BSD-3-Clause.
20 *
21 * This program is distributed WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY
23 * SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF
24 * OSMC-PL.
25 *
26 */
27
28 /** @addtogroup solverNewton
29 *
30 * @{
31 */
32
33 #include <Core/ModelicaDefine.h>
34 #include <Core/Modelica.h>
35 #if defined(OMC_BUILD) && !defined(RUNTIME_STATIC_LINKING)
36
37 #include <Solver/LinearSolver/LinearSolver.h>
38 #include <Solver/LinearSolver/LinearSolverSettings.h>
39
40 /* OMC factory */
41 using boost::extensions::factory;
42
43 ✗ BOOST_EXTENSION_TYPE_MAP_FUNCTION {
44 types.get<std::map<std::string, factory<ILinearAlgLoopSolver,ILinSolverSettings*,shared_ptr<ILinearAlgLoop> > > >()
45 ✗ ["linearSolver"].set<LinearSolver>();
46 types.get<std::map<std::string, factory<ILinSolverSettings> > >()
47 ✗ ["linearSolverSettings"].set<LinearSolverSettings>();
48 ✗ }
49
50 #elif defined(OMC_BUILD) && defined(RUNTIME_STATIC_LINKING)
51 #include <Solver/LinearSolver/LinearSolver.h>
52 #include <Solver/LinearSolver/LinearSolverSettings.h>
53 shared_ptr<ILinSolverSettings> createLinearSolverSettings()
54 {
55 shared_ptr<ILinSolverSettings> settings = shared_ptr<ILinSolverSettings>(new LinearSolverSettings());
56 return settings;
57 }
58 shared_ptr<ILinearAlgLoopSolver> createLinearSolver(shared_ptr<ILinSolverSettings> solver_settings,shared_ptr<ILinearAlgLoop> algLoop)
59 {
60 shared_ptr<ILinearAlgLoopSolver> solver = shared_ptr<ILinearAlgLoopSolver>(new LinearSolver(solver_settings.get(),algLoop));
61 return solver;
62 }
63
64 #else
65 error "operating system not supported"
66 #endif
67