FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MAINT: Remove part of the unused variables · FluidityProject/fluidity@5963c4c · GitHub

Repository navigation

Commit 5963c4c

Browse files
authored andcommitted
MAINT: Remove part of the unused variables
1 parent e3f7a54 commit 5963c4c

57 files changed

Lines changed: 4979 additions & 5130 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎assemble/Advection_Diffusion_CG.F90‎

Lines changed: 263 additions & 265 deletions
Large diffs are not rendered by default.

‎assemble/Advection_Diffusion_FV.F90‎

Lines changed: 119 additions & 121 deletions
Large diffs are not rendered by default.

‎assemble/Assemble_CMC.F90‎

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Copyright (C) 2006 Imperial College London and others.
2-
!
2+
!
33
! Please see the AUTHORS file in the main source directory for a full list
44
! of copyright holders.
55
!
@@ -9,7 +9,7 @@
99
! Imperial College London
1010
!
1111
! amcgsoftware@imperial.ac.uk
12-
!
12+
!
1313
! This library is free software; you can redistribute it and/or
1414
! modify it under the terms of the GNU Lesser General Public
1515
! License as published by the Free Software Foundation,
@@ -45,10 +45,10 @@ module assemble_CMC
4545
use field_options
4646
use fefields
4747

48-
implicit none
48+
implicit none
4949

5050
private
51-
51+
5252
public :: assemble_cmc_dg, assemble_masslumped_cmc, &
5353
assemble_masslumped_ctm, repair_stiff_nodes, zero_stiff_nodes, &
5454
assemble_diagonal_schur, assemble_scaled_pressure_mass_matrix
@@ -70,21 +70,21 @@ subroutine assemble_cmc_dg(CMC, CTP, CT, inverse_mass)
7070
integer :: dim, dim2
7171

7272
call zero(CMC)
73-
73+
7474
if(inverse_mass%diagonal) then
7575

7676
do dim=1, blocks(CT,2)
77-
77+
7878
! This is a borrowed reference so no need to deallocate.
7979
CT_block=block(CT, 1, dim)
8080
CTP_block=block(CTP, 1, dim)
81-
81+
8282
CM=matmul_T(CTP_block, block(inverse_mass,dim,dim), CT%sparsity)
83-
83+
8484
CMC_tmp=matmul_T(CM, CT_block, model=CMC%sparsity)
85-
85+
8686
call addto(CMC, CMC_tmp)
87-
87+
8888
call deallocate(CM)
8989
call deallocate(CMC_tmp)
9090

@@ -94,17 +94,17 @@ subroutine assemble_cmc_dg(CMC, CTP, CT, inverse_mass)
9494

9595
do dim=1, blocks(CT,2)
9696
do dim2 = 1, blocks(CT,2)
97-
97+
9898
! This is a borrowed reference so no need to deallocate.
9999
CT_block=block(CT, 1, dim)
100100
CTP_block=block(CTP, 1, dim2)
101-
101+
102102
CM=matmul_T(CTP_block, block(inverse_mass,dim2,dim), CT%sparsity)
103-
103+
104104
CMC_tmp=matmul_T(CM, CT_block, model=CMC%sparsity)
105-
105+
106106
call addto(CMC, CMC_tmp)
107-
107+
108108
call deallocate(CM)
109109
call deallocate(CMC_tmp)
110110
end do
@@ -129,13 +129,13 @@ subroutine assemble_masslumped_cmc(cmc_m, ctp_m, inverse_masslump, ct_m)
129129
ewrite(1,*) 'Entering assemble_masslumped_cmc'
130130

131131
call mult_div_vector_div_T(cmc_m, ctp_m, inverse_masslump, ct_m)
132-
132+
133133
ewrite_minmax(cmc_m)
134134

135135
end subroutine assemble_masslumped_cmc
136136

137137
subroutine assemble_diagonal_schur(schur_diagonal_matrix,u,inner_m,ctp_m,ct_m)
138-
!!< Assemble the matrix C_P^T * [(Big_m)_diagonal]^-1 * C.
138+
!!< Assemble the matrix C_P^T * [(Big_m)_diagonal]^-1 * C.
139139
!!< This is used as a preconditioner for the full projection solve
140140
!!< when using the full momentum matrix.
141141

@@ -144,14 +144,12 @@ subroutine assemble_diagonal_schur(schur_diagonal_matrix,u,inner_m,ctp_m,ct_m)
144144
! Divergence matrices:
145145
type(block_csr_matrix), intent(in) :: ctp_m, ct_m
146146
! Inner matrix of Schur complement:
147-
type(petsc_csr_matrix), intent(inout) :: inner_m
147+
type(petsc_csr_matrix), intent(inout) :: inner_m
148148
! Product matrix:
149149
type(csr_matrix), intent(inout):: schur_diagonal_matrix
150150
! Diagonal of inner_m - required to set up preconditioner matrix for Stokes problems
151151
! (i.e. DiagonalSchurComplement):
152-
type(vector_field) :: inner_m_diagonal
153-
154-
integer :: i
152+
type(vector_field) :: inner_m_diagonal
155153

156154
ewrite(1,*) 'Entering assemble_diagonal_schur'
157155

@@ -180,7 +178,7 @@ subroutine assemble_scaled_pressure_mass_matrix(state, scaled_pressure_mass_matr
180178
! This routine assembles the scaled_pressure_mass_matrix at the
181179
! quadrature points. It is scaled by the inverse of viscosity.
182180

183-
type(state_type), intent(in) :: state
181+
type(state_type), intent(in) :: state
184182
! Scaled pressure mass matrix - already allocated in Momentum_Eq:
185183
type(csr_matrix), intent(inout) :: scaled_pressure_mass_matrix
186184

@@ -189,7 +187,7 @@ subroutine assemble_scaled_pressure_mass_matrix(state, scaled_pressure_mass_matr
189187
real, intent(in) :: dt
190188

191189
! Viscosity tensor:
192-
type(tensor_field), pointer :: viscosity
190+
type(tensor_field), pointer :: viscosity
193191
! Viscosity component:
194192
type(scalar_field) :: viscosity_component
195193
! Positions:
@@ -202,7 +200,7 @@ subroutine assemble_scaled_pressure_mass_matrix(state, scaled_pressure_mass_matr
202200
real, dimension(:,:), allocatable :: mass_matrix
203201
real, dimension(:), allocatable :: mu_gi
204202

205-
ewrite(1,*) 'Entering assemble_scaled_pressure_mass_matrix'
203+
ewrite(1,*) 'Entering assemble_scaled_pressure_mass_matrix'
206204

207205
! Positions:
208206
positions => extract_vector_field(state, "Coordinate")
@@ -217,7 +215,7 @@ subroutine assemble_scaled_pressure_mass_matrix(state, scaled_pressure_mass_matr
217215
allocate(detwei(ele_ngi(p_mesh, 1)), &
218216
mass_matrix(ele_loc(p_mesh, 1), ele_loc(p_mesh, 1)), &
219217
mu_gi(ele_ngi(viscosity_component, 1)))
220-
218+
221219
call zero(scaled_pressure_mass_matrix)
222220

223221
do ele = 1, ele_count(p_mesh)
@@ -234,25 +232,25 @@ subroutine assemble_scaled_pressure_mass_matrix(state, scaled_pressure_mass_matr
234232
deallocate(detwei, mass_matrix, mu_gi)
235233

236234
end subroutine assemble_scaled_pressure_mass_matrix
237-
235+
238236
subroutine repair_stiff_nodes(cmc_m, stiff_nodes_list)
239-
237+
240238
type(csr_matrix), intent(inout) :: cmc_m
241239
type(ilist), intent(inout) :: stiff_nodes_list
242-
240+
243241
integer :: row
244242
real, pointer :: row_diag
245243
integer, dimension(:), pointer :: row_m
246244
real, dimension(:), pointer :: row_val
247245
real :: tolerance
248-
246+
249247
ewrite(1,*) 'in repair_stiff_nodes()'
250-
248+
251249
tolerance = maxval(cmc_m%val)*epsilon(0.0)
252250
ewrite(2,*) 'tolerance = ', tolerance
253-
251+
254252
call flush_list(stiff_nodes_list)
255-
253+
256254
do row = 1, size(cmc_m, 1)
257255
row_diag=>diag_val_ptr(cmc_m, row)
258256
row_m=>row_m_ptr(cmc_m, row)
@@ -265,27 +263,27 @@ subroutine repair_stiff_nodes(cmc_m, stiff_nodes_list)
265263
call insert(stiff_nodes_list, row)
266264
end if
267265
end do
268-
266+
269267
call print_list(stiff_nodes_list, 2)
270268

271269
end subroutine repair_stiff_nodes
272-
270+
273271
subroutine zero_stiff_nodes(rhs, stiff_nodes_list)
274-
272+
275273
type(scalar_field), intent(inout) :: rhs
276274
type(ilist), intent(in) :: stiff_nodes_list
277-
275+
278276
real, dimension(:), pointer :: row_val
279-
277+
280278
ewrite(1,*) 'in zero_stiff_nodes()'
281-
279+
282280
if(stiff_nodes_list%length>0) then
283281
ewrite(2,*) 'before node_val = ', node_val(rhs, list2vector(stiff_nodes_list))
284282
call set(rhs, list2vector(stiff_nodes_list), spread(0.0, 1, stiff_nodes_list%length))
285283
end if
286284

287285
end subroutine zero_stiff_nodes
288-
286+
289287
subroutine assemble_masslumped_ctm(ctm_m, ctp_m, masslump)
290288
!!< Assemble the matrix C_P^T M_l^{-1}
291289
!!< This currently does not support rotations.
@@ -320,5 +318,5 @@ subroutine assemble_masslumped_ctm(ctm_m, ctp_m, masslump)
320318
ewrite_minmax(ctm_m)
321319

322320
end subroutine assemble_masslumped_ctm
323-
321+
324322
end module assemble_cmc

‎assemble/Foam_Drainage.F90‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ subroutine calculate_drainage_source_absor(state)
4949

5050
type(state_type), intent(inout) :: state
5151

52-
integer :: i, stat
52+
integer :: i
5353
type(vector_field), pointer :: K1, foamvel, liquidvelocity, liqcontentvel, source, absor
5454
type(scalar_field), pointer :: p, liquidcontent, K2
5555

@@ -79,7 +79,7 @@ subroutine calculate_drainage_source_absor(state)
7979
liquidvelocity => extract_vector_field(state,'Velocity')
8080
call zero(liqcontentvel)
8181
call allocate(rho_remap, liquidvelocity%mesh, 'RemappedLiquidContent')
82-
call remap_field(liquidcontent, rho_remap)
82+
call remap_field(liquidcontent, rho_remap)
8383
do i=1, node_count(liqcontentvel)
8484
call set(liqcontentvel, i, ( node_val(rho_remap, i)*node_val(liquidvelocity, i) ) )
8585
enddo
@@ -93,14 +93,14 @@ subroutine calculate_drainage_source_absor(state)
9393
source => extract_vector_field(state,'VelocitySource')
9494
if (have_option(trim(source%option_path)//'/diagnostic')) then
9595
call get_option(trim(p%option_path)//'/prognostic/atmospheric_pressure', &
96-
atmospheric_pressure, default=0.0)
96+
atmospheric_pressure, default=0.0)
9797
call zero(source)
9898

9999
call allocate(p_remap, source%mesh, 'RemappedPressure')
100100
call allocate(K1_remap, source%dim, source%mesh, 'RemappedK1')
101101
call allocate(K2_remap, source%mesh, 'RemappedK2')
102102
call allocate(foamvel_remap, source%dim, source%mesh, 'RemappedFoamVelocity')
103-
call remap_field(p, p_remap)
103+
call remap_field(p, p_remap)
104104
call remap_field(K1, K1_remap)
105105
call remap_field(K2, K2_remap)
106106
call remap_field(foamvel, foamvel_remap)
@@ -127,9 +127,9 @@ subroutine calculate_drainage_source_absor(state)
127127
call allocate(p_remap, absor%mesh, 'RemappedPressure')
128128
call allocate(K2_remap, source%mesh, 'RemappedK2')
129129
call remap_field(p, p_remap)
130-
call remap_field(K2, K2_remap)
130+
call remap_field(K2, K2_remap)
131131

132-
allocate (absor_val(absor%dim))
132+
allocate (absor_val(absor%dim))
133133

134134
do i=1, node_count(absor)
135135
absor_val = (1/node_val(K2_remap, i))*(node_val(p_remap, i)+atmospheric_pressure )**0.5
@@ -146,7 +146,3 @@ subroutine calculate_drainage_source_absor(state)
146146
end subroutine calculate_drainage_source_absor
147147

148148
end module foam_drainage
149-
150-
151-
152-

‎assemble/Foam_Flow.F90‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,15 @@ subroutine calculate_foam_velocity(state, foamvel)
288288

289289
type(state_type), intent(inout) :: state
290290
type(vector_field), pointer, intent(out) :: foamvel
291-
type(vector_field), pointer :: liquidvelocity
292291
type(scalar_field), pointer :: field
293292
type(csr_sparsity) :: gradient_sparsity
294293
type(block_csr_matrix) :: C_m
295294
type(csr_sparsity) :: mass_sparsity
296295
type(csr_matrix) :: mass
297296
type(vector_field) :: cfield
298297

299-
integer :: i, stat
300-
298+
integer :: i
299+
301300
foamvel => extract_vector_field(state, foamvel_name)
302301
if (have_option(trim(foamvel%option_path)//'/diagnostic')) then
303302
field=>extract_scalar_field(state, "FoamVelocityPotential")
@@ -344,5 +343,3 @@ end subroutine calculate_foam_velocity
344343

345344

346345
end module foam_flow_module
347-
348-

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL