Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ NonlinearSolverParameters::NonlinearSolverParameters( string const & name,
registerWrapper( viewKeysStruct::allowNonConvergedString(), &m_allowNonConverged ).
setApplyDefaultValue( 0 ).
setInputFlag( InputFlags::OPTIONAL ).
setDescription( "Allow non-converged solution to be accepted. "
"(i.e. exit from the Newton loop without achieving the desired tolerance)" );
setDescription( "When enabled, the simulation can continue even with a non-converged solution (residuals exceeding the tolerance during the "
"newton loops) at the deepest level of sub-timesteps (maxSubSteps).\n"
"When disabled, the simulation will stop with an error when no converged solution has been found at the last sub-step level." );

registerWrapper( viewKeysStruct::timeStepDecreaseIterLimString(), &m_timeStepDecreaseIterLimit ).
setApplyDefaultValue( 0.7 ).
Expand Down
16 changes: 13 additions & 3 deletions src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,19 @@ bool PhysicsSolverBase::execute( real64 const time_n,
getName(), subStep, dtAccepted, nextDt, dtRemaining ) );
}
}
GEOS_ERROR_IF( dtRemaining > 0.0,
"Maximum allowed number of sub-steps reached. Consider increasing maxSubSteps.",
getDataContext() );

if( m_nonlinearSolverParameters.m_allowNonConverged )
{
GEOS_WARNING_IF( dtRemaining > 0.0 && MpiWrapper::commRank() == 0,
"Maximum allowed number of sub-steps reached but non-converged solutions are allowed so the simulation will continue with potentially inaccurate results.",
getDataContext(), getWrapperDataContext( NonlinearSolverParameters::viewKeysStruct::allowNonConvergedString()) );
}
else
{
GEOS_ERROR_IF( dtRemaining > 0.0 && MpiWrapper::commRank() == 0,
"Maximum allowed number of sub-steps reached. Consider increasing maxSubSteps.",
getDataContext() );
}

// Decide what to do with the next Dt for the event running the solver.
m_nextDt = setNextDt( time_n + dt, nextDt, domain );
Expand Down
3 changes: 2 additions & 1 deletion src/coreComponents/schema/schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -2452,7 +2452,8 @@ Information output from lower logLevels is added with the desired log level
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="NonlinearSolverParametersType">
<!--allowNonConverged => Allow non-converged solution to be accepted. (i.e. exit from the Newton loop without achieving the desired tolerance)-->
<!--allowNonConverged => When enabled, the simulation can continue even with a non-converged solution (residuals exceeding the tolerance during the newton loops) at the deepest level of sub-timesteps (maxSubSteps).
When disabled, the simulation will stop with an error when no converged solution has been found at the last sub-step level.-->
<xsd:attribute name="allowNonConverged" type="integer" default="0" />
<!--configurationTolerance => Configuration tolerance-->
<xsd:attribute name="configurationTolerance" type="real64" default="0" />
Expand Down
4 changes: 2 additions & 2 deletions src/coreComponents/schema/schema.xsd.other
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ A field can represent a physical variable. (pressure, temperature, global compos
<!--fractureStencil => (no description available)-->
<xsd:attribute name="fractureStencil" type="geos_SurfaceElementStencil" />
<!--targetRegions => List of regions to build the stencil for-->
<xsd:attribute name="targetRegions" type="geos_mapBase_lt_string_cm_-geos_internal_StdVectorWrapper_lt_string_cm_-std_allocator_lt_string-_gt__cm_-true_gt__cm_-std_integral_constant_lt_bool_cm_-true_gt_-_gt_" />
<xsd:attribute name="targetRegions" type="geos_mapBase_lt_string_cm_-geos_internal_StdVectorWrapper_lt_string_cm_-std_allocator_lt_string-_gt__cm_-false_gt__cm_-std_integral_constant_lt_bool_cm_-true_gt_-_gt_" />
</xsd:complexType>
<xsd:complexType name="OutputsType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
Expand Down Expand Up @@ -1603,7 +1603,7 @@ A field can represent a physical variable. (pressure, temperature, global compos
<xsd:element name="MeshBodies" type="MeshBodiesType" />
</xsd:choice>
<!--Neighbors => (no description available)-->
<xsd:attribute name="Neighbors" type="geos_internal_StdVectorWrapper_lt_geos_NeighborCommunicator_cm_-std_allocator_lt_geos_NeighborCommunicator_gt__cm_-true_gt_" />
<xsd:attribute name="Neighbors" type="geos_internal_StdVectorWrapper_lt_geos_NeighborCommunicator_cm_-std_allocator_lt_geos_NeighborCommunicator_gt__cm_-false_gt_" />
<!--partitionManager => (no description available)-->
<xsd:attribute name="partitionManager" type="geos_PartitionBase" />
</xsd:complexType>
Expand Down
Loading