|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002444||OpenFOAM||Patch||public||2017-01-28 16:45||2017-01-28 18:12|
|Target Version||Fixed in Version||4.x|
|Summary||0002444: Outdated check for 'UName' checks in 2 streamLine classes|
|Description||In commit e22c65dd8e70 ( https://github.com/OpenFOAM/OpenFOAM-dev/commit/e22c65dd8e70d38fa6f6f8163dd8261d4fc75e20 ), on the 21st of May 2016, it was finally standardized which would be the naming convention for assigning names to the standard names, e.g. 'UName' keyword is now simply defined as 'U'.|
But while I was checking the conventions used for warning and errors in function objects, for fixing report #2441, I stumbled upon a weird situation with at least two files within 'src/functionObjects/field':
Both of them have the following piece of code in 'read()':
dict.lookup("U") >> UName_;
UName_ = "U";
<< "Using deprecated entry \"U\"."
<< " Please use \"UName\" instead."
dict.lookup("U") >> UName_;
After looking up a bit at the OpenFOAM history trees, it seems like there was a previous transition to using an explicit 'UName' convention, but possibly ended up not being the standard convention. But on the aforementioned commit, semi-automated updates were made and resulted in this stale and fairly inconsistent check.
The additional problem here is that it will not properly react when 'U' is undefined, it instead assume it's named 'U', which is inconsistent with the documentation (required: yes).
Given that the description states that 'U' is a required keyword, I will attach in a few minutes a patch (need to check compatibility between dev and 4.x on these two) that simply replaces this outdated check+parse and simply use a single line to do the lookup without a default.
I'm not suggesting a revised backward compatibility check, because I couldn't quickly find any evidence that this was done for OpenFOAM 4.0 to provide these checks, so now it's a bit too late to go adding them all around.
|Tags||No tags attached.|
Attached are the following files:
- "bug2444_v1.patch" - This is a patch file that is common to both 4.x and dev, for easier pre-visualization of the proposed changes.
- "bug2444_4.x_v1.tar.gz" - package with the modified files for OpenFOAM 4.x, commit 8ff56d46b9c.
- "bug2444_dev_v1.tar.gz" - package with the modified files for OpenFOAM dev, commit 0dd9616dcf30.
The modified files are:
- Revised the description to be similar to 'wallBoundedStreamLine.H' for easier readability.
- Included the 'U' line on the example, because it's required.
- Replaced the broken check block for the single line with the lookup for 'U'.
Resolved in OpenFOAM-4.x by commit a1a70270f0a93737fa161d212fc66f50eb9fc89a
Resolved in OpenFOAM-dev by commit 4d9a8870c65f168ec895f365a810e7119fe2b0bf
|2017-01-28 16:45||wyldckat||New Issue|
|2017-01-28 16:54||wyldckat||File Added: bug2444_v1.patch|
|2017-01-28 16:54||wyldckat||File Added: bug2444_dev_v1.tar.gz|
|2017-01-28 16:54||wyldckat||File Added: bug2444_4.x_v1.tar.gz|
|2017-01-28 16:54||wyldckat||Product Version||dev => 4.x|
|2017-01-28 16:59||wyldckat||Note Added: 0007686|
|2017-01-28 16:59||wyldckat||Assigned To||=> henry|
|2017-01-28 16:59||wyldckat||Status||new => assigned|
|2017-01-28 18:12||henry||Status||assigned => resolved|
|2017-01-28 18:12||henry||Resolution||open => fixed|
|2017-01-28 18:12||henry||Fixed in Version||=> 4.x|
|2017-01-28 18:12||henry||Note Added: 0007689|