Skip to content
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

Implement interface boundaries #53

Merged
merged 27 commits into from
Jun 1, 2023
Merged

Implement interface boundaries #53

merged 27 commits into from
Jun 1, 2023

Conversation

DavidAKopriva
Copy link
Collaborator

Nascent code is now implemented to mesh interior regions to allow for multiple material applications.

Move curveType into the mesh class to save after the mesh has been generated.
Some basic cleanup including zeroing the node acceleration and removing a redundant subroutine. Code still crashes on final smooth with interface boundaries.
at this point
Remove unused procedure.
All cleanup is moved out of the interface code and moved into the MeshCleaner code.
Modify logic on node release to remove nodes from the node list if the node list is the only object that references it. Also manually remove all the linked lists from the boundaryEdgesArray before releasing it. This seems to avoid an issue where waiting until the finalizer does it causes a crash in the interface routines. It also fixes an issue where unreferenced nodes appeared in the node list in the mesh file.
Prepare for adding the material name to an element if there are interface boundaries.
Instead of using an objectArray to store the pointers for the 4/8 element nodes, use an allocatable array of SMNodePtrs. This seems to avoid not the memory crash when using interface boundaries.
Move the setting of material IDs to the very end. Delete some unused code.
Material properties are only set if the ISM_MM output format is requested.
Remove redundant material setting code now covered in SetMaterialProperties
In several places execution was altered if non-fatal errors were present. Changes general catch to catch only on fatal exceptions.
BoneAndMarrow.control added to test suite.
The changes made don't generate unused nodes in the mesh. Other than that, the meshes are the same.
@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Merging #53 (6aa4753) into main (ae2f145) will increase coverage by 5.97%.
The diff coverage is 90.90%.

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   68.00%   73.97%   +5.97%     
==========================================
  Files          68       68              
  Lines       10275    10259      -16     
==========================================
+ Hits         6987     7589     +602     
+ Misses       3288     2670     -618     
Flag Coverage Δ
unittests 73.97% <90.90%> (+5.97%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
Source/3DSource/HexMeshObjects.f90 96.29% <ø> (ø)
...rves/DiscreteCurves/ChainedSegmentedCurveClass.f90 54.31% <ø> (ø)
Source/Foundation/Geometry.f90 82.92% <ø> (ø)
Source/HOHQMeshMain.f90 44.61% <0.00%> (-2.93%) ⬇️
Source/Project/MeshProject.f90 75.59% <50.00%> (+4.01%) ⬆️
Source/3DSource/Mesh3DOutputMethods.f90 98.07% <60.00%> (-0.95%) ⬇️
Source/Mesh/MeshCleaner.f90 82.76% <82.00%> (+15.05%) ⬆️
Source/MeshObjects/SMMeshObjects.f90 66.83% <83.33%> (+4.83%) ⬆️
Source/3DSource/SimpleSweep.f90 90.32% <100.00%> (ø)
Source/HOHQMesh.f90 65.57% <100.00%> (ø)
... and 10 more

... and 4 files with indirect coverage changes

@DavidAKopriva
Copy link
Collaborator Author

The documentation still needs to be updated before a merge.

Add documentation on interface boundaries. Add BoneAndMarrow example. **The new added figure needs to be moved from the Figures directory to where all the other figures are stored in github and references changed in two places: Introduction and theModel**
Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

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

I am not able to really review the Fortran part, but I had a quick look at the docs and nothing - besides a small typo - struck me as problematic

Documentation/docs/introduction.md Outdated Show resolved Hide resolved
Fix typo in new addition to the documentation

Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Copy link
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

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

@DavidAKopriva I apologize for the extreme delay in my review. This slipped off my radar with all my teaching obligations.

This is a very cool new feature! Now we can create conforming interior/exterior object meshes for multi-material wave propagation problems. I left a few comments throughout. The main issue I found (also experimenting with the new feature locally on my machine) is that the background material name is not set properly in the resulting mesh file even when a MATERIALS block is present in the control file. I tried my best to track down where this bug could be.

Benchmarks/BenchmarkData/AllFeatures.txt Show resolved Hide resolved
Benchmarks/ControlFiles/BoneAndMarrow.control Outdated Show resolved Hide resolved
Benchmarks/MeshFiles/Benchmarks/BoneAndMarrow.mesh Outdated Show resolved Hide resolved
Benchmarks/TestGeneratorControlFiles/BoneAndMarrow.control Outdated Show resolved Hide resolved
Documentation/docs/TheISMMeshFileFormats.md Outdated Show resolved Hide resolved
Source/MeshObjects/SMMeshObjects.f90 Outdated Show resolved Hide resolved
Source/Project/Mesh/SMMeshClass.f90 Outdated Show resolved Hide resolved
Source/Project/Mesh/SMMeshClass.f90 Show resolved Hide resolved
Source/Mesh/MeshGeneratorMethods.f90 Show resolved Hide resolved
Source/Mesh/MeshGeneratorMethods.f90 Outdated Show resolved Hide resolved
DavidAKopriva and others added 3 commits May 21, 2023 10:56
Fixes two main issues with output of the mesh in the -MM format.
1. Fix the name of the background material keyword to "background material name" and check if it is set when the material key is present. If not, a warning is posted and the background material name is defaulted to "base"
2. Fix the output of the base material name by removing the "materialName" property from the element definition and printing the material name using the materialID of the element and the materialNameForIDs array held by the mesh.
3. Do #2 for hex meshes, too.
Fix typos in docs and control files. Remove commented out code that used old data structures.
@andrewwinters5000
Copy link
Member

New figure for the docs.
BoneAndMarrow

Copy link
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

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

LGTM!

@andrewwinters5000 andrewwinters5000 requested a review from sloede June 1, 2023 08:29
Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

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

I can't claim I have really read the code (or understood it), but nothing obvious struck me when browsing through the changes, thus this LGTM!

@andrewwinters5000 andrewwinters5000 merged commit fd9043d into main Jun 1, 2023
@andrewwinters5000 andrewwinters5000 deleted the InnerBoundaryDev branch June 1, 2023 19:55
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.

3 participants