- Timestamp:
- 10/23/2008 04:43:14 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 20 modified
-
. (modified) (1 prop)
-
FiPy.egg-info/SOURCES.txt (modified) (1 diff)
-
fipy/boundaryConditions/boundaryCondition.py (modified) (6 diffs)
-
fipy/solvers/pysparse/pysparseSolver.py (modified) (2 diffs)
-
fipy/solvers/scipy/scipySolver.py (modified) (2 diffs)
-
fipy/solvers/solver.py (modified) (4 diffs)
-
fipy/solvers/trilinos/preconditioners/preconditioner.py (modified) (2 diffs)
-
fipy/solvers/trilinos/trilinosAztecOOSolver.py (modified) (2 diffs)
-
fipy/solvers/trilinos/trilinosSolver.py (modified) (3 diffs)
-
fipy/terms/cellTerm.py (modified) (4 diffs)
-
fipy/terms/convectionTerm.py (modified) (5 diffs)
-
fipy/terms/equation.py (modified) (4 diffs)
-
fipy/terms/faceTerm.py (modified) (2 diffs)
-
fipy/terms/sourceTerm.py (modified) (2 diffs)
-
fipy/terms/term.py (modified) (12 diffs)
-
fipy/variables/noiseVariable.py (modified) (2 diffs)
-
fipy/viewers/gistViewer/gistViewer.py (modified) (2 diffs)
-
fipy/viewers/gnuplotViewer/gnuplotViewer.py (modified) (2 diffs)
-
fipy/viewers/matplotlibViewer/matplotlibViewer.py (modified) (2 diffs)
-
fipy/viewers/viewer.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svnmerge-integrated changed from /branches/abstractBaseClass:1-2772 to /branches/abstractBaseClass:1-2777
-
trunk/FiPy.egg-info/SOURCES.txt
r2763 r2778 501 501 utils/includedHTMLWriter.py 502 502 utils/includedLaTeXWriter.py 503 utils/epydoc/Makefile504 utils/epydoc/doc/.cvsignore505 utils/epydoc/doc/configfile.html506 utils/epydoc/doc/custom.css507 utils/epydoc/doc/docstrings.html508 utils/epydoc/doc/docutils.css509 utils/epydoc/doc/epydoc-slides.pdf510 utils/epydoc/doc/epydoc-slides.ppt511 utils/epydoc/doc/epydoc.css512 utils/epydoc/doc/epydoc_gui.png513 utils/epydoc/doc/epydoc_guiconfig.png514 utils/epydoc/doc/epytext.html515 utils/epydoc/doc/epytext_example.py516 utils/epydoc/doc/epytextintro.html517 utils/epydoc/doc/faq.html518 utils/epydoc/doc/fields.html519 utils/epydoc/doc/future.html520 utils/epydoc/doc/history.html521 utils/epydoc/doc/home.thumbnail.png522 utils/epydoc/doc/index.html523 utils/epydoc/doc/index.thumbnail.png524 utils/epydoc/doc/inh_example.py525 utils/epydoc/doc/installing.html526 utils/epydoc/doc/license.html527 utils/epydoc/doc/manual-docstring.txt528 utils/epydoc/doc/manual-epytext.txt529 utils/epydoc/doc/manual-fields.txt530 utils/epydoc/doc/manual-install.txt531 utils/epydoc/doc/manual-othermarkup.txt532 utils/epydoc/doc/manual-reference.txt533 utils/epydoc/doc/manual-usage.txt534 utils/epydoc/doc/manual.txt535 utils/epydoc/doc/othermarkup.html536 utils/epydoc/doc/pycon-epydoc.html537 utils/epydoc/doc/pycon-epydoc.pdf538 utils/epydoc/doc/pycon-epydoc.ps539 utils/epydoc/doc/pysrc.thumbnail.png540 utils/epydoc/doc/relatedprojects.html541 utils/epydoc/doc/rst-template.txt542 utils/epydoc/doc/rst-template2.txt543 utils/epydoc/doc/sflogo.png544 utils/epydoc/doc/stylesheet.html545 utils/epydoc/doc/uml.thumbnail.png546 utils/epydoc/doc/using.html547 utils/epydoc/doc/whatsnew.html548 utils/epydoc/doc/doctest/index.html549 utils/epydoc/man/epydoc.1550 utils/epydoc/man/epydocgui.1551 utils/epydoc/src/LICENSE.txt552 utils/epydoc/src/MANIFEST.in553 utils/epydoc/src/Makefile554 utils/epydoc/src/README.txt555 utils/epydoc/src/setup.py556 utils/epydoc/src/epydoc/__init__.py557 utils/epydoc/src/epydoc/apidoc.py558 utils/epydoc/src/epydoc/checker.py559 utils/epydoc/src/epydoc/cli.py560 utils/epydoc/src/epydoc/compat.py561 utils/epydoc/src/epydoc/docbuilder.py562 utils/epydoc/src/epydoc/docintrospecter.py563 utils/epydoc/src/epydoc/docparser.py564 utils/epydoc/src/epydoc/docstringparser.py565 utils/epydoc/src/epydoc/gui.py566 utils/epydoc/src/epydoc/log.py567 utils/epydoc/src/epydoc/util.py568 utils/epydoc/src/epydoc/docwriter/__init__.py569 utils/epydoc/src/epydoc/docwriter/dotgraph.py570 utils/epydoc/src/epydoc/docwriter/html.py571 utils/epydoc/src/epydoc/docwriter/html_colorize.py572 utils/epydoc/src/epydoc/docwriter/html_css.py573 utils/epydoc/src/epydoc/docwriter/html_help.py574 utils/epydoc/src/epydoc/docwriter/latex.py575 utils/epydoc/src/epydoc/docwriter/plaintext.py576 utils/epydoc/src/epydoc/docwriter/xlink.py577 utils/epydoc/src/epydoc/docwriter/latexstyles/epydoc-default.sty578 utils/epydoc/src/epydoc/markup/__init__.py579 utils/epydoc/src/epydoc/markup/doctest.py580 utils/epydoc/src/epydoc/markup/epytext.py581 utils/epydoc/src/epydoc/markup/javadoc.py582 utils/epydoc/src/epydoc/markup/plaintext.py583 utils/epydoc/src/epydoc/markup/pyval_repr.py584 utils/epydoc/src/epydoc/markup/restructuredtext.py585 utils/epydoc/src/epydoc/test/__init__.py586 utils/epydoc/src/epydoc/test/apidoc.doctest587 utils/epydoc/src/epydoc/test/docbuilder.doctest588 utils/epydoc/src/epydoc/test/docintrospecter.doctest589 utils/epydoc/src/epydoc/test/docparser.doctest590 utils/epydoc/src/epydoc/test/encoding.doctest591 utils/epydoc/src/epydoc/test/epytext.doctest592 utils/epydoc/src/epydoc/test/javadoc.doctest593 utils/epydoc/src/epydoc/test/plaintext.doctest594 utils/epydoc/src/epydoc/test/pyval_repr.doctest595 utils/epydoc/src/epydoc/test/restructuredtext.doctest596 utils/epydoc/src/epydoc/test/util.py597 utils/epydoc/src/epydoc/test/zope2.doctest598 utils/epydoc/src/epydoc/test/zope3.doctest599 utils/epydoc/src/scripts/.cvsignore600 utils/epydoc/src/scripts/apirst2html.py601 utils/epydoc/src/scripts/epydoc602 utils/epydoc/src/scripts/epydoc.py603 utils/epydoc/src/scripts/epydoc.pyw604 utils/epydoc/src/scripts/epydocgui605 utils/epydoc/src/tools/mkdispatch.py606 utils/epydoc/src/tools/rst2html.py -
trunk/fipy/boundaryConditions/boundaryCondition.py
r2573 r2778 7 7 # FILE: "boundaryCondition.py" 8 8 # created: 11/15/03 {9:47:59 PM} 9 # last update: 6/2/08 {10:41:16PM}9 # last update: 10/23/08 {4:11:11 PM} 10 10 # Author: Jonathan Guyer <guyer@nist.gov> 11 11 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 56 56 def __init__(self,faces,value): 57 57 """ 58 59 The `BoundaryCondition` class should not be invoked directly.60 61 58 :Parameters: 62 59 - `faces`: A `list` or `tuple` of `Face` objects to which this condition applies. … … 69 66 >>> from fipy.meshes.grid1D import Grid1D 70 67 >>> mesh = Grid1D(nx = 2) 71 >>> bc = BoundaryCondition(mesh.getInteriorFaces(), 0)68 >>> bc = __BoundaryCondition(mesh.getInteriorFaces(), 0) 72 69 Traceback (most recent call last): 73 70 ... … … 75 72 76 73 """ 74 if self.__class__ is BoundaryCondition: 75 raise NotImplementedError, "can't instantiate abstract base class" 76 77 77 self.faces = faces 78 78 self.value = PhysicalField(value) … … 100 100 (**L**, **b**) matrices. 101 101 """ 102 pass102 raise NotImplementedError 103 103 104 104 def _getDerivative(self, order): … … 117 117 self.boundaryConditionApplied = False 118 118 119 class __BoundaryCondition(BoundaryCondition): 120 """ 121 Dummy subclass for tests 122 """ 123 pass 124 119 125 def _test(): 120 126 import doctest -
trunk/fipy/solvers/pysparse/pysparseSolver.py
r2331 r2778 8 8 # FILE: "pysparseSolver.py" 9 9 # created: 06/28/07 10 # last update: 06/28/0710 # last update: 10/23/08 {3:04:27 PM} 11 11 # Author: Jonathan Guyer <guyer@nist.gov> 12 12 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 53 53 .. attention:: This class is abstract. Always create one of its subclasses. 54 54 """ 55 def __init__(self, *args, **kwargs): 56 if self.__class__ is PysparseSolver: 57 raise NotImplementedError, "can't instantiate abstract base class" 58 59 Solver.__init__(self, *args, **kwargs) 55 60 56 61 def _getMatrixClass(self): -
trunk/fipy/solvers/scipy/scipySolver.py
r2331 r2778 8 8 # FILE: "scipySolver.py" 9 9 # created: 06/28/07 10 # last update: 06/29/0710 # last update: 10/23/08 {3:05:25 PM} 11 11 # Author: Jonathan Guyer <guyer@nist.gov> 12 12 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 53 53 .. attention:: This class is abstract. Always create one of its subclasses. 54 54 """ 55 def __init__(self, *args, **kwargs): 56 if self.__class__ is ScipySolver: 57 raise NotImplementedError, "can't instantiate abstract base class" 58 59 Solver.__init__(self, *args, **kwargs) 55 60 56 61 def _getMatrixClass(self): -
trunk/fipy/solvers/solver.py
r2331 r2778 8 8 # FILE: "solver.py" 9 9 # created: 11/14/03 {3:47:20 PM} 10 # last update: 1 1/16/06 {2:36:00PM}10 # last update: 10/23/08 {3:02:19 PM} 11 11 # Author: Jonathan Guyer <guyer@nist.gov> 12 12 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 111 111 112 112 """ 113 if self.__class__ is Solver: 114 raise NotImplementedError, "can't instantiate abstract base class" 115 113 116 self.tolerance = tolerance 114 117 if steps is not None: … … 126 129 127 130 def _solve(self, L, x, b): 128 pass131 raise NotImplementedError 129 132 130 133 _warningList = (ScalarQuantityOutOfRangeWarning, … … 152 155 153 156 def _getMatrixClass(self): 154 pass157 raise NotImplementedError -
trunk/fipy/solvers/trilinos/preconditioners/preconditioner.py
r2331 r2778 8 8 # FILE: "preconditioner.py" 9 9 # created: 06/25/07 10 # last update: 06/25/0710 # last update: 10/23/08 {3:07:49 PM} 11 11 # Author: Jonathan Guyer <guyer@nist.gov> 12 12 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 56 56 Create a `Preconditioner` object. 57 57 """ 58 pass 58 if self.__class__ is Preconditioner: 59 raise NotImplementedError, "can't instantiate abstract base class" 59 60 60 61 def _applyToSolver(self, solver, matrix): 61 pass62 raise NotImplementedError 62 63 -
trunk/fipy/solvers/trilinos/trilinosAztecOOSolver.py
r2497 r2778 7 7 # FILE: "trilinosAztecOOSolver.py" 8 8 # created: 06/25/07 9 # last update: 06/25/079 # last update: 10/23/08 {3:10:10 PM} 10 10 # Author: Jonathan Guyer <guyer@nist.gov> 11 11 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 65 65 66 66 """ 67 if self.__class__ is TrilinosAztecOOSolver: 68 raise NotImplementedError, "can't instantiate abstract base class" 69 67 70 TrilinosSolver.__init__(self, tolerance=tolerance, 68 71 iterations=iterations, steps=steps, precon=None) -
trunk/fipy/solvers/trilinos/trilinosSolver.py
r2334 r2778 7 7 # FILE: "trilinosSolver.py" 8 8 # created: 06/07/07 9 # last update: 06/25/079 # last update: 10/23/08 {3:10:07 PM} 10 10 # Author: Jonathan Guyer <guyer@nist.gov> 11 11 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 60 60 61 61 """ 62 62 def __init__(self, *args, **kwargs): 63 if self.__class__ is TrilinosSolver: 64 raise NotImplementedError, "can't instantiate abstract base class" 65 63 66 def _makeTrilinosMatrix(self, L): 64 67 """ … … 132 135 133 136 def _applyTrilinosSolver(self): 134 pass137 raise NotImplementedError -
trunk/fipy/terms/cellTerm.py
r2454 r2778 7 7 # FILE: "cellTerm.py" 8 8 # created: 11/12/03 {11:00:54 AM} 9 # last update: 3/29/07 {10:40:50 AM}9 # last update: 10/23/08 {4:04:47 PM} 10 10 # Author: Jonathan Guyer <guyer@nist.gov> 11 11 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 55 55 """ 56 56 def __init__(self, coeff=1.): 57 if self.__class__ is CellTerm: 58 raise NotImplementedError, "can't instantiate abstract base class" 59 57 60 from fipy.variables.variable import Variable 58 61 if not isinstance(coeff, Variable): … … 158 161 >>> vcv = CellVariable(mesh=m, rank=1) 159 162 >>> vfv = FaceVariable(mesh=m, rank=1) 160 >>> CellTerm(coeff=cv) 161 CellTerm(coeff=CellVariable(value=array([ 0., 0.]), mesh=UniformGrid1D(dx=1.0, nx=2))) 162 >>> CellTerm(coeff=1) 163 CellTerm(coeff=1) 164 >>> CellTerm(coeff=fv) 165 Traceback (most recent call last): 166 ... 167 TypeError: The coefficient must be a rank-0 CellVariable or a scalar value. 168 >>> CellTerm(coeff=vcv) 169 Traceback (most recent call last): 170 ... 171 TypeError: The coefficient must be a rank-0 CellVariable or a scalar value. 172 >>> CellTerm(coeff=vfv) 173 Traceback (most recent call last): 174 ... 175 TypeError: The coefficient must be a rank-0 CellVariable or a scalar value. 176 >>> CellTerm(coeff=(1,)) 163 164 >>> __CellTerm(coeff=cv) 165 __CellTerm(coeff=CellVariable(value=array([ 0., 0.]), mesh=UniformGrid1D(dx=1.0, nx=2))) 166 >>> __CellTerm(coeff=1) 167 __CellTerm(coeff=1) 168 >>> __CellTerm(coeff=fv) 169 Traceback (most recent call last): 170 ... 171 TypeError: The coefficient must be a rank-0 CellVariable or a scalar value. 172 >>> __CellTerm(coeff=vcv) 173 Traceback (most recent call last): 174 ... 175 TypeError: The coefficient must be a rank-0 CellVariable or a scalar value. 176 >>> __CellTerm(coeff=vfv) 177 Traceback (most recent call last): 178 ... 179 TypeError: The coefficient must be a rank-0 CellVariable or a scalar value. 180 >>> __CellTerm(coeff=(1,)) 177 181 Traceback (most recent call last): 178 182 ... … … 182 186 pass 183 187 188 class __CellTerm(CellTerm): 189 """ 190 Dummy subclass for tests 191 """ 192 pass 193 184 194 185 195 def _test(): -
trunk/fipy/terms/convectionTerm.py
r2331 r2778 7 7 # FILE: "convectionTerm.py" 8 8 # created: 11/13/03 {11:39:03 AM} 9 # last update: 3/29/07 {10:40:48 AM}9 # last update: 10/23/08 {4:07:28 PM} 10 10 # Author: Jonathan Guyer <guyer@nist.gov> 11 11 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 69 69 >>> vcv = CellVariable(mesh=m, rank=1) 70 70 >>> vfv = FaceVariable(mesh=m, rank=1) 71 >>> ConvectionTerm(coeff = cv)71 >>> __ConvectionTerm(coeff = cv) 72 72 Traceback (most recent call last): 73 73 ... 74 74 TypeError: The coefficient must be a vector value. 75 >>> ConvectionTerm(coeff = fv)75 >>> __ConvectionTerm(coeff = fv) 76 76 Traceback (most recent call last): 77 77 ... 78 78 TypeError: The coefficient must be a vector value. 79 >>> ConvectionTerm(coeff = vcv)80 ConvectionTerm(coeff=_ArithmeticCellToFaceVariable(value=array([[ 0., 0., 0.]]), mesh=UniformGrid1D(dx=1.0, nx=2)))81 >>> ConvectionTerm(coeff = vfv)82 ConvectionTerm(coeff=FaceVariable(value=array([[ 0., 0., 0.]]), mesh=UniformGrid1D(dx=1.0, nx=2)))83 >>> ConvectionTerm(coeff = (1,))84 ConvectionTerm(coeff=(1,))79 >>> __ConvectionTerm(coeff = vcv) 80 __ConvectionTerm(coeff=_ArithmeticCellToFaceVariable(value=array([[ 0., 0., 0.]]), mesh=UniformGrid1D(dx=1.0, nx=2))) 81 >>> __ConvectionTerm(coeff = vfv) 82 __ConvectionTerm(coeff=FaceVariable(value=array([[ 0., 0., 0.]]), mesh=UniformGrid1D(dx=1.0, nx=2))) 83 >>> __ConvectionTerm(coeff = (1,)) 84 __ConvectionTerm(coeff=(1,)) 85 85 >>> from fipy.terms.explicitUpwindConvectionTerm import ExplicitUpwindConvectionTerm 86 86 >>> ExplicitUpwindConvectionTerm(coeff = (0,)).solve(var = cv) … … 94 94 >>> vcv2 = CellVariable(mesh=m2, rank=1) 95 95 >>> vfv2 = FaceVariable(mesh=m2, rank=1) 96 >>> ConvectionTerm(coeff=vcv2)97 ConvectionTerm(coeff=_ArithmeticCellToFaceVariable(value=array([[ 0., 0., 0., 0., 0., 0., 0.],96 >>> __ConvectionTerm(coeff=vcv2) 97 __ConvectionTerm(coeff=_ArithmeticCellToFaceVariable(value=array([[ 0., 0., 0., 0., 0., 0., 0.], 98 98 [ 0., 0., 0., 0., 0., 0., 0.]]), mesh=UniformGrid2D(dx=1.0, dy=1.0, nx=2, ny=1))) 99 >>> ConvectionTerm(coeff=vfv2)100 ConvectionTerm(coeff=FaceVariable(value=array([[ 0., 0., 0., 0., 0., 0., 0.],99 >>> __ConvectionTerm(coeff=vfv2) 100 __ConvectionTerm(coeff=FaceVariable(value=array([[ 0., 0., 0., 0., 0., 0., 0.], 101 101 [ 0., 0., 0., 0., 0., 0., 0.]]), mesh=UniformGrid2D(dx=1.0, dy=1.0, nx=2, ny=1))) 102 102 >>> ExplicitUpwindConvectionTerm(coeff = ((0,),(0,))).solve(var=cv2) … … 108 108 - `diffusionTerm` : ** deprecated **. The Peclet number is calculated automatically. 109 109 """ 110 if self.__class__ is ConvectionTerm: 111 raise NotImplementedError, "can't instantiate abstract base class" 112 110 113 if diffusionTerm is not None: 111 114 import warnings … … 173 176 return FaceTerm.__add__(self, other) 174 177 178 class __ConvectionTerm(ConvectionTerm): 179 """ 180 Dummy subclass for tests 181 """ 182 pass 183 175 184 def _test(): 176 185 import doctest -
trunk/fipy/terms/equation.py
r2447 r2778 7 7 # FILE: "equation.py" 8 8 # created: 11/9/04 {11:51:08 AM} 9 # last update: 7/25/07 {9:57:05 AM}9 # last update: 10/23/08 {4:10:02 PM} 10 10 # Author: Jonathan Guyer <guyer@nist.gov> 11 11 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 134 134 Add a `Term` to another `Term`, number or variable. 135 135 136 >>> Term(coeff=1.) + 10. +Term(2.)137 10.0 + Term(coeff=3.0) == 0138 >>> Term(coeff=1.) + Term(coeff=2.) +Term(coeff=3.)139 Term(coeff=6.0)136 >>> __Term(coeff=1.) + 10. + __Term(2.) 137 10.0 + __Term(coeff=3.0) == 0 138 >>> __Term(coeff=1.) + __Term(coeff=2.) + __Term(coeff=3.) 139 __Term(coeff=6.0) 140 140 141 141 """ … … 178 178 Negate a `Term`. 179 179 180 >>> -( Term(coeff=1.) -Term(coeff=2.))181 Term(coeff=1.0)180 >>> -(__Term(coeff=1.) - __Term(coeff=2.)) 181 __Term(coeff=1.0) 182 182 183 183 """ … … 189 189 190 190 return dup 191 192 class __Term(Term): 193 """ 194 Dummy subclass for tests 195 """ 196 pass 191 197 192 198 def _test(): -
trunk/fipy/terms/faceTerm.py
r2571 r2778 7 7 # FILE: "faceTerm.py" 8 8 # created: 11/17/03 {10:29:10 AM} 9 # last update: 6/7/08 {11:11:20 PM}9 # last update: 10/23/08 {3:13:50 PM} 10 10 # Author: Jonathan Guyer <guyer@nist.gov> 11 11 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 55 55 """ 56 56 def __init__(self, coeff=1.): 57 if self.__class__ is FaceTerm: 58 raise NotImplementedError, "can't instantiate abstract base class" 59 57 60 Term.__init__(self, coeff=coeff) 58 61 self.coeffMatrix = None -
trunk/fipy/terms/sourceTerm.py
r2149 r2778 7 7 # FILE: "sourceTerm.py" 8 8 # created: 11/28/03 {11:36:25 AM} 9 # last update: 3/28/07 {10:17:48 AM}9 # last update: 10/23/08 {3:14:26 PM} 10 10 # Author: Jonathan Guyer <guyer@nist.gov> 11 11 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 50 50 """ 51 51 def __init__(self, coeff = 0.): 52 if self.__class__ is SourceTerm: 53 raise NotImplementedError, "can't instantiate abstract base class" 52 54 CellTerm.__init__(self, coeff = coeff) 53 55 -
trunk/fipy/terms/term.py
r2737 r2778 7 7 # FILE: "term.py" 8 8 # created: 11/12/03 {10:54:37 AM} 9 # last update: 9/17/08 {9:34:46 AM}9 # last update: 10/23/08 {4:05:43 PM} 10 10 # Author: Jonathan Guyer <guyer@nist.gov> 11 11 # Author: Daniel Wheeler <daniel.wheeler@nist.gov> … … 64 64 65 65 """ 66 if self.__class__ is Term: 67 raise NotImplementedError, "can't instantiate abstract base class" 68 66 69 self.coeff = coeff 67 70 self.geomCoeff = None … … 73 76 74 77 def _buildMatrix(self, var, SparseMatrix, boundaryConditions, dt, equation=None):
FiPy: A Finite Volume PDE Solver Using Python