> On 22 Oct 2016, at 04:09, Mayank Jog <[email protected]> wrote: > > Hello, > I have been using "simnibs" software which uses gmsh to calculate electric > fields over a 3D mesh/geometry (human head). > It outputs a final .msh file, that contains the electric field information, > and can be viewed using gmsh. > > My issue is, I want to convert this file to a list where each line = > [coord location, electric field value ] How do I go about doing it? > > The ultimate goal is to regrid this data onto a regular cartesian grid to do > some funky postprocessing (fourier transforms, followed by funky stuff).
Here's an example: Merge "tutorial/view3.pos"; Plugin(CutBox).X0=0; Plugin(CutBox).Y0=0; Plugin(CutBox).Z0=0; Plugin(CutBox).X1=1; Plugin(CutBox).Y1=0; Plugin(CutBox).Z1=0; Plugin(CutBox).X2=0; Plugin(CutBox).Y2=1; Plugin(CutBox).Z2=0; Plugin(CutBox).X3=0; Plugin(CutBox).Y3=0; Plugin(CutBox).Z3=1; Plugin(CutBox).NumPointsU=20; Plugin(CutBox).NumPointsV=20; Plugin(CutBox).NumPointsW=20; Plugin(CutBox).ConnectPoints=0; Plugin(CutBox).Boundary=0; Plugin(CutBox).View=0; Plugin(CutBox).Run; Save View[1] "points.txt"; > I tried saving the .msh file as a .txt ** , and then reading it line by > line.....I was thinking of replacing each triangular element with its > centroid. However, I don't know how to proceed with other elements....please > help me out > > Thank you! > Mayank > > ** "Post processing Generic txt" option in "save as" in gmsh > _______________________________________________ > gmsh mailing list > [email protected] > http://onelab.info/mailman/listinfo/gmsh -- Prof. Christophe Geuzaine University of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaine Free software: http://gmsh.info | http://getdp.info | http://onelab.info _______________________________________________ gmsh mailing list [email protected] http://onelab.info/mailman/listinfo/gmsh
