Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for new computation environment routines. #4

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/python/benchmark_te_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def truncated_ellipsoid_LV(h):

[nodes, reversenodemap, nodemap] = numpy.unique(nodes, True, True)
elem = nodemap(naive_elem)
print 'removed duplicates '+str(temp)+' -> '+str(len(nodes)) + '\n'
print('removed duplicates '+str(temp)+' -> '+str(len(nodes)) + '\n')

UV = naive_nodes[reversenodemap, 4:5]

Expand Down
8 changes: 4 additions & 4 deletions src/python/exfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def _read_element(self, f):
try:
indices = map(int, element_line.split(':')[1].split())
except:
print element_line
print(element_line)
raise
if indices[1] == 0 and indices[2] == 0:
#raise ExfileError(f, "Face or line elements not supported")
Expand Down Expand Up @@ -295,10 +295,10 @@ def _read_node(self, f):
new_values = map(float, line.split())
except ValueError:
raise ExfileError(f, "Expecting node values, got: %s" % line.strip())
if read + len(new_values) > self.num_node_values:
if read + len(list(new_values)) > self.num_node_values:
raise ExfileError(f, "Got more node values than expected.")
values[read:read + len(new_values)] = new_values
read += len(new_values)
values[read:read + len(list(new_values))] = new_values
read += len(list(new_values))

self.nodes.append(ExnodeNode(number, values))

Expand Down
6 changes: 3 additions & 3 deletions src/python/left_ventricle_inflation.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def ExtractNodeCoords(nodes, field_name):
equationsSet.CreateStart(equationsSetUserNumber, region, fibreField, equationsSetSpecification,
equationsSetFieldUserNumber, equationsSetField)
equationsSet.CreateFinish()
print "----> Set up equations set <---\n"
print("----> Set up equations set <---\n")

# Set up material field in equations set.
equationsSet.MaterialsCreateStart(materialFieldUserNumber, materialField)
Expand All @@ -270,8 +270,8 @@ def ExtractNodeCoords(nodes, field_name):
increm = pressure_increments[i]
p = p + increm
tol = tolerances[i]
print 'Applying pressure increment of: ', increm, ' using ', iters, ' iterations'
print 'Current pressure is: ', p
print('Applying pressure increment of: ', increm, ' using ', iters, ' iterations')
print('Current pressure is: ', p)
[problem, solverEquations] = ProblemSolverSetup(equationsSet, problemUserNumber, iters, tol, cellMLOption)
BCEndoPressure(solverEquations, dependentField, endocardial_nodes, increm, basal_nodes, option)

Expand Down
Loading