Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restiction meets residual #606

Merged
merged 5 commits into from
Nov 7, 2024
Merged
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
3 changes: 3 additions & 0 deletions fem/src/MeshUtils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2970,7 +2970,10 @@ SUBROUTINE PrepareMesh( Model, Mesh, Parallel, Def_Dofs, mySolver )
CALL NonNodalElements()

IF( Parallel ) THEN
CALL Info(Caller,'Generating parallel communications for the non-nodal mesh',Level=20)
CALL ResetTimer('ParallelNonNodal')
CALL ParallelNonNodalElements()
CALL CheckTimer('ParallelNonNodal',Level=7,Delete=.TRUE.)
END IF

CALL EnlargeCoordinates( Mesh )
Expand Down
12 changes: 12 additions & 0 deletions fem/src/ModelDescription.F90
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,18 @@ RECURSIVE SUBROUTINE LoadInputFile( Model, InFileUnit, FileName, &
ELSE IF ( Section == 'run' ) THEN
IF ( PRESENT(runc) ) runc=.TRUE.
EXIT
ELSE IF ( Section == 'stop' ) THEN
CALL Warn(Caller,'Encountered "STOP" in sif, rest will be ignored!')
EXIT
ELSE IF( Section == '/*' ) THEN
CALL Info(Caller,'Starting comment section!')
DO WHILE( ReadAndTrim( InFileUnit, Section, Echo ) )
IF ( Section == '*/' ) THEN
CALL Info(Caller,'Finished comment section!')
EXIT
END IF
END DO
CYCLE
END IF

FreeNames = ( CheckAbort <= 0 )
Expand Down
25 changes: 10 additions & 15 deletions fem/src/SParIterSolver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,10 @@ END SUBROUTINE SolveTrilinos4
!
!------------------------------------------------------------------

CALL Info(Caller,'Copying Matrix values into SplittedMatrix',Level=20)
CALL ResetTimer('SplittedMatrix')


GT => SplittedMatrix % GlueTable
DO i = 1, SourceMatrix % NumberOfRows
GRow = ParallelInfo % GlobalDOFs(i)
Expand Down Expand Up @@ -2154,12 +2158,14 @@ END SUBROUTINE SolveTrilinos4
END DO

CALL GlueFinalize( SourceMatrix, SplittedMatrix, ParallelInfo )
CALL CheckTimer('SplittedMatrix',Level=7,Delete=.TRUE.)


!------------------------------------------------------------------
!
! Call the actual solver routine (based on older design)
!
!------------------------------------------------------------------
CALL Info(Caller,'Going into actual parallel solution',Level=20)

CALL Solve( SourceMatrix, SParMatrixDesc % SplittedMatrix, &
ParallelInfo, RHSVec, XVec, Solver, Errinfo )

Expand Down Expand Up @@ -2436,9 +2442,7 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &
PIGpntr => GlobalData

!----------------------------------------------------------------------
!
! Initialize Right-Hand-Side
!
!----------------------------------------------------------------------
ALLOCATE(TmpRHSVec(SplittedMatrix % InsideMatrix % NumberOfRows))
TmpRHSVec = 0
Expand Down Expand Up @@ -2495,12 +2499,10 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &

GlobalMatrix % Ematrix => SourceMatrix
GlobalMatrix % COMPLEX = SourceMatrix % COMPLEX

!----------------------------------------------------------------------
!
! Set up the preconditioner
!
!----------------------------------------------------------------------

IF (SplittedMatrix % InsideMatrix % NumberOFRows>0) THEN
! IF (SplittedMatrix % InsideMatrix % Diag(1)==0) THEN
DO i = 1, SplittedMatrix % InsideMatrix % NumberOfRows
Expand Down Expand Up @@ -2533,11 +2535,8 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &


!----------------------------------------------------------------------
!
! Call the main iterator routine
!
!----------------------------------------------------------------------

CM => SourceMatrix % ConstraintMatrix
IF (ASSOCIATED(CM)) THEN
ALLOCATE(SPerm(SourceMatrix % NumberOfRows)); SPerm=0
Expand Down Expand Up @@ -2576,9 +2575,7 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &
GlobalMatrix => SaveMatrix

!----------------------------------------------------------------------
!
! Collect the result
!
!----------------------------------------------------------------------
ALLOCATE( VecEPerNB( ParEnv % PEs ) )
VecEPerNB = 0
Expand Down Expand Up @@ -2609,12 +2606,10 @@ SUBROUTINE Solve( SourceMatrix, SplittedMatrix, ParallelInfo, &
END DO

CALL ExchangeResult( SourceMatrix,SplittedMatrix,ParallelInfo,XVec )

!----------------------------------------------------------------------
!
! Clean the work space
!
!----------------------------------------------------------------------

DEALLOCATE( TmpXVec, TmpRHSVec, VecEPerNB )
!----------------------------------------------------------------------
END SUBROUTINE Solve
Expand Down
Loading
Loading