If the data is given node-based, this can be done more or less easily with awk. If the data is cell-centered (as it seems to be the case from your description) probably a more complex solution will be needed.
Can you give us an example .msh file you want to convert to plain ASCII columns? -- jeremy On Fri, 2016-10-21 at 19:09 -0700, Mayank Jog 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). 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 _______________________________________________ gmsh mailing list [email protected] http://onelab.info/mailman/listinfo/gmsh
