mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: scaleFactor for fieldValue function-objects is 'sticky' (issue #331)
- if set in a dictionary and later removed, the intermediate value is retained rather than reverting to a normal default value. - same applies for a few other function objects and their variables
This commit is contained in:
@ -97,7 +97,7 @@ bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
|
||||
|
||||
dict.lookup("fields") >> fields_;
|
||||
dict.lookup("writeFields") >> writeFields_;
|
||||
dict.readIfPresent("scaleFactor", scaleFactor_);
|
||||
scaleFactor_ = dict.lookupOrDefault<scalar>("scaleFactor", 1.0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Optional scale value
|
||||
//- Optional scaling factor
|
||||
scalar scaleFactor_;
|
||||
|
||||
//- Construction dictionary
|
||||
|
||||
Reference in New Issue
Block a user