Skip to content

Commit

Permalink
fprettify
Browse files Browse the repository at this point in the history
  • Loading branch information
mjr-deltares committed Sep 18, 2023
1 parent b80b3d0 commit fc141be
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 59 deletions.
4 changes: 2 additions & 2 deletions src/Solution/ConvergenceSummary.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module ConvergenceSummaryModule
integer(I4B), pointer :: convnmod => null() !< number of models in the solution
integer(I4B), dimension(:), pointer :: model_bounds => null() !< the start and stop index of the models in the solution
integer(I4B), pointer :: nitermax => null() !< max. nr. of iterations in a timestep
integer(I4B), dimension(:), pointer, contiguous :: itinner => null() !< inner iteration number within each picard iteration
integer(I4B), dimension(:), pointer, contiguous :: itinner => null() !< inner iteration number within each picard iteration
integer(I4B), dimension(:), pointer, contiguous :: locdv => null() !< location of the maximum dependent-variable change in the solution
real(DP), dimension(:), pointer, contiguous :: dvmax => null() !< maximum dependent-variable change in the solution
integer(I4B), dimension(:), pointer, contiguous :: locdr => null() !< location of the maximum flow change in the solution
Expand Down Expand Up @@ -120,7 +120,7 @@ subroutine destroy(this)
! scalars
call mem_deallocate(this%convnmod)
call mem_deallocate(this%nitermax)

call mem_deallocate(this%locdr)
call mem_deallocate(this%drmax)
call mem_deallocate(this%locdv)
Expand Down
114 changes: 57 additions & 57 deletions src/Solution/LinearMethods/ImsLinearSolver.f90
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
module ImsLinearSolverModule
use KindModule, only: I4B, DP
use LinearSolverBaseModule
use MatrixBaseModule
use VectorBaseModule
use SparseMatrixModule
use ConvergenceSummaryModule
implicit none
private

public :: create_ims_solver

type, public, extends(LinearSolverBaseType) :: ImsLinearSolverType
contains
procedure :: initialize => ims_initialize
procedure :: print_summary => ims_print_summary
procedure :: solve => ims_solve
procedure :: get_result => ims_get_result
procedure :: destroy => ims_destroy

procedure :: create_matrix => ims_create_matrix
end type
use KindModule, only: I4B, DP
use LinearSolverBaseModule
use MatrixBaseModule
use VectorBaseModule
use SparseMatrixModule
use ConvergenceSummaryModule
implicit none
private

public :: create_ims_solver

type, public, extends(LinearSolverBaseType) :: ImsLinearSolverType
contains
procedure :: initialize => ims_initialize
procedure :: print_summary => ims_print_summary
procedure :: solve => ims_solve
procedure :: get_result => ims_get_result
procedure :: destroy => ims_destroy

procedure :: create_matrix => ims_create_matrix
end type

contains

function create_ims_solver() result(solver)
class(LinearSolverBaseType), pointer :: solver
! local
class(ImsLinearSolverType), pointer :: ims_solver
function create_ims_solver() result(solver)
class(LinearSolverBaseType), pointer :: solver
! local
class(ImsLinearSolverType), pointer :: ims_solver

allocate (ims_solver)
solver => ims_solver
allocate (ims_solver)
solver => ims_solver

end function create_ims_solver
end function create_ims_solver

subroutine ims_initialize(this, matrix, convergence_summary)
class(ImsLinearSolverType) :: this
class(MatrixBaseType), pointer :: matrix
type(ConvergenceSummaryType), pointer :: convergence_summary
end subroutine ims_initialize
subroutine ims_initialize(this, matrix, convergence_summary)
class(ImsLinearSolverType) :: this
class(MatrixBaseType), pointer :: matrix
type(ConvergenceSummaryType), pointer :: convergence_summary
end subroutine ims_initialize

subroutine ims_print_summary(this)
class(ImsLinearSolverType) :: this
end subroutine ims_print_summary
subroutine ims_print_summary(this)
class(ImsLinearSolverType) :: this
end subroutine ims_print_summary

subroutine ims_solve(this, kiter, rhs, x, cnvg_summary)
class(ImsLinearSolverType) :: this
integer(I4B) :: kiter
class(VectorBaseType), pointer :: rhs
class(VectorBaseType), pointer :: x
type(ConvergenceSummaryType) :: cnvg_summary
end subroutine ims_solve
subroutine ims_solve(this, kiter, rhs, x, cnvg_summary)
class(ImsLinearSolverType) :: this
integer(I4B) :: kiter
class(VectorBaseType), pointer :: rhs
class(VectorBaseType), pointer :: x
type(ConvergenceSummaryType) :: cnvg_summary
end subroutine ims_solve

subroutine ims_get_result(this)
class(ImsLinearSolverType) :: this
end subroutine ims_get_result
subroutine ims_get_result(this)
class(ImsLinearSolverType) :: this
end subroutine ims_get_result

subroutine ims_destroy(this)
class(ImsLinearSolverType) :: this
end subroutine ims_destroy
subroutine ims_destroy(this)
class(ImsLinearSolverType) :: this
end subroutine ims_destroy

function ims_create_matrix(this) result(matrix)
class(ImsLinearSolverType) :: this
class(MatrixBaseType), pointer :: matrix
! local
class(SparseMatrixType), pointer :: ims_matrix
function ims_create_matrix(this) result(matrix)
class(ImsLinearSolverType) :: this
class(MatrixBaseType), pointer :: matrix
! local
class(SparseMatrixType), pointer :: ims_matrix

allocate (ims_matrix)
matrix => ims_matrix
allocate (ims_matrix)
matrix => ims_matrix

end function ims_create_matrix
end function ims_create_matrix

end module ImsLinearSolverModule

0 comments on commit fc141be

Please sign in to comment.