/[escript]/branches/diaplayground/weipa/py_src/__init__.py
ViewVC logotype

Diff of /branches/diaplayground/weipa/py_src/__init__.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5146 by caltinay, Thu May 15 01:40:06 2014 UTC revision 5147 by caltinay, Fri Sep 12 00:33:02 2014 UTC
# Line 42  def interpolateEscriptData(domain, data) Line 42  def interpolateEscriptData(domain, data)
42                  domain=fs.getDomain()                  domain=fs.getDomain()
43              elif domain != fs.getDomain():              elif domain != fs.getDomain():
44                  raise ValueError("weipa: All Data must be on the same domain!")                  raise ValueError("weipa: All Data must be on the same domain!")
45              if fs == Solution(domain):              new_data[n]=d
46                  new_data[n]=interpolate(d, ContinuousFunction(domain))              try:
47              elif fs == ReducedSolution(domain):                  if fs == Solution(domain):
48                  new_data[n]=interpolate(d, ReducedContinuousFunction(domain))                      new_data[n]=interpolate(d, ContinuousFunction(domain))
49              else:                  elif fs == ReducedSolution(domain):
50                  new_data[n]=d                      new_data[n]=interpolate(d, ReducedContinuousFunction(domain))
51                except RuntimeError as e:
52                    if str(e).startswith("FunctionSpaceException"):
53                        pass
54                    else:
55                        raise e
56    
57      return domain,new_data      return domain,new_data
58    
59  def createDataset(domain=None, **data):  def createDataset(domain=None, **data):

Legend:
Removed from v.5146  
changed lines
  Added in v.5147

  ViewVC Help
Powered by ViewVC 1.1.26