-
Notifications
You must be signed in to change notification settings - Fork 24
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 remeshing #1
Comments
I found a couple of bugs in the I added a while loop to the C++ main simulation code to reproduce the Fortran |
I've adding a
|
The initial part of the TetGen meshing seems to be working, creating the same number of elements and node. |
I've converted an svFSI test provided by @fgerosa that triggers remeshing. svFSI and svFSIplus were giving different intermediates results, tracked this down to the I rewrote |
The remeshing code seems to work for the above test. The challenge now is to restart the simulation with the new mesh. The Fortran code essentially starts a new simulation, reading the .inp file again, distributing the mesh, etc. checking the global |
I've fixed a couple of indexing bugs and some misinterpreted logic. I found another inconsistency in the codes in checking if a point is in an element, uses a matrix inverse to compute the local element coordinates of a point. The Fortran code uses a tol=1e-14 to check if the local element coordinates are in [0.0, 1.0] but this is too small for the C++ code, changed it to 1e-8 and the codes then produced the same results. The Fortran and C++ codes and now produce about the same results. I will next try remeshing for a parallel simulation. |
Parallel remeshing is now working for the test I am using, a couple of indexing problems and a bug in reading/writing mesh partitions. It took a long time to find an unintentional use of the
which should have been
This operator was added for certain element-by-element array operations in the linear solver. I will review and maybe remove it. |
Enabling remeshing for an FSI simulation with a solid and fluid mesh (svFSIplus-Tests/07-fsi/ale/03-pipe_3D) causes svFSIplus to fail when running in parallel. The crash is in the code that checks for mesh distortion and not in the actual remeshing code. |
Printing out the number of elements (lM.nEl) of the mesh passed to the
The I've modified the |
I've fixed a bug in
to
|
I've coded around more 0-size array issues and fixed an indexing bug. The 4-process parallel remeshing now works for the most excellent FSI problem provided to me by @fgerosa. However, the Fortran and C++ remeshing does not produce identical meshes, differ by a few tens of nodes. I think that is OK but I will have a look to see what might be causing that. |
The remeshing does produce the same meshes for this simulation. |
I have made a pull request for the new code. Note that this code will not match the Fortran results until SimVascular/svFSI#105 is resolved. |
Merged into |
Add remeshing for fluid-solid simulations.
For now I will just convert the current Fortran remeshing implementation to C++.
The text was updated successfully, but these errors were encountered: