BELFEM 0.9.3
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
46 STRUMPACK( const SolverParameters * aParams ) ;
47
48//------------------------------------------------------------------------------
49
50 ~STRUMPACK() override ;
51
52//------------------------------------------------------------------------------
53
57 void
58 solve(
59 SpMatrix & aMatrix,
60 Vector< real > & aLHS,
61 Vector< real > & aRHS ) override ;
62
63//------------------------------------------------------------------------------
64
65 void
66 free() override;
67
68//------------------------------------------------------------------------------
69
70 /*void
71 solve(
72 SpMatrix & aMatrix,
73 Matrix< real > & aLHS,
74 Matrix< real > & aRHS );
75
76//------------------------------------------------------------------------------
77
78 void
79 free(); */
80
81//------------------------------------------------------------------------------
82 protected :
83//------------------------------------------------------------------------------
84
85 void
86 initialize( SpMatrix & aMatrix,
87 const SymmetryMode aSymmetryMode = SymmetryMode::Unsymmetric,
88 const int_t aNumRhsColumns = 1 ) override ;
89
90//------------------------------------------------------------------------------
91 };
92 }
93}
94
95#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)
aParams is borrowed and must outlive the wrapper.
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
Collective.
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