/[escript]/branches/3.4.1/modellib/py_src/input.py
ViewVC logotype

Diff of /branches/3.4.1/modellib/py_src/input.py

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

revision 815 by gross, Wed Aug 23 09:31:10 2006 UTC revision 816 by gross, Thu Aug 24 00:03:01 2006 UTC
# Line 138  class InterpolateOverBox(ParameterSet): Line 138  class InterpolateOverBox(ParameterSet):
138              f_top = (x[1] - self.left_bottom_front[1])/\              f_top = (x[1] - self.left_bottom_front[1])/\
139           (self.right_top_back[1] - self.left_bottom_front[1])           (self.right_top_back[1] - self.left_bottom_front[1])
140              f_bottom = 1. - f_top              f_bottom = 1. - f_top
141              out = self.value_left_bottom_front * f_left * f_bottom \              out = f_left * f_bottom * self.value_left_bottom_front \
142                  + self.value_right_bottom_front* f_right * f_bottom \                  + f_right * f_bottom * self.value_right_bottom_front \
143                  + self.value_left_top_front    * f_left * f_top \                  + f_left * f_top * self.value_left_top_front \
144                  + self.value_right_top_front   * f_right * f_top                  + f_right * f_top * self.value_right_top_front
145          else:          else:
146              f_right = (x[0] - self.left_bottom_front[0])/\              f_right = (x[0] - self.left_bottom_front[0])/\
147                      (self.right_top_back[0] - self.left_bottom_front[0])                      (self.right_top_back[0] - self.left_bottom_front[0])
# Line 152  class InterpolateOverBox(ParameterSet): Line 152  class InterpolateOverBox(ParameterSet):
152              f_back = (x[2] - self.left_bottom_front[1])/\              f_back = (x[2] - self.left_bottom_front[1])/\
153                      (self.right_top_back[2] - self.left_bottom_front[2])                      (self.right_top_back[2] - self.left_bottom_front[2])
154              f_front = 1. - f_back              f_front = 1. - f_back
155              out = self.value_left_bottom_front * f_left * f_bottom * f_front \              out = f_left * f_bottom * f_front * self.value_left_bottom_front\
156                  + self.value_right_bottom_front* f_right * f_bottom * f_front \                  + f_right * f_bottom * f_front * self.value_right_bottom_front\
157                  + self.value_left_top_front    * f_left * f_top * f_front \                  + f_left * f_top * f_front * self.value_left_top_front\
158                  + self.value_right_top_front   * f_right * f_top * f_front \                  + f_right * f_top * f_front * self.value_right_top_front\
159                  + self.value_left_bottom_back  * f_left * f_bottom * f_back \                  + f_left * f_bottom * f_back * self.value_left_bottom_back\
160                  + self.value_right_bottom_back * f_right * f_bottom * f_back \                  + f_right * f_bottom * f_back * self.value_right_bottom_back\
161                  + self.value_left_top_back     * f_left * f_top * f_back \                  + f_left * f_top * f_back * self.value_left_top_back\
162                  + self.value_right_top_back    * f_right * f_top * f_back                  + f_right * f_top * f_back * self.value_right_top_back
163          return out          return out
164    
165    

Legend:
Removed from v.815  
changed lines
  Added in v.816

  ViewVC Help
Powered by ViewVC 1.1.26