GEOS
WellNewtonSolver.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_PHYSICSSOLVERS_WELLNEWTONSOLVER_HPP_
21 #define GEOS_PHYSICSSOLVERS_WELLNEWTONSOLVER_HPP_
22 
23 #include "codingUtilities/traits.hpp"
24 #include "common/DataTypes.hpp"
26 
31 #include "mesh/DomainPartition.hpp"
32 #include "mesh/MeshBody.hpp"
33 #include "physicsSolvers/NonlinearSolverParameters.hpp"
35 #include "physicsSolvers/SolverStatistics.hpp"
37 
39 #include "common/Timer.hpp"
40 #include <limits>
41 
42 namespace geos
43 {
44 
45 class DomainPartition;
46 
56 {
57 public:
58 
62  enum class StatsOutputType : integer
63  {
64  none, iteration, convergence, all
65  };
66 
72  explicit WellNewtonSolver( string const & name,
73  Group * const parent );
74 
79 
83  virtual ~WellNewtonSolver() override;
84 
88  WellNewtonSolver() = delete;
89 
93  WellNewtonSolver( WellNewtonSolver const & ) = delete;
94 
99 
104 
109  static string catalogName() { return "WellNewtonSolver"; }
110 
111 
112 
117  void generateMeshTargetsFromTargetRegions( Group const & meshBodies );
118 
119 
126 
131  ParallelMatrix const & getSystemMatrix() const { return m_matrix; }
132 
138 
143  ParallelVector const & getSystemRhs() const { return m_rhs; }
144 
150 
155  ParallelVector const & getSystemSolution() const { return m_solution; }
156 
162 
167  DofManager const & getDofManager() const { return m_dofManager; }
168 
174 
180 
181 
182  template< typename T >
183  void setupSystem( T & well, DomainPartition & domain,
184  std::string const & meshBodyName,
185  MeshLevel const & meshLevel,
186  WellElementRegion & wellElementRegion,
187  bool const setSparsity =true );
188 
189  template< typename T >
190  bool
191  solveNonlinearSystem( T & well, real64 const & time_n,
192  real64 const & stepDt,
193  integer const cycleNumber,
194  DomainPartition & domain,
195  MeshLevel & mesh,
196  ElementRegionManager & elemManager,
197  WellElementSubRegion & subRegion );
198 
199 
205  virtual void
206  setupDofs( DomainPartition const & domain,
207  DofManager & dofManager ) const;
208 
230  virtual void
232  DofManager & dofManager,
233  CRSMatrix< real64, globalIndex > & localMatrix,
234  SparsityPattern< globalIndex > & pattern );
235 
241  virtual std::unique_ptr< PreconditionerBase< LAInterface > >
243 
244 
253  void
254  debugOutputSystem( real64 const & time,
255  integer const cycleNumber,
256  integer const nonlinearIteration,
257  ParallelMatrix const & matrix,
258  ParallelVector const & rhs ) const;
259 
267  void
269  integer const cycleNumber,
270  integer const nonlinearIteration,
271  ParallelVector const & solution ) const;
272 
280  virtual void
282  real64 const & dt,
283  integer const cycleNumber,
284  integer const iteration );
285 
286 
287 
301  virtual void
302  solveLinearSystem( DofManager const & dofManager,
303  ParallelMatrix & matrix,
304  ParallelVector & rhs,
305  ParallelVector & solution );
306 
307 
308 
315  virtual Group * createChild( string const & childKey, string const & childName ) override;
316 
321 
327 
332  {
334  static constexpr char const * cflFactorString() { return "cflFactor"; }
335 
337  static constexpr char const * initialDtString() { return "initialDt"; }
338 
340  static constexpr char const * minDtIncreaseIntervalString() { return "minDtIncreaseInterval"; }
341 
343  static constexpr char const * discretizationString() { return "discretization"; }
344 
346  static constexpr char const * targetRegionsString() { return "targetRegions"; }
347 
349  static constexpr char const * writeLinearSystemString() { return "writeLinearSystem"; }
350 
352  static constexpr char const * usePhysicsScalingString() { return "usePhysicsScaling"; }
353 
355  static constexpr char const * allowNonConvergedLinearSolverSolutionString() { return "allowNonConvergedLinearSolverSolution"; }
356 
358  static constexpr char const * writeStatisticsCSVString() { return "writeStatistics"; }
359 
361  static constexpr char const * numTimestepsSinceLastDtCutString() { return "numTimestepsSinceLastDtCut"; }
362 
364  static constexpr char const * activeCoupledIterationsString() { return "activeCoupledIterations"; }
365  static constexpr char const * estimateWellSolutionString() { return "estimateWellSolution"; }
367  static constexpr char const * enableIsoThermalEstimatorString() { return "enableIsoThermalEstimator"; }
368  };
369 
374  {
376  static constexpr char const * linearSolverParametersString() { return "LinearSolverParameters"; }
377 
379  static constexpr char const * nonlinearSolverParametersString() { return "NonlinearSolverParameters"; }
380 
382  static constexpr char const * solverStatisticsString() { return "SolverStatistics"; }
383  };
384 
390 
391 
397 
398 
404  {
405  return m_linearSolverParameters.get();
406  }
407 
413  {
414  return m_linearSolverParameters.get();
415  }
416 
422  {
424  }
425 
431  {
433  }
434 
438  virtual void
440  { /* empty here, overriden in CoupledSolver */ }
441 
447  localIndex targetRegionIndex( string const & regionName ) const;
448 
453  string_array const & getTargetRegionNames() const {return m_targetRegionNames;}
454 
455 
456 
465  virtual bool registerCallback( void * func, const std::type_info & funcType ) final override;
466 
472  {
474  }
481  {
483  }
488  {
490  }
495  {
497  }
498 
504 
510 
511 
512 
517  bool detectOscillations() const;
518 
519 
524  void enableThermalEffects ( bool enable ) { m_thermalEffectsEnabled = enable; };
525 
530  bool thermalEffectsEnabled() const { return m_thermalEffectsEnabled; }
531 
536  bool isoThermalEstimatorEnabled() const { return m_enableIsoThermalEstimator; }
537 
538  bool getNumActiveCoupledIterations() const { return m_activeCoupledIterations; }
539 
540 protected:
541 
542  virtual void postInputInitialization() override;
543 
546 
547 
548 
551 
554 
557 
560 
563 
566 
569 
571  std::unique_ptr< LinearSolverBase< LAInterface > > m_linearSolver;
572 
574  std::unique_ptr< PreconditionerBase< LAInterface > > m_precond;
575 
578 
581 
584 
587 
590 
593 
596 
599 
602 
605 
606 private:
608  string_array m_targetRegionNames;
609 
612 
614  integer m_activeCoupledIterations;
615 
617  bool m_thermalEffectsEnabled;
618  integer m_enableIsoThermalEstimator;
619 
620 
627  void logEndOfCycleInformation( integer const cycleNumber,
628  integer const numOfSubSteps,
629  stdVector< real64 > const & subStepDts ) const;
630 };
631 
632 template< typename T >
633 void WellNewtonSolver::setupSystem( T & well, DomainPartition & domain,
634  std::string const & meshBodyName,
635  MeshLevel const & meshLevel,
636  WellElementRegion & wellElementRegion,
637  bool const setSparsity )
638 {
640 
642  string_array regions;
643 
644  meshTargets.clear();
645  regions.clear();
646  regions.emplace_back( wellElementRegion.getName() );
647  auto const key = std::make_pair( meshBodyName, meshLevel.getName() );
648  meshTargets[key] = std::move( regions );
649 
650  m_dofManager.setDomain( domain );
651  m_dofManager.addField( well.wellElementDofName(),
653  well.numDofPerWellElement(),
654  meshTargets );
655 
656  m_dofManager.addCoupling( well.wellElementDofName(),
657  well.wellElementDofName(),
659 
661  if( setSparsity )
662  {
664  setSparsityPattern( domain, m_dofManager, m_localMatrix, pattern );
665  m_localMatrix.assimilate< parallelDevicePolicy<> >( std::move( pattern ) );
666  }
667  m_localMatrix.setName( this->getName() + "/matrix" );
668 
669  m_rhs.setName( this->getName() + "/rhs" );
671 
672  m_solution.setName( this->getName() + "/solution" );
674 }
675 
676 
677 template< typename T >
678 bool WellNewtonSolver::solveNonlinearSystem( T & well, real64 const & time_n,
679  real64 const & stepDt,
680  integer const cycleNumber,
681  DomainPartition & domain,
682  MeshLevel & mesh,
683  ElementRegionManager & elemManager,
684  WellElementSubRegion & subRegion )
685 {
689 
690 // keep residual from previous iteration in case we need to do a line search
691 
692  integer newtonIter = 0;
693  real64 scaleFactor = 1.0;
694 
695  bool isNewtonConverged = false;
696 
697  for( newtonIter = 0; newtonIter < maxNewtonIter; ++newtonIter )
698  {
700  GEOS_LOG_LEVEL_RANK_0( logInfo::NonlinearSolver,
701  GEOS_FMT( " Well: {} Est Attempt: NewtonIter: {:2}", subRegion.getName(), stepDt, newtonIter ));
702 
703  {
704  Timer timer( m_timers.get_inserted( "assemble" ) );
705 
706 // We sync the nonlinear convergence history. The coupled solver parameters are the one being
707 // used. We want to propagate the info to subsolvers. It can be important for solvers that
708 // have special treatment for specific iterations.
710 
711 // zero out matrix/rhs before assembly
712  m_localMatrix.zero();
713  m_rhs.zero();
714 
715  arrayView1d< real64 > const localRhs = m_rhs.open();
716 
717 // call assemble to fill the matrix and the rhs
718  well.assembleSystem( time_n,
719  stepDt,
720  cycleNumber,
721  elemManager,
722  subRegion,
723  m_dofManager,
724  m_localMatrix.toViewConstSizes(),
725  localRhs );
726 
727 // apply boundary conditions to system
728  well.applyWellBoundaryConditions( time_n,
729  stepDt,
730  elemManager,
731  subRegion,
732  m_dofManager,
733  localRhs,
734  m_localMatrix.toViewConstSizes() );
735 
736  m_rhs.close();
737 
738  if( m_assemblyCallback )
739  {
740 // Make a copy of LA objects and ship off to the callback
741  array1d< real64 > localRhsCopy( m_rhs.localSize() );
742  localRhsCopy.setValues< parallelDevicePolicy<> >( m_rhs.values() );
743  m_assemblyCallback( m_localMatrix, std::move( localRhsCopy ) );
744  }
745  }
746 
747  // well.outputSingleWellDebug( time_n, stepDt, 0, newtonIter, 0,
748  // mesh, subRegion, dofManager, m_localMatrix.toViewConstSizes(), m_rhs.values() );
749  real64 residualNorm = 0;
750  {
751  Timer timer( m_timers.get_inserted( "convergence check" ) );
752 
753 // get residual norm
754  residualNorm = well.calculateWellResidualNorm( time_n, stepDt, m_nonlinearSolverParameters, subRegion, m_dofManager, m_rhs.values() );
756  GEOS_LOG_LEVEL_RANK_0( logInfo::Convergence,
757  GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) );
758  }
759  //auto iterInfo = currentIter( time_n, dt );
760  //outputSingleWellDebug( time_n, stepDt, 0, newtonIter, 0,
761  // mesh, subRegion, dofManager, m_localMatrix.toViewConstSizes(), m_rhs.values() );
762  // if the residual norm is less than the Newton tolerance we denote that we have
763  // converged and break from the Newton loop immediately.
764  if( residualNorm < newtonTol && newtonIter >= minNewtonIter )
765  {
766  isNewtonConverged = true;
767  break;
768  }
769 
770 // if the residual norm is above the max allowed residual norm, we break from
771 // the Newton loop to avoid crashes due to Newton divergence
773  {
774  string const maxAllowedResidualNormString = NonlinearSolverParameters::viewKeysStruct::maxAllowedResidualNormString();
776  GEOS_LOG_LEVEL_RANK_0( logInfo::Convergence,
777  GEOS_FMT( " The residual norm is above the {} of {}. Newton loop terminated.",
778  maxAllowedResidualNormString,
780  isNewtonConverged = false;
781  break;
782  }
783 
784  {
785  Timer timer( m_timers.get_inserted( "linear solver total" ) );
786 
787 // TODO: Trilinos currently requires this, re-evaluate after moving to Tpetra-based solvers
788  if( m_precond )
789  {
790  m_precond->clear();
791  }
792 
793  {
794  Timer timer_setup( m_timers.get_inserted( "linear solver create" ) );
795 
796 // Compose parallel LA matrix/rhs out of local LA matrix/rhs
797 //
798  m_matrix.create( m_localMatrix.toViewConst(), m_dofManager.numLocalDofs(), MPI_COMM_GEOS );
799  }
800 
801 // Output the linear system matrix/rhs for debugging purposes
802  //string tag = "_"+std::to_string( my_ctime ); tjb
803  //debugOutputSystem( time_n, cycleNumber, newtonIter, m_matrix, m_rhs, tag );
804 
805  debugOutputSystem( time_n, cycleNumber, newtonIter, m_matrix, m_rhs );
806 // Solve the linear system
808 
809 // Increment the solver statistics for reporting purposes
811 
812 // Output the linear system solution for debugging purposes
813  debugOutputSolution( time_n, cycleNumber, newtonIter, m_solution );
814  //debugOutputSolution( time_n, cycleNumber, newtonIter, m_solution, tag );
815  }
816 
817  {
818  Timer timer( m_timers.get_inserted( "apply solution" ) );
819 
820 // Compute the scaling factor for the Newton update
821  scaleFactor = well.scalingForWellSystemSolution( subRegion, m_dofManager, m_solution.values() );
823  GEOS_LOG_LEVEL_RANK_0( logInfo::Solution,
824  GEOS_FMT( " {}: Global solution scaling factor = {}", getName(), scaleFactor ) );
825 
826  real64 minPressure = 0.0, minDensity = 0.0, minTotalDensity = 0.0;
827  bool const solutionLogActive = isLogLevelActive< logInfo::Solution >( getLogLevel() );
828  bool const solutionDetailsLogActive = isLogLevelActive< logInfo::SolutionDetails >( getLogLevel() );
829  ElementsReporterBuffer rankNegPressureIds{ solutionLogActive, solutionDetailsLogActive ? 16 : 0 };
830  ElementsReporterBuffer rankNegDensityIds{ solutionLogActive, solutionDetailsLogActive ? 16 : 0 };
831  // output only total density sum, not cell details
832  ElementsReporterBuffer rankTotalNegDensityIds{ solutionLogActive, 0 };
833  if( !well.checkWellSystemSolution( subRegion, m_dofManager, m_solution.values(), scaleFactor, minPressure, minDensity, minTotalDensity, rankNegPressureIds, rankNegDensityIds,
834  rankTotalNegDensityIds ) )
835  {
836 // TODO try chopping (similar to line search)
838  GEOS_LOG_RANK_0( GEOS_FMT( " {}: Solution check failed. Newton loop terminated.", getName()) );
839  break;
840  }
841 
842 // apply the system solution to the fields/variables
843  well.applyWellSystemSolution( m_dofManager, m_solution.values(), scaleFactor, stepDt, domain, mesh, subRegion );
844  }
845 
846  {
847  Timer timer( m_timers.get_inserted( "update state" ) );
848 
849  // update derived variables (constitutive models)
850  well.updateWellState( domain.getMeshBody( mesh.getParent().getParent().getName() ), elemManager, subRegion );
851  }
852 
853  }
854  return isNewtonConverged;
855 }
856 
857 
862  "none",
863  "iteration",
864  "convergence",
865  "all" );
866 
867 } // namespace geos
868 
869 
870 #endif /* GEOS_PHYSICSSOLVERS_WELLNEWTONSOLVER_HPP_ */
#define GEOS_LOG_RANK_0(msg)
Log a message on screen on rank 0.
Definition: Logger.hpp:99
#define GEOS_MARK_FUNCTION
Mark function with both Caliper and NVTX if enabled.
Class containing convergence information given a time-step.
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
Definition: DofManager.hpp:45
void addField(string const &fieldName, FieldLocation location, integer components, stdVector< FieldSupport > const &regions={})
Add a new field and enumerate its degrees-of-freedom.
void addCoupling(string const &rowFieldName, string const &colFieldName, Connector connectivity, stdVector< FieldSupport > const &regions={}, bool symmetric=true)
Add coupling between two fields.
void reorderByRank()
Finish populating fields and apply appropriate dof renumbering.
localIndex numLocalDofs(string const &fieldName) const
@ Node
connectivity is node (like in finite volumes MPFA)
void setDomain(DomainPartition &domain)
Assign a domain.
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
Class containing solver iterations data for a time-step.
void updateNonlinearIteration(integer const numLinearIterations)
Tell the solverStatistics that we have done a newton iteration.
Linear solver parameters with Group capabilities.
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:42
real64 m_newtonTol
The tolerance for the nonlinear convergence check.
integer m_maxIterNewton
The maximum number of nonlinear iterations that are allowed.
real64 m_maxAllowedResidualNorm
The maximum value of residual norm that we allow (otherwise, we cut the time step)
integer m_minIterNewton
The minimum number of nonlinear iterations that may be applied.
This class records solver statistics for each time step.
IterationsStatistics m_iterationsStats
Contain iteration data given a time step.
ConvergenceStatistics m_convergenceStats
Contain convergence data given a time step.
This class specializes the element region for the case of a well. This class is also in charge of sta...
This class describes a collection of local well elements and perforations.
Base class for all physics solvers.
static CatalogInterface::CatalogType & getCatalog()
Get the singleton catalog for WellNewtonSolver.
StatsOutputType
Type of the stat output.
ParallelMatrix & getSystemMatrix()
Getter for system matrix.
WellNewtonSolver & operator=(WellNewtonSolver const &)=delete
Deleted copy assignment operator.
virtual void setupDofs(DomainPartition const &domain, DofManager &dofManager) const
Populate degree-of-freedom manager with fields relevant to this solver.
std::function< void(CRSMatrix< real64, globalIndex >, array1d< real64 >) > m_assemblyCallback
Callback function for assembly step.
void debugOutputSystem(real64 const &time, integer const cycleNumber, integer const nonlinearIteration, ParallelMatrix const &matrix, ParallelVector const &rhs) const
Output the assembled linear system for debug purposes.
ParallelVector m_scaling
Diagonal scaling vector D (Ahat = D * A * D, bhat = D * b, x = D * xhat)
bool thermalEffectsEnabled() const
Are thermal effects enabled.
virtual ~WellNewtonSolver() override
Destructor for WellNewtonSolver.
LinearSolverParametersInput m_linearSolverParameters
Linear solver parameters.
WellNewtonSolver(WellNewtonSolver const &)=delete
Deleted copy constructor.
virtual void updateAndWriteConvergenceStep(real64 const &time_n, real64 const &dt, integer const cycleNumber, integer const iteration)
Update the convergence information and write then into a CSV file.
virtual void synchronizeNonlinearSolverParameters()
synchronize the nonlinear solver parameters.
virtual Group * createChild(string const &childKey, string const &childName) override
creates a child group of of this WellNewtonSolver instantiation
void generateMeshTargetsFromTargetRegions(Group const &meshBodies)
Generate mesh targets from target regions.
ConvergenceStatistics & getConvergenceStats()
Timestamp m_systemSetupTimestamp
Timestamp of the last call to setup system.
WellNewtonSolver & operator=(WellNewtonSolver &&)=delete
Deleted move assignment operator.
stdMap< std::string, std::chrono::system_clock::duration > m_timers
Timers for the aggregate profiling of the solver.
void debugOutputSolution(real64 const &time, integer const cycleNumber, integer const nonlinearIteration, ParallelVector const &solution) const
Output the linear system solution for debug purposes.
IterationsStatistics const & getIterationStats() const
std::unique_ptr< LinearSolverBase< LAInterface > > m_linearSolver
Custom linear solver for the "native" solver type.
localIndex targetRegionIndex(string const &regionName) const
Get position of a given region within solver's target region list.
ArrayOfArrays< real64 > m_solutionHistory
History of the solution vector, used for oscillation detection.
static string catalogName()
name of the node manager in the object catalog
Timestamp getSystemSetupTimestamp() const
getter for the timestamp of the system setup
WellNewtonSolver()=delete
Deleted constructor.
ParallelVector m_rhs
System right-hand side vector.
LinearSolverParameters const & getLinearSolverParameters() const
const accessor for the linear solver parameters.
DofManager const & getDofManager() const
Getter for degree-of-freedom manager.
ParallelMatrix const & getSystemMatrix() const
Getter for system rhs vector.
IterationsStatistics & getIterationStats()
NonlinearSolverParameters m_nonlinearSolverParameters
Nonlinear solver parameters.
NonlinearSolverParameters & getNonlinearSolverParameters()
accessor for the nonlinear solver parameters.
WellNewtonSolver(WellNewtonSolver &&)=default
Move constructor for WellNewtonSolver.
ConvergenceStatistics const & getConvergenceStats() const
ParallelVector & getSystemSolution()
Getter for system solution vector.
integer m_usePhysicsScaling
Flag to decide whether to apply physics-based scaling to the linear system.
StatsOutputType m_writeStatisticsCSV
Parameter for outputing statistics information.
virtual std::unique_ptr< PreconditionerBase< LAInterface > > createPreconditioner(DomainPartition &domain) const
Create a preconditioner for this solver's linear system.
void enableThermalEffects(bool enable)
Set thermal effects enable.
SolverStatistics & getSolverStatistics()
accessor for the solver statistics.
ParallelVector & getSystemRhs()
Getter for system rhs vector.
CRSMatrix< real64, globalIndex > m_localMatrix
Local system matrix and rhs.
SolverStatistics const & getSolverStatistics() const
const accessor for the solver statistics.
LinearSolverResult m_linearSolverResult
Result of the last linear solver.
virtual bool registerCallback(void *func, const std::type_info &funcType) final override
function to set the value of m_assemblyCallback
string_array const & getTargetRegionNames() const
return the list of target regions
std::unique_ptr< PreconditionerBase< LAInterface > > m_precond
Custom preconditioner for the "native" iterative solver.
SolverStatistics m_solverStatistics
Solver statistics.
virtual void postInputInitialization() override
integer m_writeLinearSystem
flag for debug output of matrix, rhs, and solution
CRSMatrix< real64, globalIndex > & getLocalMatrix()
Getter for local matrix.
virtual void solveLinearSystem(DofManager const &dofManager, ParallelMatrix &matrix, ParallelVector &rhs, ParallelVector &solution)
function to apply a linear system solver to the assembled system.
CRSMatrixView< real64 const, globalIndex const > getLocalMatrix() const
Getter for local matrix.
integer m_allowNonConvergedLinearSolverSolution
behavior in case of linear solver failure
ParallelVector m_solution
System solution vector.
NonlinearSolverParameters const & getNonlinearSolverParameters() const
const accessor for the nonlinear solver parameters.
bool detectOscillations() const
Detect oscillations in the solution.
virtual void setSparsityPattern(DomainPartition &domain, DofManager &dofManager, CRSMatrix< real64, globalIndex > &localMatrix, SparsityPattern< globalIndex > &pattern)
Set up the linear system (DOF indices and sparsity patterns)
DofManager m_dofManager
Data structure to handle degrees of freedom.
DofManager & getDofManager()
Getter for degree-of-freedom manager.
ParallelMatrix m_matrix
System matrix.
bool isoThermalEstimatorEnabled() const
Is isoThermalEstimator enabled.
ParallelVector const & getSystemRhs() const
Getter for system rhs vector.
WellNewtonSolver(string const &name, Group *const parent)
Constructor for WellNewtonSolver.
LinearSolverParameters & getLinearSolverParameters()
accessor for the linear solver parameters.
ParallelVector const & getSystemSolution() const
Getter for system solution vector.
void setSystemSetupTimestamp(Timestamp timestamp)
set the timestamp of the system setup
This class provides the base class/interface for the catalog value objects.
stdUnorderedMap< std::string, std::unique_ptr< CatalogInterface< BASETYPE, ARGS... > > > CatalogType
This is the type that will be used for the catalog. The catalog is actually instantiated in the BASET...
string const & getName() const
Get group name.
Definition: Group.hpp:1329
integer getLogLevel() const
Definition: Group.hpp:1508
Base template for ordered and unordered maps.
#define GEOS_LOG_LEVEL_RANK_0(logInfoStruct, msg)
Output messages (only on rank 0) based on current Group's log level.
stdVector< string > string_array
A 1-dimensional array of geos::string types.
Definition: DataTypes.hpp:361
unsigned long long int Timestamp
Timestamp type (used to perform actions such a sparsity pattern computation after mesh modifications)
Definition: DataTypes.hpp:126
int MPI_COMM_GEOS
Global MPI communicator used by GEOSX.
LvArray::CRSMatrix< T, COL_INDEX, INDEX_TYPE, LvArray::ChaiBuffer > CRSMatrix
Alias for CRS Matrix class.
Definition: DataTypes.hpp:305
std::string string
String type.
Definition: DataTypes.hpp:90
LvArray::SparsityPattern< COL_INDEX, INDEX_TYPE, LvArray::ChaiBuffer > SparsityPattern
Alias for Sparsity pattern class.
Definition: DataTypes.hpp:297
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:84
@ Elem
location is element (like pressure in finite volumes)
LvArray::CRSMatrixView< T, COL_INDEX, INDEX_TYPE const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
Definition: DataTypes.hpp:309
internal::StdMapWrapper< std::map< Key, T, Compare, Allocator >, USE_STD_CONTAINER_BOUNDS_CHECKING > stdMap
LAInterface::ParallelMatrix ParallelMatrix
Alias for ParallelMatrix.
int integer
Signed integer type.
Definition: DataTypes.hpp:81
Array< T, 1 > array1d
Alias for 1D array.
Definition: DataTypes.hpp:175
LvArray::ArrayOfArrays< T, INDEX_TYPE, LvArray::ChaiBuffer > ArrayOfArrays
Array of variable-sized arrays. See LvArray::ArrayOfArrays for details.
Definition: DataTypes.hpp:281
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "richardson", "preconditioner")
Declare strings associated with enumeration values.
LAInterface::ParallelVector ParallelVector
Alias for ParallelVector.
internal::StdVectorWrapper< T, Allocator, USE_STD_CONTAINER_BOUNDS_CHECKING > stdVector
Set of parameters for a linear solver or preconditioner.
Results/stats of a linear solve.
integer numIterations
Number of solver iterations performed.
Structure to hold scoped key names.
static constexpr char const * nonlinearSolverParametersString()
static constexpr char const * linearSolverParametersString()
static constexpr char const * solverStatisticsString()
Structure to hold scoped key names.
static constexpr char const * targetRegionsString()
static constexpr char const * discretizationString()
static constexpr char const * enableIsoThermalEstimatorString()
string key for the enable iso thermal estimator flag
static constexpr char const * usePhysicsScalingString()
static constexpr char const * writeLinearSystemString()
static constexpr char const * activeCoupledIterationsString()
string key for the esitmate well solution flag
static constexpr char const * writeStatisticsCSVString()
static constexpr char const * minDtIncreaseIntervalString()
static constexpr char const * cflFactorString()
static constexpr char const * allowNonConvergedLinearSolverSolutionString()
static constexpr char const * initialDtString()
static constexpr char const * numTimestepsSinceLastDtCutString()