Dear Anne-Cecilie You can just save the nodal values to text files, e.g. numpy.save_txt("brain_displacements.txt",md.variable("ub")) numpy.save_txt("brain_pressure.txt",md.variable("pb")) and so on.
If you want to know the coordinates of each degree of freedom, you can also save these in files numpy.save_txt("brain_displacements_nodes.txt", mfub.basic_dof_nodes()) numpy.save_txt("brain_pressure_nodes.txt", mfpb.basic_dof_nodes()) For displacements and node coordinates you can also reshape your arrays to having 3 columns before exporting. I hope it helps. Best regards Kostas On Tue, Jan 18, 2022 at 10:56 PM Lesage,Anne Cecile J < ajles...@mdanderson.org> wrote: > Dear all > > > > I am using python scripting with getfem > > > > I have a mesh with 54026 > > I output the results in a vtu format with the following script lines > > > > mfoutb = gf.MeshFem(meshb) > > mfoutb.set_classical_discontinuous_fem(2) > > > > mfoutb.export_to_vtu("PoroEResect25brain_%i.vtu" % it, > > mfub, md.variable("ub"), "Displacements", > > mfpb, md.variable("pb"), "Pressure") > > > > when I save the spreadsheet of the results with paraview, I can the > results on 2646060 > > Ideally I would like to have the results only on the 54026 nodes > > Is there a way to correct my definition of mfoutb that corrects that? > > > > I am preforming an inverse method on the material parameter typically on > 700+ simulations, I need my results files to be smaller > > > > Thank you > > Regards > > Anne-Cecile > > The information contained in this e-mail message may be privileged, > confidential, and/or protected from disclosure. This e-mail message may > contain protected health information (PHI); dissemination of PHI should > comply with applicable federal and state laws. If you are not the intended > recipient, or an authorized representative of the intended recipient, any > further review, disclosure, use, dissemination, distribution, or copying of > this message or any attachment (or the information contained therein) is > strictly prohibited. If you think that you have received this e-mail > message in error, please notify the sender by return e-mail and delete all > references to it and its contents from your systems. >