Commit 6f8ba179 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

NestedBlockState: fix bfield influence for higher levels

This fixes issue #662
parent 164ac5f6
Pipeline #625 passed with stage
in 376 minutes and 31 seconds
...@@ -1411,13 +1411,6 @@ public: ...@@ -1411,13 +1411,6 @@ public:
} }
} }
auto& f = _bfield[v];
if (!f.empty())
{
dS_dl -= (nr < f.size()) ? f[nr] : f.back();
dS_dl += (r < f.size()) ? f[r] : f.back();
}
if (!_Bfield.empty() && ea.Bfield) if (!_Bfield.empty() && ea.Bfield)
{ {
int dB = 0; int dB = 0;
...@@ -1670,6 +1663,15 @@ public: ...@@ -1670,6 +1663,15 @@ public:
double dS = 0; double dS = 0;
auto& f = _bfield[v];
if (!f.empty())
{
if (nr != null_group)
dS -= (nr < f.size()) ? f[nr] : f.back();
if (r != null_group)
dS += (r < f.size()) ? f[r] : f.back();
}
if (ea.partition_dl) if (ea.partition_dl)
{ {
enable_partition_stats(); enable_partition_stats();
......
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