Skip to content

Commit a04d0e4

Browse files
author
Linnea Andersson
committed
Fix indentation
1 parent d7eec98 commit a04d0e4

File tree

3 files changed

+69
-69
lines changed

3 files changed

+69
-69
lines changed

src/prg_ewald_mod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ subroutine Ewald_Real_Space_Single_latte(COULOMBV,I,RXYZ,Box,Nr_elem, &
9898

9999
TJ = TFACT*U(Element_Pointer(J))
100100
DC = Rab/dR
101-
101+
102102
Z = abs(CALPHA*MAGR)
103103
NUMREP_ERFC = erfc(Z)
104104

src/prg_syrotation_mod.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ subroutine prg_rotate(rot,r,verbose)
190190
v2(2)=rot%v2(2)
191191
v2(3)=rot%v2(3)
192192

193-
vQ(1)=rot%vQ(1) !Rotation center
193+
vQ(1)=rot%vQ(1) !Rotation center
194194
vQ(2)=rot%vQ(2)
195195
vQ(3)=rot%vQ(3)
196196

@@ -232,7 +232,7 @@ subroutine prg_rotate(rot,r,verbose)
232232
v2=pq2-vQ
233233
endif
234234

235-
vtr(1)=0.0_dp !Translation
235+
vtr(1)=0.0_dp !Translation
236236
vtr(2)=0.0_dp
237237
vtr(3)=0.0_dp
238238

src/prg_xlbokernel_mod.F90

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ subroutine prg_kernel_multirank_latte(KRes,KK0_bml,Res,FelTol,L,LMAX,NUMRANK,HO_
249249

250250
if (modulo(mdstep,update) .eq. 0) then
251251
call prg_update_preconditioner(KK0_bml,vi(:,1),fi(:,1),Nr_atoms,threshold)
252-
endif
252+
endif
253253

254254
deallocate(row1);deallocate(row2);deallocate(row_NA)
255255
call bml_deallocate(KK0T_bml)
@@ -261,73 +261,73 @@ subroutine prg_kernel_multirank_latte(KRes,KK0_bml,Res,FelTol,L,LMAX,NUMRANK,HO_
261261
call prg_timer_shutdown()
262262

263263
end subroutine prg_kernel_multirank_latte
264-
264+
265265
subroutine prg_update_preconditioner(K0,v,fv,Nr_atoms,threshold)
266266

267-
implicit none
268-
type(bml_matrix_t), intent(inout) :: K0
269-
real(dp), intent(in) :: v(Nr_atoms),fv(Nr_atoms),threshold
270-
integer, intent(in) :: Nr_atoms
271-
type(bml_matrix_t) :: v_bml,fv_bml,vt_bml,tmp1_bml,tmp2_bml
272-
type(bml_matrix_t) :: ones_bml,onest_bml,K0_update,K0_T
273-
real(dp) :: const,kthresh
274-
real(dp) :: ones(Nr_atoms)
275-
real(dp),allocatable :: row(:),norm(:)
276-
integer :: I
277-
character(20) :: bml_type
278-
279-
bml_type = bml_get_type(K0)
280-
kthresh = 1.0_dp*1e-5
281-
allocate(row(Nr_atoms))
282-
allocate(norm(Nr_atoms))
283-
284-
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,v_bml)
285-
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,vt_bml)
286-
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,fv_bml)
287-
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,tmp1_bml)
288-
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,tmp2_bml)
289-
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,ones_bml)
290-
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,onest_bml)
291-
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,K0_update)
292-
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,K0_T)
293-
294-
ones = 1.0_dp
295-
call bml_set_row(onest_bml,1,ones,0.0_dp)
296-
call bml_multiply(K0,ones_bml,tmp1_bml,1.0_dp,0.0_dp,threshold)
297-
const = 1.0_dp/(bml_trace_mult(onest_bml,tmp1_bml) + 1)
298-
299-
call bml_set_row(vt_bml,1,v,1.0_dp*1e-10)
300-
call bml_set_row(fv_bml,1,fv,1.0_dp*1e-10)
301-
call bml_transpose(vt_bml,v_bml)
302-
303-
call bml_multiply(K0,v_bml,tmp1_bml,1.0_dp,0.0_dp,threshold)
304-
call bml_copy(vt_bml,tmp2_bml)
305-
call bml_multiply(fv_bml,K0,tmp2_bml,1.0_dp,-1.0_dp,threshold)
306-
call bml_multiply(tmp1_bml,tmp2_bml,K0_update,const,0.0_dp,kthresh)
307-
call bml_add(K0,K0_update,1.0_dp,-1.0_dp,kthresh)
308-
309-
call bml_multiply(onest_bml,K0,tmp1_bml,1.0_dp,0.0_dp,0.0_dp)
310-
call bml_get_row(tmp1_bml,1,norm)
311-
call bml_transpose(K0,K0_T)
312-
do I = 1,Nr_atoms
313-
call bml_get_row(K0_T,1,row)
314-
call bml_set_row(K0_T,1,row/norm(I),1.0_dp*1e-10)
315-
enddo
316-
call bml_transpose(K0_T,K0)
317-
318-
deallocate(row)
319-
deallocate(norm)
320-
call bml_deallocate(v_bml)
321-
call bml_deallocate(vt_bml)
322-
call bml_deallocate(fv_bml)
323-
call bml_deallocate(tmp1_bml)
324-
call bml_deallocate(tmp2_bml)
325-
call bml_deallocate(onest_bml)
326-
call bml_deallocate(ones_bml)
327-
call bml_deallocate(K0_update)
328-
call bml_deallocate(K0_T)
329-
330-
end subroutine prg_update_preconditioner
267+
implicit none
268+
type(bml_matrix_t), intent(inout) :: K0
269+
real(dp), intent(in) :: v(Nr_atoms),fv(Nr_atoms),threshold
270+
integer, intent(in) :: Nr_atoms
271+
type(bml_matrix_t) :: v_bml,fv_bml,vt_bml,tmp1_bml,tmp2_bml
272+
type(bml_matrix_t) :: ones_bml,onest_bml,K0_update,K0_T
273+
real(dp) :: const,kthresh
274+
real(dp) :: ones(Nr_atoms)
275+
real(dp),allocatable :: row(:),norm(:)
276+
integer :: I
277+
character(20) :: bml_type
278+
279+
bml_type = bml_get_type(K0)
280+
kthresh = 1.0_dp*1e-5
281+
allocate(row(Nr_atoms))
282+
allocate(norm(Nr_atoms))
283+
284+
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,v_bml)
285+
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,vt_bml)
286+
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,fv_bml)
287+
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,tmp1_bml)
288+
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,tmp2_bml)
289+
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,ones_bml)
290+
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,onest_bml)
291+
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,K0_update)
292+
call bml_zero_matrix(bml_type,bml_element_real,dp,Nr_atoms,Nr_atoms,K0_T)
293+
294+
ones = 1.0_dp
295+
call bml_set_row(onest_bml,1,ones,0.0_dp)
296+
call bml_multiply(K0,ones_bml,tmp1_bml,1.0_dp,0.0_dp,threshold)
297+
const = 1.0_dp/(bml_trace_mult(onest_bml,tmp1_bml) + 1)
298+
299+
call bml_set_row(vt_bml,1,v,1.0_dp*1e-10)
300+
call bml_set_row(fv_bml,1,fv,1.0_dp*1e-10)
301+
call bml_transpose(vt_bml,v_bml)
302+
303+
call bml_multiply(K0,v_bml,tmp1_bml,1.0_dp,0.0_dp,threshold)
304+
call bml_copy(vt_bml,tmp2_bml)
305+
call bml_multiply(fv_bml,K0,tmp2_bml,1.0_dp,-1.0_dp,threshold)
306+
call bml_multiply(tmp1_bml,tmp2_bml,K0_update,const,0.0_dp,kthresh)
307+
call bml_add(K0,K0_update,1.0_dp,-1.0_dp,kthresh)
308+
309+
call bml_multiply(onest_bml,K0,tmp1_bml,1.0_dp,0.0_dp,0.0_dp)
310+
call bml_get_row(tmp1_bml,1,norm)
311+
call bml_transpose(K0,K0_T)
312+
do I = 1,Nr_atoms
313+
call bml_get_row(K0_T,1,row)
314+
call bml_set_row(K0_T,1,row/norm(I),1.0_dp*1e-10)
315+
enddo
316+
call bml_transpose(K0_T,K0)
317+
318+
deallocate(row)
319+
deallocate(norm)
320+
call bml_deallocate(v_bml)
321+
call bml_deallocate(vt_bml)
322+
call bml_deallocate(fv_bml)
323+
call bml_deallocate(tmp1_bml)
324+
call bml_deallocate(tmp2_bml)
325+
call bml_deallocate(onest_bml)
326+
call bml_deallocate(ones_bml)
327+
call bml_deallocate(K0_update)
328+
call bml_deallocate(K0_T)
329+
330+
end subroutine prg_update_preconditioner
331331

332332

333333
! Above routine but for development code

0 commit comments

Comments
 (0)