-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VERY GOOD: Imported grid from FortranOpenAcc!!!
A step towards unifying these two; introduced Grid_Mod from FortranOpenAcc project to here. On branch master modified: Demo_Mod/Fill_In.f90 modified: Demo_Mod/Main.f90 modified: Discretize_Mod/On_Sparse_Matrix.f90 modified: Grid_Mod.f90 new file: Grid_Mod/Cell_Number.f90 new file: Grid_Mod/Cells_I_J_K.f90 new file: Grid_Mod/Create_Grid.f90 new file: Grid_Mod/Save_Vtk_Debug.f90 modified: Solvers_Mod/Dense/Cholesky.f90 modified: Solvers_Mod/Dense/Gauss.f90 modified: Solvers_Mod/Dense/Ldlt.f90 modified: Solvers_Mod/Dense/Lu.f90 modified: Solvers_Mod/Incomplete/Cholesky.f90 modified: Solvers_Mod/Incomplete/Ldlt.f90 modified: Solvers_Mod/Incomplete/Lu.f90 modified: Solvers_Mod/Incomplete/Tflows_Ldlt.f90 modified: Solvers_Mod/Sparse/Cg_Cholesky_Prec.f90 modified: Solvers_Mod/Sparse/Cg_Diag_Prec.f90 modified: Solvers_Mod/Sparse/Cg_No_Prec.f90 modified: Solvers_Mod/Sparse/Cg_Tflows_Prec.f90 modified: Sparse_Mod/Create.f90 modified: makefile_explicit_dependencies
- Loading branch information
Showing
22 changed files
with
538 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
!==============================================================================! | ||
integer function Cell_Number(Grid, i, j, k) | ||
!------------------------------------------------------------------------------! | ||
!> Returns the cell number based on i, j and k indices in Cartesian grid | ||
!------------------------------------------------------------------------------! | ||
implicit none | ||
!---------------------------------[Arguments]----------------------------------! | ||
class(Grid_Type) :: Grid | ||
integer, intent(in) :: i, j, k | ||
!-----------------------------------[Locals]-----------------------------------! | ||
integer :: ni, nj, nk | ||
!==============================================================================! | ||
|
||
ni = Grid % nx | ||
nj = Grid % ny | ||
nk = Grid % nz | ||
|
||
Cell_Number = (k-1)*ni*nj + (j-1)*ni + i | ||
|
||
end function | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
!==============================================================================! | ||
subroutine Cells_I_J_K(Grid, c, i, j, k) | ||
!------------------------------------------------------------------------------! | ||
!> Returns the cell's indices i, j and k based on the cell number. | ||
!------------------------------------------------------------------------------! | ||
implicit none | ||
!---------------------------------[Arguments]----------------------------------! | ||
class(Grid_Type) :: Grid | ||
integer, intent(in) :: c | ||
integer, intent(out) :: i, j, k | ||
!==============================================================================! | ||
|
||
i = mod(c-1, Grid % nx) + 1 | ||
j = mod(c-i, Grid % nx * Grid % ny) / Grid % nx + 1 | ||
k = (c - i - (j-1) * Grid % nx) / (Grid % nx * Grid % ny) + 1 | ||
|
||
end subroutine |
Oops, something went wrong.