ISTLSolver.hpp
Go to the documentation of this file.
164 constexpr static std::size_t pressureIndex = GetPropType<TypeTag, Properties::Indices>::pressureSwitchIdx;
282 detail::findOverlapAndInterior(simulator_.vanguard().grid(), elemMapper, overlapRows_, interiorRows_);
293 const int interiorCellNum_ = detail::numMatrixRowsToUseInSolver(simulator_.vanguard().grid(), true);
306 detail::printLinearSolverParameters(parameters_, activeSolverNum_, prm_, simulator_.gridView().comm());
354 if (isParallel() && prm_[activeSolverNum_].template get<std::string>("preconditioner.type") != "ParOverILU0") {
371 } 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.");
475 auto wellOp = std::make_unique<DomainWellModelAsLinearOperator<WellModel, Vector, Vector>>(simulator_.problem().wellModel());
484 std::function<Vector()> weightCalculator = this->getWeightsCalculator(prm_[activeSolverNum_], getMatrix(), pressureIndex);
546 std::string msg = "Invalid value: " + std::to_string(this->parameters_[activeSolverNum_].cpr_reuse_setup_)
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:147 void getResidual(Vector &b) const override Get the residual vector. Definition: ISTLSolver.hpp:380 ISTLSolver(const Simulator &simulator, const FlowLinearSolverParameters ¶meters, bool forceSerial=false) Definition: ISTLSolver.hpp:190 GetPropType< TypeTag, Properties::Scalar > Scalar Definition: ISTLSolver.hpp:150 static constexpr bool isIncompatibleWithCprw Definition: ISTLSolver.hpp:167 std::vector< FlowLinearSolverParameters > parameters_ Definition: ISTLSolver.hpp:645 void setActiveSolver(const int num) override Set the active solver by its index. Definition: ISTLSolver.hpp:314 GetPropType< TypeTag, Properties::GridView > GridView Definition: ISTLSolver.hpp:149 Dune::InverseOperator< Vector, Vector > AbstractSolverType Definition: ISTLSolver.hpp:159 void setMatrix(const SparseMatrixAdapter &) override Set the matrix for the solver. Definition: ISTLSolver.hpp:385 void prepare(const Matrix &M, Vector &b) override Prepare the solver with the given matrix and right-hand side vector. Definition: ISTLSolver.hpp:364 typename SparseMatrixAdapter::IstlMatrix Matrix Definition: ISTLSolver.hpp:156 GetPropType< TypeTag, Properties::WellModel > WellModel Definition: ISTLSolver.hpp:154 int numAvailableSolvers() const override Get the number of available solvers. Definition: ISTLSolver.hpp:326 void prepare(const SparseMatrixAdapter &M, Vector &b) override Prepare the solver with the given sparse matrix and right-hand side vector. Definition: ISTLSolver.hpp:359 Dune::OwnerOverlapCopyCommunication< int, int > CommunicationType Definition: ISTLSolver.hpp:170 int getSolveCount() const override Get the count of how many times the solver has been called. Definition: ISTLSolver.hpp:390 bool checkConvergence(const Dune::InverseOperatorResult &result) const Definition: ISTLSolver.hpp:456 static constexpr std::size_t pressureIndex Definition: ISTLSolver.hpp:164 GetPropType< TypeTag, Properties::ThreadManager > ThreadManager Definition: ISTLSolver.hpp:157 GetPropType< TypeTag, Properties::ElementMapper > ElementMapper Definition: ISTLSolver.hpp:163 GetPropType< TypeTag, Properties::GlobalEqVector > Vector Definition: ISTLSolver.hpp:152 const std::any & parallelInformation() const Definition: ISTLSolver.hpp:437 void initPrepare(const Matrix &M, Vector &b) Definition: ISTLSolver.hpp:331 std::vector< detail::FlexibleSolverInfo< Matrix, Vector, CommunicationType > > flexibleSolver_ Definition: ISTLSolver.hpp:637 void eraseMatrix() override Signals that the memory for the matrix internally in the solver could be erased. Definition: ISTLSolver.hpp:310 Dune::AssembledLinearOperator< Matrix, Vector, Vector > AbstractOperatorType Definition: ISTLSolver.hpp:160 std::function< Vector()> getWeightsCalculator(const PropertyTree &prm, const Matrix &matrix, std::size_t pressIndex) const Definition: ISTLSolver.hpp:560 Dune::AssembledLinearOperator< Matrix, Vector, Vector > AssembledLinearOperatorType Definition: ISTLSolver.hpp:176 GetPropType< TypeTag, Properties::Simulator > Simulator Definition: ISTLSolver.hpp:155 GetPropType< TypeTag, Properties::Indices > Indices Definition: ISTLSolver.hpp:153 Dune::OwnerOverlapCopyCommunication< int, int > Comm Definition: ISTLSolver.hpp:453 bool solve(Vector &x) override Solve the system of equations Ax = b. Definition: ISTLSolver.hpp:398 GetPropType< TypeTag, Properties::ElementContext > ElementContext Definition: ISTLSolver.hpp:158 void setResidual(Vector &) override Set the residual vector. Definition: ISTLSolver.hpp:375 const CommunicationType * comm() const override Get the communication object used by the solver. Definition: ISTLSolver.hpp:439 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 threadId() Return the index of the current OpenMP thread. 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 GridView &gridView, ElementContext &elemCtx, const Model &model, std::size_t threadId) Definition: getQuasiImpesWeights.hpp:137 void getTrueImpesWeights(int pressureVarIndex, Vector &weights, const GridView &gridView, ElementContext &elemCtx, const Model &model, std::size_t threadId) Definition: getQuasiImpesWeights.hpp:91 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:95 static void registerParameters() void init(bool cprRequestedInDataFile) std::string linsolver_ Definition: FlowLinearSolverParameters.hpp:110 typename Linear::IstlSparseMatrixAdapter< Block > type Definition: ISTLSolver.hpp:85 The class that allows to manipulate sparse matrices. Definition: linalgproperties.hh:50 Definition: ISTLSolver.hpp:66 std::tuple< FlowIstlSolverParams > InheritsFrom Definition: ISTLSolver.hpp:67 Definition: FlowBaseProblemProperties.hpp:87 Definition: ISTLSolver.hpp:99 std::unique_ptr< AbstractSolverType > solver_ Definition: ISTLSolver.hpp:112 std::size_t interiorCellNum_ Definition: ISTLSolver.hpp:116 Dune::InverseOperator< Vector, Vector > AbstractSolverType Definition: ISTLSolver.hpp:100 AbstractPreconditionerType * pre_ Definition: ISTLSolver.hpp:115 Dune::AssembledLinearOperator< Matrix, Vector, Vector > AbstractOperatorType Definition: ISTLSolver.hpp:101 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:114 std::unique_ptr< AbstractOperatorType > op_ Definition: ISTLSolver.hpp:113 |