|
ISTLSolver.hpp
Go to the documentation of this file.
150 class ISTLSolver : public AbstractISTLSolver<GetPropType<TypeTag, Properties::SparseMatrixAdapter>,
171 constexpr static std::size_t pressureIndex = GetPropType<TypeTag, Properties::Indices>::pressureSwitchIdx;
297 detail::findOverlapAndInterior(simulator_.vanguard().grid(), elemMapper, overlapRows_, interiorRows_);
308 const int interiorCellNum_ = detail::numMatrixRowsToUseInSolver(simulator_.vanguard().grid(), true);
321 detail::printLinearSolverParameters(parameters_, activeSolverNum_, prm_, simulator_.gridView().comm());
323 element_chunks_ = std::make_unique<ElementChunksType>(simulator_.vanguard().gridView(), Dune::Partitions::all, ThreadManager::maxThreads());
372 std::string type = prm_[activeSolverNum_].template get<std::string>("preconditioner.type", "paroverilu0");
391 } 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.");
478 return AbstractISTLSolver<SparseMatrixAdapter, Vector>::checkConvergence(result, parameters_[activeSolverNum_]);
495 auto wellOp = std::make_unique<DomainWellModelAsLinearOperator<WellModel, Vector, Vector>>(simulator_.problem().wellModel());
504 std::function<Vector()> weightCalculator = this->getWeightsCalculator(prm_[activeSolverNum_], getMatrix(), pressureIndex);
565 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:34 static bool checkConvergence(const Dune::InverseOperatorResult &result, const FlowLinearSolverParameters ¶meters) Check the convergence of the linear solver. Definition: AbstractISTLSolver.hpp:192 Definition: ISTLSolver.hpp:152 void getResidual(Vector &b) const override Definition: ISTLSolver.hpp:400 ElementChunks< GridView, Dune::Partitions::All > ElementChunksType Definition: ISTLSolver.hpp:169 ISTLSolver(const Simulator &simulator, const FlowLinearSolverParameters ¶meters, bool forceSerial=false) Definition: ISTLSolver.hpp:197 GetPropType< TypeTag, Properties::Scalar > Scalar Definition: ISTLSolver.hpp:155 static constexpr bool isIncompatibleWithCprw Definition: ISTLSolver.hpp:174 std::vector< FlowLinearSolverParameters > parameters_ Definition: ISTLSolver.hpp:674 void setActiveSolver(const int num) override Set the active solver by its index. Definition: ISTLSolver.hpp:331 GetPropType< TypeTag, Properties::GridView > GridView Definition: ISTLSolver.hpp:154 Dune::InverseOperator< Vector, Vector > AbstractSolverType Definition: ISTLSolver.hpp:164 void setMatrix(const SparseMatrixAdapter &) override Definition: ISTLSolver.hpp:405 void prepare(const Matrix &M, Vector &b) override Definition: ISTLSolver.hpp:384 typename SparseMatrixAdapter::IstlMatrix Matrix Definition: ISTLSolver.hpp:161 GetPropType< TypeTag, Properties::WellModel > WellModel Definition: ISTLSolver.hpp:159 int numAvailableSolvers() const override Get the number of available solvers. Definition: ISTLSolver.hpp:343 GetPropType< TypeTag, Properties::SparseMatrixAdapter > SparseMatrixAdapter Definition: ISTLSolver.hpp:156 void prepare(const SparseMatrixAdapter &M, Vector &b) override Definition: ISTLSolver.hpp:379 Dune::OwnerOverlapCopyCommunication< int, int > CommunicationType Definition: ISTLSolver.hpp:177 int getSolveCount() const override Get the count of how many times the solver has been called. Definition: ISTLSolver.hpp:410 bool checkConvergence(const Dune::InverseOperatorResult &result) const Definition: ISTLSolver.hpp:476 static constexpr std::size_t pressureIndex Definition: ISTLSolver.hpp:171 GetPropType< TypeTag, Properties::ThreadManager > ThreadManager Definition: ISTLSolver.hpp:162 GetPropType< TypeTag, Properties::ElementMapper > ElementMapper Definition: ISTLSolver.hpp:168 GetPropType< TypeTag, Properties::GlobalEqVector > Vector Definition: ISTLSolver.hpp:157 const std::any & parallelInformation() const Definition: ISTLSolver.hpp:457 void initPrepare(const Matrix &M, Vector &b) Definition: ISTLSolver.hpp:348 std::vector< detail::FlexibleSolverInfo< Matrix, Vector, CommunicationType > > flexibleSolver_ Definition: ISTLSolver.hpp:666 void eraseMatrix() override Signals that the memory for the matrix internally in the solver could be erased. Definition: ISTLSolver.hpp:327 Dune::AssembledLinearOperator< Matrix, Vector, Vector > AbstractOperatorType Definition: ISTLSolver.hpp:165 std::function< Vector()> getWeightsCalculator(const PropertyTree &prm, const Matrix &matrix, std::size_t pressIndex) const Definition: ISTLSolver.hpp:579 Dune::AssembledLinearOperator< Matrix, Vector, Vector > AssembledLinearOperatorType Definition: ISTLSolver.hpp:183 GetPropType< TypeTag, Properties::Simulator > Simulator Definition: ISTLSolver.hpp:160 std::unique_ptr< ElementChunksType > element_chunks_ Definition: ISTLSolver.hpp:679 GetPropType< TypeTag, Properties::Indices > Indices Definition: ISTLSolver.hpp:158 Dune::OwnerOverlapCopyCommunication< int, int > Comm Definition: ISTLSolver.hpp:473 GetPropType< TypeTag, Properties::ElementContext > ElementContext Definition: ISTLSolver.hpp:163 const CommunicationType * comm() const override Get the communication object used by the solver. Definition: ISTLSolver.hpp:459 A sparse matrix interface backend for BCRSMatrix from dune-istl. Definition: istlsparsematrixadapter.hh:43 Definition: matrixblock.hh:229 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 getTrueImpesWeights(int pressureVarIndex, Vector &weights, const ElementContext &elemCtx, const Model &model, const ElementChunksType &element_chunks, bool enable_thread_parallel) Definition: getQuasiImpesWeights.hpp:161 void getTrueImpesWeightsAnalytic(int, Vector &weights, const ElementContext &elemCtx, const Model &model, const ElementChunksType &element_chunks, bool enable_thread_parallel) Definition: getQuasiImpesWeights.hpp:228 void writeSystem(const SimulatorType &simulator, const MatrixType &matrix, const VectorType &rhs, const std::string &sysName, const Communicator *comm) Definition: WriteSystemMatrixHelper.hpp:197 Definition: blackoilmodel.hh:80 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: blackoilbioeffectsmodules.hh:45 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 void extractParallelGridInformationToISTL(const Dune::CpGrid &grid, std::any &anyComm) Extracts the information about the data decomposition from the grid for dune-istl. std::string to_string(const ConvergenceReport::ReservoirFailure::Type t) PropertyTree setupPropertyTree(FlowLinearSolverParameters p, bool linearSolverMaxIterSet, bool linearSolverReductionSet, bool tpsaSetup=false) 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:98 static void registerParameters() void init(bool cprRequestedInDataFile) std::string linsolver_ Definition: FlowLinearSolverParameters.hpp:113 typename Linear::IstlSparseMatrixAdapter< Block > type Definition: ISTLSolver.hpp:89 The class that allows to manipulate sparse matrices. Definition: linalgproperties.hh:50 Definition: ISTLSolver.hpp:70 std::tuple< FlowIstlSolverParams > InheritsFrom Definition: ISTLSolver.hpp:71 Definition: FlowBaseProblemProperties.hpp:98 Definition: ISTLSolver.hpp:103 std::unique_ptr< AbstractSolverType > solver_ Definition: ISTLSolver.hpp:116 std::size_t interiorCellNum_ Definition: ISTLSolver.hpp:120 Dune::InverseOperator< Vector, Vector > AbstractSolverType Definition: ISTLSolver.hpp:104 AbstractPreconditionerType * pre_ Definition: ISTLSolver.hpp:119 Dune::AssembledLinearOperator< Matrix, Vector, Vector > AbstractOperatorType Definition: ISTLSolver.hpp:105 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:118 std::unique_ptr< AbstractOperatorType > op_ Definition: ISTLSolver.hpp:117 |