-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix data initialization #81
Conversation
…als at b3f92fc into this repository for development. Also add logs to be able to check for regression.
…nction for data initialization and update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I highlighted some of the obvious todos of the current draft.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes align the adapter to a better workflow for initialization 👍
Some open points to be discussed and implemented (see comments above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments from the discussion with @IshaanDesai and @uekerman.
We decided not add an self._interface.is_read_data_available()
branch in read_data
, since this will interfere with the CouplingExpression and PointSource update/creation.
In write_data
we could optionally add the self._interface.is_write_data_required()
.
As we no longer return data from initialization and also initialize an empty New implementation:
Old implementation:
|
The reason for this is probably (and hopefully) 3cd2fb8, where I intentionally removed initialization to see 1) whether our new scheme can handle cases without initialization and 2) what happens with the number of QN iterations. I would not expect a regression from this PR. I will now prepare a PR to update the tutorials according to this PR and carefully check for any regressions. As soon as the tutorials PR is ready I would suggest to merge everything (don't forget to remove the |
I prepared precice/tutorials#101 and checked that everything is working. I did not find anything that we have to worry about. So from my perspective this PR is ready to merge. |
* Copy /tutorials/HT/partitioned-heat/fenics-fenics form precice/tutorials at b3f92fc into this repository for development. Also add logs to be able to check for regression. * Move initialize_data() into initialize() * Skip initialization to see what happens. * Always create empty CouplingExpression and PointSource, use update function for data initialization and update. * Update tests. * Simplifying point sources definition and use * Further simplifying initialization and adding error messages Co-authored-by: ishaandesai <ishaandesai@gmail.com>
closes #80
This PR provides a draft (or a solution?) for #80.
Main changes
initialize_data
ininitialize
write_function
optional argument ofinitialize
write_function
is provided, butself._interface.is_action_required(precice.action_write_initial_data())
coupling_expression.is_scalar_valued()
orcoupling_expression.is_vector_valued()
on an emptycoupling_expression
. Empty means, created, but not updated.Restrictions
self._interface.is_read_data_available()
anymore.Todo
prototype
folder before merge