Skip to content

Offers more control to the user via new interface#59

Merged
IshaanDesai merged 57 commits intodevelopfrom
introduceMidLevelInterface
Jun 10, 2020
Merged

Offers more control to the user via new interface#59
IshaanDesai merged 57 commits intodevelopfrom
introduceMidLevelInterface

Conversation

@BenjaminRodenberg
Copy link
Contributor

@BenjaminRodenberg BenjaminRodenberg commented Dec 11, 2019

closes #37 and #33
Also closes #66 as the new design now has numpy docstring style documentation

@BenjaminRodenberg
Copy link
Contributor Author

@IshaanDesai IshaanDesai changed the title Offers more control to the user via new interface WIP: Offers more control to the user via new interface Dec 13, 2019
@IshaanDesai IshaanDesai added the enhancement New feature or request label Dec 13, 2019
Copy link
Contributor Author

@BenjaminRodenberg BenjaminRodenberg left a comment

Choose a reason for hiding this comment

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

As soon as the return value of the read function is fixed, I can take care of updating the tests.

Copy link
Contributor Author

@BenjaminRodenberg BenjaminRodenberg left a comment

Choose a reason for hiding this comment

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

I mainly have comments on documentation. The rest looks good and is in my opinion ready to merge 👍

Feel free to go ahead, when you think everything is ready. Please stash the commits before you merge to avoid unnecessary commits in the history.

:return: Returns lists of PointSources
"""
# PointSources are scalar valued, therefore we need an individual scalar valued PointSource for each dimension in a vector-valued setting
# TODO: a vector valued PointSource would be more straightforward, but does not exist (as far as I know)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I totally agree. I think we should create an issue for this todo.

@BenjaminRodenberg
Copy link
Contributor Author

I just realized that for checkpointing the n is actually not mandatory. We use it in the heat tutorial for bookkeeping only. It is actually not required for the tutorial to work correctly. One can also argue whether t should be mandatory for a checkpoint.

From an API design point of view it would be less restrictive to make these parameters optional to not force the user to provide them, if they are not required for the case the user is solving or do not even exist. However, I think we can also solve this later. If a user really has a problem providing t and n fake values could be provided and this will not harm as far as I know.

@IshaanDesai IshaanDesai merged commit 69f199f into develop Jun 10, 2020
BenjaminRodenberg pushed a commit to precice/tutorials that referenced this pull request Jun 10, 2020
…ated tutorials (#62)

Ensures compatibility of tutorials to new interface of FEniCS adapter introduced in precice/fenics-adapter#59
@BenjaminRodenberg BenjaminRodenberg deleted the introduceMidLevelInterface branch October 10, 2020 18:07
BenjaminRodenberg added a commit that referenced this pull request Dec 21, 2020
* introduces mid level interface #37 

* Replacing all API functions to new python_bindings structure

* Adapter Core now contains only helper functions. adapter_core.py is a source file where no API functions are present.

* Changing the way boundary conditions are updated. Providing a generic function so that user can update boundary condition.

* Saving a copy of all FEniCS functions passed to Adapter to ensure Adapter does not directly modify functions in the problem setup

* New point source functions to handling vector point sources in FSI cases

* Numpy docstring style documentation for all functions and classes

* Fixing read and write mock tests

* Adding mock test for FEniCS Expression functionality

* Disabling Windows and OSx tests as fenics dependency not satisfied

Co-authored-by: ishaandesai <ishaandesai@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consistently use numpy style docstring Expose mid-level functions to user

4 participants