IFEM icon indicating copy to clipboard operation
IFEM copied to clipboard

added: allow for defining a function for textureproperties

Open akva2 opened this issue 3 years ago • 4 comments

this allows for a generic f(texture(X)) where f can be scalar or vector valued.

ideally f would be a function of property name but as we do not have a base class for f: R -> R^3 we have to use the f: R^3 -> R^3 type for vector functions. for this reason, both scalar and vectorial functions have to refer to the texture value as 'x'.

akva2 avatar Nov 12 '21 14:11 akva2

jenkins build this with downstreams please

akva2 avatar Nov 12 '21 14:11 akva2

jenkins build this with downstreams please

akva2 avatar Nov 12 '21 14:11 akva2

Regarding "as we do not have a base class for f: R -> R^3", you can do, e.g., typedef utl::Function<Real,Vec3> Vec3Func; to get Vec3Func a base class for such functions. See for instance TractionField.h where I use that to represent a time-dependent vector field.

kmokstad avatar Nov 17 '21 15:11 kmokstad

yeah, i realize that it's doable but i'd have to implement a ExprFunc version of it.

akva2 avatar Nov 17 '21 15:11 akva2