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

Sparse #28

Merged
merged 10 commits into from
Feb 11, 2024
Merged
1 change: 0 additions & 1 deletion Sources/metrics.f90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ MODULE metrics
!-------------------------------------------------------------------------------
SUBROUTINE init_metric_elements()
USE timer_mod, ONLY: init_timers
USE shared_data, ONLY: torflux, polflux
USE island_params, hs=>hs_i, ns=>ns_i

IMPLICIT NONE
Expand Down
2 changes: 1 addition & 1 deletion Sources/pchelms.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MODULE pchelms
asubsmncf, asubumnsf, asubvmnsf
USE quantities, ONLY: fsupsmnsf, fsupumncf, fsupvmncf, &
fsupsmncf, fsupumnsf, fsupvmnsf
USE shared_data, ONLY: torflux, polflux, nsp, r1_i, z1_i, ru_i, &
USE shared_data, ONLY: nsp, r1_i, z1_i, ru_i, &
zu_i, rv_i, zv_i, lcolscale
USE descriptor_mod, ONLY: iam, nprocs, lscalapack, INHESSIAN, SIESTA_COMM
USE v3_utilities, ONLY: assert
Expand Down
6 changes: 6 additions & 0 deletions Sources/quantities.f90
Original file line number Diff line number Diff line change
Expand Up @@ -857,9 +857,15 @@ SUBROUTINE dealloc_quantities
IF (ALLOCATED(ksupsijf0)) THEN
DEALLOCATE(ksupsijf0, ksupuijf0, ksupvijf0)
END IF
IF (ALLOCATED(ksupsijf)) THEN
DEALLOCATE(ksupsijf, ksupuijf, ksupvijf)
END IF
IF (ALLOCATED(bsubsijf)) THEN
DEALLOCATE(bsubsijf, bsubuijf, bsubvijf)
END IF
IF (ALLOCATED(bsupsijf)) THEN
DEALLOCATE(bsupsijf, bsupuijf, bsupvijf)
END IF

! Asymmetric quantities.
IF (lasym) THEN
Expand Down
92 changes: 46 additions & 46 deletions Sources/restart_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -53,105 +53,105 @@ MODULE restart_mod
CHARACTER (len=*), PARAMETER :: vn_tor_modes = 'tor_modes'

!> Name for the restart file jbsupss.
CHARACTER (len=*), PARAMETER :: vn_jbsupss = 'JBsupssh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jbsupss = 'JBsupssh_m_n_r_'
!> Name for the restart file jbsupuc.
CHARACTER (len=*), PARAMETER :: vn_jbsupuc = 'JBsupuch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jbsupuc = 'JBsupuch_m_n_r_'
!> Name for the restart file jbsupvc.
CHARACTER (len=*), PARAMETER :: vn_jbsupvc = 'JBsupvch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jbsupvc = 'JBsupvch_m_n_r_'
!> Name for the restart file jbsupsc.
CHARACTER (len=*), PARAMETER :: vn_jbsupsc = 'JBsupsch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jbsupsc = 'JBsupsch_m_n_r_'
!> Name for the restart file jbsupus.
CHARACTER (len=*), PARAMETER :: vn_jbsupus = 'JBsupush(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jbsupus = 'JBsupush_m_n_r_'
!> Name for the restart file jbsupus.
CHARACTER (len=*), PARAMETER :: vn_jbsupvs = 'JBsupvsh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jbsupvs = 'JBsupvsh_m_n_r_'
!> Name for the restart file jpresc.
CHARACTER (len=*), PARAMETER :: vn_jpresc = 'jpresch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jpresc = 'jpresch_m_n_r_'
!> Name for the restart file jpress.
CHARACTER (len=*), PARAMETER :: vn_jpress = 'jpressh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jpress = 'jpressh_m_n_r_'

!> Name for the restart file rmnc.
CHARACTER (len=*), PARAMETER :: vn_rmnc = 'rmnc(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_rmnc = 'rmnc_m_n_r_'
!> Name for the restart file rmns.
CHARACTER (len=*), PARAMETER :: vn_rmns = 'rmns(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_rmns = 'rmns_m_n_r_'
!> Name for the restart file zmnc.
CHARACTER (len=*), PARAMETER :: vn_zmnc = 'zmnc(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_zmnc = 'zmnc_m_n_r_'
!> Name for the restart file zmns.
CHARACTER (len=*), PARAMETER :: vn_zmns = 'zmns(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_zmns = 'zmns_m_n_r_'

!> Name for the restart file chipf.
CHARACTER (len=*), PARAMETER :: vn_chipf = 'chipf(r)'
!> Name for the restart file phipf.
CHARACTER (len=*), PARAMETER :: vn_phipf = 'phipf(r)'

!> Name for the restart file bsupsmns.
CHARACTER (len=*), PARAMETER :: vn_bsupsmns = 'bsupsmnsh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsupsmns = 'bsupsmnsh_m_n_r_'
!> Name for the restart file bsupsmnc.
CHARACTER (len=*), PARAMETER :: vn_bsupsmnc = 'bsupsmnch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsupsmnc = 'bsupsmnch_m_n_r_'
!> Name for the restart file bsupumns.
CHARACTER (len=*), PARAMETER :: vn_bsupumns = 'bsupumnsh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsupumns = 'bsupumnsh_m_n_r_'
!> Name for the restart file bsupumnc.
CHARACTER (len=*), PARAMETER :: vn_bsupumnc = 'bsupumnch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsupumnc = 'bsupumnch_m_n_r_'
!> Name for the restart file bsupvmns.
CHARACTER (len=*), PARAMETER :: vn_bsupvmns = 'bsupvmnsh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsupvmns = 'bsupvmnsh_m_n_r_'
!> Name for the restart file bsupvmnc.
CHARACTER (len=*), PARAMETER :: vn_bsupvmnc = 'bsupvmnch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsupvmnc = 'bsupvmnch_m_n_r_'
!> Name for the restart file bsubsmns.
CHARACTER (len=*), PARAMETER :: vn_bsubsmns = 'bsubsmnsh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsubsmns = 'bsubsmnsh_m_n_r_'
!> Name for the restart file bsubsmnc.
CHARACTER (len=*), PARAMETER :: vn_bsubsmnc = 'bsubsmnch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsubsmnc = 'bsubsmnch_m_n_r_'
!> Name for the restart file bsubumns.
CHARACTER (len=*), PARAMETER :: vn_bsubumns = 'bsubumnsh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsubumns = 'bsubumnsh_m_n_r_'
!> Name for the restart file bsubumnc.
CHARACTER (len=*), PARAMETER :: vn_bsubumnc = 'bsubumnch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsubumnc = 'bsubumnch_m_n_r_'
!> Name for the restart file bsubvmns.
CHARACTER (len=*), PARAMETER :: vn_bsubvmns = 'bsubvmnsh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsubvmns = 'bsubvmnsh_m_n_r_'
!> Name for the restart file bsubvmnc.
CHARACTER (len=*), PARAMETER :: vn_bsubvmnc = 'bsubvmnch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_bsubvmnc = 'bsubvmnch_m_n_r_'
!> Name for the restart file pmns.
CHARACTER (len=*), PARAMETER :: vn_pmns = 'pmnsh(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_pmns = 'pmnsh_m_n_r_'
!> Name for the restart file pmnc.
CHARACTER (len=*), PARAMETER :: vn_pmnc = 'pmnch(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_pmnc = 'pmnch_m_n_r_'
!> Name for the restart file jksupsmns.
CHARACTER (len=*), PARAMETER :: vn_jksupsmns = 'jksupsmnsf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jksupsmns = 'jksupsmnsf_m_n_r_'
!> Name for the restart file jksupsmnc.
CHARACTER (len=*), PARAMETER :: vn_jksupsmnc = 'jksupsmncf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jksupsmnc = 'jksupsmncf_m_n_r_'
!> Name for the restart file jksupumns.
CHARACTER (len=*), PARAMETER :: vn_jksupumns = 'jksupumnsf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jksupumns = 'jksupumnsf_m_n_r_'
!> Name for the restart file jksupumnc.
CHARACTER (len=*), PARAMETER :: vn_jksupumnc = 'jksupumncf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jksupumnc = 'jksupumncf_m_n_r_'
!> Name for the restart file jksupvmns.
CHARACTER (len=*), PARAMETER :: vn_jksupvmns = 'jksupvmnsf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jksupvmns = 'jksupvmnsf_m_n_r_'
!> Name for the restart file jksupvmnc.
CHARACTER (len=*), PARAMETER :: vn_jksupvmnc = 'jksupvmncf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_jksupvmnc = 'jksupvmncf_m_n_r_'
!> Name for the restart file fsupsmns.
CHARACTER (len=*), PARAMETER :: vn_fsupsmns = 'fsupsmnsf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsupsmns = 'fsupsmnsf_m_n_r_'
!> Name for the restart file fsupsmnc.
CHARACTER (len=*), PARAMETER :: vn_fsupsmnc = 'fsupsmncf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsupsmnc = 'fsupsmncf_m_n_r_'
!> Name for the restart file fsupumns.
CHARACTER (len=*), PARAMETER :: vn_fsupumns = 'fsupumnsf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsupumns = 'fsupumnsf_m_n_r_'
!> Name for the restart file fsupumnc.
CHARACTER (len=*), PARAMETER :: vn_fsupumnc = 'fsupumncf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsupumnc = 'fsupumncf_m_n_r_'
!> Name for the restart file fsupvmns.
CHARACTER (len=*), PARAMETER :: vn_fsupvmns = 'fsupvmnsf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsupvmns = 'fsupvmnsf_m_n_r_'
!> Name for the restart file fsupvmnc.
CHARACTER (len=*), PARAMETER :: vn_fsupvmnc = 'fsupvmncf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsupvmnc = 'fsupvmncf_m_n_r_'
!> Name for the restart file fsubsmns.
CHARACTER (len=*), PARAMETER :: vn_fsubsmns = 'fsubsmnsf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsubsmns = 'fsubsmnsf_m_n_r_'
!> Name for the restart file fsubsmnc.
CHARACTER (len=*), PARAMETER :: vn_fsubsmnc = 'fsubsmncf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsubsmnc = 'fsubsmncf_m_n_r_'
!> Name for the restart file fsubumns.
CHARACTER (len=*), PARAMETER :: vn_fsubumns = 'fsubumnsf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsubumns = 'fsubumnsf_m_n_r_'
!> Name for the restart file fsubumnc.
CHARACTER (len=*), PARAMETER :: vn_fsubumnc = 'fsubumncf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsubumnc = 'fsubumncf_m_n_r_'
!> Name for the restart file fsubvmns.
CHARACTER (len=*), PARAMETER :: vn_fsubvmns = 'fsubvmnsf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsubvmns = 'fsubvmnsf_m_n_r_'
!> Name for the restart file fsubvmnc.
CHARACTER (len=*), PARAMETER :: vn_fsubvmnc = 'fsubvmncf(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_fsubvmnc = 'fsubvmncf_m_n_r_'

!> Name for the restart file lmns.
CHARACTER (len=*), PARAMETER :: vn_lmns = 'lmns(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_lmns = 'lmns_m_n_r_'
!> Name for the restart file lmnc.
CHARACTER (len=*), PARAMETER :: vn_lmnc = 'lmnc(m,n,r)'
CHARACTER (len=*), PARAMETER :: vn_lmnc = 'lmnc_m_n_r_'

!> Name for the restart file p_factor.
CHARACTER (len=*), PARAMETER :: vn_p_factor = 'p_factor'
Expand Down
4 changes: 0 additions & 4 deletions Sources/shared_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ MODULE shared_data
! Shared quantities.
!> FIXME: UNKNOWN
REAL (dp) :: jsupvdotA
!> Toroidal flux profile.
REAL (dp), DIMENSION(:), ALLOCATABLE :: torflux
!> Poloidal flux profile.
REAL (dp), DIMENSION(:), ALLOCATABLE :: polflux
!> Covariant vector potential for stellator symmetric s component on full grid.
REAL (dp), DIMENSION(:,:,:), POINTER :: asubsmnsf
!> Covariant vector potential for non-stellator symmetric s component on full
Expand Down
Loading