39 const word& entryName,
40 const objectRegistry* obrPtr
43 function1Base(entryName, obrPtr)
50 const word& entryName,
51 const dictionary&
dict,
52 const objectRegistry* obrPtr
55 function1Base(entryName,
dict, obrPtr)
107 template<
class Function1Type>
115 auto&
fld = tfld.ref();
119 fld[i] = Function1Type::value(
x[i]);
125 template<
class Function1Type>
128 const word& entryName,
129 const dictionary&
dict,
130 const objectRegistry* obrPtr
133 Function1Type(entryName,
dict, obrPtr)
137 template<
class Function1Type>
146 auto&
fld = tfld.ref();
150 fld[i] = Function1Type::integrate(x1[i], x2[i]);
165 os.writeKeyword(name_) <<
type();
175 const Function1<Type>& rhs
virtual void writeEntries(Ostream &os) const
Write coefficient entries in dictionary format.
void size(const label n)
Older name for setAddressableSize.
virtual tmp< Field< Type > > value(const scalarField &x) const
Return value as a function of (scalar) independent variable.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
virtual void writeData(Ostream &os) const
Write in dictionary format.
#define forAll(list, i)
Loop across all elements in list.
virtual Type value(const scalar x) const
Return value as a function of (scalar) independent variable.
FieldFunction1(const word &entryName, const dictionary &dict, const objectRegistry *obrPtr=nullptr)
Construct from entry name and dictionary.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual Type integrate(const scalar x1, const scalar x2) const
Integrate between two (scalar) values.
OBJstream os(runTime.globalPath()/outputName)
virtual tmp< Field< Type > > integrate(const scalarField &x1, const scalarField &x2) const
Integrate between two (scalar) values.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Base class for template-invariant parts of Function1.
A class for managing temporary objects.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.