ISTLSolver.hpp
Go to the documentation of this file.
168 constexpr static std::size_t pressureIndex = GetPropType<TypeTag, Properties::Indices>::pressureSwitchIdx;
286 detail::findOverlapAndInterior(simulator_.vanguard().grid(), elemMapper, overlapRows_, interiorRows_);
297 const int interiorCellNum_ = detail::numMatrixRowsToUseInSolver(simulator_.vanguard().grid(), true);
310 detail::printLinearSolverParameters(parameters_, activeSolverNum_, prm_, simulator_.gridView().comm());
312 element_chunks_ = std::make_unique<ElementChunksType>(simulator_.vanguard().gridView(), Dune::Partitions::all, ThreadManager::maxThreads());
361 std::string type = prm_[activeSolverNum_].template get<std::string>("preconditioner.type", "paroverilu0");
380 } OPM_CATCH_AND_RETHROW_AS_CRITICAL_ERROR("This is likely due to a faulty linear solver JSON specification. Check for errors related to missing nodes.");
484 auto wellOp = std::make_unique<DomainWellModelAsLinearOperator<WellModel, Vector, Vector>>(simulator_.problem().wellModel());
493 std::function<Vector()> weightCalculator = this->getWeightsCalculator(prm_[activeSolverNum_], getMatrix(), pressureIndex);
555 std::string msg = "Invalid value: " + std::to_string(this->parameters_[activeSolverNum_].cpr_reuse_setup_)
579 std::transform(preconditionerType.begin(), preconditionerType.end(), preconditionerType.begin(), ::tolower);
Interface class adding the update() method to the preconditioner interface. Definition: PreconditionerWithUpdate.hpp:32 GetPropType< TypeTag, Properties::SparseMatrixAdapter > SparseMatrixAdapter Definition: AbstractISTLSolver.hpp:53 static bool checkConvergence(const Dune::InverseOperatorResult &result, const FlowLinearSolverParameters ¶meters) Check the convergence of the linear solver. Definition: AbstractISTLSolver.hpp:194 Definition: ISTLSolver.hpp:149 void getResidual(Vector &b) const override Get the residual vector. Definition: ISTLSolver.hpp:389 ElementChunks< GridView, Dune::Partitions::All > ElementChunksType Definition: ISTLSolver.hpp:166 ISTLSolver(const Simulator &simulator, const FlowLinearSolverParameters ¶meters, bool forceSerial=false) Definition: ISTLSolver.hpp:194 GetPropType< TypeTag, Properties::Scalar > Scalar Definition: ISTLSolver.hpp:152 static constexpr bool isIncompatibleWithCprw Definition: ISTLSolver.hpp:171 std::vector< FlowLinearSolverParameters > parameters_ Definition: ISTLSolver.hpp:660 void setActiveSolver(const int num) override Set the active solver by its index. Definition: ISTLSolver.hpp:320 GetPropType< TypeTag, Properties::GridView > GridView Definition: ISTLSolver.hpp:151 Dune::InverseOperator< Vector, Vector > AbstractSolverType Definition: ISTLSolver.hpp:161 void setMatrix(const SparseMatrixAdapter &) override Set the matrix for the solver. Definition: ISTLSolver.hpp:394 void prepare(const Matrix &M, Vector &b) override Prepare the solver with the given matrix and right-hand side vector. Definition: ISTLSolver.hpp:373 typename SparseMatrixAdapter::IstlMatrix Matrix Definition: ISTLSolver.hpp:158 GetPropType< TypeTag, Properties::WellModel > WellModel Definition: ISTLSolver.hpp:156 int numAvailableSolvers() const override Get the number of available solvers. Definition: ISTLSolver.hpp:332 void prepare(const SparseMatrixAdapter &M, Vector &b) override Prepare the solver with the given sparse matrix and right-hand side vector. Definition: ISTLSolver.hpp:368 Dune::OwnerOverlapCopyCommunication< int, int > CommunicationType Definition: ISTLSolver.hpp:174 int getSolveCount() const override Get the count of how many times the solver has been called. Definition: ISTLSolver.hpp:399 bool checkConvergence(const Dune::InverseOperatorResult &result) const Definition: ISTLSolver.hpp:465 static constexpr std::size_t pressureIndex Definition: ISTLSolver.hpp:168 GetPropType< TypeTag, Properties::ThreadManager > ThreadManager Definition: ISTLSolver.hpp:159 GetPropType< TypeTag, Properties::ElementMapper > ElementMapper Definition: ISTLSolver.hpp:165 GetPropType< TypeTag, Properties::GlobalEqVector > Vector Definition: ISTLSolver.hpp:154 const std::any & parallelInformation() const Definition: ISTLSolver.hpp:446 void initPrepare(const Matrix &M, Vector &b) Definition: ISTLSolver.hpp:337 std::vector< detail::FlexibleSolverInfo< Matrix, Vector, CommunicationType > > flexibleSolver_ Definition: ISTLSolver.hpp:652 void eraseMatrix() override Signals that the memory for the matrix internally in the solver could be erased. Definition: ISTLSolver.hpp:316 Dune::AssembledLinearOperator< Matrix, Vector, Vector > AbstractOperatorType Definition: ISTLSolver.hpp:162 std::function< Vector()> getWeightsCalculator(const PropertyTree &prm, const Matrix &matrix, std::size_t pressIndex) const Definition: ISTLSolver.hpp:569 Dune::AssembledLinearOperator< Matrix, Vector, Vector > AssembledLinearOperatorType Definition: ISTLSolver.hpp:180 GetPropType< TypeTag, Properties::Simulator > Simulator Definition: ISTLSolver.hpp:157 std::unique_ptr< ElementChunksType > element_chunks_ Definition: ISTLSolver.hpp:665 GetPropType< TypeTag, Properties::Indices > Indices Definition: ISTLSolver.hpp:155 Dune::OwnerOverlapCopyCommunication< int, int > Comm Definition: ISTLSolver.hpp:462 bool solve(Vector &x) override Solve the system of equations Ax = b. Definition: ISTLSolver.hpp:407 GetPropType< TypeTag, Properties::ElementContext > ElementContext Definition: ISTLSolver.hpp:160 void setResidual(Vector &) override Set the residual vector. Definition: ISTLSolver.hpp:384 const CommunicationType * comm() const override Get the communication object used by the solver. Definition: ISTLSolver.hpp:448 A sparse matrix interface backend for BCRSMatrix from dune-istl. Definition: istlsparsematrixadapter.hh:43 Definition: matrixblock.hh:227 T get(const std::string &key) const static unsigned maxThreads() Return the maximum number of threads of the current process. Definition: threadmanager.hpp:66 Definition: WellOperators.hpp:70 Declare the properties used by the infrastructure code of the finite volume discretizations. Defines the common properties required by the porous medium multi-phase models. void getTrueImpesWeightsAnalytic(int, Vector &weights, const ElementContext &elemCtx, const Model &model, const ElementChunksType &element_chunks) Definition: getQuasiImpesWeights.hpp:168 void getTrueImpesWeights(int pressureVarIndex, Vector &weights, const ElementContext &elemCtx, const Model &model, const ElementChunksType &element_chunks) Definition: getQuasiImpesWeights.hpp:104 void writeSystem(const SimulatorType &simulator, const MatrixType &matrix, const VectorType &rhs, const std::string &sysName, const Communicator *comm) Definition: WriteSystemMatrixHelper.hpp:196 Definition: blackoilmodel.hh:79 std::unique_ptr< Matrix > blockJacobiAdjacency(const Grid &grid, const std::vector< int > &cell_part, std::size_t nonzeroes, const std::vector< std::set< int > > &wellConnectionsGraph) void copyParValues(std::any ¶llelInformation, std::size_t size, Dune::OwnerOverlapCopyCommunication< int, int > &comm) Copy values in parallel. std::size_t numMatrixRowsToUseInSolver(const Grid &grid, bool ownerFirst) If ownerFirst=true, returns the number of interior cells in grid, else just numCells(). Definition: findOverlapRowsAndColumns.hpp:122 void makeOverlapRowsInvalid(Matrix &matrix, const std::vector< int > &overlapRows) void findOverlapAndInterior(const Grid &grid, const Mapper &mapper, std::vector< int > &overlapRows, std::vector< int > &interiorRows) Find the rows corresponding to overlap cells. Definition: findOverlapRowsAndColumns.hpp:92 void printLinearSolverParameters(const FlowLinearSolverParameters ¶meters, const VectorOrSingle &prm, const Comm &comm) Print the linear solver parameters to the log if requested. Definition: printlinearsolverparameter.hpp:61 Definition: blackoilboundaryratevector.hh:39 Dune::InverseOperatorResult InverseOperatorResult Definition: GpuBridge.hpp:32 typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(.... Definition: propertysystem.hh:233 std::string to_string(const ConvergenceReport::ReservoirFailure::Type t) PropertyTree setupPropertyTree(FlowLinearSolverParameters p, bool linearSolverMaxIterSet, bool linearSolverReductionSet) This file provides the infrastructure to retrieve run-time parameters. The Opm property system, traits with inheritance. This class carries all parameters for the NewtonIterationBlackoilInterleaved class. Definition: FlowLinearSolverParameters.hpp:97 static void registerParameters() void init(bool cprRequestedInDataFile) std::string linsolver_ Definition: FlowLinearSolverParameters.hpp:112 typename Linear::IstlSparseMatrixAdapter< Block > type Definition: ISTLSolver.hpp:87 The class that allows to manipulate sparse matrices. Definition: linalgproperties.hh:50 Definition: ISTLSolver.hpp:68 std::tuple< FlowIstlSolverParams > InheritsFrom Definition: ISTLSolver.hpp:69 Definition: FlowBaseProblemProperties.hpp:91 Definition: ISTLSolver.hpp:101 std::unique_ptr< AbstractSolverType > solver_ Definition: ISTLSolver.hpp:114 std::size_t interiorCellNum_ Definition: ISTLSolver.hpp:118 Dune::InverseOperator< Vector, Vector > AbstractSolverType Definition: ISTLSolver.hpp:102 AbstractPreconditionerType * pre_ Definition: ISTLSolver.hpp:117 Dune::AssembledLinearOperator< Matrix, Vector, Vector > AbstractOperatorType Definition: ISTLSolver.hpp:103 void create(const Matrix &matrix, bool parallel, const PropertyTree &prm, std::size_t pressureIndex, std::function< Vector()> weightCalculator, const bool forceSerial, Comm *comm) std::unique_ptr< LinearOperatorExtra< Vector, Vector > > wellOperator_ Definition: ISTLSolver.hpp:116 std::unique_ptr< AbstractOperatorType > op_ Definition: ISTLSolver.hpp:115 |