Rename DataEntry -> Function1

Function1 is an abstract base-class of run-time selectable unary
functions which may be composed of other Function1's allowing the user
to specify complex functions of a single scalar variable, e.g. time.
The implementations need not be a simple or continuous functions;
interpolated tables and polynomials are also supported.  In fact form of
mapping between a single scalar input and a single primitive type output
is supportable.

The primary application of Function1 is in time-varying boundary
conditions, it also used for other functions of time, e.g. injected mass
is spray simulations but is not limited to functions of time.
This commit is contained in:
Henry Weller
2016-02-08 16:18:07 +00:00
parent c3f6a149d2
commit 968c888fc4
102 changed files with 497 additions and 494 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,7 +76,7 @@ CONSTRUCT
scalarData_(readScalar(dict.lookup("scalarData"))),
data_(pTraits<TYPE>(dict.lookup("data"))),
fieldData_("fieldData", dict, p.size()),
timeVsData_(DataEntry<TYPE>::New("timeVsData", dict)),
timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
wordData_(dict.lookupOrDefault<word>("wordName", "wordDefault")),
labelData_(-1),
boolData_(false)
@ -203,7 +203,10 @@ void Foam::CLASS::updateCoeffs()
);
const scalarField& phip =
this->patch().template lookupPatchField<surfaceScalarField, scalar>("phi");
this->patch().template lookupPatchField<surfaceScalarField, scalar>
(
"phi"
);
this->valueFraction() = 1.0 - pos(phip);
PARENT::updateCoeffs();