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)" 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;
250 timeVals[i] = timeDirs[i].value();
251 timeNames[i] = timeDirs[i].name();
265 Info<<
"Interpolating fields for times:" <<
endl;
267 for (
label timei = 0; timei < timeDirs.
size() - 1; timei++)
274 fieldInterpolator interpolator
static autoPtr< interpolationWeights > New(const word &type, const scalarField &samples)
Return a reference to the selected interpolationWeights.
A HashTable with keys but without contents.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
List of IOobjects with searching and retrieving facilities.
void off()
Switch the function objects off.
const word & name() const
Name (const access)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool optionFound(const word &opt) const
Return true if the named option is found.
Field reading functions for post-processing utilities.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Abstract base class for interpolating in 1D.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
label size() const
Return number of elements in table.
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
A class for handling words, derived from string.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
word name(const complex &)
Return a string representation of a complex.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
An instant of time. Contains the time value and name.
IOobjectList lookupClass(const word &className) const
Return the list for all IOobjects of a given class.
const functionObjectList & functionObjects() const
Return the list of function objects.
Mesh data needed to do the Finite Volume discretisation.
A List with indirect addressing.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
IStringStream optionLookup(const word &opt) const
Return an IStringStream from the named option.