mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Function1: Rationalized construction to support the simpler sub-dictionary format
e.g.
ramp
{
type quadratic;
start 200;
duration 1.6;
}
but the old format is supported for backward compatibility:
ramp linear;
rampCoeffs
{
start 200;
duration 1.6;
}
This commit is contained in:
@ -203,18 +203,16 @@ template<class Type>
|
||||
Foam::Function1Types::CSV<Type>::CSV
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict,
|
||||
const word& ext
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
TableBase<Type>(entryName, dict.subDict(entryName + ext)),
|
||||
coeffs_(dict.subDict(entryName + ext)),
|
||||
nHeaderLine_(readLabel(coeffs_.lookup("nHeaderLine"))),
|
||||
refColumn_(readLabel(coeffs_.lookup("refColumn"))),
|
||||
componentColumns_(coeffs_.lookup("componentColumns")),
|
||||
separator_(coeffs_.lookupOrDefault<string>("separator", string(","))[0]),
|
||||
mergeSeparators_(readBool(coeffs_.lookup("mergeSeparators"))),
|
||||
fName_(coeffs_.lookup("file"))
|
||||
TableBase<Type>(entryName, dict),
|
||||
nHeaderLine_(readLabel(dict.lookup("nHeaderLine"))),
|
||||
refColumn_(readLabel(dict.lookup("refColumn"))),
|
||||
componentColumns_(dict.lookup("componentColumns")),
|
||||
separator_(dict.lookupOrDefault<string>("separator", string(","))[0]),
|
||||
mergeSeparators_(readBool(dict.lookup("mergeSeparators"))),
|
||||
fName_(dict.lookup("file"))
|
||||
{
|
||||
if (componentColumns_.size() != pTraits<Type>::nComponents)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user