FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
umfpack.hpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6#pragma once
7
8// includes, FEAT
10#include <kernel/solver/base.hpp>
11#include <kernel/lafem/saddle_point_matrix.hpp>
12#include <kernel/lafem/sparse_matrix_bcsr.hpp>
13#include <kernel/lafem/sparse_matrix_csr.hpp>
14#include <kernel/lafem/mean_filter.hpp>
15#include <kernel/lafem/tuple_vector.hpp>
16#include <kernel/lafem/dense_vector.hpp>
17#include <kernel/lafem/dense_vector_blocked.hpp>
18
19namespace FEAT
20{
21 namespace Solver
22 {
23#if defined(FEAT_HAVE_UMFPACK) || defined(DOXYGEN)
40 class Umfpack :
41 public SolverBase<LAFEM::DenseVector<double, Index>>
42 {
43 public:
48
51
52 private:
56 double* _umf_control;
61
63 std::size_t _sym_peak_size;
65 std::size_t _sym_mem_size;
67 std::size_t _num_mem_size;
69 std::size_t _umf_peak_size;
70
71 public:
78 explicit Umfpack(const MatrixType& system_matrix);
79
81 virtual ~Umfpack();
82
84 virtual String name() const override
85 {
86 return "Umfpack";
87 }
88
89 virtual void init_symbolic() override;
90 virtual void done_symbolic() override;
91 virtual void init_numeric() override;
92 virtual void done_numeric() override;
93
104 virtual Status apply(VectorType& vec_sol, const VectorType& vec_rhs) override;
105 }; // class Umfpack
106
116 inline std::shared_ptr<Umfpack> new_umfpack(const LAFEM::SparseMatrixCSR<double, Index>& matrix)
117 {
118 return std::make_shared<Umfpack>(matrix);
119 }
120
141 public SolverBase<LAFEM::DenseVector<double, Index>>
142 {
143 public:
148
151
152 private:
163
164 public:
174 explicit UmfpackMean(const MatrixType& system_matrix, const VectorType& weight_vector);
175
185 explicit UmfpackMean(
186 const MatrixType& system_matrix,
187 const LAFEM::MeanFilter<double, Index>& mean_filter) :
188 UmfpackMean(system_matrix, mean_filter.get_vec_dual())
189 {
190 }
191
193 virtual String name() const override
194 {
195 return "UmfpackMean";
196 }
197
198 virtual void init_symbolic() override;
199 virtual void done_symbolic() override;
200 virtual void init_numeric() override;
201 virtual void done_numeric() override;
202
213 virtual Status apply(VectorType& vec_sol, const VectorType& vec_rhs) override;
214 }; // class UmfpackMean
215
228 inline std::shared_ptr<UmfpackMean> new_umfpack_mean(
230 const LAFEM::DenseVector<double, Index>& weight_vector)
231 {
232 return std::make_shared<UmfpackMean>(matrix, weight_vector);
233 }
234
247 inline std::shared_ptr<UmfpackMean> new_umfpack_mean(
250 {
251 return std::make_shared<UmfpackMean>(matrix, filter);
252 }
253
275 template<typename DT_, typename IT_, int dim_>
277 public SolverBase<LAFEM::TupleVector<LAFEM::DenseVectorBlocked<DT_, IT_, dim_>, LAFEM::DenseVector<DT_, IT_>>>
278 {
279 public:
285
290
293
296
297 private:
308
309 public:
319 explicit SaddleUmfpackMean(const MatrixType& system_matrix, const VectorTypeP& weight_vector) :
320 BaseClass(),
321 _system_matrix(system_matrix),
322 _weight_vector(weight_vector),
324 {
325 }
326
337 const MatrixType& system_matrix,
338 const LAFEM::MeanFilter<DT_, IT_>& mean_filter) :
339 SaddleUmfpackMean(system_matrix, mean_filter.get_vec_dual())
340 {
341 }
342
344 virtual String name() const override
345 {
346 return "SaddleUmfpackMean";
347 }
348
349 virtual void init_symbolic() override
350 {
352
353 // get sub-matrices
354 const MatrixTypeA& matrix_a = _system_matrix.block_a();
355 const MatrixTypeB& matrix_b = _system_matrix.block_b();
356 const MatrixTypeD& matrix_d = _system_matrix.block_d();
357
358 // get velocity/pressure space dimensions
359 const Index n_v = matrix_b.rows();
360 const Index n_p = matrix_b.columns();
361
362 // verify matrix dimensions
363 XASSERT(n_v == matrix_a.rows());
364 XASSERT(n_v == matrix_a.columns());
365 XASSERT(n_p == matrix_d.rows());
366 XASSERT(n_v == matrix_d.columns());
367 XASSERTM(n_p == _weight_vector.size(), "invalid weight vector/mean filter size");
368
369 // get the number of non-zeroes in sub-matrices
370 const Index nnze_a = matrix_a.used_elements();
371 const Index nnze_b = matrix_b.used_elements();
372 const Index nnze_d = matrix_d.used_elements();
373
374 // allocate our solver matrix
375 _solver_matrix = UmfMatrixType(dim_*n_v+n_p+1, dim_*n_v+n_p+1, dim_*dim_*nnze_a + dim_*(nnze_b+nnze_d) + 2*n_p);
376
377 // get our input matrix arrays
378 const IT_* irow_ptr_a = matrix_a.row_ptr();
379 const IT_* icol_idx_a = matrix_a.col_ind();
380 const IT_* irow_ptr_b = matrix_b.row_ptr();
381 const IT_* icol_idx_b = matrix_b.col_ind();
382 const IT_* irow_ptr_d = matrix_d.row_ptr();
383 const IT_* icol_idx_d = matrix_d.col_ind();
384
385 // get our output matrix arrays
386 Index* orow_ptr = _solver_matrix.row_ptr();
387 Index* ocol_idx = _solver_matrix.col_ind();
388
389 // assemble the solver matrix structure
390 orow_ptr[0] = Index(0);
391 // loop over all rows of A and B
392 for(Index i(0); i < n_v; ++i)
393 {
394 Index id = i*Index(dim_);
395 // loop over all block dimensions
396 for(Index j(0); j < Index(dim_); ++j, ++id)
397 {
398 Index op = orow_ptr[id];
399 // copy input matrix A row pattern
400 for(Index ip(irow_ptr_a[i]); ip < irow_ptr_a[i+1]; ++ip)
401 {
402 // convert block to scalar indices
403 for(Index k(0); k < Index(dim_); ++k, ++op)
404 ocol_idx[op] = Index(icol_idx_a[ip])*Index(dim_) + k;
405 }
406 // copy input matrix B row pattern
407 for(Index ip(irow_ptr_b[i]); ip < irow_ptr_b[i+1]; ++ip, ++op)
408 ocol_idx[op] = n_v*Index(dim_) + Index(icol_idx_b[ip]);
409 // set next row pointer
410 orow_ptr[id+1] = op;
411 }
412 }
413 // loop over all rows of D
414 for(Index i(0); i < n_p; ++i)
415 {
416 Index op = orow_ptr[Index(dim_)*n_v + i];
417 // copy input matrix D row pattern
418 for(Index ip(irow_ptr_d[i]); ip < irow_ptr_d[i+1]; ++ip)
419 {
420 // convert block to scalar value
421 for(Index k(0); k < Index(dim_); ++k, ++op)
422 ocol_idx[op] = Index(icol_idx_d[ip])*Index(dim_) + k;
423 }
424 // append a single entry in the last column
425 ocol_idx[op] = Index(dim_)*n_v + n_p;
426 // set next row pointer
427 orow_ptr[Index(dim_)*n_v+i+1] = ++op;
428 }
429
430 // append an (almost) dense row for pressure
431 Index op(orow_ptr[Index(dim_)*n_v + n_p]);
432 for(Index j(0); j < n_p; ++j, ++op)
433 {
434 ocol_idx[op] = Index(dim_)*n_v + j;
435 }
436 // set last row pointer
437 orow_ptr[Index(dim_)*n_v+n_p+1] = op;
438
439 // Okay, solver matrix structure assembly complete
440
441 // create temporary vectors
444
445 // initialize umfpack
447 }
448
449 virtual void done_symbolic() override
450 {
452 _vec_b.clear();
453 _vec_x.clear();
455
457 }
458
459 virtual void init_numeric() override
460 {
462
463 // get sub-matrices
464 const MatrixTypeA& matrix_a = _system_matrix.block_a();
465 const MatrixTypeB& matrix_b = _system_matrix.block_b();
466 const MatrixTypeD& matrix_d = _system_matrix.block_d();
467
468 // get velocity/pressure space dimensions
469 const Index n_v = matrix_b.rows();
470 const Index n_p = matrix_b.columns();
471
472 // get our input matrix arrays
473 const IT_* irow_ptr_a = matrix_a.row_ptr();
474 const auto* idata_a = matrix_a.val();
475 const IT_* irow_ptr_b = matrix_b.row_ptr();
476 const auto* idata_b = matrix_b.val();
477 const IT_* irow_ptr_d = matrix_d.row_ptr();
478 const auto* idata_d = matrix_d.val();
479
480 // get input vector array
481 const DT_* weight = _weight_vector.elements();
482
483 // get output matrix arrays
484 const Index* orow_ptr = _solver_matrix.row_ptr();
485 double* odata = _solver_matrix.val();
486
487 // loop over all rows of A and B
488 for(Index i(0); i < n_v; ++i)
489 {
490 Index id = i*Index(dim_);
491 // loop over all block dimensions
492 for(int j(0); j < dim_; ++j, ++id)
493 {
494 Index op = orow_ptr[id];
495 // copy input matrix A row data
496 for(Index ip(irow_ptr_a[i]); ip < irow_ptr_a[i+1]; ++ip)
497 {
498 for(int k(0); k < dim_; ++k, ++op)
499 odata[op] = double(idata_a[ip][j][k]);
500 }
501 // copy input matrix B row data
502 for(Index ip(irow_ptr_b[i]); ip < irow_ptr_b[i+1]; ++ip, ++op)
503 odata[op] = double(idata_b[ip][j][0]);
504 }
505 }
506 // loop over all rows of D
507 for(Index i(0); i < n_p; ++i)
508 {
509 Index op = orow_ptr[Index(dim_)*n_v + i];
510 // copy input matrix D row data
511 for(Index ip(irow_ptr_d[i]); ip < irow_ptr_d[i+1]; ++ip)
512 {
513 // convert block to scalar value
514 for(int k(0); k < dim_; ++k, ++op)
515 odata[op] = double(idata_d[ip][0][k]);
516 }
517 // copy weight vector entry as last column entry
518 odata[op] = double(weight[i]);
519 }
520
521 // copy weight vector into last row
522 Index op(orow_ptr[Index(dim_)*n_v + n_p]);
523 for(Index j(0); j < n_p; ++j, ++op)
524 {
525 odata[op] = double(weight[j]);
526 }
527
528 // okay, solver matrix data assembly completed
529
530 // initialize umfpack
532 }
533
534 virtual void done_numeric() override
535 {
537
539 }
540
551 virtual Status apply(VectorType& vec_sol, const VectorType& vec_rhs) override
552 {
553 const Index n_v = vec_sol.template at<0>().size() * Index(dim_);
554 const Index n_p = vec_sol.template at<1>().size();
555
556 // copy RHS vector
557 const DT_* vr_v = vec_rhs.template at<0>().template elements<LAFEM::Perspective::pod>();
558 const DT_* vr_p = vec_rhs.template at<1>().elements();
559 double* vb = _vec_b.elements();
560
561 // copy velocity RHS
562 for(Index i(0); i < n_v; ++i, ++vb)
563 *vb = double(vr_v[i]);
564 // copy pressure RHS
565 for(Index i(0); i < n_p; ++i, ++vb)
566 *vb = double(vr_p[i]);
567 // append Lagrange multiplier RHS
568 *vb = 0.0;
569
570 // solve system
571 Status status = _umfpack.apply(_vec_x, _vec_b);
572
573 // copy sol vector
574 const double* vx = _vec_x.elements();
575 DT_* vs_v = vec_sol.template at<0>().template elements<LAFEM::Perspective::pod>();
576 DT_* vs_p = vec_sol.template at<1>().elements();
577 // copy velocity solution
578 for(Index i(0); i < n_v; ++i, ++vx)
579 vs_v[i] = DT_(*vx);
580 // copy pressure solution
581 for(Index i(0); i < n_p; ++i, ++vx)
582 vs_p[i] = DT_(*vx);
583
584 // okay
585 return status;
586 }
587 }; // class SaddleUmfpackMean
588
601 template<typename DT_, typename IT_, int dim_>
602 inline std::shared_ptr<SaddleUmfpackMean<DT_, IT_, dim_>> new_saddle_umfpack_mean(
607 const LAFEM::DenseVector<DT_, IT_>& weight_vector)
608 {
609 return std::make_shared<SaddleUmfpackMean<DT_, IT_, dim_>>(matrix, weight_vector);
610 }
611
624 template<typename DT_, typename IT_, int dim_>
625 inline std::shared_ptr<SaddleUmfpackMean<DT_, IT_, dim_>> new_saddle_umfpack_mean(
630 const LAFEM::MeanFilter<DT_, IT_>& filter)
631 {
632 return std::make_shared<SaddleUmfpackMean<DT_, IT_, dim_>>(matrix, filter);
633 }
634
646 template<typename Matrix_>
648 public SolverBase<typename Matrix_::VectorTypeL>
649 {
650 public:
654 typedef Matrix_ MatrixType;
656 typedef typename MatrixType::VectorTypeL VectorType;
657
658 protected:
664 typename Umfpack::VectorType _umf_vsol, _umf_vrhs;
669
670 public:
671 explicit GenericUmfpack(const MatrixType& matrix) :
672 _matrix(matrix),
674 {
675 }
676
679 {
680 }
681
683 virtual String name() const override
684 {
685 return "GenericUmfpack";
686 }
687
688 virtual void init_symbolic() override
689 {
691
692 // convert our system matrix to <double, Index> (if necessary)
693 typename MatrixType::template ContainerType<double, Index> mat_double;
694 mat_double.convert(_matrix);
695
696 // convert matrix to obtain the structure
697 _umf_matrix.convert(mat_double);
698
699 // create umfpack vectors
701 _umf_vrhs = _umf_matrix.create_vector_l();
702
703 // convert to temporary vectors; note that these share their data arrays
704 // with the umfpack vectors if their datatype is also 'double'
706 _tmp_vrhs.convert(_umf_vrhs);
707
708 // factorize symbolic
710 }
711
712 virtual void done_symbolic() override
713 {
715
716 _tmp_vrhs.clear();
718 _umf_vrhs.clear();
721
723 }
724
725 virtual void init_numeric() override
726 {
728
729 // convert our system matrix to <double, Index> (if necessary)
730 typename MatrixType::template ContainerType<double, Index> mat_double;
731 mat_double.convert(_matrix);
732
733 // get the array of our CSR matrix
734 const Index* row_ptr = _umf_matrix.row_ptr();
735 /*const*/ Index* col_idx = _umf_matrix.col_ind();
736 double* val = _umf_matrix.val();
737
738 // copy entries into our CSR matrix
739 for(Index i(0); i < _umf_matrix.rows(); ++i)
740 mat_double.set_line(i, val + row_ptr[i], col_idx + row_ptr[i], 0);
741
742 // factorize
744 }
745
746 virtual void done_numeric() override
747 {
750 }
751
752 virtual Status apply(VectorType& vec_sol, const VectorType& vec_rhs) override
753 {
754 // convert RHS vector
755 _tmp_vrhs.copy(vec_rhs);
756 _umf_vrhs.convert(_tmp_vrhs);
757
758 // solve
759 Status status = _umfpack.apply(_umf_vsol, _umf_vrhs);
760
761 // convert sol vector
763 _tmp_vsol.copy_inv(vec_sol);
764
765 return status;
766 }
767 }; // class GenericUmfpack<...>
768
778 template<typename Matrix_>
779 inline std::shared_ptr<GenericUmfpack<Matrix_>> new_generic_umfpack(const Matrix_& matrix)
780 {
781 return std::make_shared<GenericUmfpack<Matrix_>> (matrix);
782 }
783
784#endif // defined(FEAT_HAVE_UMFPACK) || defined(DOXYGEN)
785 } // namespace Solver
786} // namespace FEAT
#define XASSERT(expr)
Assertion macro definition.
Definition: assertion.hpp:262
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
Definition: assertion.hpp:263
FEAT Kernel base header.
Index size() const
Returns the containers size.
Definition: container.hpp:1136
virtual void clear()
Free all allocated arrays.
Definition: container.hpp:875
Blocked Dense data vector class template.
Dense data vector class template.
void convert(const DenseVector< DT2_, IT2_ > &other)
Conversion method.
DT_ * elements()
Get a pointer to the data array.
void copy_inv(VT_ &a) const
Performs .
void copy(const VT_ &a)
Performs .
Mean Filter class template.
Definition: mean_filter.hpp:22
Saddle-Point matrix meta class template.
MatrixTypeA & block_a()
Returns the sub-matrix block A.
MatrixTypeB & block_b()
Returns the sub-matrix block B.
MatrixTypeD & block_d()
Returns the sub-matrix block D.
CSR based blocked sparse matrix.
Index rows() const
Retrieve matrix row count.
IT_ * col_ind()
Retrieve column indices array.
IT_ * row_ptr()
Retrieve row start index array.
Index columns() const
Retrieve matrix column count.
Index used_elements() const
Retrieve non zero element count.
auto val() const -> const typename Intern::BCSRPerspectiveHelper< DT_, BlockHeight_, BlockWidth_, perspective_ >::Type *
Retrieve non zero element array.
CSR based sparse matrix.
VectorTypeR create_vector_r() const
Returns a new compatible R-Vector.
void convert(const SparseMatrixCSR< DT2_, IT2_ > &other)
Conversion method.
VectorTypeL create_vector_l() const
Returns a new compatible L-Vector.
IT_ * col_ind()
Retrieve column indices array.
DT_ * val()
Retrieve non zero element array.
Index rows() const
Retrieve matrix row count.
IT_ * row_ptr()
Retrieve row start index array.
Variadic TupleVector class template.
Index size() const
Returns the total size of this tuple-vector.
Generic UMFPACK solver class.
Definition: umfpack.hpp:649
virtual ~GenericUmfpack()
virtual destructor
Definition: umfpack.hpp:678
Umfpack::MatrixType _umf_matrix
the matrix for our Umfpack solver (SparseMatrixCSR<double, Index>)
Definition: umfpack.hpp:662
LAFEM::DenseVector< typename VectorType::DataType, typename VectorType::IndexType > _tmp_vsol
temporary vectors for datatype conversion
Definition: umfpack.hpp:666
virtual void init_numeric() override
Numeric initialization method.
Definition: umfpack.hpp:725
Matrix_ MatrixType
our matrix type
Definition: umfpack.hpp:654
SolverBase< typename Matrix_::VectorTypeL > BaseClass
our base class
Definition: umfpack.hpp:652
virtual String name() const override
Returns the name of the solver.
Definition: umfpack.hpp:683
virtual void done_symbolic() override
Symbolic finalization method.
Definition: umfpack.hpp:712
const MatrixType & _matrix
our matrix
Definition: umfpack.hpp:660
Umfpack::VectorType _umf_vsol
the vectors for our Umfpack solver (DenseVector<double, Index>)
Definition: umfpack.hpp:664
virtual void done_numeric() override
Numeric finalization method.
Definition: umfpack.hpp:746
Umfpack _umfpack
the actual Umfpack solver object
Definition: umfpack.hpp:668
virtual void init_symbolic() override
Symbolic initialization method.
Definition: umfpack.hpp:688
MatrixType::VectorTypeL VectorType
our vector type
Definition: umfpack.hpp:656
UMFPACK Saddle-Point Mean solver class.
Definition: umfpack.hpp:278
virtual void init_numeric() override
Numeric initialization method.
Definition: umfpack.hpp:459
UmfMatrixType _solver_matrix
our extended system matrix
Definition: umfpack.hpp:303
SaddleUmfpackMean(const MatrixType &system_matrix, const VectorTypeP &weight_vector)
Constructor.
Definition: umfpack.hpp:319
UmfVectorType _vec_x
two temporary extended vectors
Definition: umfpack.hpp:305
Umfpack _umfpack
our internal Umfpack solver object
Definition: umfpack.hpp:307
LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, dim_ > MatrixTypeA
compatible matrix type
Definition: umfpack.hpp:281
SaddleUmfpackMean(const MatrixType &system_matrix, const LAFEM::MeanFilter< DT_, IT_ > &mean_filter)
Constructor.
Definition: umfpack.hpp:336
SolverBase< VectorType > BaseClass
our base class
Definition: umfpack.hpp:295
const VectorTypeP & _weight_vector
weight vector from mean filter
Definition: umfpack.hpp:301
virtual void init_symbolic() override
Symbolic initialization method.
Definition: umfpack.hpp:349
virtual String name() const override
Returns the name of the solver.
Definition: umfpack.hpp:344
const MatrixType & _system_matrix
system matrix
Definition: umfpack.hpp:299
virtual void done_symbolic() override
Symbolic finalization method.
Definition: umfpack.hpp:449
virtual void done_numeric() override
Numeric finalization method.
Definition: umfpack.hpp:534
LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > VectorTypeV
compatible vector type
Definition: umfpack.hpp:287
virtual Status apply(VectorType &vec_sol, const VectorType &vec_rhs) override
Solves a linear system with the factorized system matrix.
Definition: umfpack.hpp:551
Polymorphic solver interface.
Definition: base.hpp:183
virtual void init_symbolic()
Symbolic initialization method.
Definition: base.hpp:227
virtual void init_numeric()
Numeric initialization method.
Definition: base.hpp:237
virtual void done_symbolic()
Symbolic finalization method.
Definition: base.hpp:255
virtual void done_numeric()
Numeric finalization method.
Definition: base.hpp:246
UMFPACK solver class.
Definition: umfpack.hpp:42
std::size_t _sym_mem_size
symbolic factorization memory size
Definition: umfpack.hpp:65
virtual void init_symbolic() override
Symbolic initialization method.
virtual ~Umfpack()
virtual destructor
void * _umf_numeric
umfpack numeric factorization pointer
Definition: umfpack.hpp:60
LAFEM::SparseMatrixCSR< double, Index > MatrixType
compatible matrix type
Definition: umfpack.hpp:45
std::size_t _umf_peak_size
total peak memory size
Definition: umfpack.hpp:69
const MatrixType & _system_matrix
system matrix
Definition: umfpack.hpp:54
std::size_t _sym_peak_size
symbolic peak memory size
Definition: umfpack.hpp:63
double * _umf_control
umfpack control array
Definition: umfpack.hpp:56
LAFEM::DenseVector< double, Index > VectorType
compatible vector type
Definition: umfpack.hpp:47
void * _umf_symbolic
umfpack symbolic factorization pointer
Definition: umfpack.hpp:58
Umfpack(const MatrixType &system_matrix)
Constructor.
virtual String name() const override
Returns the name of the solver.
Definition: umfpack.hpp:84
virtual void done_numeric() override
Numeric finalization method.
std::size_t _num_mem_size
numeric factorization memory size
Definition: umfpack.hpp:67
SolverBase< VectorType > BaseClass
our base class
Definition: umfpack.hpp:50
virtual void init_numeric() override
Numeric initialization method.
virtual void done_symbolic() override
Symbolic finalization method.
virtual Status apply(VectorType &vec_sol, const VectorType &vec_rhs) override
Solves a linear system with the factorized system matrix.
UMFPACK Mean solver class.
Definition: umfpack.hpp:142
virtual Status apply(VectorType &vec_sol, const VectorType &vec_rhs) override
Solves a linear system with the factorized system matrix.
virtual void done_symbolic() override
Symbolic finalization method.
UmfpackMean(const MatrixType &system_matrix, const LAFEM::MeanFilter< double, Index > &mean_filter)
Constructor.
Definition: umfpack.hpp:185
const MatrixType & _system_matrix
system matrix
Definition: umfpack.hpp:154
virtual String name() const override
Returns the name of the solver.
Definition: umfpack.hpp:193
SolverBase< VectorType > BaseClass
our base class
Definition: umfpack.hpp:150
MatrixType _solver_matrix
our extended system matrix
Definition: umfpack.hpp:158
virtual void done_numeric() override
Numeric finalization method.
VectorType _vec_x
two temporary extended vectors
Definition: umfpack.hpp:160
UmfpackMean(const MatrixType &system_matrix, const VectorType &weight_vector)
Constructor.
virtual void init_numeric() override
Numeric initialization method.
const VectorType & _weight_vector
weight vector
Definition: umfpack.hpp:156
Umfpack _umfpack
our internal Umfpack solver object
Definition: umfpack.hpp:162
LAFEM::DenseVector< double, Index > VectorType
compatible vector type
Definition: umfpack.hpp:147
virtual void init_symbolic() override
Symbolic initialization method.
LAFEM::SparseMatrixCSR< double, Index > MatrixType
compatible matrix type
Definition: umfpack.hpp:145
String class implementation.
Definition: string.hpp:46
std::shared_ptr< UmfpackMean > new_umfpack_mean(const LAFEM::SparseMatrixCSR< double, Index > &matrix, const LAFEM::DenseVector< double, Index > &weight_vector)
Creates a new UmfpackMean solver object.
Definition: umfpack.hpp:228
std::shared_ptr< SaddleUmfpackMean< DT_, IT_, dim_ > > new_saddle_umfpack_mean(const LAFEM::SaddlePointMatrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, dim_ >, LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ > > &matrix, const LAFEM::DenseVector< DT_, IT_ > &weight_vector)
Creates a new UmfpackMean solver object.
Definition: umfpack.hpp:602
std::shared_ptr< GenericUmfpack< Matrix_ > > new_generic_umfpack(const Matrix_ &matrix)
Creates a new GenericUmfpack solver object.
Definition: umfpack.hpp:779
Status
Solver status return codes enumeration.
Definition: base.hpp:47
std::shared_ptr< Umfpack > new_umfpack(const LAFEM::SparseMatrixCSR< double, Index > &matrix)
Creates a new Umfpack solver object.
Definition: umfpack.hpp:116
FEAT namespace.
Definition: adjactor.hpp:12
std::uint64_t Index
Index data type.