View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003569 | OpenFOAM | Patch | public | 2020-10-13 07:57 | 2020-10-13 10:25 |
Reporter | tniemi | Assigned To | will | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Summary | 0003569: Patch to fix a bug in general distribution for Lagrangian | ||||
Description | In the copy constructor of general distribution, https://github.com/OpenFOAM/OpenFOAM-dev/blob/master/src/lagrangian/distributionModels/general/general.C, the cumulative-Switch and meanValue-scalar are not being copied and this causes issues with steady tracking. Here is a patch which adds the missing copy calls. The fix should also be applied to OF-8. | ||||
Tags | No tags attached. | ||||
|
patch.diff (560 bytes)
diff --git a/src/lagrangian/distributionModels/general/general.C b/src/lagrangian/distributionModels/general/general.C index c3911dd..1e10f33 100644 --- a/src/lagrangian/distributionModels/general/general.C +++ b/src/lagrangian/distributionModels/general/general.C @@ -144,7 +144,9 @@ Foam::distributionModels::general::general(const general& p) nEntries_(p.nEntries_), minValue_(p.minValue_), maxValue_(p.maxValue_), - integral_(p.integral_) + meanValue_(p.maxValue_), + integral_(p.integral_), + cumulative_(p.cumulative_) {} |
|
Sorry, attached a wrong diff. Here is the correct one patch-2.diff (561 bytes)
diff --git a/src/lagrangian/distributionModels/general/general.C b/src/lagrangian/distributionModels/general/general.C index c3911dd..d21f7f8 100644 --- a/src/lagrangian/distributionModels/general/general.C +++ b/src/lagrangian/distributionModels/general/general.C @@ -144,7 +144,9 @@ Foam::distributionModels::general::general(const general& p) nEntries_(p.nEntries_), minValue_(p.minValue_), maxValue_(p.maxValue_), - integral_(p.integral_) + meanValue_(p.meanValue_), + integral_(p.integral_), + cumulative_(p.cumulative_) {} |
|
Thanks, Timo. Resolved in 8 and dev. https://github.com/OpenFOAM/OpenFOAM-8/commit/5b09ecd3bcfa794c3a87887cfd3b6fd6276dad69 https://github.com/OpenFOAM/OpenFOAM-dev/commit/e326af2b4facb6f78e7163a2497450539a1960ca |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-10-13 07:57 | tniemi | New Issue | |
2020-10-13 07:57 | tniemi | File Added: patch.diff | |
2020-10-13 07:59 | tniemi | File Added: patch-2.diff | |
2020-10-13 07:59 | tniemi | Note Added: 0011589 | |
2020-10-13 10:25 | will | Assigned To | => will |
2020-10-13 10:25 | will | Status | new => resolved |
2020-10-13 10:25 | will | Resolution | open => fixed |
2020-10-13 10:25 | will | Fixed in Version | => 8 |
2020-10-13 10:25 | will | Note Added: 0011590 |