The -dict option is now handled correctly and consistently across all applications with -dict options. The logic associated with doing so has been centralised. If a relative path is given to the -dict option, then it is assumed to be relative to the case directory. If an absolute path is given, then it is used without reference to the case directory. In both cases, if the path is found to be a directory, then the standard dictionary name is appended to the path. Resolves bug report http://bugs.openfoam.org/view.php?id=3692
22 lines
636 B
C++
22 lines
636 B
C++
const word dictName("noiseDict");
|
|
|
|
IOdictionary dict(systemDict(dictName, args, runTime));
|
|
|
|
// reference pressure
|
|
scalar pRef = dict.lookupOrDefault("pRef", 0.0);
|
|
|
|
// number of samples in sampling window
|
|
label N = dict.lookupOrDefault("N", 65536);
|
|
|
|
// number of sampling windows
|
|
label nw = dict.lookupOrDefault("nw", 100);
|
|
|
|
// lower frequency of frequency band
|
|
scalar f1 = dict.lookupOrDefault("f1", 25.0);
|
|
|
|
// upper frequency of frequency band
|
|
scalar fU = dict.lookupOrDefault("fU", 10000.0);
|
|
|
|
// graph format
|
|
word graphFormat = dict.lookupOrDefault<word>("graphFormat", "raw");
|