Skip to content

Conversation

@akva2
Copy link
Member

@akva2 akva2 commented Nov 12, 2021

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
Copy link
Member Author

akva2 commented Nov 12, 2021

jenkins build this with downstreams please

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 akva2 force-pushed the texture_prop_funcs branch from a64723a to 107ecfe Compare November 12, 2021 14:46
@akva2
Copy link
Member Author

akva2 commented Nov 12, 2021

jenkins build this with downstreams please

@kmokstad
Copy link
Contributor

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.

@akva2
Copy link
Member Author

akva2 commented Nov 17, 2021

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

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

Successfully merging this pull request may close these issues.

2 participants