From 97badcec88c302b8f9c56fb6ad4f50b35fa89fb2 Mon Sep 17 00:00:00 2001 From: Alberto Otero de la Roza Date: Fri, 13 Dec 2024 16:06:24 +0100 Subject: [PATCH] respect the ghost keyword if it has been explicit --- VERSION | 2 +- src/fieldseedmod.f90 | 1 + src/fieldseedmod@proc.f90 | 2 ++ src/systemmod@proc.f90 | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index d2a633ea..28e47c8c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.359 +1.2.360 diff --git a/src/fieldseedmod.f90 b/src/fieldseedmod.f90 index 40e11d53..3ad1b63f 100644 --- a/src/fieldseedmod.f90 +++ b/src/fieldseedmod.f90 @@ -46,6 +46,7 @@ module fieldseedmod character(len=mlen) :: fid = "" !< field ID logical :: nou = .false. !< wannier option nou integer :: molden_type = molden_type_unknown !< type of molden file + logical :: ghost_explicit = .false. !< whether there has been a explicit for ghost ! pwc integer :: pwcspin = 0 !< read which spin (0=all,1=up,2=dn) integer, allocatable :: pwcikpt(:) !< read which kpts diff --git a/src/fieldseedmod@proc.f90 b/src/fieldseedmod@proc.f90 index 9526bb8b..2e98296e 100644 --- a/src/fieldseedmod@proc.f90 +++ b/src/fieldseedmod@proc.f90 @@ -39,6 +39,7 @@ module subroutine fieldseed_end(f) f%expr = "" f%elseopt = "" f%testrmt = .true. + f%ghost_explicit = .false. f%readvirtual = .false. f%vaspblk = 1 f%fid = "" @@ -443,6 +444,7 @@ module subroutine fieldseed_parse(f,line,withoptions,lp0) f%ids = word elseif (equal(lword,"ghost")) then f%iff = ifformat_as_ghost + f%ghost_explicit = .true. else call backtrack() ok = eval_next(f%n(1),line,lp) diff --git a/src/systemmod@proc.f90 b/src/systemmod@proc.f90 index 24580df3..ef825dbf 100644 --- a/src/systemmod@proc.f90 +++ b/src/systemmod@proc.f90 @@ -485,7 +485,7 @@ module subroutine load_field_string(s,line,verbose,id,errmsg,ti) ! Maybe we can load it as a grid if all the fields are grids ! and they are the same size - if (seed%iff == ifformat_as_ghost) then + if (seed%iff == ifformat_as_ghost.and..not.seed%ghost_explicit) then syl => s call fields_in_eval(seed%expr,errmsg,nn,idlist,c_loc(syl)) if (len_trim(errmsg) > 0) return