/[escript]/trunk/modellib/py_src/geometry.py
ViewVC logotype

Diff of /trunk/modellib/py_src/geometry.py

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

revision 147 by jgs, Fri Aug 12 01:45:47 2005 UTC revision 148 by jgs, Tue Aug 23 01:24:31 2005 UTC
# Line 2  Line 2 
2    
3    
4  from escript.escript import *  from escript.escript import *
5  from escript.modelframe import Model  from escript.modelframe import Model,ParameterSet
6  from finley import finley  from finley import finley
7    
8  class RectangularDomain(Model):  class RectangularDomain(Model):
# Line 54  class RectangularDomain(Model): Line 54  class RectangularDomain(Model):
54    
55            return self._domain            return self._domain
56    
57  class ScalarConstrainer(Model):  class ScalarConstrainer(ParameterSet):
58       """@brief creates a characteristic function for the location of constraints for a scalar value       """@brief creates a characteristic function for the location of constraints for a scalar value
59    
60                @param domain (in) - rectangular domain                @param domain (in) - rectangular domain
# Line 70  class ScalarConstrainer(Model): Line 70  class ScalarConstrainer(Model):
70    
71       """       """
72       def __init__(self,debug=False):       def __init__(self,debug=False):
73             Model.__init__(self,debug=debug)             ParameterSet.__init__(self,debug=debug)
74             self.declareParameter(domain=None, \             self.declareParameter(domain=None, \
75                                   left=False, \                                   left=False, \
76                                   right=False, \                                   right=False, \
# Line 99  class ScalarConstrainer(Model): Line 99  class ScalarConstrainer(Model):
99                  if self.top: self._location_of_constraint+=(x[1]-sup(x[1])).whereZero()                  if self.top: self._location_of_constraint+=(x[1]-sup(x[1])).whereZero()
100            return self._location_of_constraint            return self._location_of_constraint
101    
102  class VectorConstrainer(Model):  class VectorConstrainer(ParameterSet):
103        """@brief creates a characteristic function for the location of constraints for a scalar value        """@brief creates a characteristic function for the location of constraints for a scalar value
104    
105                @param domain (in) - rectangular domain                @param domain (in) - rectangular domain
# Line 121  class VectorConstrainer(Model): Line 121  class VectorConstrainer(Model):
121    
122        """        """
123        def __init__(self,debug=False):        def __init__(self,debug=False):
124             Model.__init__(self,debug=debug)             ParameterSet.__init__(self,debug=debug)
125             self.declareParameter(domain=None, \             self.declareParameter(domain=None, \
126                                   left=[0,0,0],  \                                   left=[0,0,0],  \
127                                   right=[0,0,0],  \                                   right=[0,0,0],  \

Legend:
Removed from v.147  
changed lines
  Added in v.148

  ViewVC Help
Powered by ViewVC 1.1.26