-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add potential interactions in 4C #74
Add potential interactions in 4C #74
Conversation
0aa0d06
to
a2e3cb2
Compare
One thing I am unsure about is how to add a global (or get) a global ID (number) for a defined function? I specifically set it with
|
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.
Thanks @davidrudlstorfer for the contribution. I left some comments. Also can you please add a test case to cover your changes? One (or how many you need) for the beam potential interactions and one where we check the nodes_on_plane
function?
@davidrudlstorfer in general the script looks good to me, one comment: input_file.write_input_file("_test_output/test.dat", header=False) In testing we always turn the header off, but in practice I would keep it on, as it adds some information to your input file that can later be used to help to identify the state of the script when the file was created. |
@isteinbrecher thanks for your review! I've added all of your recommendations to latest changes. Also thanks for the help with the function numbering within the Regarding the tests: I took the liberty and renamed I've also added a test to check an exemplary beam potential interaction input file for 4C. |
@davidrudlstorfer everything looks good to me, if you think this is ready, we can merge this. |
Thanks for the review! From my side it would be ready to merge 🚀 |
Can you click on the merge button or is this for member of the group |
Unfortunately I am not authorized to push the big button |
I invited you to the project with |
@isteinbrecher thanks for the invitation, unfortunately it still does not work ![]() Is the rule active within this repository that contributors cannot merge if they created the PR? |
How about now? |
Yes - worked like a charm. Thanks for your help and review regarding this PR! This concludes the first steps for me regarding MeshPy. I am now going to include it within my own repo for the creation of input files. I am going to contribute further to MeshPy depending on different upcoming needs 😄 |
Thanks for your contributions and looking forward to the next ones! I might come up to you for some small improvements cleanup in the future 😉 |
In this PR I added the following things:
A new top level directory
FourC
(I learned that Python modules are not allowed to start with a number, e.g.,4C
) which now includes thebeam_potential.py
file for potential interactions.Therein, I've added a new class
BeamPotential
which helps with the header and runtime output definition as well as the boundary conditions for potential interactionsI also added your proposed code snippet to the utilities of MeshPy, as this is a very useful tool.
The final structure is probably upon discussion, therefore, I've waited to add a test (as this only tests for simple header changes this is not yet important)
Finally I now use this code:
Click me
to create the following perfectly fine input file (
.txt
instead of.dat
due to Github not supporting.dat
files)test_potential_interaction.txt
I would be more than happy to get your feedback regarding these changes 😊
Closes #72