Closed davidrudlstorfer closed 3 months ago
During the changes of your review the following two questions came up:
warnings.warn
the following commandline output is written out:/home/rudlstorfer/01_work/01_workspace/meshpy/meshpy/mesh_creation_functions/beam_basic_geometry.py:566: UserWarning: Radius of helix is 0 or twist angle is 90 degrees! Simple line geometry is returned!
warnings.warn(
At the end there's always an unnecessary warnings.warn(
. Have you encountered that problem?
I use black v22.12.0 to format my code. Yesterday you started one pipeline run and it failed due to unformatted code. Are there any specific settings within MeshPy I haven't found?
EDIT
I've also directly added three test cases (simple helix, simple rotated and offset helix and straight line) - this was a very good idea! My initial implementation of the rotation had a bug which is solved with your proposed simple rotation! This is the reason for the changes within the reference files.
Thanks for your review/feedback. I've added everything and sorry for the long discussions. Locally all tests succeed.
Two more little details:
@davidrudlstorfer I just merged #65 which might require a reordering of the created sets in the reference file for this merge request.
I've now done the following things which finalize the PR from my side:
I've fixed the bugs regarding the twist angle. Now a twist angle between -inf
and inf
can be utilized. Additionally, the height and twist can either be positive or negative. Tested it manually for angles in all 4 quadrants as well as angles smaller than 0 and angles larger than 2pi
. This now enables all thinkable sorts of input resulting in correct geometries.
Made the warning of returning a straight line optional and disabled it within the tests.
Added myself to the contributors - thanks for the option that means a lot to me🙏🏻
Finally, I've rebased on main and updated the reference files - again all tests pass locally and I hope that the tests now also pass within the pipeline. That's the output of running python tests/testing_main.py
/home/rudlstorfer/01_work/01_workspace/meshpy/tests/testing_utility.py:81: UserWarning: Path to baci-release not found. Did you set the environment variable BACI_RELEASE?
warnings.warn(
...sssss.ss.ss.ss.ss.....................................s................................................ssmesh_1 number of nodes: 13
mesh_1 number of elements: 6
Point couplings before "couple_nodes": 0
Point couplings after "couple_nodes": 6
.
----------------------------------------------------------------------
Ran 109 tests in 2.527s
OK (skipped=16)
To enable the usage of meshpy within my own input file creation repository it is helpful to create a simple helical beam base geometry. This pull request introduces a new helical mesh creation function with the following parameters (crucial for the helical geometry):
I tested the mesh creation function in general orientations and setups and everything worked as expected. If the general approach is correct I would also add a test.