Mentions légales du service

Skip to content
Snippets Groups Projects
Commit af4bfb30 authored by Martin Genet's avatar Martin Genet
Browse files

Merge branch 'master' of gitlab.inria.fr:mgenet/dolfin_dic

parents fe001fd1 697e6fc0
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ class Image(): ...@@ -103,7 +103,7 @@ class Image():
# structure # structure
if (structure["type"] == "no"): if (structure["type"] == "no"):
self.I0_structure = self.I0_structure_no self.I0_structure = self.I0_structure_no
if (structure["type"] == "box"): elif (structure["type"] == "box"):
self.I0_structure = self.I0_structure_box self.I0_structure = self.I0_structure_box
self.Xmin = structure["Xmin"] self.Xmin = structure["Xmin"]
self.Xmax = structure["Xmax"] self.Xmax = structure["Xmax"]
...@@ -206,7 +206,7 @@ class Image(): ...@@ -206,7 +206,7 @@ class Image():
if (g is not None): g[:] = 1. # MG 20180806: gradient is given by texture; here it is just indicator function if (g is not None): g[:] = 1. # MG 20180806: gradient is given by texture; here it is just indicator function
def I0_structure_box(self, X, i, g=None): def I0_structure_box(self, X, i, g=None):
if numpy.greater_equal(X, self.Xmin) and numpy.less_equal(X, self.Xmax): if all(numpy.greater_equal(X, self.Xmin)) and all(numpy.less_equal(X, self.Xmax)):
i[0] = 1. i[0] = 1.
else: else:
i[0] = 0. i[0] = 0.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment