BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_SolverSTRUMPACK.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_CL_SOLVERSTRUMPACK_HPP
13#define BELFEM_CL_SOLVERSTRUMPACK_HPP
14
15#include "cl_StringList.hpp"
16#include "cl_SolverWrapper.hpp"
18
19#include "strumpacktools.hpp"
20
21
22namespace belfem
23{
24 namespace solver
25 {
26//------------------------------------------------------------------------------
27
28 class STRUMPACK : public Wrapper
29 {
30 const SolverParameters * mParams ;
31#ifdef BELFEM_STRUMPACK
32
33 int mArgC = 0 ;
34 StringList * mArgV = nullptr ;
35
36 sparse::DistMatrix * mDistMatrix = nullptr ;
37
38 strumpack::StrumpackSparseSolver<real,int> * mSolver = nullptr ;
39 strumpack::StrumpackSparseSolverMPIDist<real, int> * mDistSolver = nullptr ;
40#endif
41//------------------------------------------------------------------------------
42 public:
43//------------------------------------------------------------------------------
44
45 STRUMPACK( const SolverParameters * aParams ) ;
46
47//------------------------------------------------------------------------------
48
49 ~STRUMPACK() override ;
50
51//------------------------------------------------------------------------------
52
53 void
54 solve(
55 SpMatrix & aMatrix,
56 Vector< real > & aLHS,
57 Vector< real > & aRHS ) override ;
58
59//------------------------------------------------------------------------------
60
61 void
62 free() override;
63
64//------------------------------------------------------------------------------
65
66 /*void
67 solve(
68 SpMatrix & aMatrix,
69 Matrix< real > & aLHS,
70 Matrix< real > & aRHS );
71
72//------------------------------------------------------------------------------
73
74 void
75 free(); */
76
77//------------------------------------------------------------------------------
78 protected :
79//------------------------------------------------------------------------------
80
81 void
82 initialize( SpMatrix & aMatrix,
83 const SymmetryMode aSymmetryMode = SymmetryMode::Unsymmetric,
84 const int_t aNumRhsColumns = 1 ) override ;
85
86//------------------------------------------------------------------------------
87 };
88 }
89}
90
91#endif //BELFEM_CL_SOLVERSTRUMPACK_HPP
Configuration for a Solver.
Definition cl_SolverParameters.hpp:27
Sparse matrix in CSR or CSC format.
Definition cl_SpMatrix.hpp:52
a help class needed for the Exodus Writer
Definition cl_StringList.hpp:35
STRUMPACK(const SolverParameters *aParams)
Definition cl_SolverSTRUMPACK.cpp:34
void initialize(SpMatrix &aMatrix, const SymmetryMode aSymmetryMode=SymmetryMode::Unsymmetric, const int_t aNumRhsColumns=1) override
Definition cl_SolverSTRUMPACK.cpp:85
void free() override
Definition cl_SolverSTRUMPACK.cpp:53
void solve(SpMatrix &aMatrix, Vector< real > &aLHS, Vector< real > &aRHS) override
Definition cl_SolverSTRUMPACK.cpp:219
Wrapper(const string &aLabel, const bool aUsesMPI)
Definition cl_SolverWrapper.cpp:44
Definition cl_SolverDistMatrix.hpp:30
Definition cl_SolverMUMPS.cpp:26
USER GUIDES:
Definition cl_Capacitor.cpp:16
SymmetryMode
Definition en_SolverEnums.hpp:36
@ Unsymmetric
Definition en_SolverEnums.hpp:37
int32_t int_t
Definition typedefs.hpp:51