Go to the documentation of this file.
45 class fieldInterpolator
75 selectedFields_(selectedFields),
78 interpolator_(interpolator),
79 timeNames_(timeNames),
83 template<
class GeoFieldType>
88 template<
class GeoFieldType>
91 const word& fieldClassName = GeoFieldType::typeName;
97 Info<<
" " << fieldClassName <<
"s:";
103 selectedFields_.empty()
104 || selectedFields_.found(fieldIter()->
name())
107 Info<<
" " << fieldIter()->name() <<
'(';
109 scalar deltaT = (ti1_.value() - ti_.value())/(divisions_ + 1);
111 for (
int j=0; j<divisions_; j++)
119 if (j < divisions_-1)
127 interpolator_.valueWeights
145 ReadFields<GeoFieldType>
154 uniformInterpolate<GeoFieldType>
185 int main(
int argc,
char *argv[])
193 "specify a list of fields to be interpolated. Eg, '(U T p)' - "
194 "regular expressions not currently supported"
200 "specify number of temporal sub-divisions to create (default = 1)."
206 "specify type of interpolation (linear or spline)"
211 runTime.functionObjects().off();
218 if (selectedFields.
size())
220 Info<<
"Interpolating fields " << selectedFields <<
nl <<
endl;
224 Info<<
"Interpolating all fields" <<
nl <<
endl;
233 Info<<
"Using " << divisions <<
" per time interval" <<
nl <<
endl;
241 Info<<
"Using interpolation " << interpolationType <<
nl <<
endl;
265 Info<<
"Interpolating fields for times:" <<
endl;
269 runTime.setTime(
timeDirs[timei], timei);
274 fieldInterpolator interpolator
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from string.
static autoPtr< interpolationWeights > New(const word &type, const scalarField &samples)
Return a reference to the selected interpolationWeights.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
#define forAll(list, i)
Loop across all elements in list.
Info<< "Creating field dpdt\n"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar("dpdt", p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);p_rgh=p - rho *gh;mesh.setFluxRequired(p_rgh.name());multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A HashTable with keys but without contents.
const word & name() const
Name (const access)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
int main(int argc, char *argv[])
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
Abstract base class for interpolating in 1D.
label size() const
Return number of elements in table.
Mesh data needed to do the Finite Volume discretisation.
List of IOobjects with searching and retrieving facilities.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static instantList timeDirs
Helper routine to read fields.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool optionFound(const word &opt) const
Return true if the named option is found.
A List with indirect addressing.
An instant of time. Contains the time value and name.
void size(const label)
Override size to be inconsistent with allocated storage.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
Generic GeometricField class.
Foam::argList args(argc, argv)
word name(const complex &)
Return a string representation of a complex.
IStringStream optionLookup(const word &opt) const
Return an IStringStream from the named option.