Skip to content

Commit cf69a2b

Browse files
authored
feat: add a warning when direct linear solver is used for > 100k dofs system (#3891)
1 parent 3fde58e commit cf69a2b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,11 @@ void PhysicsSolverBase::solveLinearSystem( DofManager const & dofManager,
13881388

13891389
matrix.setDofManager( &dofManager );
13901390

1391+
GEOS_WARNING_IF( isDirectSolver && dofManager.numGlobalDofs() > 100000,
1392+
"Direct solver used for large system ( > 100,000 DOFs ). "
1393+
"This may lead to high memory consumption and long computation times. "
1394+
"Consider using an iterative solver for better performance." );
1395+
13911396
// Apply physics-based scaling to the linear system if enabled
13921397
if( m_usePhysicsScaling )
13931398
{

0 commit comments

Comments
 (0)