22#define Int_ std::int64_t
56 virtual size_t dim(
int idim)
const;
110 virtual bool add(
Real sigma,
int ieq);
128 Real shift = 0.0,
int iop = 1);
139 virtual bool load(
const char* fileName,
bool binary);
153 virtual std::ostream&
write(std::ostream& os)
const;
186 std::pair<int,int> getNodeAndLocalDof(
int ieq,
bool)
const;
189 bool sharedSam =
false;
std::vector< int > IntVec
General integer vector.
Definition ASMbase.h:25
#define Real
The floating point type to use.
Definition ImmersedBoundaries.h:18
std::vector< Real > RealArray
A real-valued array without algebraic operations.
Definition ImmersedBoundaries.h:32
General representation of system matrices and vectors.
This class contains data and functions for the assembly of FE matrices.
Definition SAM.h:39
Class for representing the system matrix on the SPR-format.
Definition SPRMatrix.h:37
Int_ * msifa
Matrix of Storage Information for FA.
Definition SPRMatrix.h:159
SPRMatrix()
Default constructor.
Definition SPRMatrix.C:167
SPRMatrix & operator=(const SPRMatrix &)=delete
This class is not copyable.
virtual LinAlg::MatrixType getType() const
Returns the matrix type.
Definition SPRMatrix.h:47
virtual Real Linfnorm() const
Returns the L-infinity norm of the matrix.
Definition SPRMatrix.C:760
Real * values
The actual matrix VALUES.
Definition SPRMatrix.h:162
bool convert(Matrix &fullMat) const
Converts to a dense matrix.
Definition SPRMatrix.C:802
SAM SAM64
Convenience alias when using 32-bit int version.
Definition SPRMatrix.h:191
Int_ ierr
Internal error flag.
Definition SPRMatrix.h:156
virtual SystemMatrix * copy() const
Creates a copy of the system matrix and returns a pointer to it.
Definition SPRMatrix.h:50
virtual void initAssembly(const SAM &sam, char)
Initializes the element assembly process.
Definition SPRMatrix.C:296
Int_ * mvarnc
Matrix of VARiable to Node Correspondence.
Definition SPRMatrix.h:161
virtual bool add(const SystemMatrix &B, Real alpha)
Adds a matrix with similar sparsity pattern to the current matrix.
Definition SPRMatrix.C:627
virtual bool multiply(const SystemVector &B, SystemVector &C) const
Performs the matrix-vector multiplication C = *this * B.
Definition SPRMatrix.C:671
virtual std::ostream & write(std::ostream &os) const
Writes the system matrix to the given output stream.
Definition SPRMatrix.C:774
virtual void init()
Initializes the matrix to zero assuming it is properly dimensioned.
Definition SPRMatrix.C:440
Int_ mpar[NS]
Matrix of sparse PARameters.
Definition SPRMatrix.h:157
SAM64 * mySam
Possibly 64-bit integer version of SAM arrays.
Definition SPRMatrix.h:193
virtual void dump(std::ostream &os, LinAlg::StorageFormat fmt, const char *)
Dumps the system matrix on a specified format.
Definition SPRMatrix.C:449
Int_ * msica
Matrix of Storage Information for CA.
Definition SPRMatrix.h:158
virtual size_t dim(int idim) const
Returns the dimension of the system matrix.
Definition SPRMatrix.C:276
virtual bool load(const char *fileName, bool binary)
Loads the system matrix from specified file.
Definition SPRMatrix.C:504
std::vector< Real > rWork
Real work array.
Definition SPRMatrix.h:166
std::vector< Int_ > iWork
Integer work array.
Definition SPRMatrix.h:164
virtual bool solve(SystemVector &B, Real *)
Solves the linear system of equations for a given right-hand-side.
Definition SPRMatrix.C:683
Int_ * mtrees
Matrix of elimination assembly TREES.
Definition SPRMatrix.h:160
std::vector< Int_ > * jWork
Integer work arrays for multi-threaded assembly.
Definition SPRMatrix.h:165
virtual bool assemble(const Matrix &eM, const SAM &sam, int e)
Adds an element matrix into the associated system matrix.
Definition SPRMatrix.C:566
virtual ~SPRMatrix()
The destructor frees the dynamically allocated arrays.
Definition SPRMatrix.C:207
virtual void mult(Real alpha)
Multiplication with a scalar.
Definition SPRMatrix.C:621
bool solveEig(SPRMatrix &B, RealArray &val, Matrix &vec, int nev, Real shift=0.0, int iop=1)
Solves a generalized symmetric-definite eigenproblem.
Definition SPRMatrix.C:724
Base class for representing a system matrix on different formats.
Definition SystemMatrix.h:220
virtual bool solve(SystemVector &b, Real *rc=nullptr)=0
Solves the linear system of equations for a given right-hand-side.
virtual bool assemble(const Matrix &eM, const SAM &sam, int e)=0
Adds an element matrix into the associated system matrix.
Base class for representing a system vector on different formats.
Definition SystemMatrix.h:32
MatrixType
The available system matrix formats and associated solvers.
Definition LinAlgenums.h:22
@ SPR
Sparse matrices / SPR solver.
Definition LinAlgenums.h:24
StorageFormat
Enumeration of matrix storage formats.
Definition LinAlgenums.h:43