Skip to content
Snippets Groups Projects
Commit cbc76253 authored by Keck Jean-Baptiste's avatar Keck Jean-Baptiste
Browse files

1D fields quickfix

parent fa715fd8
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ class FortranFFTWOperator(ComputationalGraphOperator): ...@@ -36,7 +36,7 @@ class FortranFFTWOperator(ComputationalGraphOperator):
self.domain = domain self.domain = domain
self.topology = topology self.topology = topology
def initialize(self,topgraph_method): def initialize(self,topgraph_method=None):
super(FortranFFTWOperator,self).initialize(topgraph_method) super(FortranFFTWOperator,self).initialize(topgraph_method)
@debug @debug
......
...@@ -86,6 +86,8 @@ class DiscreteField(object): ...@@ -86,6 +86,8 @@ class DiscreteField(object):
for _ in xrange(self.nb_components)]) for _ in xrange(self.nb_components)])
def set_data(self, new_data): def set_data(self, new_data):
if (self.nb_components==1) and not isinstance(new_data,(list,tuple)):
new_data = [new_data]
check_instance(new_data, (list,tuple)) check_instance(new_data, (list,tuple))
new_data = list(new_data) new_data = list(new_data)
backend = self.topology.backend() backend = self.topology.backend()
......
...@@ -78,7 +78,6 @@ class Analytic(ComputationalGraphOperator): ...@@ -78,7 +78,6 @@ class Analytic(ComputationalGraphOperator):
assert simulation is not None, \ assert simulation is not None, \
"Missing simulation value for computation." "Missing simulation value for computation."
for (var,topo) in self.variables.iteritems(): for (var,topo) in self.variables.iteritems():
print var.name, 'INITIALIZE'
var.initialize(time=simulation.time, topo=topo) var.initialize(time=simulation.time, topo=topo)
@classmethod @classmethod
......
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