/[escript]/trunk/downunder/py_src/coordinates.py
ViewVC logotype

Diff of /trunk/downunder/py_src/coordinates.py

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

revision 4396 by caltinay, Mon May 6 01:52:05 2013 UTC revision 4397 by jfenwick, Thu May 9 06:17:15 2013 UTC
# Line 67  class ReferenceSystem(object): Line 67  class ReferenceSystem(object):
67          :type other: `ReferenceSystem`          :type other: `ReferenceSystem`
68          :returns: ``True`` if other defines the same reference system          :returns: ``True`` if other defines the same reference system
69          :rtype: ``bool``          :rtype: ``bool``
70          :note: needs to be overwritten by a particular reference system          
71            .. note:: needs to be overwritten by a particular reference system
72          """          """
73          raise NotImplementedError()          raise NotImplementedError()
74    
75      def isCartesian(self):      def isCartesian(self):
76          """          """
77          returns if the reference system is Cartesian          returns if the reference system is Cartesian
78            
79            .. note:: needs to be overwritten by a particular reference system
80            
81          :rtype: ``bool``          :rtype: ``bool``
 \       :note: needs to be overwritten by a particular reference system  
82          """          """
83          raise NotImplementedError()          raise NotImplementedError()
84                
# Line 83  class ReferenceSystem(object): Line 86  class ReferenceSystem(object):
86          """          """
87          creates an appropriate coordinate transformation on a given domain          creates an appropriate coordinate transformation on a given domain
88    
89            .. note:: needs to be overwritten by a particular reference system
90                    
91          :param domain: domain of transformation          :param domain: domain of transformation
92          :type domain: `esys.escript.AbstractDomain'          :type domain: `esys.escript.AbstractDomain`
93          :rtype: `SpatialCoordinateTransformation`          :rtype: `SpatialCoordinateTransformation`
         :note: needs to be overwritten by a particular reference system  
94          """          """
95          raise NotImplementedError()          raise NotImplementedError()
96    
# Line 118  class CartesianReferenceSystem(Reference Line 122  class CartesianReferenceSystem(Reference
122          creates an appropriate coordinate transformation on a given domain          creates an appropriate coordinate transformation on a given domain
123    
124          :param domain: domain of transformation          :param domain: domain of transformation
125          :type domain: `esys.escript.AbstractDomain'          :type domain: `esys.escript.AbstractDomain`
126          :rtype: `SpatialCoordinateTransformation`          :rtype: `SpatialCoordinateTransformation`
127          """          """
128          return SpatialCoordinateTransformation(domain, reference=self)          return SpatialCoordinateTransformation(domain, reference=self)
# Line 126  class CartesianReferenceSystem(Reference Line 130  class CartesianReferenceSystem(Reference
130      def isCartesian(self):      def isCartesian(self):
131          """          """
132          returns if the reference system is Cartesian          returns if the reference system is Cartesian
133            
134          :rtype: ``bool``          :rtype: ``bool``
135          """          """
136          return True          return True
# Line 162  class GeodeticReferenceSystem(ReferenceS Line 167  class GeodeticReferenceSystem(ReferenceS
167      def isCartesian(self):      def isCartesian(self):
168          """          """
169          returns if the reference system is Cartesian          returns if the reference system is Cartesian
170            
171          :rtype: ``bool``          :rtype: ``bool``
172          """          """
173          return False          return False
# Line 200  class GeodeticReferenceSystem(ReferenceS Line 206  class GeodeticReferenceSystem(ReferenceS
206          :type other: `ReferenceSystem`          :type other: `ReferenceSystem`
207          :returns: ``True`` if other defines then same reference system          :returns: ``True`` if other defines then same reference system
208          :rtype: ``bool``          :rtype: ``bool``
209          :note: two `GeodeticReferenceSystem` are considered to be the same          
210            .. note:: two `GeodeticReferenceSystem` are considered to be the same
211                 if the use the same semi major axis, the same flattening                 if the use the same semi major axis, the same flattening
212                 and the same angular unit.                 and the same angular unit.
213          """          """
# Line 219  class GeodeticReferenceSystem(ReferenceS Line 226  class GeodeticReferenceSystem(ReferenceS
226          creates an appropriate coordinate transformation on a given domain          creates an appropriate coordinate transformation on a given domain
227    
228          :param domain: domain of transformation          :param domain: domain of transformation
229          :type domain:`esys.escript.AbstractDomain'          :type domain: `esys.escript.AbstractDomain`
230          :rtype: `SpatialCoordinateTransformation`          :rtype: `SpatialCoordinateTransformation`
231          """          """
232          return GeodeticCoordinateTransformation(domain, reference=self)          return GeodeticCoordinateTransformation(domain, reference=self)
# Line 259  class SpatialCoordinateTransformation(ob Line 266  class SpatialCoordinateTransformation(ob
266          set up the orthogonal coordinate transformation.          set up the orthogonal coordinate transformation.
267    
268          :param domain: domain in the domain of the coordinate transformation          :param domain: domain in the domain of the coordinate transformation
269          :type domain: `esys.escript.AbstractDomain'          :type domain: `esys.escript.AbstractDomain`
270          :param reference: the reference system          :param reference: the reference system
271          :type reference: `ReferenceSystem`          :type reference: `ReferenceSystem`
272          """          """
# Line 293  class SpatialCoordinateTransformation(ob Line 300  class SpatialCoordinateTransformation(ob
300      def isCartesian(self):      def isCartesian(self):
301          """          """
302          returns ``True`` if the scaling factors (and the volume factor) are equal to 1          returns ``True`` if the scaling factors (and the volume factor) are equal to 1
303            
304          :rtype: ``bool``          :rtype: ``bool``
305          """          """
306          return self.__reference_system.isCartesian()          return self.__reference_system.isCartesian()
# Line 300  class SpatialCoordinateTransformation(ob Line 308  class SpatialCoordinateTransformation(ob
308      def getDomain(self):      def getDomain(self):
309          """          """
310          returns the domain of the coordinate transformation.          returns the domain of the coordinate transformation.
311          :rtype: `esys.escript.AbstractDomain'          
312            :rtype: `esys.escript.AbstractDomain`
313          """          """
314          return self.__domain          return self.__domain
315    
316      def getReferenceSystem(self):      def getReferenceSystem(self):
317          """          """
318          returns the reference system used to to define the coordinate transformation          returns the reference system used to to define the coordinate transformation
319            
320          :rtype: `ReferenceSystem`          :rtype: `ReferenceSystem`
321          """          """
322          return self.__reference_system          return self.__reference_system
# Line 314  class SpatialCoordinateTransformation(ob Line 324  class SpatialCoordinateTransformation(ob
324      def getVolumeFactor(self):      def getVolumeFactor(self):
325          """          """
326          returns the volume factor for the coordinate transformation          returns the volume factor for the coordinate transformation
327          :rtype:  `esys.escript.Scalar'          
328            :rtype:  `esys.escript.Scalar`
329          """          """
330          return self._volumefactor          return self._volumefactor
331    
332      def getScalingFactors(self):      def getScalingFactors(self):
333          """          """
334          returns the scaling factors          returns the scaling factors
335          :rtype: `esys.escript.Vector'          
336            :rtype: `esys.escript.Vector`
337          """          """
338          return self._scaling_factors          return self._scaling_factors
339    
# Line 338  class GeodeticCoordinateTransformation(S Line 350  class GeodeticCoordinateTransformation(S
350          set up the orthogonal coordinate transformation.          set up the orthogonal coordinate transformation.
351    
352          :param domain: domain in the domain of the coordinate transformation          :param domain: domain in the domain of the coordinate transformation
353          :type domain: `esys.escript.AbstractDomain'          :type domain: `esys.escript.AbstractDomain`
354          :param reference: the reference system          :param reference: the reference system
355          :type reference: `ReferenceSystem`          :type reference: `ReferenceSystem`
356    
# Line 375  def makeTranformation(domain, coordinate Line 387  def makeTranformation(domain, coordinate
387      returns a `SpatialCoordinateTransformation` for the given domain      returns a `SpatialCoordinateTransformation` for the given domain
388            
389      :param domain: domain in the domain of the coordinate transformation      :param domain: domain in the domain of the coordinate transformation
390      :type domain: `esys.escript.AbstractDomain'      :type domain: `esys.escript.AbstractDomain`
391      :param coordinates: the reference system or spatial coordinate system.      :param coordinates: the reference system or spatial coordinate system.
392      :type coordinates: `ReferenceSystem` or `SpatialCoordinateTransformation`      :type coordinates: `ReferenceSystem` or `SpatialCoordinateTransformation`
393      :return: the spatial coordinate system for the given domain of the specified      :return: the spatial coordinate system for the given domain of the specified

Legend:
Removed from v.4396  
changed lines
  Added in v.4397

  ViewVC Help
Powered by ViewVC 1.1.26