/[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 2324 by gross, Thu Mar 19 04:23:32 2009 UTC revision 2325 by gross, Thu Mar 19 05:32:13 2009 UTC
# Line 2336  class LameEquation(LinearPDE): Line 2336  class LameEquation(LinearPDE):
2336       @rtype: L{Data<escript.Data>}       @rtype: L{Data<escript.Data>}
2337       @raise IllegalCoefficient: invalid coefficient name       @raise IllegalCoefficient: invalid coefficient name
2338       """       """
2339         out =self.createCoefficient("A")
2340       if name == "A" :       if name == "A" :
2341           out =self.createCoefficient("A")           if self.getCoefficient("lame_lambda").isEmpty():
2342           for i in range(self.getDim()):              if self.getCoefficient("lame_mu").isEmpty():
2343             for j in range(self.getDim()):                  pass
2344               out[i,i,j,j] += self.getCoefficient("lame_lambda")              else:
2345               out[i,j,j,i] += self.getCoefficient("lame_mu")                  for i in range(self.getDim()):
2346               out[i,j,i,j] += self.getCoefficient("lame_mu")                    for j in range(self.getDim()):
2347                        out[i,j,j,i] += self.getCoefficient("lame_mu")
2348                        out[i,j,i,j] += self.getCoefficient("lame_mu")
2349             else:
2350                if self.getCoefficient("lame_mu").isEmpty():
2351                    for i in range(self.getDim()):
2352                      for j in range(self.getDim()):
2353                        out[i,i,j,j] += self.getCoefficient("lame_lambda")
2354                else:
2355                    for i in range(self.getDim()):
2356                      for j in range(self.getDim()):
2357                        out[i,i,j,j] += self.getCoefficient("lame_lambda")
2358                        out[i,j,j,i] += self.getCoefficient("lame_mu")
2359                        out[i,j,i,j] += self.getCoefficient("lame_mu")
2360           return out           return out
2361       elif name == "X" :       elif name == "X" :
2362           return self.getCoefficient("sigma")           return self.getCoefficient("sigma")

Legend:
Removed from v.2324  
changed lines
  Added in v.2325

  ViewVC Help
Powered by ViewVC 1.1.26