BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
st_SolverPetscData.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_ST_SOLVERPETSCDATA_HPP
13
#define BELFEM_ST_SOLVERPETSCDATA_HPP
14
#include "
petsctools.hpp
"
15
16
namespace
belfem
17
{
18
namespace
solver
19
{
20
//------------------------------------------------------------------------------
21
27
struct
PetscData
28
{
29
// communicator that is used
30
MPI_Comm
mComm
;
31
32
// index arrays for solver
33
Vector <PetscInt>
mMyPointers
;
34
Vector <PetscInt>
mMyColumns
;
35
Vector <PetscInt>
mMyRows
;
36
37
// indices for vectors
38
Vector <PetscInt>
mVectorIndices
;
39
40
// global number of colums for RHS and LHS
41
PetscInt
mNumRows
;
42
PetscInt
mNumCols
;
43
44
// proc local number of colums for RHS and LHS
45
PetscInt
mMyNumRows
;
46
PetscInt
mMyNumCols
;
47
48
// row offset for indices
49
PetscInt
mMyRowOffset
;
50
51
// number of nonzeros on this proc
52
PetscInt
mMyNumNnz
;
53
54
// vector for left hand side
55
Vec
mLHS
;
56
57
// vector for right hand side
58
Vec
mRHS
;
59
60
// matrix wrapper
61
Mat
mMat
;
62
63
// solver object
64
KSP
mKSP
;
65
66
// preconditioner context
67
PC
mPC
;
68
};
69
70
//------------------------------------------------------------------------------
71
}
72
}
73
#endif
//BELFEM_ST_SOLVERPETSCDATA_HPP
KSP
Definition
petsctools.hpp:33
Mat
Definition
petsctools.hpp:27
PC
Definition
petsctools.hpp:30
Vec
Definition
petsctools.hpp:24
belfem::solver
Definition
cl_SolverMUMPS.cpp:26
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
petsctools.hpp
PetscInt
int PetscInt
Definition
petsctools.hpp:20
MPI_Comm
int MPI_Comm
Definition
petsctools.hpp:40
belfem::solver::PetscData
this struct contains the variables needed by PETSc
Definition
st_SolverPetscData.hpp:28
belfem::solver::PetscData::mComm
MPI_Comm mComm
Definition
st_SolverPetscData.hpp:30
belfem::solver::PetscData::mMyRows
Vector< PetscInt > mMyRows
Definition
st_SolverPetscData.hpp:35
belfem::solver::PetscData::mMyNumNnz
PetscInt mMyNumNnz
Definition
st_SolverPetscData.hpp:52
belfem::solver::PetscData::mNumCols
PetscInt mNumCols
Definition
st_SolverPetscData.hpp:42
belfem::solver::PetscData::mLHS
Vec mLHS
Definition
st_SolverPetscData.hpp:55
belfem::solver::PetscData::mMat
Mat mMat
Definition
st_SolverPetscData.hpp:61
belfem::solver::PetscData::mNumRows
PetscInt mNumRows
Definition
st_SolverPetscData.hpp:41
belfem::solver::PetscData::mVectorIndices
Vector< PetscInt > mVectorIndices
Definition
st_SolverPetscData.hpp:38
belfem::solver::PetscData::mMyRowOffset
PetscInt mMyRowOffset
Definition
st_SolverPetscData.hpp:49
belfem::solver::PetscData::mMyNumCols
PetscInt mMyNumCols
Definition
st_SolverPetscData.hpp:46
belfem::solver::PetscData::mMyColumns
Vector< PetscInt > mMyColumns
Definition
st_SolverPetscData.hpp:34
belfem::solver::PetscData::mKSP
KSP mKSP
Definition
st_SolverPetscData.hpp:64
belfem::solver::PetscData::mRHS
Vec mRHS
Definition
st_SolverPetscData.hpp:58
belfem::solver::PetscData::mMyNumRows
PetscInt mMyNumRows
Definition
st_SolverPetscData.hpp:45
belfem::solver::PetscData::mMyPointers
Vector< PetscInt > mMyPointers
Definition
st_SolverPetscData.hpp:33
belfem::solver::PetscData::mPC
PC mPC
Definition
st_SolverPetscData.hpp:67
src
sparse
st_SolverPetscData.hpp
Generated by
1.18.0