│ │ │ │ +1869 bool graphRepartition(const G& graph, P& oocomm, int nparts,
│ │ │ │ +1870 std::shared_ptr& outcomm,
│ │ │ │ +1871 R& redistInf,
│ │ │ │ +1872 bool v=false)
│ │ │ │ +1873 {
│ │ │ │ +1874 if(nparts!=oocomm.size())
│ │ │ │ +1875 DUNE_THROW(NotImplemented, "only available for MPI programs");
│ │ │ │ +1876 }
│ │ │ │ +1877
│ │ │ │ +1878
│ │ │ │ +1879 template
│ │ │ │ +1880 bool _c_o_m_m_G_r_a_p_h_R_e_p_a_r_t_i_t_i_o_n(const G& graph, P& oocomm, int nparts,
│ │ │ │ +1881 std::shared_ptr& outcomm,
│ │ │ │ +1882 R& redistInf,
│ │ │ │ +1883 bool v=false)
│ │ │ │ +1884 {
│ │ │ │ +1885 if(nparts!=oocomm.size())
│ │ │ │ +1886 DUNE_THROW(NotImplemented, "only available for MPI programs");
│ │ │ │ +1887 }
│ │ │ │ +1888#endif // HAVE_MPI
│ │ │ │ +1889} // end of namespace Dune
│ │ │ │ +1890#endif
│ │ │ │ +_g_l_o_b_a_l_O_w_n_e_r_V_e_r_t_i_c_e_s
│ │ │ │ +int globalOwnerVertices
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:175
│ │ │ │ +_o_w_n_e_r_o_v_e_r_l_a_p_c_o_p_y_._h_h
│ │ │ │ +Classes providing communication interfaces for overlapping Schwarz methods.
│ │ │ │ +_g_r_a_p_h_._h_h
│ │ │ │ +Provides classes for building the matrix graph.
│ │ │ │ +_m_a_t
│ │ │ │ +Matrix & mat
│ │ │ │ +DDeeffiinniittiioonn matrixmatrix.hh:347
│ │ │ │ +_D_u_n_e
│ │ │ │ +DDeeffiinniittiioonn allocator.hh:11
│ │ │ │ +_D_u_n_e_:_:_b_u_i_l_d_C_o_m_m_u_n_i_c_a_t_i_o_n
│ │ │ │ +bool buildCommunication(const G &graph, std::vector< int > &realparts, Dune::
│ │ │ │ +OwnerOverlapCopyCommunication< T1, T2 > &oocomm, std::shared_ptr< Dune::
│ │ │ │ +OwnerOverlapCopyCommunication< T1, T2 > > &outcomm, RedistributeInterface
│ │ │ │ +&redistInf, bool verbose=false)
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:1449
│ │ │ │ +_D_u_n_e_:_:_f_i_l_l_I_n_d_e_x_S_e_t_H_o_l_e_s
│ │ │ │ +void fillIndexSetHoles(const G &graph, Dune::OwnerOverlapCopyCommunication< T1,
│ │ │ │ +T2 > &oocomm)
│ │ │ │ +Fills the holes in an index set.
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:83
│ │ │ │ +_D_u_n_e_:_:_c_o_m_m_G_r_a_p_h_R_e_p_a_r_t_i_t_i_o_n
│ │ │ │ +bool commGraphRepartition(const M &mat, Dune::OwnerOverlapCopyCommunication<
│ │ │ │ +T1, T2 > &oocomm, Metis::idx_t nparts, std::shared_ptr< Dune::
│ │ │ │ +OwnerOverlapCopyCommunication< T1, T2 > > &outcomm, RedistributeInterface
│ │ │ │ +&redistInf, bool verbose=false)
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:822
│ │ │ │ +_D_u_n_e_:_:_p_r_i_n_t___c_a_r_r_a_y
│ │ │ │ +void print_carray(S &os, T *array, std::size_t l)
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:771
│ │ │ │ +_D_u_n_e_:_:_i_s_V_a_l_i_d_G_r_a_p_h
│ │ │ │ +bool isValidGraph(std::size_t noVtx, std::size_t gnoVtx, S noEdges, T *xadj, T
│ │ │ │ +*adjncy, bool checkSymmetry)
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:778
│ │ │ │ +_D_u_n_e_:_:_g_r_a_p_h_R_e_p_a_r_t_i_t_i_o_n
│ │ │ │ +bool graphRepartition(const G &graph, Dune::OwnerOverlapCopyCommunication< T1,
│ │ │ │ +T2 > &oocomm, Metis::idx_t nparts, std::shared_ptr< Dune::
│ │ │ │ +OwnerOverlapCopyCommunication< T1, T2 > > &outcomm, RedistributeInterface
│ │ │ │ +&redistInf, bool verbose=false)
│ │ │ │ +execute a graph repartition for a giving graph and indexset.
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:1228
│ │ │ │ +_D_u_n_e_:_:_M_e_t_i_s_:_:_r_e_a_l___t
│ │ │ │ +float real_t
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:53
│ │ │ │ +_D_u_n_e_:_:_M_e_t_i_s_:_:_i_d_x___t
│ │ │ │ +std::size_t idx_t
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:63
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_A_t_t_r_i_b_u_t_e_S_e_t_:_:_o_w_n_e_r
│ │ │ │ +@ owner
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:61
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n
│ │ │ │ +A class setting up standard communication for a two-valued attribute set with
│ │ │ │ +owner/overlap/copy sema...
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:174
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_g_l_o_b_a_l_L_o_o_k_u_p
│ │ │ │ +const GlobalLookupIndexSet & globalLookup() const
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:526
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_i_n_d_e_x_S_e_t
│ │ │ │ +const ParallelIndexSet & indexSet() const
│ │ │ │ +Get the underlying parallel index set.
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:462
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_c_o_p_y_C_o_p_y_T_o_A_l_l
│ │ │ │ +void copyCopyToAll(const T &source, T &dest) const
│ │ │ │ +Communicate values from copy data points to all other data points.
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:328
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_G_l_o_b_a_l_L_o_o_k_u_p_I_n_d_e_x_S_e_t
│ │ │ │ +Dune::GlobalLookupIndexSet< ParallelIndexSet > GlobalLookupIndexSet
│ │ │ │ +The type of the reverse lookup of indices.
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:456
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_b_u_i_l_d_G_l_o_b_a_l_L_o_o_k_u_p
│ │ │ │ +void buildGlobalLookup()
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:495
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_c_o_m_m_u_n_i_c_a_t_o_r
│ │ │ │ +const Communication< MPI_Comm > & communicator() const
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:299
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_c_o_p_y_O_w_n_e_r_T_o_A_l_l
│ │ │ │ +void copyOwnerToAll(const T &source, T &dest) const
│ │ │ │ +Communicate values from owner data points to all other data points.
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:311
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_r_e_m_o_t_e_I_n_d_i_c_e_s
│ │ │ │ +const RemoteIndices & remoteIndices() const
│ │ │ │ +Get the underlying remote indices.
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:471
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_f_r_e_e_G_l_o_b_a_l_L_o_o_k_u_p
│ │ │ │ +void freeGlobalLookup()
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:520
│ │ │ │ +_D_u_n_e_:_:_O_w_n_e_r_O_v_e_r_l_a_p_C_o_p_y_C_o_m_m_u_n_i_c_a_t_i_o_n_:_:_P_a_r_a_l_l_e_l_I_n_d_e_x_S_e_t
│ │ │ │ +Dune::ParallelIndexSet< GlobalIdType, LI, 512 > ParallelIndexSet
│ │ │ │ +The type of the parallel index set.
│ │ │ │ +DDeeffiinniittiioonn owneroverlapcopy.hh:449
│ │ │ │ +_D_u_n_e_:_:_A_m_g_:_:_M_a_t_r_i_x_G_r_a_p_h
│ │ │ │ +The (undirected) graph of a matrix.
│ │ │ │ +DDeeffiinniittiioonn graph.hh:51
│ │ │ │ +_D_u_n_e_:_:_R_e_d_i_s_t_r_i_b_u_t_e_I_n_t_e_r_f_a_c_e
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:260
│ │ │ │ +_D_u_n_e_:_:_R_e_d_i_s_t_r_i_b_u_t_e_I_n_t_e_r_f_a_c_e_:_:_r_e_s_e_r_v_e_S_p_a_c_e_F_o_r_R_e_c_e_i_v_e_I_n_t_e_r_f_a_c_e
│ │ │ │ +void reserveSpaceForReceiveInterface(int proc, int size)
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:284
│ │ │ │ +_D_u_n_e_:_:_R_e_d_i_s_t_r_i_b_u_t_e_I_n_t_e_r_f_a_c_e_:_:_b_u_i_l_d_R_e_c_e_i_v_e_I_n_t_e_r_f_a_c_e
│ │ │ │ +void buildReceiveInterface(std::vector< std::pair< TG, int > > &indices)
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:293
│ │ │ │ +_D_u_n_e_:_:_R_e_d_i_s_t_r_i_b_u_t_e_I_n_t_e_r_f_a_c_e_:_:_s_e_t_C_o_m_m_u_n_i_c_a_t_o_r
│ │ │ │ +void setCommunicator(MPI_Comm comm)
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:261
│ │ │ │ +_D_u_n_e_:_:_R_e_d_i_s_t_r_i_b_u_t_e_I_n_t_e_r_f_a_c_e_:_:_b_u_i_l_d_S_e_n_d_I_n_t_e_r_f_a_c_e
│ │ │ │ +void buildSendInterface(const std::vector< int > &toPart, const IS &idxset)
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:266
│ │ │ │ +_D_u_n_e_:_:_R_e_d_i_s_t_r_i_b_u_t_e_I_n_t_e_r_f_a_c_e_:_:_a_d_d_R_e_c_e_i_v_e_I_n_d_e_x
│ │ │ │ +void addReceiveIndex(int proc, std::size_t idx)
│ │ │ │ +DDeeffiinniittiioonn repartition.hh:288
│ │ │ │ ===============================================================================
│ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8
│ │ ├── ./usr/share/doc/libdune-istl-doc/doxygen/a00014.html
│ │ │ @@ -1,15 +1,15 @@
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -dune-istl: superlu.hh File Reference
│ │ │ +dune-istl: ldl.hh File Reference
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ @@ -73,79 +73,63 @@
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -
Classes for using SuperLU with ISTL matrices.
│ │ │ +
Class for using LDL with ISTL matrices.
│ │ │ More...
│ │ │ -
#include "superlufunctions.hh"
│ │ │ -
#include "solvers.hh"
│ │ │ -
#include "supermatrix.hh"
│ │ │ -
#include <algorithm>
│ │ │ -
#include <functional>
│ │ │ -
#include "bcrsmatrix.hh"
│ │ │ -
#include "bvector.hh"
│ │ │ -
#include "istlexception.hh"
│ │ │ -
#include <dune/common/fmatrix.hh>
│ │ │ -
#include <dune/common/fvector.hh>
│ │ │ -
#include <dune/common/stdstreams.hh>
│ │ │ -
#include <dune/istl/solvertype.hh>
│ │ │ -
#include <dune/istl/solverfactory.hh>
│ │ │ +
#include <iostream>
│ │ │ +
#include <memory>
│ │ │ +
#include <type_traits>
│ │ │ +
#include <dune/common/exceptions.hh>
│ │ │ +
#include <dune/istl/bccsmatrixinitializer.hh>
│ │ │ +
#include <dune/istl/solvers.hh>
│ │ │ +
#include <dune/istl/solvertype.hh>
│ │ │ +
#include <dune/istl/solverfactory.hh>
│ │ │
│ │ │
Go to the source code of this file.
│ │ │
│ │ │ |
│ │ │ -struct | Dune::SuperLUSolveChooser< T > |
│ │ │ +class | Dune::LDL< Matrix > |
│ │ │ + | Use the LDL package to directly solve linear systems – empty default class. More...
|
│ │ │ |
│ │ │ -struct | Dune::SuperLUDenseMatChooser< T > |
│ │ │ +class | Dune::LDL< BCRSMatrix< FieldMatrix< T, n, m >, A > > |
│ │ │ + | The LDL direct sparse solver for matrices of type BCRSMatrix. More...
|
│ │ │ |
│ │ │ -struct | Dune::SuperLUQueryChooser< T > |
│ │ │ +struct | Dune::IsDirectSolver< LDL< BCRSMatrix< FieldMatrix< T, n, m >, A > > > |
│ │ │ |
│ │ │ -struct | Dune::QuerySpaceChooser< T > |
│ │ │ +struct | Dune::StoresColumnCompressed< LDL< BCRSMatrix< FieldMatrix< T, n, m >, A > > > |
│ │ │ |
│ │ │ -class | Dune::SuperLU< M > |
│ │ │ - | SuperLu Solver. More...
|
│ │ │ +struct | Dune::LDLCreator |
│ │ │ |
│ │ │ -struct | Dune::IsDirectSolver< SuperLU< BCRSMatrix< T, A > > > |
│ │ │ +struct | Dune::LDLCreator::isValidBlock< F > |
│ │ │ |
│ │ │ -struct | Dune::StoresColumnCompressed< SuperLU< BCRSMatrix< T, A > > > |
│ │ │ - |
│ │ │ -struct | Dune::SuperLUCreator |
│ │ │ - |
│ │ │ -struct | Dune::SuperLUCreator::isValidBlock< class > |
│ │ │ - |
│ │ │ -struct | Dune::SuperLUCreator::isValidBlock< Dune::FieldVector< double, k > > |
│ │ │ - |
│ │ │ -struct | Dune::SuperLUCreator::isValidBlock< Dune::FieldVector< std::complex< double >, k > > |
│ │ │ - |
│ │ │ -struct | Dune::SuperLUCreator::isValidBlock< double > |
│ │ │ - |
│ │ │ -struct | Dune::SuperLUCreator::isValidBlock< std::complex< double > > |
│ │ │ +struct | Dune::LDLCreator::isValidBlock< FieldVector< double, k > > |
│ │ │ |
│ │ │
│ │ │ |
│ │ │ namespace | Dune |
│ │ │ |
│ │ │
│ │ │
│ │ │ -
Classes for using SuperLU with ISTL matrices.
│ │ │ -
- Author
- Markus Blatt
│ │ │ +
Class for using LDL with ISTL matrices.
│ │ │ +
- Author
- Marco Agnese, Andrea Sacconi
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ ├── html2text {}
│ │ │ │ @@ -1,65 +1,50 @@
│ │ │ │ dune-istl 2.10
│ │ │ │ Loading...
│ │ │ │ Searching...
│ │ │ │ No Matches
│ │ │ │ * _d_u_n_e
│ │ │ │ * _i_s_t_l
│ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s
│ │ │ │ -superlu.hh File Reference
│ │ │ │ +ldl.hh File Reference
│ │ │ │ _I_t_e_r_a_t_i_v_e_ _S_o_l_v_e_r_s_ _T_e_m_p_l_a_t_e_ _L_i_b_r_a_r_y_ _(_I_S_T_L_)
│ │ │ │ -Classes for using SuperLU with ISTL matrices. _M_o_r_e_._._.
│ │ │ │ -#include "_s_u_p_e_r_l_u_f_u_n_c_t_i_o_n_s_._h_h"
│ │ │ │ -#include "_s_o_l_v_e_r_s_._h_h"
│ │ │ │ -#include "_s_u_p_e_r_m_a_t_r_i_x_._h_h"
│ │ │ │ -#include
│ │ │ │ -#include
│ │ │ │ -#include "_b_c_r_s_m_a_t_r_i_x_._h_h"
│ │ │ │ -#include "_b_v_e_c_t_o_r_._h_h"
│ │ │ │ -#include "_i_s_t_l_e_x_c_e_p_t_i_o_n_._h_h"
│ │ │ │ -#include
│ │ │ │ -#include
│ │ │ │ -#include
│ │ │ │ +Class for using LDL with ISTL matrices. _M_o_r_e_._._.
│ │ │ │ +#include
│ │ │ │ +#include
│ │ │ │ +#include
│ │ │ │ +#include
│ │ │ │ +#include <_d_u_n_e_/_i_s_t_l_/_b_c_c_s_m_a_t_r_i_x_i_n_i_t_i_a_l_i_z_e_r_._h_h>
│ │ │ │ +#include <_d_u_n_e_/_i_s_t_l_/_s_o_l_v_e_r_s_._h_h>
│ │ │ │ #include <_d_u_n_e_/_i_s_t_l_/_s_o_l_v_e_r_t_y_p_e_._h_h>
│ │ │ │ #include <_d_u_n_e_/_i_s_t_l_/_s_o_l_v_e_r_f_a_c_t_o_r_y_._h_h>
│ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_.
│ │ │ │ CCllaasssseess
│ │ │ │ -struct _D_u_n_e_:_:_S_u_p_e_r_L_U_S_o_l_v_e_C_h_o_o_s_e_r_<_ _T_ _>
│ │ │ │ + class _D_u_n_e_:_:_L_D_L_<_ _M_a_t_r_i_x_ _>
│ │ │ │ + Use the LDL package to directly solve linear systems – empty default
│ │ │ │ + class. _M_o_r_e_._._.
│ │ │ │
│ │ │ │ -struct _D_u_n_e_:_:_S_u_p_e_r_L_U_D_e_n_s_e_M_a_t_C_h_o_o_s_e_r_<_ _T_ _>
│ │ │ │ + class _D_u_n_e_:_:_L_D_L_<_ _B_C_R_S_M_a_t_r_i_x_<_ _F_i_e_l_d_M_a_t_r_i_x_<_ _T_,_ _n_,_ _m_ _>_,_ _A_ _>_ _>
│ │ │ │ + The LDL direct sparse solver for matrices of type _B_C_R_S_M_a_t_r_i_x. _M_o_r_e_._._.
│ │ │ │
│ │ │ │ -struct _D_u_n_e_:_:_S_u_p_e_r_L_U_Q_u_e_r_y_C_h_o_o_s_e_r_<_ _T_ _>
│ │ │ │ +struct _D_u_n_e_:_:_I_s_D_i_r_e_c_t_S_o_l_v_e_r_<_ _L_D_L_<_ _B_C_R_S_M_a_t_r_i_x_<_ _F_i_e_l_d_M_a_t_r_i_x_<_ _T_,_ _n_,_ _m_ _>_,_ _A_ _>_ _>_ _>
│ │ │ │
│ │ │ │ -struct _D_u_n_e_:_:_Q_u_e_r_y_S_p_a_c_e_C_h_o_o_s_e_r_<_ _T_ _>
│ │ │ │ +struct _D_u_n_e_:_:_S_t_o_r_e_s_C_o_l_u_m_n_C_o_m_p_r_e_s_s_e_d_<_ _L_D_L_<_ _B_C_R_S_M_a_t_r_i_x_<_ _F_i_e_l_d_M_a_t_r_i_x_<_ _T_,_ _n_,_ _m_ _>_,
│ │ │ │ + _A_ _>_ _>_ _>
│ │ │ │
│ │ │ │ - class _D_u_n_e_:_:_S_u_p_e_r_L_U_<_ _M_ _>
│ │ │ │ - SuperLu Solver. _M_o_r_e_._._.
│ │ │ │ +struct _D_u_n_e_:_:_L_D_L_C_r_e_a_t_o_r
│ │ │ │
│ │ │ │ -struct _D_u_n_e_:_:_I_s_D_i_r_e_c_t_S_o_l_v_e_r_<_ _S_u_p_e_r_L_U_<_ _B_C_R_S_M_a_t_r_i_x_<_ _T_,_ _A_ _>_ _>_ _>
│ │ │ │ +struct _D_u_n_e_:_:_L_D_L_C_r_e_a_t_o_r_:_:_i_s_V_a_l_i_d_B_l_o_c_k_<_ _F_ _>
│ │ │ │
│ │ │ │ -struct _D_u_n_e_:_:_S_t_o_r_e_s_C_o_l_u_m_n_C_o_m_p_r_e_s_s_e_d_<_ _S_u_p_e_r_L_U_<_ _B_C_R_S_M_a_t_r_i_x_<_ _T_,_ _A_ _>_ _>_ _>
│ │ │ │ -
│ │ │ │ -struct _D_u_n_e_:_:_S_u_p_e_r_L_U_C_r_e_a_t_o_r
│ │ │ │ -
│ │ │ │ -struct _D_u_n_e_:_:_S_u_p_e_r_L_U_C_r_e_a_t_o_r_:_:_i_s_V_a_l_i_d_B_l_o_c_k_<_ _c_l_a_s_s_ _>
│ │ │ │ -
│ │ │ │ -struct _D_u_n_e_:_:_S_u_p_e_r_L_U_C_r_e_a_t_o_r_:_:_i_s_V_a_l_i_d_B_l_o_c_k_<_ _D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_ _d_o_u_b_l_e_,_ _k_ _>_ _>
│ │ │ │ -
│ │ │ │ -struct _D_u_n_e_:_:_S_u_p_e_r_L_U_C_r_e_a_t_o_r_:_:_i_s_V_a_l_i_d_B_l_o_c_k_<_ _D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_ _s_t_d_:_:_c_o_m_p_l_e_x_<
│ │ │ │ - _d_o_u_b_l_e_ _>_,_ _k_ _>_ _>
│ │ │ │ -
│ │ │ │ -struct _D_u_n_e_:_:_S_u_p_e_r_L_U_C_r_e_a_t_o_r_:_:_i_s_V_a_l_i_d_B_l_o_c_k_<_ _d_o_u_b_l_e_ _>
│ │ │ │ -
│ │ │ │ -struct _D_u_n_e_:_:_S_u_p_e_r_L_U_C_r_e_a_t_o_r_:_:_i_s_V_a_l_i_d_B_l_o_c_k_<_ _s_t_d_:_:_c_o_m_p_l_e_x_<_ _d_o_u_b_l_e_ _>_ _>
│ │ │ │ +struct _D_u_n_e_:_:_L_D_L_C_r_e_a_t_o_r_:_:_i_s_V_a_l_i_d_B_l_o_c_k_<_ _F_i_e_l_d_V_e_c_t_o_r_<_ _d_o_u_b_l_e_,_ _k_ _>_ _>
│ │ │ │
│ │ │ │ NNaammeessppaacceess
│ │ │ │ namespace _D_u_n_e
│ │ │ │
│ │ │ │ FFuunnccttiioonnss
│ │ │ │ - _D_u_n_e_:_:_D_U_N_E___R_E_G_I_S_T_E_R___D_I_R_E_C_T___S_O_L_V_E_R ("superlu", _S_u_p_e_r_L_U_C_r_e_a_t_o_r())
│ │ │ │ + _D_u_n_e_:_:_D_U_N_E___R_E_G_I_S_T_E_R___D_I_R_E_C_T___S_O_L_V_E_R ("ldl", _D_u_n_e_:_:_L_D_L_C_r_e_a_t_o_r())
│ │ │ │
│ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn **********
│ │ │ │ -Classes for using SuperLU with ISTL matrices.
│ │ │ │ +Class for using LDL with ISTL matrices.
│ │ │ │ Author
│ │ │ │ - Markus Blatt
│ │ │ │ + Marco Agnese, Andrea Sacconi
│ │ │ │ ===============================================================================
│ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8
│ │ ├── ./usr/share/doc/libdune-istl-doc/doxygen/a00014_source.html
│ │ │ @@ -1,15 +1,15 @@
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -dune-istl: superlu.hh Source File
│ │ │ +dune-istl: ldl.hh Source File
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ @@ -74,833 +74,431 @@
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
Go to the documentation of this file.
│ │ │
│ │ │
│ │ │
│ │ │ -
5#ifndef DUNE_ISTL_SUPERLU_HH
│ │ │ -
6#define DUNE_ISTL_SUPERLU_HH
│ │ │ +
5#ifndef DUNE_ISTL_LDL_HH
│ │ │ +
6#define DUNE_ISTL_LDL_HH
│ │ │
│ │ │ -
│ │ │ +
8#if HAVE_SUITESPARSE_LDL || defined DOXYGEN
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
18#include <dune/common/fmatrix.hh>
│ │ │ -
19#include <dune/common/fvector.hh>
│ │ │ -
20#include <dune/common/stdstreams.hh>
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
22#include <dune/common/exceptions.hh>
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
37 template<
class M,
class T,
class TM,
class TD,
class TA>
│ │ │ -
38 class SeqOverlappingSchwarz;
│ │ │ -
│ │ │ -
40 template<
class T,
bool tag>
│ │ │ -
41 struct SeqOverlappingSchwarzAssemblerHelper;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
59#if __has_include("slu_sdefs.h")
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
63 static void create(SuperMatrix *
mat,
int n,
int m,
float *dat,
int n1,
│ │ │ -
64 Stype_t stype, Dtype_t dtype, Mtype_t mtype)
│ │ │ -
│ │ │ -
66 sCreate_Dense_Matrix(
mat, n, m, dat, n1, stype, dtype, mtype);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
70 static void destroy(SuperMatrix*)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
75 struct SuperLUSolveChooser<float>
│ │ │ -
│ │ │ -
77 static void solve(superlu_options_t *options, SuperMatrix *
mat,
int *perm_c,
int *perm_r,
int *etree,
│ │ │ -
78 char *equed,
float *R,
float *C, SuperMatrix *L, SuperMatrix *U,
│ │ │ -
79 void *work,
int lwork, SuperMatrix *B, SuperMatrix *X,
│ │ │ -
80 float *rpg,
float *rcond,
float *ferr,
float *berr,
│ │ │ -
81 mem_usage_t *memusage, SuperLUStat_t *stat,
int *info)
│ │ │ -
│ │ │ -
│ │ │ -
84 sgssvx(options,
mat, perm_c, perm_r, etree, equed, R, C,
│ │ │ -
85 L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
│ │ │ -
86 &gLU, memusage, stat, info);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
91 struct QuerySpaceChooser<float>
│ │ │ -
│ │ │ -
93 static void querySpace(SuperMatrix* L, SuperMatrix* U, mem_usage_t* memusage)
│ │ │ -
│ │ │ -
95 sQuerySpace(L,U,memusage);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
101#if __has_include("slu_ddefs.h")
│ │ │ -
│ │ │ -
│ │ │ -
104 struct SuperLUDenseMatChooser<double>
│ │ │ -
│ │ │ -
106 static void create(SuperMatrix *
mat,
int n,
int m,
double *dat,
int n1,
│ │ │ -
107 Stype_t stype, Dtype_t dtype, Mtype_t mtype)
│ │ │ -
│ │ │ -
109 dCreate_Dense_Matrix(
mat, n, m, dat, n1, stype, dtype, mtype);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
42 template<
class M,
class T,
class TM,
class TD,
class TA>
│ │ │ +
43 class SeqOverlappingSchwarz;
│ │ │ +
│ │ │ +
45 template<
class T,
bool tag>
│ │ │ +
46 struct SeqOverlappingSchwarzAssemblerHelper;
│ │ │ +
│ │ │ +
54 template<
class Matrix>
│ │ │ +
│ │ │ +
│ │ │ +
71 template<
typename T,
typename A,
int n,
int m>
│ │ │ +
│ │ │ +
│ │ │ +
73 :
public InverseOperator<BlockVector<FieldVector<T,m>, typename std::allocator_traits<A>::template rebind_alloc<FieldVector<T,m> > >,
│ │ │ +
74 BlockVector<FieldVector<T,n>, typename std::allocator_traits<A>::template rebind_alloc<FieldVector<T,n> > > >
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
81 typedef Dune::ISTL::Impl::BCCSMatrix<T,int>
LDLMatrix;
│ │ │ +
83 typedef ISTL::Impl::BCCSMatrixInitializer<BCRSMatrix<FieldMatrix<T,n,m>,A>,
int>
MatrixInitializer;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
104 LDL(
const Matrix& matrix,
int verbose=0) : matrixIsLoaded_(false), verbose_(verbose)
│ │ │ +
│ │ │ +
│ │ │ +
107 static_assert(std::is_same<T,double>::value,
"Unsupported Type in LDL (only double supported)");
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
113 static void destroy(SuperMatrix * )
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
117 struct SuperLUSolveChooser<double>
│ │ │ -
│ │ │ -
119 static void solve(superlu_options_t *options, SuperMatrix *
mat,
int *perm_c,
int *perm_r,
int *etree,
│ │ │ -
120 char *equed,
double *R,
double *C, SuperMatrix *L, SuperMatrix *U,
│ │ │ -
121 void *work,
int lwork, SuperMatrix *B, SuperMatrix *X,
│ │ │ -
122 double *rpg,
double *rcond,
double *ferr,
double *berr,
│ │ │ -
123 mem_usage_t *memusage, SuperLUStat_t *stat,
int *info)
│ │ │ -
│ │ │ -
│ │ │ -
126 dgssvx(options,
mat, perm_c, perm_r, etree, equed, R, C,
│ │ │ -
127 L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
│ │ │ -
128 &gLU, memusage, stat, info);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
133 struct QuerySpaceChooser<double>
│ │ │ -
│ │ │ -
135 static void querySpace(SuperMatrix* L, SuperMatrix* U, mem_usage_t* memusage)
│ │ │ -
│ │ │ -
137 dQuerySpace(L,U,memusage);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
142#if __has_include("slu_zdefs.h")
│ │ │ -
│ │ │ -
144 struct SuperLUDenseMatChooser<
std::complex<double> >
│ │ │ -
│ │ │ -
146 static void create(SuperMatrix *
mat,
int n,
int m, std::complex<double> *dat,
int n1,
│ │ │ -
147 Stype_t stype, Dtype_t dtype, Mtype_t mtype)
│ │ │ -
│ │ │ -
149 zCreate_Dense_Matrix(
mat, n, m,
reinterpret_cast<doublecomplex*
>(dat), n1, stype, dtype, mtype);
│ │ │ +
│ │ │ +
120 LDL(
const Matrix& matrix,
int verbose,
bool) : matrixIsLoaded_(false), verbose_(verbose)
│ │ │ +
│ │ │ +
│ │ │ +
123 static_assert(std::is_same<T,double>::value,
"Unsupported Type in LDL (only double supported)");
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
137 :
LDL(matrix, config.
get<int>(
"verbose", 0))
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
141 LDL() : matrixIsLoaded_(false), verbose_(0)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
147 if ((ldlMatrix_.N() + ldlMatrix_.M() > 0) || matrixIsLoaded_)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
153 static void destroy(SuperMatrix*)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
158 struct SuperLUSolveChooser<
std::complex<double> >
│ │ │ -
│ │ │ -
160 static void solve(superlu_options_t *options, SuperMatrix *
mat,
int *perm_c,
int *perm_r,
int *etree,
│ │ │ -
161 char *equed,
double *R,
double *C, SuperMatrix *L, SuperMatrix *U,
│ │ │ -
162 void *work,
int lwork, SuperMatrix *B, SuperMatrix *X,
│ │ │ -
163 double *rpg,
double *rcond,
double *ferr,
double *berr,
│ │ │ -
164 mem_usage_t *memusage, SuperLUStat_t *stat,
int *info)
│ │ │ -
│ │ │ -
│ │ │ -
167 zgssvx(options,
mat, perm_c, perm_r, etree, equed, R, C,
│ │ │ -
168 L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
│ │ │ -
169 &gLU, memusage, stat, info);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
174 struct QuerySpaceChooser<
std::complex<double> >
│ │ │ -
│ │ │ -
176 static void querySpace(SuperMatrix* L, SuperMatrix* U, mem_usage_t* memusage)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
154 const int dimMat(ldlMatrix_.N());
│ │ │ +
155 ldl_perm(dimMat, Y_,
reinterpret_cast<double*
>(&b[0]), P_);
│ │ │ +
156 ldl_lsolve(dimMat, Y_, Lp_, Li_, Lx_);
│ │ │ +
157 ldl_dsolve(dimMat, Y_, D_);
│ │ │ +
158 ldl_ltsolve(dimMat, Y_, Lp_, Li_, Lx_);
│ │ │ +
159 ldl_permt(dimMat,
reinterpret_cast<double*
>(&x[0]), Y_, P_);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
178 zQuerySpace(L,U,memusage);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
183#if __has_include("slu_cdefs.h")
│ │ │ -
│ │ │ -
185 struct SuperLUDenseMatChooser<
std::complex<float> >
│ │ │ -
│ │ │ -
187 static void create(SuperMatrix *
mat,
int n,
int m, std::complex<float> *dat,
int n1,
│ │ │ -
188 Stype_t stype, Dtype_t dtype, Mtype_t mtype)
│ │ │ -
│ │ │ -
190 cCreate_Dense_Matrix(
mat, n, m,
reinterpret_cast<singlecomplex*
>(dat), n1, stype, dtype, mtype);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
194 static void destroy(SuperMatrix* )
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
199 struct SuperLUSolveChooser<
std::complex<float> >
│ │ │ -
│ │ │ -
201 static void solve(superlu_options_t *options, SuperMatrix *
mat,
int *perm_c,
int *perm_r,
int *etree,
│ │ │ -
202 char *equed,
float *R,
float *C, SuperMatrix *L, SuperMatrix *U,
│ │ │ -
203 void *work,
int lwork, SuperMatrix *B, SuperMatrix *X,
│ │ │ -
204 float *rpg,
float *rcond,
float *ferr,
float *berr,
│ │ │ -
205 mem_usage_t *memusage, SuperLUStat_t *stat,
int *info)
│ │ │ -
│ │ │ -
│ │ │ -
208 cgssvx(options,
mat, perm_c, perm_r, etree, equed, R, C,
│ │ │ -
209 L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
│ │ │ -
210 &gLU, memusage, stat, info);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
215 struct QuerySpaceChooser<
std::complex<float> >
│ │ │ -
│ │ │ -
217 static void querySpace(SuperMatrix* L, SuperMatrix* U, mem_usage_t* memusage)
│ │ │ -
│ │ │ -
219 cQuerySpace(L,U,memusage);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
178 const int dimMat(ldlMatrix_.N());
│ │ │ +
179 ldl_perm(dimMat, Y_, b, P_);
│ │ │ +
180 ldl_lsolve(dimMat, Y_, Lp_, Li_, Lx_);
│ │ │ +
181 ldl_dsolve(dimMat, Y_, D_);
│ │ │ +
182 ldl_ltsolve(dimMat, Y_, Lp_, Li_, Lx_);
│ │ │ +
183 ldl_permt(dimMat, x, Y_, P_);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
186 void setOption([[maybe_unused]]
unsigned int option, [[maybe_unused]]
double value)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
192 if ((ldlMatrix_.N() + ldlMatrix_.M() > 0) || matrixIsLoaded_)
│ │ │ +
│ │ │ +
│ │ │ +
195 if (ldlMatrix_.N() + ldlMatrix_.M() + ldlMatrix_.nonzeroes() != 0)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
199 ISTL::Impl::BCCSMatrixInitializer<Matrix, int> initializer(ldlMatrix_);
│ │ │ +
│ │ │ +
201 copyToBCCSMatrix(initializer, matrix);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
209 if ((ldlMatrix_.N() + ldlMatrix_.M() > 0) || matrixIsLoaded_)
│ │ │ +
│ │ │ +
│ │ │ +
212 if (ldlMatrix_.N() + ldlMatrix_.M() + ldlMatrix_.nonzeroes() != 0)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
217 ISTL::Impl::BCCSMatrixInitializer<Matrix, int> initializer(ldlMatrix_);
│ │ │ +
│ │ │ +
219 copyToBCCSMatrix(initializer, ISTL::Impl::MatrixRowSubset<
Matrix,std::set<std::size_t> >(matrix,rowIndexSet));
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
227 struct SuperLUVectorChooser
│ │ │ -
│ │ │ -
│ │ │ -
230 template<
typename T,
typename A,
int n,
int m>
│ │ │ -
231 struct SuperLUVectorChooser<BCRSMatrix<FieldMatrix<T,n,m>,A > >
│ │ │ -
│ │ │ -
234 using domain_type = BlockVector<
│ │ │ -
│ │ │ -
236 typename std::allocator_traits<A>::template rebind_alloc<FieldVector<T,m> > >;
│ │ │ -
238 using range_type = BlockVector<
│ │ │ -
│ │ │ -
240 typename std::allocator_traits<A>::template rebind_alloc<FieldVector<T,n> > >;
│ │ │ -
│ │ │ -
│ │ │ -
243 template<
typename T,
typename A>
│ │ │ -
244 struct SuperLUVectorChooser<BCRSMatrix<T,A> >
│ │ │ -
│ │ │ -
247 using domain_type = BlockVector<T, A>;
│ │ │ -
249 using range_type = BlockVector<T, A>;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
269 typename Impl::SuperLUVectorChooser<M>::domain_type,
│ │ │ -
270 typename Impl::SuperLUVectorChooser<M>::range_type >
│ │ │ -
│ │ │ -
272 using T =
typename M::field_type;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
282 using domain_type =
typename Impl::SuperLUVectorChooser<M>::domain_type;
│ │ │ -
284 using range_type =
typename Impl::SuperLUVectorChooser<M>::range_type;
│ │ │ -
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
256 matrixIsLoaded_ =
false;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │
│ │ │
│ │ │ -
│ │ │ -
307 bool reusevector=
true);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
321 :
SuperLU(
mat, config.
get<bool>(
"verbose", false), config.
get<bool>(
"reuseVector", true))
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
350 void apply(T* x, T* b);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
355 typename SuperLUMatrix::size_type
nnz()
const
│ │ │ -
│ │ │ -
357 return mat.nonzeroes();
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
371 const char*
name() {
return "SuperLU"; }
│ │ │ -
│ │ │ -
373 template<
class Mat,
class X,
class TM,
class TD,
class T1>
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
302 template<
class M,
class X,
class TM,
class TD,
class T1>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
311 const int dimMat(ldlMatrix_.N());
│ │ │ +
312 D_ =
new double [dimMat];
│ │ │ +
313 Y_ =
new double [dimMat];
│ │ │ +
314 Lp_ =
new int [dimMat + 1];
│ │ │ +
315 Parent_ =
new int [dimMat];
│ │ │ +
316 Lnz_ =
new int [dimMat];
│ │ │ +
317 Flag_ =
new int [dimMat];
│ │ │ +
318 Pattern_ =
new int [dimMat];
│ │ │ +
319 P_ =
new int [dimMat];
│ │ │ +
320 Pinv_ =
new int [dimMat];
│ │ │ +
│ │ │ +
322 double Info [AMD_INFO];
│ │ │ +
323 if(amd_order (dimMat, ldlMatrix_.getColStart(), ldlMatrix_.getRowIndex(), P_, (
double *) NULL, Info) < AMD_OK)
│ │ │ +
324 DUNE_THROW(InvalidStateException,
"Error: AMD failed!");
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
328 ldl_symbolic(dimMat, ldlMatrix_.getColStart(), ldlMatrix_.getRowIndex(), Lp_, Parent_, Lnz_, Flag_, P_, Pinv_);
│ │ │ +
│ │ │ +
330 Lx_ =
new double [Lp_[dimMat]];
│ │ │ +
331 Li_ =
new int [Lp_[dimMat]];
│ │ │ +
│ │ │ +
333 const int rank(ldl_numeric(dimMat, ldlMatrix_.getColStart(), ldlMatrix_.getRowIndex(), ldlMatrix_.getValues(),
│ │ │ +
334 Lp_, Parent_, Lnz_, Li_, Lx_, D_, Y_, Pattern_, Flag_, P_, Pinv_));
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
342 DUNE_THROW(InvalidStateException,
"Error: LDL factorisation failed!");
│ │ │ +
│ │ │ +
│ │ │ +
345 LDLMatrix ldlMatrix_;
│ │ │ +
346 bool matrixIsLoaded_;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
361 template<
typename T,
typename A,
int n,
int m>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
367 template<
typename T,
typename A,
int n,
int m>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
375 template<
int k>
struct isValidBlock<FieldVector<double,k>> : std::true_type{};
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
383 SuperMatrix L, U, B, X;
│ │ │ -
384 int *perm_c, *perm_r, *etree;
│ │ │ -
│ │ │ -
│ │ │ -
387 superlu_options_t options;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
391 bool first, verbose, reusevector;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
377 template<
typename TL,
typename M>
│ │ │ +
378 std::shared_ptr<Dune::InverseOperator<typename Dune::TypeListElement<1, TL>::type,
│ │ │ +
379 typename Dune::TypeListElement<2, TL>::type>>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
382 isValidBlock<
typename Dune::TypeListElement<1, TL>::type::block_type>::value,
int> = 0)
const
│ │ │ +
│ │ │ +
384 int verbose = config.get(
"verbose", 0);
│ │ │ +
385 return std::make_shared<Dune::LDL<M>>(
mat,verbose);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
389 template<
typename TL,
typename M>
│ │ │ +
390 std::shared_ptr<Dune::InverseOperator<typename Dune::TypeListElement<1, TL>::type,
│ │ │ +
391 typename Dune::TypeListElement<2, TL>::type>>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
394 !
isValidBlock<
typename Dune::TypeListElement<1, TL>::type::block_type>::value,
int> = 0)
const
│ │ │ +
│ │ │ +
│ │ │ +
397 "Unsupported Type in LDL (only double and std::complex<double> supported)");
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
411 Destroy_SuperNode_Matrix(&L);
│ │ │ -
412 Destroy_CompCol_Matrix(&U);
│ │ │ -
│ │ │ -
│ │ │ -
415 if(!first && reusevector) {
│ │ │ -
416 SUPERLU_FREE(B.Store);
│ │ │ -
417 SUPERLU_FREE(X.Store);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
425 : work(0), lwork(0), first(true), verbose(verbose_),
│ │ │ -
426 reusevector(reusevector_)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
433 : work(0), lwork(0),verbose(false),
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
466 mat.setMatrix(mat_,mrs);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
475 perm_c =
new int[
mat.
M()];
│ │ │ -
476 perm_r =
new int[
mat.
N()];
│ │ │ -
477 etree =
new int[
mat.
M()];
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
481 set_default_options(&options);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
488 fakeFormat.lda=
mat.
N();
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
498 mem_usage_t memusage;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
503 &L, &U, work, lwork, &B, &X, &rpg, &rcond, &ferr,
│ │ │ -
504 &berr, &memusage, &stat, &info);
│ │ │ -
│ │ │ -
│ │ │ -
507 dinfo<<
"LU factorization: dgssvx() returns info "<< info<<std::endl;
│ │ │ -
│ │ │ -
509 auto nSuperLUCol =
static_cast<SuperMatrix&
>(
mat).ncol;
│ │ │ -
│ │ │ -
511 if ( info == 0 || info == nSuperLUCol+1 ) {
│ │ │ -
│ │ │ -
513 if ( options.PivotGrowth )
│ │ │ -
514 dinfo<<
"Recip. pivot growth = "<<rpg<<std::endl;
│ │ │ -
515 if ( options.ConditionNumber )
│ │ │ -
516 dinfo<<
"Recip. condition number = %e\n"<< rcond<<std::endl;
│ │ │ -
517 SCformat* Lstore = (SCformat *) L.Store;
│ │ │ -
518 NCformat* Ustore = (NCformat *) U.Store;
│ │ │ -
519 dinfo<<
"No of nonzeros in factor L = "<< Lstore->nnz<<std::endl;
│ │ │ -
520 dinfo<<
"No of nonzeros in factor U = "<< Ustore->nnz<<std::endl;
│ │ │ -
521 dinfo<<
"No of nonzeros in L+U = "<< Lstore->nnz + Ustore->nnz - nSuperLUCol<<std::endl;
│ │ │ -
│ │ │ -
523 dinfo<<
"L\\U MB "<<memusage.for_lu/1e6<<
" \ttotal MB needed "<<memusage.total_needed/1e6
│ │ │ -
│ │ │ -
525 std::cout<<stat.expansions<<std::endl;
│ │ │ -
│ │ │ -
527 }
else if ( info > 0 && lwork == -1 ) {
│ │ │ -
528 dinfo<<
"** Estimated memory: "<< info - nSuperLUCol<<std::endl;
│ │ │ -
│ │ │ -
530 if ( options.PrintStat ) StatPrint(&stat);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
558 options.Fact = FACTORED;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
565 if (
mat.
N() != b.dim())
│ │ │ -
566 DUNE_THROW(
ISTLError,
"Size of right-hand-side vector b does not match the number of matrix rows!");
│ │ │ -
567 if (
mat.
M() != x.dim())
│ │ │ -
568 DUNE_THROW(
ISTLError,
"Size of solution vector x does not match the number of matrix columns!");
│ │ │ -
│ │ │ -
570 DUNE_THROW(
ISTLError,
"Matrix of SuperLU is null!");
│ │ │ -
│ │ │ -
572 SuperMatrix* mB = &B;
│ │ │ -
573 SuperMatrix* mX = &X;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
581 ((DNformat*)B.Store)->nzval=&b[0];
│ │ │ -
582 ((DNformat*)X.Store)->nzval=&x[0];
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
592 mem_usage_t memusage;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
602 options.IterRefine=SLU_DOUBLE;
│ │ │ -
│ │ │ -
│ │ │ -
605 &L, &U, work, lwork, mB, mX, &rpg, &rcond, &ferr, &berr,
│ │ │ -
606 &memusage, &stat, &info);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
626 dinfo<<
"Triangular solve: dgssvx() returns info "<< info<<std::endl;
│ │ │ -
│ │ │ -
628 auto nSuperLUCol =
static_cast<SuperMatrix&
>(
mat).ncol;
│ │ │ -
│ │ │ -
630 if ( info == 0 || info == nSuperLUCol+1 ) {
│ │ │ -
│ │ │ -
632 if ( options.IterRefine ) {
│ │ │ -
633 std::cout<<
"Iterative Refinement: steps="
│ │ │ -
634 <<stat.RefineSteps<<
" FERR="<<ferr<<
" BERR="<<berr<<std::endl;
│ │ │ -
│ │ │ -
636 std::cout<<
" FERR="<<ferr<<
" BERR="<<berr<<std::endl;
│ │ │ -
637 }
else if ( info > 0 && lwork == -1 ) {
│ │ │ -
638 std::cout<<
"** Estimated memory: "<< info - nSuperLUCol<<
" bytes"<<std::endl;
│ │ │ -
│ │ │ -
│ │ │ -
641 if ( options.PrintStat ) StatPrint(&stat);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
645 SUPERLU_FREE(rB.Store);
│ │ │ -
646 SUPERLU_FREE(rX.Store);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
655 DUNE_THROW(
ISTLError,
"Matrix of SuperLU is null!");
│ │ │ -
│ │ │ -
657 SuperMatrix* mB = &B;
│ │ │ -
658 SuperMatrix* mX = &X;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
666 ((DNformat*) B.Store)->nzval=b;
│ │ │ -
667 ((DNformat*)X.Store)->nzval=x;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
678 mem_usage_t memusage;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
683 options.IterRefine=SLU_DOUBLE;
│ │ │ -
│ │ │ -
│ │ │ -
686 &L, &U, work, lwork, mB, mX, &rpg, &rcond, &ferr, &berr,
│ │ │ -
687 &memusage, &stat, &info);
│ │ │ -
│ │ │ -
│ │ │ -
690 dinfo<<
"Triangular solve: dgssvx() returns info "<< info<<std::endl;
│ │ │ -
│ │ │ -
692 auto nSuperLUCol =
static_cast<SuperMatrix&
>(
mat).ncol;
│ │ │ -
│ │ │ -
694 if ( info == 0 || info == nSuperLUCol+1 ) {
│ │ │ -
│ │ │ -
696 if ( options.IterRefine ) {
│ │ │ -
697 dinfo<<
"Iterative Refinement: steps="
│ │ │ -
698 <<stat.RefineSteps<<
" FERR="<<ferr<<
" BERR="<<berr<<std::endl;
│ │ │ -
│ │ │ -
700 dinfo<<
" FERR="<<ferr<<
" BERR="<<berr<<std::endl;
│ │ │ -
701 }
else if ( info > 0 && lwork == -1 ) {
│ │ │ -
702 dinfo<<
"** Estimated memory: "<< info - nSuperLUCol<<
" bytes"<<std::endl;
│ │ │ -
│ │ │ -
704 if ( options.PrintStat ) StatPrint(&stat);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
709 SUPERLU_FREE(rB.Store);
│ │ │ -
710 SUPERLU_FREE(rX.Store);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
715 template<
typename T,
typename A>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
721 template<
typename T,
typename A>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
730 template<
int k>
struct isValidBlock<
Dune::FieldVector<std::complex<double>,k>> : std::true_type{};
│ │ │ -
731 template<
typename TL,
typename M>
│ │ │ -
732 std::shared_ptr<Dune::InverseOperator<typename Dune::TypeListElement<1, TL>::type,
│ │ │ -
733 typename Dune::TypeListElement<2, TL>::type>>
│ │ │ -
│ │ │ -
│ │ │ -
735 std::enable_if_t<
isValidBlock<
typename Dune::TypeListElement<1, TL>::type::block_type>::value,
int> = 0)
const
│ │ │ -
│ │ │ -
737 int verbose = config.get(
"verbose", 0);
│ │ │ -
738 return std::make_shared<Dune::SuperLU<M>>(
mat,verbose);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
742 template<
typename TL,
typename M>
│ │ │ -
743 std::shared_ptr<Dune::InverseOperator<typename Dune::TypeListElement<1, TL>::type,
│ │ │ -
744 typename Dune::TypeListElement<2, TL>::type>>
│ │ │ -
│ │ │ -
│ │ │ -
746 std::enable_if_t<!
isValidBlock<
typename Dune::TypeListElement<1, TL>::type::block_type>::value,
int> = 0)
const
│ │ │ -
│ │ │ -
│ │ │ -
749 "Unsupported Type in SuperLU (only double and std::complex<double> supported)");
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
759#undef FIRSTCOL_OF_SNODE
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
Templates characterizing the type of a solver.
│ │ │ -
Implementations of the inverse operator interface.
│ │ │ -
#define DUNE_REGISTER_DIRECT_SOLVER(name,...)
Definition solverregistry.hh:13
│ │ │ -
│ │ │ -
│ │ │ -
This file implements a vector space as a tensor product of a given vector space. The number of compon...
│ │ │ -
Implementation of the BCRSMatrix class.
│ │ │ -
void setSubMatrix(const Matrix &mat, const S &rowIndexSet)
Definition superlu.hh:457
│ │ │ -
void apply(domain_type &x, range_type &b, InverseOperatorResult &res)
Apply inverse operator,.
Definition superlu.hh:563
│ │ │ -
void setVerbosity(bool v)
Definition superlu.hh:437
│ │ │ -
void free()
free allocated space.
Definition superlu.hh:403
│ │ │ -
~SuperLU()
Definition superlu.hh:396
│ │ │ -
SuperLU()
Empty default constructor.
Definition superlu.hh:432
│ │ │ -
void setMatrix(const Matrix &mat)
Initialize data from given matrix.
Definition superlu.hh:443
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
#define DUNE_REGISTER_DIRECT_SOLVER(name,...)
Definition solverregistry.hh:13
│ │ │ +
Implementations of the inverse operator interface.
│ │ │ +
│ │ │ +
Templates characterizing the type of a solver.
│ │ │ +
Dune::BlockVector< FieldVector< T, m >, typename std::allocator_traits< A >::template rebind_alloc< FieldVector< T, m > > > domain_type
The type of the domain of the solver.
Definition ldl.hh:85
│ │ │ +
Dune::BCRSMatrix< FieldMatrix< T, n, m >, A > Matrix
The matrix type.
Definition ldl.hh:78
│ │ │ +
int * getLp()
Get factorization Lp.
Definition ldl.hh:278
│ │ │ +
LDLMatrix & getInternalMatrix()
Return the column compress matrix.
Definition ldl.hh:237
│ │ │ +
Dune::ISTL::Impl::BCCSMatrix< T, int > LDLMatrix
The corresponding SuperLU Matrix type.
Definition ldl.hh:81
│ │ │ +
double * getLx()
Get factorization Lx.
Definition ldl.hh:296
│ │ │ +
void setVerbosity(int v)
Sets the verbosity level for the solver.
Definition ldl.hh:228
│ │ │ +
void apply(T *x, T *b)
Additional apply method with c-arrays in analogy to superlu.
Definition ldl.hh:176
│ │ │ +
virtual void apply(domain_type &x, range_type &b, double reduction, InverseOperatorResult &res)
apply inverse operator, with given convergence criteria.
Definition ldl.hh:166
│ │ │ +
Dune::BlockVector< FieldVector< T, n >, typename std::allocator_traits< A >::template rebind_alloc< FieldVector< T, n > > > range_type
The type of the range of the solver.
Definition ldl.hh:87
│ │ │ +
virtual ~LDL()
Default constructor.
Definition ldl.hh:145
│ │ │ +
void free()
Free allocated space.
Definition ldl.hh:246
│ │ │ +
virtual void apply(domain_type &x, range_type &b, InverseOperatorResult &res)
Apply inverse operator,.
Definition ldl.hh:152
│ │ │ +
int * getLi()
Get factorization Li.
Definition ldl.hh:287
│ │ │ +
Dune::BCRSMatrix< FieldMatrix< T, n, m >, A > matrix_type
Definition ldl.hh:79
│ │ │ +
void setMatrix(const Matrix &matrix)
Initialize data from given matrix.
Definition ldl.hh:190
│ │ │ +
void setOption(unsigned int option, double value)
Definition ldl.hh:186
│ │ │ +
LDL(const Matrix &matrix, int verbose, bool)
Constructor for compatibility with SuperLU standard constructor.
Definition ldl.hh:120
│ │ │ +
double * getD()
Get factorization diagonal matrix D.
Definition ldl.hh:269
│ │ │ +
LDL(const Matrix &matrix, const ParameterTree &config)
Constructs the LDL solver.
Definition ldl.hh:136
│ │ │ +
virtual SolverCategory::Category category() const
Category of the solver (see SolverCategory::Category)
Definition ldl.hh:90
│ │ │ +
ISTL::Impl::BCCSMatrixInitializer< BCRSMatrix< FieldMatrix< T, n, m >, A >, int > MatrixInitializer
Type of an associated initializer class.
Definition ldl.hh:83
│ │ │ +
std::shared_ptr< Dune::InverseOperator< typename Dune::TypeListElement< 1, TL >::type, typename Dune::TypeListElement< 2, TL >::type > > operator()(TL, const M &mat, const Dune::ParameterTree &config, std::enable_if_t< isValidBlock< typename Dune::TypeListElement< 1, TL >::type::block_type >::value, int >=0) const
Definition ldl.hh:380
│ │ │ +
const char * name()
Get method name.
Definition ldl.hh:260
│ │ │ +
void setSubMatrix(const Matrix &matrix, const S &rowIndexSet)
Definition ldl.hh:207
│ │ │ +
LDL()
Default constructor.
Definition ldl.hh:141
│ │ │ +
LDL(const Matrix &matrix, int verbose=0)
Construct a solver object from a BCRSMatrix.
Definition ldl.hh:104
│ │ │
Matrix & mat
Definition matrixmatrix.hh:347
│ │ │ -
│ │ │
Definition allocator.hh:11
│ │ │
PropertyMapTypeSelector< Amg::VertexVisitedTag, Amg::PropertiesGraph< G, Amg::VertexProperties, EP, VM, EM > >::Type get(const Amg::VertexVisitedTag &tag, Amg::PropertiesGraph< G, Amg::VertexProperties, EP, VM, EM > &graph)
Definition dependency.hh:293
│ │ │ +
Definition matrixutils.hh:211
│ │ │
A sparse block matrix with compressed row storage.
Definition bcrsmatrix.hh:466
│ │ │ -
derive error class from the base class in common
Definition istlexception.hh:19
│ │ │ +
size_type M() const
number of columns (counted in blocks)
Definition bcrsmatrix.hh:2007
│ │ │ +
size_type N() const
number of rows (counted in blocks)
Definition bcrsmatrix.hh:2001
│ │ │ +
A vector of blocks with memory management.
Definition bvector.hh:392
│ │ │
Sequential overlapping Schwarz preconditioner.
Definition overlappingschwarz.hh:755
│ │ │
Definition overlappingschwarz.hh:694
│ │ │ -
A generic dynamic dense matrix.
Definition matrix.hh:561
│ │ │ -
size_type M() const
Return the number of columns.
Definition matrix.hh:696
│ │ │ -
size_type N() const
Return the number of rows.
Definition matrix.hh:691
│ │ │ +
Use the LDL package to directly solve linear systems – empty default class.
Definition ldl.hh:56
│ │ │ +
│ │ │ +
│ │ │ +
Definition matrixutils.hh:27
│ │ │
Statistics about the application of an inverse operator.
Definition solver.hh:50
│ │ │
int iterations
Number of iterations.
Definition solver.hh:69
│ │ │
bool converged
True if convergence criterion has been met.
Definition solver.hh:75
│ │ │
Abstract base class for all solvers.
Definition solver.hh:101
│ │ │
Category
Definition solvercategory.hh:23
│ │ │
@ sequential
Category for sequential solvers.
Definition solvercategory.hh:25
│ │ │
Definition solverregistry.hh:77
│ │ │
Definition solvertype.hh:16
│ │ │
@ value
Whether this is a direct solver.
Definition solvertype.hh:24
│ │ │
Definition solvertype.hh:30
│ │ │
@ value
whether the solver internally uses column compressed storage
Definition solvertype.hh:36
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
SuperLu Solver.
Definition superlu.hh:271
│ │ │ -
SuperLUMatrix::size_type nnz() const
Definition superlu.hh:355
│ │ │ -
void apply(domain_type &x, range_type &b, double reduction, InverseOperatorResult &res)
apply inverse operator, with given convergence criteria.
Definition superlu.hh:342
│ │ │ -
typename Impl::SuperLUVectorChooser< M >::range_type range_type
The type of the range of the solver.
Definition superlu.hh:284
│ │ │ -
M matrix_type
Definition superlu.hh:276
│ │ │ -
SuperMatrixInitializer< Matrix > MatrixInitializer
Type of an associated initializer class.
Definition superlu.hh:280
│ │ │ -
M Matrix
The matrix type.
Definition superlu.hh:275
│ │ │ -
typename Impl::SuperLUVectorChooser< M >::domain_type domain_type
The type of the domain of the solver.
Definition superlu.hh:282
│ │ │ -
const char * name()
Definition superlu.hh:371
│ │ │ -
virtual SolverCategory::Category category() const
Category of the solver (see SolverCategory::Category)
Definition superlu.hh:287
│ │ │ -
Dune::SuperLUMatrix< Matrix > SuperLUMatrix
The corresponding SuperLU Matrix type.
Definition superlu.hh:278
│ │ │ -
SuperLU(const Matrix &mat, const ParameterTree &config)
Constructs the SuperLU solver.
Definition superlu.hh:320
│ │ │ -
Definition superlu.hh:727
│ │ │ -
std::shared_ptr< Dune::InverseOperator< typename Dune::TypeListElement< 1, TL >::type, typename Dune::TypeListElement< 2, TL >::type > > operator()(TL, const M &mat, const Dune::ParameterTree &config, std::enable_if_t< isValidBlock< typename Dune::TypeListElement< 1, TL >::type::block_type >::value, int >=0) const
Definition superlu.hh:734
│ │ │ -
Definition superlu.hh:728
│ │ │ -
Definition supermatrix.hh:132
│ │ │ -
Utility class for converting an ISTL Matrix into a SuperLU Matrix.
Definition supermatrix.hh:175
│ │ │ -
Definition supermatrix.hh:179
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ ├── html2text {}
│ │ │ │ @@ -1,846 +1,505 @@
│ │ │ │ dune-istl 2.10
│ │ │ │ Loading...
│ │ │ │ Searching...
│ │ │ │ No Matches
│ │ │ │ * _d_u_n_e
│ │ │ │ * _i_s_t_l
│ │ │ │ -superlu.hh
│ │ │ │ +ldl.hh
│ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_.
│ │ │ │ 1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file
│ │ │ │ LICENSE.md in module root
│ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ 4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -5#ifndef DUNE_ISTL_SUPERLU_HH
│ │ │ │ -6#define DUNE_ISTL_SUPERLU_HH
│ │ │ │ +5#ifndef DUNE_ISTL_LDL_HH
│ │ │ │ +6#define DUNE_ISTL_LDL_HH
│ │ │ │ 7
│ │ │ │ -8#if HAVE_SUPERLU
│ │ │ │ +8#if HAVE_SUITESPARSE_LDL || defined DOXYGEN
│ │ │ │ 9
│ │ │ │ -10#include "_s_u_p_e_r_l_u_f_u_n_c_t_i_o_n_s_._h_h"
│ │ │ │ -11#include "_s_o_l_v_e_r_s_._h_h"
│ │ │ │ -12#include "_s_u_p_e_r_m_a_t_r_i_x_._h_h"
│ │ │ │ -13#include
│ │ │ │ -14#include
│ │ │ │ -15#include "_b_c_r_s_m_a_t_r_i_x_._h_h"
│ │ │ │ -16#include "_b_v_e_c_t_o_r_._h_h"
│ │ │ │ -17#include "_i_s_t_l_e_x_c_e_p_t_i_o_n_._h_h"
│ │ │ │ -18#include
│ │ │ │ -19#include
│ │ │ │ -20#include
│ │ │ │ -21#include <_d_u_n_e_/_i_s_t_l_/_s_o_l_v_e_r_t_y_p_e_._h_h>
│ │ │ │ -22#include <_d_u_n_e_/_i_s_t_l_/_s_o_l_v_e_r_f_a_c_t_o_r_y_._h_h>
│ │ │ │ +10#include
│ │ │ │ +11#include
│ │ │ │ +12#include
│ │ │ │ +13
│ │ │ │ +14#ifdef __cplusplus
│ │ │ │ +15extern "C"
│ │ │ │ +16{
│ │ │ │ +17#include
│ │ │ │ +18#include
│ │ │ │ +19}
│ │ │ │ +20#endif
│ │ │ │ +21
│ │ │ │ +22#include
│ │ │ │ 23
│ │ │ │ -24namespace _D_u_n_e
│ │ │ │ -25{
│ │ │ │ -26
│ │ │ │ -37 template
│ │ │ │ -38 class SeqOverlappingSchwarz;
│ │ │ │ -39
│ │ │ │ -40 template
│ │ │ │ -41 struct SeqOverlappingSchwarzAssemblerHelper;
│ │ │ │ -42
│ │ │ │ -43 template
│ │ │ │ -_4_4 struct _S_u_p_e_r_L_U_S_o_l_v_e_C_h_o_o_s_e_r
│ │ │ │ -45 {};
│ │ │ │ -46
│ │ │ │ -47 template
│ │ │ │ -_4_8 struct _S_u_p_e_r_L_U_D_e_n_s_e_M_a_t_C_h_o_o_s_e_r
│ │ │ │ -49 {};
│ │ │ │ -50
│ │ │ │ -51 template
│ │ │ │ -_5_2 struct _S_u_p_e_r_L_U_Q_u_e_r_y_C_h_o_o_s_e_r
│ │ │ │ -53 {};
│ │ │ │ -54
│ │ │ │ -55 template
│ │ │ │ -_5_6 struct _Q_u_e_r_y_S_p_a_c_e_C_h_o_o_s_e_r
│ │ │ │ -57 {};
│ │ │ │ -58
│ │ │ │ -59#if __has_include("slu_sdefs.h")
│ │ │ │ -60 template<>
│ │ │ │ -61 struct _S_u_p_e_r_L_U_D_e_n_s_e_M_a_t_C_h_o_o_s_e_r
│ │ │ │ -62 {
│ │ │ │ -63 static void create(SuperMatrix *_m_a_t, int n, int m, float *dat, int n1,
│ │ │ │ -64 Stype_t stype, Dtype_t dtype, Mtype_t mtype)
│ │ │ │ -65 {
│ │ │ │ -66 sCreate_Dense_Matrix(_m_a_t, n, m, dat, n1, stype, dtype, mtype);
│ │ │ │ -67
│ │ │ │ -68 }
│ │ │ │ -69
│ │ │ │ -70 static void destroy(SuperMatrix*)
│ │ │ │ -71 {}
│ │ │ │ -72
│ │ │ │ -73 };
│ │ │ │ -74 template<>
│ │ │ │ -75 struct SuperLUSolveChooser
│ │ │ │ -76 {
│ │ │ │ -77 static void solve(superlu_options_t *options, SuperMatrix *_m_a_t, int *perm_c,
│ │ │ │ -int *perm_r, int *etree,
│ │ │ │ -78 char *equed, float *R, float *C, SuperMatrix *L, SuperMatrix *U,
│ │ │ │ -79 void *work, int lwork, SuperMatrix *B, SuperMatrix *X,
│ │ │ │ -80 float *rpg, float *rcond, float *ferr, float *berr,
│ │ │ │ -81 mem_usage_t *memusage, SuperLUStat_t *stat, int *info)
│ │ │ │ -82 {
│ │ │ │ -83 GlobalLU_t gLU;
│ │ │ │ -84 sgssvx(options, _m_a_t, perm_c, perm_r, etree, equed, R, C,
│ │ │ │ -85 L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
│ │ │ │ -86 &gLU, memusage, stat, info);
│ │ │ │ -87 }
│ │ │ │ -88 };
│ │ │ │ -89
│ │ │ │ -90 template<>
│ │ │ │ -91 struct QuerySpaceChooser
│ │ │ │ -92 {
│ │ │ │ -93 static void querySpace(SuperMatrix* L, SuperMatrix* U, mem_usage_t*
│ │ │ │ -memusage)
│ │ │ │ -94 {
│ │ │ │ -95 sQuerySpace(L,U,memusage);
│ │ │ │ -96 }
│ │ │ │ -97 };
│ │ │ │ -98
│ │ │ │ -99#endif
│ │ │ │ -100
│ │ │ │ -101#if __has_include("slu_ddefs.h")
│ │ │ │ -102
│ │ │ │ -103 template<>
│ │ │ │ -104 struct SuperLUDenseMatChooser
│ │ │ │ +24#include <_d_u_n_e_/_i_s_t_l_/_b_c_c_s_m_a_t_r_i_x_i_n_i_t_i_a_l_i_z_e_r_._h_h>
│ │ │ │ +25#include <_d_u_n_e_/_i_s_t_l_/_s_o_l_v_e_r_s_._h_h>
│ │ │ │ +26#include <_d_u_n_e_/_i_s_t_l_/_s_o_l_v_e_r_t_y_p_e_._h_h>
│ │ │ │ +27#include <_d_u_n_e_/_i_s_t_l_/_s_o_l_v_e_r_f_a_c_t_o_r_y_._h_h>
│ │ │ │ +28
│ │ │ │ +29namespace _D_u_n_e {
│ │ │ │ +41 // forward declarations
│ │ │ │ +42 template