Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer interpolation is inconsistent #209

Open
rchristie opened this issue Nov 28, 2021 · 0 comments
Open

Integer interpolation is inconsistent #209

rchristie opened this issue Nov 28, 2021 · 0 comments

Comments

@rchristie
Copy link
Contributor

Integer grid values are not interpolated -- the nearest parameter is used like texture mapping.

Time-varying integer values are interpolated in time using the same generic template function as real values

template <typename VALUE_TYPE> int cmzn_node_get_field_component_values(
	cmzn_node *node, FE_field *field, int componentNumber, FE_value time,
	int valuesCount, VALUE_TYPE *valuesOut)

with:

*dest = source[time_index_one]*one_minus_time_xi + source[time_index_two]*time_xi;

i.e. not nearest, not using rounding.

Note: Unemap data formerly used short integer values to compress a range of real values; the short values won't interpolate well. Our current approach of interpolating nodal parameters first may need changing. Alternative is to evaluate at stored times as real values (including at element locations) then interpolate the final values with a time basis. The alternative approach is more amenable to adaptive mesh refinement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant