Skip to content

Named Functions#1314

Merged
chleh merged 17 commits intoufz:masterfrom
chleh:named-functions
Aug 4, 2016
Merged

Named Functions#1314
chleh merged 17 commits intoufz:masterfrom
chleh:named-functions

Conversation

@chleh
Copy link
Copy Markdown
Collaborator

@chleh chleh commented Jul 6, 2016

Follow-up of #1312.

This PR adds classes that enable the construction of expression trees dynamically at runtime.
That roughly goes into the direction discussed recently in the frame of constitutive relations.
However, I want to use the code provided here at first to compute secondary variables.

For a usage example, please have a look at the tests. There will be a follow-up PR coupling this PR with FEM processes, soon.

@chleh chleh force-pushed the named-functions branch 3 times, most recently from 9820f66 to e910f65 Compare July 26, 2016 07:23
Comment thread NumLib/NamedFunction.h Outdated
template <typename ReturnType, typename... Arguments>
NamedFunction(
std::string const& name,
std::vector<ArgumentInfo>&& arguments,
Copy link
Copy Markdown
Collaborator

@norihiro-w norihiro-w Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to name it argument_names

@norihiro-w
Copy link
Copy Markdown
Collaborator

i checked only class interface. Comments are mostly about naming of functions etc.

@chleh
Copy link
Copy Markdown
Collaborator Author

chleh commented Aug 2, 2016

I'll do the renaming when the main part of the code review has been finished.

Comment thread NumLib/NamedFunction.cpp Outdated
generateCaller<21>(), generateCaller<22>(), generateCaller<23>(),
generateCaller<24>(), generateCaller<25>(), generateCaller<26>(),
generateCaller<27>(), generateCaller<28>(), generateCaller<29>(),
generateCaller<30>(), generateCaller<31>()};
Copy link
Copy Markdown
Collaborator Author

@chleh chleh Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: MAX_FUNCTION_ARGS is 32. ✅

@norihiro-w
Copy link
Copy Markdown
Collaborator

i will not review cpp files because there are many things I don't understand and these code will be used only for output. If the renaming is done, this PR is ok from my side.

Comment thread NumLib/NamedFunctionCaller.cpp Outdated
return;

auto const& si_so = map_sink_source[sink_fct];
int const num_args = si_so.size();
Copy link
Copy Markdown
Member

@endJunction endJunction Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto or std::size_t (resolves some of the implicit conversions...) ✅


enum class TraversePosition { StartNode, BetweenChildren, EndNode };

template <typename Callback>
Copy link
Copy Markdown
Member

@endJunction endJunction Aug 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DFS, traverse ✅

@chleh chleh force-pushed the named-functions branch from cda4f7b to 1952186 Compare August 4, 2016 09:49
@chleh chleh merged commit 50ddf32 into ufz:master Aug 4, 2016
@chleh chleh deleted the named-functions branch August 4, 2016 12:42
@ogsbot
Copy link
Copy Markdown
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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.

5 participants