Changeset 7865
- Timestamp:
- Jun 21, 2010, 11:26:20 AM (15 years ago)
- Location:
- trunk/anuga_core/source/anuga
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/anuga_exceptions.py
r7743 r7865 4 4 import exceptions 5 5 6 class TitleError(exceptions.IOError): pass 7 class ParsingError(exceptions.IOError): pass 8 class ShapeError(exceptions.IOError): pass 6 class TitleError(exceptions.IOError): 7 """ Incorrect header in a file. """ 8 pass 9 10 class ParsingError(exceptions.IOError): 11 """ Could not parse a file. """ 12 pass 13 14 class ShapeError(exceptions.IOError): 15 """ Pathological shape in data. """ 16 pass 9 17 10 18 class ANUGAError(Exception): 19 """ Generic ANUGA error. """ 11 20 def __init__(self, args=None): 12 21 self.args = args 13 22 14 class DataMissingValuesError(exceptions.Exception): pass 15 class DataFileNotOpenError(exceptions.Exception): pass 16 class DataTimeError(exceptions.Exception): pass 17 class DataDomainError(exceptions.Exception): pass 18 class NewQuantity(exceptions.Exception): pass 19 class TitleValueError(exceptions.Exception): pass 23 class DataMissingValuesError(exceptions.Exception): 24 """ Missing values in file. """ 25 pass 26 27 class DataFileNotOpenError(exceptions.Exception): 28 """ File is not open. """ 29 pass 30 31 class DataTimeError(exceptions.Exception): 32 """ Pathological time data. """ 33 pass 34 35 class DataDomainError(exceptions.Exception): 36 """ Pathological domain. """ 37 pass 38 39 class NewQuantity(exceptions.Exception): 40 """ Quantity used but not defined. """ 41 pass 42 43 class TitleValueError(exceptions.Exception): 44 """ Title of data column in file has wrong value. """ 45 pass -
trunk/anuga_core/source/anuga/build_options.py
r3875 r7865 1 # Build configuration for ANUGA 1 """ Build configuration for ANUGA. """ 2 2 3 3 # Flags to pass to GCC -
trunk/anuga_core/source/anuga/compile_all.py
r7765 r7865 1 """ Script to compile all C extensions in ANUGA. """ 2 1 3 import os 2 4 3 buildroot= os.getcwd()5 BUILDROOT = os.getcwd() 4 6 5 7 #Attempt to compile all extensions … … 32 34 execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py') 33 35 34 os.chdir( buildroot)36 os.chdir(BUILDROOT) 35 37 #execfile('test_all.py') 36 38 -
trunk/anuga_core/source/anuga/config.py
r7841 r7865 43 43 #g = 9.80665 # Gravity - FIXME reinstate this and fix unit tests. 44 44 g = 9.8 45 #g(phi) = 9780313 * (1 + 0.0053024 sin(phi)**2 - 0.000 0059 sin(2*phi)**2) micro m/s**2, where phi is the latitude 45 #g(phi) = 9780313 * (1 + 0.0053024 sin(phi)**2 - 0.000 0059 sin(2*phi)**2) 46 # micro m/s**2, where phi is the latitude 46 47 #The 'official' average is 9.80665 47 48 … … 138 139 # 139 140 # The actual soundspeed can be as high as 1530m/s 140 # (see http://staff.washington.edu/aganse/public.projects/clustering/clustering.html), 141 # (see http://staff.washington.edu/aganse/public.projects/ 142 # clustering/clustering.html), 141 143 # but that would only happen with h>225000m in this equation. Why ? 142 144 # The maximal speed we specify is really related to the max speed -
trunk/anuga_core/source/anuga/count_lines.py
r4070 r7865 4 4 import os 5 5 6 s= 'find . -type f -name "*.py" -print | xargs wc -l'7 print s8 os.system( s)6 cmd_string = 'find . -type f -name "*.py" -print | xargs wc -l' 7 print cmd_string 8 os.system(cmd_string) 9 9 10 10 11 s= 'find . -type f -name "*.c" -print | xargs wc -l'12 print s13 os.system( s)11 cmd_string = 'find . -type f -name "*.c" -print | xargs wc -l' 12 print cmd_string 13 os.system(cmd_string) 14 14 15 15 -
trunk/anuga_core/source/anuga/setup.py
r1957 r7865 1 """ Dummy file - setup would be a script to install ANUGA. """ 1 2 pass -
trunk/anuga_core/source/anuga/test_all.py
r7779 r7865 23 23 24 24 # Directories that should not be searched for test files. 25 exclude_dirs = ['pypar_dist', 'shallow_water_balanced', 25 exclude_dirs = ['pypar_dist', 'shallow_water_balanced', # Special requirements 26 26 '.svn', # subversion 27 27 'props', 'wcprops', 'prop-base', 'text-base', 'tmp'] … … 68 68 69 69 70 ##71 # @brief Get 'test_*.py' files and paths to directories.72 # @param path Path to directory to start walk in.73 # @return A tuple (<files>, <dirs>).74 # @note Don't include any files in and below forbidden directories.75 70 def get_test_files(path): 71 """ Get 'test_*.py' files and paths to directories. 72 param path Path to directory to start walk in. 73 @return A tuple (<files>, <dirs>). 74 Don't include any files in and below forbidden directories. 75 76 """ 76 77 walk = os.walk(path) 77 78
Note: See TracChangeset
for help on using the changeset viewer.