-
-
Notifications
You must be signed in to change notification settings - Fork 190
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 xdmffile read function #3536
base: main
Are you sure you want to change the base?
Add xdmffile read function #3536
Conversation
Wouldn't it be sufficient to read in the "vertex_data" as a MeshTags object (using |
@jorgensd This is not possible, as far as I can tell, because
so |
…b.com:mleoni-pf/dolfinx into mleoni/make_read_meshtags_a_template_function
…b.com:mleoni-pf/dolfinx into mleoni/make_read_meshtags_a_template_function
678fd08
to
1f3ca79
Compare
1f3ca79
to
71a8285
Compare
71a8285
to
92a7321
Compare
92a7321
to
d74dc33
Compare
…b.com:mleoni-pf/dolfinx into mleoni/make_read_meshtags_a_template_function
d74dc33
to
ba0bdc0
Compare
ba0bdc0
to
7d9192b
Compare
Co-authored-by: Jørgen Schartum Dokken <[email protected]>
7d9192b
to
9005a9a
Compare
NOTE: This PR is meant to be stacked onto #3533 . The diff of this PR shows the edits of both but the only new changes are the ones related to the function
XDMFFile::read_function
. The rest of the diff will disappear once #3533 is merged and this PR is rebased ontomain
but I am uploading it now so it can be reviewed immediately.This PR introduces much-needed functionalities that let a user read a function from file. This is vital in most scenarios in which a Finite Element element simulation is part of a bigger pipeline and needs to read input data produced by other software.
This PR adds a
read_function
routine to the classXDMFFile
that can read a P1 function from an XDMF file exploiting the fact that the degrees of freedom of a P1 function are the mesh vertexes and that we can now read a [double
-valued] meshtag defined on vertexes, so we can define a P1 function.The implementation closely follows the normal
read_meshtags
function but reads vertex data instead and, as a last step, copies the data in a function'sarray
in the correct position.Co-implemented with @jorgensd .