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;
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++)
269 runTime.setTime(timeDirs[timei], 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.
IOobjectList lookupClass(const word &className) const
Return the list for all IOobjects of a given class.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List of IOobjects with searching and retrieving facilities.
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.
label size() const
Return number of elements in table.
Field reading functions for post-processing utilities.
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Abstract base class for interpolating in 1D.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
bool optionFound(const word &opt) const
Return true if the named option is found.
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.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const word & name() const
Name (const access)
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.
An instant of time. Contains the time value and name.
Mesh data needed to do the Finite Volume discretisation.
A List with indirect addressing.
IStringStream optionLookup(const word &opt) const
Return an IStringStream from the named option.
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...
const word & name() const
Return name.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.