|
From: | Lesage,Anne Cecile J |
Subject: | FW: [EXT] Re: field output size |
Date: | Wed, 19 Jan 2022 16:18:07 +0000 |
Dear Kostas I tried this to test the nodes output and its transpose The problem is that the nodes are printed sequentially three times in a row np.savetxt("brain_displacements_nodeslines.txt", mfub.basic_dof_nodes(),delimiter=' ', fmt='%f') a = np.empty([meshb.nbpts(),3]) for i in range(meshb.nbpts()): Pt=mfub.basic_dof_nodes(i) a[i][0]=Pt[0] a[i][1]=Pt[1] a[i][2]=Pt[2] np.savetxt("brain_displacements_nodes.txt", a, delimiter=' ', fmt='%f') thank you Anne-Cecile From: Konstantinos Poulios <logari81@googlemail.com>
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
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 <AJLesage@mdanderson.org> wrote:
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.
|
[Prev in Thread] | Current Thread | [Next in Thread] |