/[escript]/trunk/escript/py_src/linearPDEs.py
ViewVC logotype

Diff of /trunk/escript/py_src/linearPDEs.py

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

revision 1384 by ksteube, Mon Sep 24 06:18:44 2007 UTC revision 1385 by trankine, Fri Jan 11 07:33:30 2008 UTC
# Line 200  class PDECoefficient(object): Line 200  class PDECoefficient(object):
200         @raise IllegalCoefficientValue: if the shape of the assigned value does not match the shape of the coefficient         @raise IllegalCoefficientValue: if the shape of the assigned value does not match the shape of the coefficient
201         @raise IllegalCoefficientFunctionSpace: if unable to interploate value to appropriate function space         @raise IllegalCoefficientFunctionSpace: if unable to interploate value to appropriate function space
202         """         """
203           print "SASDSADSA"
204         if newValue==None:         if newValue==None:
205             newValue=escript.Data()             newValue=escript.Data()
206         elif isinstance(newValue,escript.Data):         elif isinstance(newValue,escript.Data):
207             if not newValue.isEmpty():             if not newValue.isEmpty():
208                if not newValue.getFunctionSpace() == self.getFunctionSpace(domain,reducedEquationOrder,reducedSolutionOrder):                if not newValue.getFunctionSpace() == self.getFunctionSpace(domain,reducedEquationOrder,reducedSolutionOrder):
209                  try:                  try:
210                  print "try new value"
211                    newValue=escript.Data(newValue,self.getFunctionSpace(domain,reducedEquationOrder,reducedSolutionOrder))                    newValue=escript.Data(newValue,self.getFunctionSpace(domain,reducedEquationOrder,reducedSolutionOrder))
212                  except:                  except:
213                    raise IllegalCoefficientFunctionSpace,"Unable to interpolate coefficient to function space %s"%self.getFunctionSpace(domain)                print "bad luck!"
214              foo=self.getFunctionSpace(domain)
215              print "XXX"
216                      raise IllegalCoefficientFunctionSpace,"Unable to interpolate coefficient to function space %s"%foo
217         else:         else:
218             newValue=escript.Data(newValue,self.getFunctionSpace(domain,reducedEquationOrder,reducedSolutionOrder))             newValue=escript.Data(newValue,self.getFunctionSpace(domain,reducedEquationOrder,reducedSolutionOrder))
219         if not newValue.isEmpty():         if not newValue.isEmpty():

Legend:
Removed from v.1384  
changed lines
  Added in v.1385

  ViewVC Help
Powered by ViewVC 1.1.26