Skip to content
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
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ OBJS := $(SRCDIR)/Binary_Tree.o \
$(SRCDIR)/Gmres_Poly_Data_Type.o \
$(SRCDIR)/AIR_Data_Type.o \
$(SRCDIR)/Matshell_Data_Type.o \
$(SRCDIR)/Matshell_PFLARE.o \
$(SRCDIR)/Sorting.o \
$(SRCDIR)/C_PETSc_Interfaces.o \
$(SRCDIR)/PCPFLAREINV_Interfaces.o \
Expand Down
9 changes: 4 additions & 5 deletions Makefile.deps
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ src/AIR_Data_Type_Routines.o : src/AIR_Data_Type_Routines.F90 src/FC_Smooth.o sr
src/AIR_MG_Setup.o : src/AIR_MG_Setup.F90 src/AIR_Operators_Setup.o src/Grid_Transfer.o src/C_PETSc_Interfaces.o src/FC_Smooth.o src/AIR_MG_Stats.o src/Timers.o src/Approx_Inverse_Setup.o src/Matshell_Data_Type.o src/CF_Splitting.o src/Constrain_Z_or_W.o
src/AIR_MG_Stats.o : src/AIR_MG_Stats.F90 src/Gmres_Poly.o src/AIR_Data_Type.o src/PETSc_Helper.o
src/AIR_Operators_Setup.o : src/AIR_Operators_Setup.F90 src/Grid_Transfer_Improve.o src/Grid_Transfer.o src/C_PETSc_Interfaces.o src/FC_Smooth.o src/Timers.o src/Approx_Inverse_Setup.o src/Constrain_Z_or_W.o
src/Approx_Inverse_Setup.o : src/Approx_Inverse_Setup.F90 src/Matshell_PFLARE.o src/Repartition.o src/SAI_Z.o src/Weighted_Jacobi.o src/Neumann_Poly.o src/Gmres_Poly_Newton.o src/Gmres_Poly.o
src/Approx_Inverse_Setup.o : src/Approx_Inverse_Setup.F90 src/Matshell_Data_Type.o src/Repartition.o src/SAI_Z.o src/Weighted_Jacobi.o src/Neumann_Poly.o src/Gmres_Poly_Newton.o src/Gmres_Poly.o
src/Binary_Tree.o : src/Binary_Tree.F90
src/C_Fortran_Bindings.o : src/C_Fortran_Bindings.F90 src/AIR_Data_Type_Routines.o src/PFLARE.o src/PCAIR_Shell.o src/AIR_MG_Setup.o
src/CF_Splitting.o : src/CF_Splitting.F90 src/PETSc_Helper.o src/Aggregation.o src/PMISR_DDC.o
src/Constrain_Z_or_W.o : src/Constrain_Z_or_W.F90 src/PETSc_Helper.o src/C_PETSc_Interfaces.o
src/C_PETSc_Interfaces.o : src/C_PETSc_Interfaces.F90
src/FC_Smooth.o : src/FC_Smooth.F90 src/Matshell_PFLARE.o src/PETSc_Helper.o src/AIR_Data_Type.o src/C_PETSc_Interfaces.o
src/FC_Smooth.o : src/FC_Smooth.F90 src/Matshell_Data_Type.o src/PETSc_Helper.o src/AIR_Data_Type.o src/C_PETSc_Interfaces.o
src/Gmres_Poly_Data_Type.o : src/Gmres_Poly_Data_Type.F90 src/TSQR.o
src/Gmres_Poly.o : src/Gmres_Poly.F90 src/PETSc_Helper.o src/Gmres_Poly_Data_Type.o src/TSQR.o src/Matshell_PFLARE.o src/C_PETSc_Interfaces.o src/Sorting.o
src/Gmres_Poly.o : src/Gmres_Poly.F90 src/PETSc_Helper.o src/Gmres_Poly_Data_Type.o src/TSQR.o src/Matshell_Data_Type.o src/C_PETSc_Interfaces.o src/Sorting.o
src/Gmres_Poly_Newton.o : src/Gmres_Poly_Newton.F90 src/C_PETSc_Interfaces.o src/Gmres_Poly.o
src/Grid_Transfer.o : src/Grid_Transfer.F90 src/PETSc_Helper.o src/C_PETSc_Interfaces.o
src/Grid_Transfer_Improve.o : src/Grid_Transfer_Improve.F90 src/PETSc_Helper.o src/Timers.o
src/Matshell_Data_Type.o : src/Matshell_Data_Type.F90 src/AIR_Data_Type.o
src/Matshell_PFLARE.o : src/Matshell_PFLARE.F90 src/Matshell_Data_Type.o
src/Neumann_Poly.o : src/Neumann_Poly.F90 src/C_PETSc_Interfaces.o src/Matshell_PFLARE.o src/Gmres_Poly.o
src/Neumann_Poly.o : src/Neumann_Poly.F90 src/C_PETSc_Interfaces.o src/Gmres_Poly.o
src/PCAIR_C_Fortran_Bindings.o : src/PCAIR_C_Fortran_Bindings.F90 src/PCAIR_Interfaces.o
src/PCAIR_Data_Type.o : src/PCAIR_Data_Type.F90 src/AIR_Data_Type.o
src/PCAIR_Interfaces.o : src/PCAIR_Interfaces.F90 src/PCAIR_Shell.o
Expand Down
2 changes: 1 addition & 1 deletion src/AIR_MG_Setup.F90
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ subroutine setup_air_pcmg(amat, pmat, air_data, pcmg_input)
type(tPC) :: pc_smoother_up, pc_smoother_down, pc_coarse_solver
type(tVec) :: temp_coarse_vec, rand_vec, sol_vec, temp_vec, diag_vec, diag_vec_aff
type(tIS) :: is_unchanged, is_full, temp_is
type(mat_ctxtype), pointer :: mat_ctx
type(mat_ctxtype), pointer :: mat_ctx => null()
PetscInt, parameter :: one=1, zero=0
type(tVec), dimension(:), allocatable :: left_null_vecs, right_null_vecs
type(tVec), dimension(:), allocatable :: left_null_vecs_c, right_null_vecs_c
Expand Down
4 changes: 2 additions & 2 deletions src/Approx_Inverse_Setup.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module approx_inverse_setup
use weighted_jacobi
use sai_z
use repartition
use matshell_pflare
use matshell_data_type

#include "petsc/finclude/petscmat.h"

Expand Down Expand Up @@ -368,7 +368,7 @@ subroutine reset_inverse_mat(matrix)

PetscErrorCode :: ierr
MatType:: mat_type
type(mat_ctxtype), pointer :: mat_ctx, mat_ctx_ida
type(mat_ctxtype), pointer :: mat_ctx=>null(), mat_ctx_ida=>null()
! ~~~~~~

if (.NOT. PetscObjectIsNull(matrix)) then
Expand Down
4 changes: 2 additions & 2 deletions src/FC_Smooth.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module fc_smooth
use c_petsc_interfaces
use air_data_type
use petsc_helper
use matshell_pflare
use matshell_data_type

#include "petsc/finclude/petscksp.h"
#include "petscconf.h"
Expand Down Expand Up @@ -405,7 +405,7 @@ subroutine mg_FC_point_richardson(pc, b, x, r, rtol, abstol, dtol, maxits, guess

type(tMat) :: mat, pmat
integer :: our_level, errorcode, i, smooth_its
type(mat_ctxtype), pointer :: mat_ctx
type(mat_ctxtype), pointer :: mat_ctx=>null()
type(air_multigrid_data), pointer :: air_data
PetscBool :: first_smooth

Expand Down
4 changes: 2 additions & 2 deletions src/Gmres_Poly.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module gmres_poly
use petscmat
use sorting
use c_petsc_interfaces
use matshell_pflare
use matshell_data_type
use tsqr
use gmres_poly_data_type
use petsc_helper
Expand Down Expand Up @@ -1410,7 +1410,7 @@ subroutine build_gmres_polynomial_inverse(matrix, poly_order, buffers, coefficie
PetscErrorCode :: ierr
MPIU_Comm :: MPI_COMM_MATRIX
type(tMat) :: mat_power, temp_mat
type(mat_ctxtype), pointer :: mat_ctx
type(mat_ctxtype), pointer :: mat_ctx=>null()
logical :: reuse_triggered

! ~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion src/Gmres_Poly_Newton.F90
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ subroutine build_gmres_polynomial_newton_inverse(matrix, poly_order, &
integer :: comm_size, errorcode
PetscErrorCode :: ierr
MPIU_Comm :: MPI_COMM_MATRIX
type(mat_ctxtype), pointer :: mat_ctx
type(mat_ctxtype), pointer :: mat_ctx=>null()

! ~~~~~~

Expand Down
37 changes: 0 additions & 37 deletions src/Matshell_PFLARE.F90

This file was deleted.

3 changes: 1 addition & 2 deletions src/Neumann_Poly.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module neumann_poly

use petscmat
use gmres_poly
use matshell_pflare
use c_petsc_interfaces

#include "petsc/finclude/petscmat.h"
Expand Down Expand Up @@ -127,7 +126,7 @@ subroutine calculate_and_build_neumann_polynomial_inverse(matrix, poly_order, &
PetscInt :: local_rows, local_cols, global_rows, global_cols
type(tMat) :: temp_mat
type(tVec) :: rhs_copy, diag_vec
type(mat_ctxtype), pointer :: mat_ctx, mat_ctx_ida
type(mat_ctxtype), pointer :: mat_ctx=>null(), mat_ctx_ida=>null()

! ~~~~~~

Expand Down
4 changes: 2 additions & 2 deletions src/PCAIR_C_Fortran_Bindings.F90
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ subroutine PCAIRGetPolyCoeffs_c(pc_ptr, petsc_level, which_inverse, &
integer :: our_level, errorcode
integer(PFLARE_PETSCINT_C_KIND) :: num_levels
type(tPC) :: pc_shell
type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()

! ~~~~~~~~

Expand Down Expand Up @@ -1751,7 +1751,7 @@ subroutine PCAIRSetPolyCoeffs_c(pc_ptr, petsc_level, which_inverse, &
integer :: our_level, errorcode
integer(PFLARE_PETSCINT_C_KIND) :: num_levels, i_loc, j_loc
type(tPC) :: pc_shell
type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()
real(PFLARE_PETSCREAL_C_KIND), pointer :: coeffs_c(:,:)

! ~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions src/PCAIR_Interfaces.F90
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ subroutine PCAIRGetOptions(pc, options)
type(air_options), pointer, intent(inout) :: options

type(tPC) :: pc_shell
type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()
PetscErrorCode :: ierr
! ~~~~~~~~

Expand Down Expand Up @@ -201,7 +201,7 @@ subroutine PCAIRGetNumLevels(pc, num_levels, ierr)
PetscErrorCode, intent(out) :: ierr

type(tPC) :: pc_shell
type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()
! ~~~~~~~~

! Get the underlying PCShell
Expand Down Expand Up @@ -231,7 +231,7 @@ subroutine PCAIRGetPolyCoeffs(pc, petsc_level, which_inverse, coeffs, ierr)
PetscErrorCode, intent(out) :: ierr

type(tPC) :: pc_shell
type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()
PetscInt :: num_levels
integer :: our_level, errorcode
! ~~~~~~~~
Expand Down Expand Up @@ -349,7 +349,7 @@ subroutine PCAIRSetPolyCoeffs(pc, petsc_level, which_inverse, coeffs, ierr)
PetscErrorCode, intent(out) :: ierr

type(tPC) :: pc_shell
type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()
PetscInt :: num_levels
integer :: our_level, errorcode
! ~~~~~~~~
Expand Down
32 changes: 5 additions & 27 deletions src/PCAIR_Shell.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,6 @@ module pcair_shell
implicit none

public

! You have to provide this to get the context type correct for PETSc
interface PCShellGetContext
subroutine PCShellGetContext(pc,pc_air_data,ierr)
use petsc
use pcair_data_type
type(tPC) :: pc
type(pc_air_multigrid_data), pointer :: pc_air_data
PetscErrorCode :: ierr
end subroutine PCShellGetContext
end interface PCShellGetContext

interface PCShellSetContext
subroutine PCShellSetContext(pc,pc_air_data,ierr)
use petsc
use pcair_data_type
type(tPC) :: pc
type(pc_air_multigrid_data) :: pc_air_data
PetscErrorCode :: ierr
end subroutine PCShellSetContext
end interface PCShellSetContext

contains

! -------------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -135,7 +113,7 @@ subroutine PCSetUp_AIR_Shell(pc, ierr)
PetscErrorCode, intent(inout) :: ierr

type(tMat) :: amat, pmat
type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()
integer :: structure_flag
PetscInt :: setupcalled

Expand Down Expand Up @@ -198,7 +176,7 @@ subroutine PCApply_AIR_Shell(pc, x, y, ierr)
type(tVec), intent(in) :: x, y
PetscErrorCode, intent(inout) :: ierr

type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()

! ~~~~~~

Expand All @@ -219,7 +197,7 @@ subroutine PCDestroy_AIR_Shell(pc, ierr)
type(tPC), intent(in) :: pc
PetscErrorCode, intent(inout) :: ierr

type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()

! ~~~~~~

Expand All @@ -242,7 +220,7 @@ subroutine PCReset_AIR_Shell(pc, ierr)
type(tPC), intent(in) :: pc
PetscErrorCode, intent(inout) :: ierr

type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()

! ~~~~~~

Expand All @@ -264,7 +242,7 @@ subroutine PCView_AIR_Shell(pc, viewer, ierr)
type(tPetscViewer), intent(in) :: viewer
PetscErrorCode, intent(inout) :: ierr

type(pc_air_multigrid_data), pointer :: pc_air_data
type(pc_air_multigrid_data), pointer :: pc_air_data=>null()

! ~~~~~~

Expand Down
Loading