Need help evaluating field by interpolation with a "lookup table"
I am attempting to create a solver which determines the internalField values of a certain scalar field (effectively a field of coefficients "C") based on interpolative evaluation of another scalar field's internal values.
Foe clarification, if I have a normallygenerated (e.g. timestepping, with boundary conditions, evaluated using .solve) scalar field "T," and a .csv file (or other format) of paired values "Cref" vs. "Tref" for the effective range of "T," I need to evaluate "C" at every cell where "T" is already available by interpolating the Cref/Tref data for every value of "T"s internal field, then storing the field "C" for the time step to later perform other calculations. I have already explored using both Foam::interpolateXY and Foam:interpolationTable to attempt this task, but I've encountered a unique problem with each: interpolateXY apparently operates only on "fields," whereas my data is in the form of "lists"; since the Cref/Tref data have no dependence (or information) regarding spatial position. As a result I believe I've failed to understand completely this function's intended use, and now suspect it has nothing to do with what I'm attempting. Using interpolationTable instead yields me a new problem, in which I can't seem to manage accessing and writing to the internalField lists of either "T" or "C" directly. For example, I would ideally have code similar to the following: Code:
interpolationTable lookup(filename); //initialize my interpolationTable with data from file Even the following simple test: Code:
info << T.internalField[1] error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript I would appreciate it if anyone could either alert me to my error, or suggest a better method for evaluating "C" using the interpolation data. (Thanks!) 
Additionally, I'm having some difficulty handling deconstruction of the "interpolationTable," but this is a secondary issue. Any help with the original problem would be greatly appreciated!

Quote:
You need to put in brackets with no arguments to access the internal field function i.e. Code:
info << T.internalField()[1] Philip 
All times are GMT 4. The time now is 01:22. 