Commit 404df83f authored by Matthias Redies's avatar Matthias Redies

replace implicit allocation with explicit

parent b4a63be2
......@@ -206,6 +206,10 @@ CONTAINS
PotDen3%iter = PotDen1%iter
PotDen3%potdenType = PotDen1%potdenType
! implicit allocation would break the bounds staring at 0
if(.not. allocated(PotDen3%mt)) allocate(PotDen3%mt, mold=PotDen1%mt)
PotDen3%mt = PotDen1%mt + PotDen2%mt
PotDen3%pw = PotDen1%pw + PotDen2%pw
PotDen3%vacz = PotDen1%vacz + PotDen2%vacz
......@@ -224,6 +228,10 @@ CONTAINS
PotDen3%iter = PotDen1%iter
PotDen3%potdenType = PotDen1%potdenType
! implicit allocation would break the bounds staring at 0
if(.not. allocated(PotDen3%mt)) allocate(PotDen3%mt, mold=PotDen1%mt)
PotDen3%mt = PotDen1%mt - PotDen2%mt
PotDen3%pw = PotDen1%pw - PotDen2%pw
PotDen3%vacz = PotDen1%vacz - PotDen2%vacz
......@@ -242,6 +250,10 @@ CONTAINS
PotDenCopy%iter = PotDen%iter
PotDenCopy%potdenType = PotDen%potdenType
! implicit allocation would break the bounds staring at 0
if(.not. allocated(PotDenCopy%mt)) allocate(PotDenCopy%mt, mold=PotDen%mt)
PotDenCopy%mt = PotDen%mt
PotDenCopy%pw = PotDen%pw
PotDenCopy%vacz = PotDen%vacz
......
  • @hinzen I replaced the implicit allocation with an explicit one, so that our spherical harmonics continue to start at 0. These routines only seem to be used in the Kerker-part. I hope this doesn't break anything.

  • @redies This shouldn't make a difference in the Kerker part, since I call the init subroutine before I call the copy subroutine. But your version is probably more elegant and easier to use.

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment