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

Re-add functions for reading/writing mesh geometry #218

Open
jeff-cohere opened this issue Dec 16, 2021 · 7 comments
Open

Re-add functions for reading/writing mesh geometry #218

jeff-cohere opened this issue Dec 16, 2021 · 7 comments
Labels
I/O input/output

Comments

@jeff-cohere
Copy link
Collaborator

#215 discarded these mesh geometry reading and writing functions, because the assumptions they were written under changed as a result of the work in that PR:

PETSC_INTERN PetscErrorCode TDyMeshReadGeometry(TDyMesh*,const char*);
PETSC_INTERN PetscErrorCode TDyMeshWriteGeometry(TDyMesh*,const char*);

If I understand things correctly, @bishtgautam introduced these functions to save time on calculating mesh geometry for debugging. Maybe it's time for us to optimize the geometry calculations so we don't need these functions anymore. But if that's not practical, we can try to rewrite these functions so they work in the post-215 world.

@jedbrown
Copy link
Member

I think we can optimize geometry so it's faster than reading a file. (And this should be done in PETSc.) If it's still an issue, what is a current representative example?

@bishtgautam
Copy link
Member

@jedbrown These functions were written before your fix to PETSc in https://gitlab.com/petsc/petsc/-/merge_requests/4273. I need to evaluate if reading geometry is still an issue with the latest PETSc.

@bishtgautam
Copy link
Member

@jeff-cohere We should introduce these functions back because they are helpful in debugging the code.

@jeff-cohere
Copy link
Collaborator Author

Sounds good. Maybe we can discuss this sometime soon. It would help me to understand when/where you're using them, and what you're using them for.

@jeff-cohere
Copy link
Collaborator Author

@knepley , here's where we've started talking about writing/reading mesh geometry files. I'd really like it if we could write out HDF5 geometry files and develop some simple tools for manipulating them, and/or visualize them with existing software.

@knepley
Copy link

knepley commented Jan 19, 2022

@jeff-cohere So the way I would start is to do the cellwise stuff in an HDF5 way. You can make a P0 element easily with PetscFECreateLagrange(), and set it into a cloned DM. Then the local/global vectors will be what we want, and you should be able to just do VecView(), if you change the name of the cloned DM, say "diagnostic", so that it is put in a parallel dir in the HDF5 file.

@jeff-cohere jeff-cohere added the I/O input/output label Jan 21, 2022
@jeff-cohere
Copy link
Collaborator Author

@bishtgautam , what would you like in this file? Cell centroids and volumes, face normals and areas, node coordinates? Anything else?

@jeff-cohere jeff-cohere changed the title Reintroduce mesh geometry reading/writing functions or optimize geometry calculations? Re-add functions for reading/writing mesh geometry Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I/O input/output
Projects
None yet
Development

No branches or pull requests

4 participants