Skip to content
Snippets Groups Projects

Katropton: Add supports for Gmsh 4

Merged Liegeois Kim requested to merge gmsh_4_mpi into master
1 unresolved thread
1 file
+ 6
21
Compare changes
  • Side-by-side
  • Inline
+ 6
21
@@ -16,22 +16,13 @@ import os
import numpy as np
from katropton.eigenvalues import *
def get_gmsh_version():
command_line = 'gmsh --version'
tmp = shlex.split(command_line)
fileout = open('gmsh_version.log', 'w')
p = subprocess.Popen(tmp,
stdin=subprocess.PIPE,
stdout=fileout,
stderr=fileout,
env=os.environ,
shell=False,
close_fds=True)
retcode = p.wait()
fileout.close()
f = open('gmsh_version.log', 'r')
tmp = f.read().split('.')
return int(tmp[0]), int(tmp[1]), int(tmp[2])
tmp = subprocess.check_output(["gmsh", "--version"],
stderr=subprocess.STDOUT)
tmp2 = tmp.split('.')
return int(tmp2[0]), int(tmp2[1]), int(tmp2[2])
def import_MPI():
try:
@@ -261,16 +252,10 @@ def extract(msh,
pos = msh.nodes[int(nodes[i])-1].pos
x[i] = pos[which_pos]
#print x
indices = np.argsort(x)
#print x
for i in range(0, len(x)):
x_sorted[i] = x[indices[i]]
nodes_sorted[i] = nodes[indices[i]]
#print x_sorted
#print nodes_sorted
with open(name_sol) as fp:
for i, line in enumerate(fp):
Loading