Changeset 3085 for inundation
- Timestamp:
- Jun 5, 2006, 5:03:48 PM (19 years ago)
- Location:
- inundation
- Files:
-
- 12 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
inundation/fit_interpolate/general_fit_interpolate.py
r2897 r3085 25 25 26 26 from caching.caching import cache 27 from pyvolution. mesh import Mesh27 from pyvolution.neighbour_mesh import Mesh 28 28 from utilities.sparse import Sparse, Sparse_CSR 29 29 from utilities.cg_solve import conjugate_gradient, VectorShapeError -
inundation/fit_interpolate/interpolate.py
r3055 r3085 25 25 26 26 from caching.caching import cache 27 from pyvolution. mesh import Mesh27 from pyvolution.neighbour_mesh import Mesh 28 28 from utilities.sparse import Sparse, Sparse_CSR 29 29 from utilities.cg_solve import conjugate_gradient, VectorShapeError -
inundation/fit_interpolate/test_fit.py
r3014 r3085 10 10 11 11 from fit import * 12 from pyvolution.neighbour_mesh import Mesh 12 13 from utilities.sparse import Sparse, Sparse_CSR 13 14 from coordinate_transforms.geo_reference import Geo_reference … … 199 200 200 201 def test_fit_and_interpolation(self): 201 from mesh import Mesh202 202 203 203 a = [0.0, 0.0] … … 366 366 coordinate system as defined by origin. 367 367 """ 368 from mesh import Mesh369 368 370 369 #Setup mesh used to represent fitted function -
inundation/pymetis/metis-4.0/Lib/mesh.c
r2051 r3085 24 24 idxtype *dxadj, idxtype *dadjncy) 25 25 { 26 27 26 28 int esizes[] = {-1, 3, 4, 8, 4}; 27 29 -
inundation/pymetis/metis-4.0/Lib/meshpart.c
r2051 r3085 31 31 esize = esizes[*etype]; 32 32 33 printf("Inside METIS_PartMeshNodal\n"); 34 33 35 if (*numflag == 1) 34 36 ChangeMesh2CNumbering((*ne)*esize, elmnts); … … 37 39 adjncy = idxmalloc(20*(*nn), "METIS_MESHPARTNODAL: adjncy"); 38 40 41 printf("Calling METIS_MeshToNodal\n"); 39 42 METIS_MeshToNodal(ne, nn, elmnts, etype, &pnumflag, xadj, adjncy); 40 43 printf("After METIS_MeshToNodal\n"); 44 41 45 adjncy = realloc(adjncy, xadj[*nn]*sizeof(idxtype)); 42 46 43 47 options[0] = 0; 48 printf("Calling METIS_PartGraphKway\n"); 44 49 METIS_PartGraphKway(nn, xadj, adjncy, NULL, NULL, &wgtflag, &pnumflag, nparts, options, edgecut, npart); 45 50 46 51 /* OK, now compute an element partition based on the nodal partition npart */ 52 printf("Starting loop 1\n"); 47 53 idxset(*ne, -1, epart); 48 54 pwgts = idxsmalloc(*nparts, 0, "METIS_MESHPARTNODAL: pwgts"); … … 59 65 } 60 66 67 printf("Starting loop 2\n"); 61 68 maxpwgt = 1.03*(*ne)/(*nparts); 62 69 for (i=0; i<*ne; i++) { … … 96 103 } 97 104 105 printf("ChangeMesh2FNumbering2\n"); 98 106 if (*numflag == 1) 99 107 ChangeMesh2FNumbering2((*ne)*esize, elmnts, *ne, *nn, epart, npart); 100 108 109 printf("Free\n"); 101 110 GKfree(&xadj, &adjncy, &pwgts, LTERM); 111 printf("Done\n"); 102 112 103 113 } -
inundation/pymetis/pymetis/metis.c
r2847 r3085 64 64 return NULL; 65 65 66 printf("Hello 1\n"); 66 67 elem_arr = (PyArrayObject *) PyArray_ContiguousFromObject(elements, PyArray_NOTYPE, 1, 1); 67 68 … … 72 73 * converted to arrays of idxtype for metis to work on them. 73 74 */ 75 printf("Hello 2\n"); 74 76 if(elem_arr->descr->type_num == PyArray_LONG){ 75 77 elem_c_arr = (idxtype *)malloc(*(elem_arr->dimensions) * sizeof(idxtype)); … … 88 90 elem_c_arr = (idxtype *)elem_arr->data; 89 91 92 printf("Hello 3\n"); 90 93 epart = (idxtype *)malloc(ne * sizeof(idxtype)); 91 94 if(epart == NULL){ … … 101 104 return NULL; 102 105 } 106 printf("Hello 4\n"); 103 107 bridge_partMeshNodal(&ne, &nn, elem_c_arr, &etype, &numflag, &nparts, &edgecut, epart, npart); 104 108 109 printf("Hello 5\n"); 105 110 dims[0] = ne; 106 111 epart_pyarr = (PyArrayObject *)PyArray_FromDimsAndData(1, dims, PyArray_INT, (char *)epart); -
inundation/pymetis/pymetis/metis_bridge.c
r2678 r3085 13 13 14 14 void bridge_partMeshNodal(int * ne, int * nn, idxtype * elmnts, int * etype, int * numflag, int * nparts, int * edgecut, idxtype * epart, idxtype * npart){ 15 16 printf("Inside bridge_PartMeshNodal\n"); 17 15 18 METIS_PartMeshNodal(ne, nn, elmnts, etype, numflag, nparts, edgecut, epart, npart); 16 19 } -
inundation/pyvolution/domain.py
r3021 r3085 8 8 """ 9 9 10 from pyvolution. mesh import Mesh10 from pyvolution.neighbour_mesh import Mesh 11 11 from pyvolution.generic_boundary_conditions import Boundary 12 12 from pyvolution.generic_boundary_conditions import File_boundary -
inundation/pyvolution/least_squares.py
r2884 r3085 25 25 #from general_mesh import General_mesh 26 26 from Numeric import zeros, array, Float, Int, transpose, concatenate, ArrayType, NewAxis 27 from pyvolution. mesh import Mesh27 from pyvolution.neighbour_mesh import Mesh 28 28 29 29 from Numeric import dot, zeros, take, compress, array, Float, Int, transpose, concatenate, ArrayType -
inundation/pyvolution/quantity.py
r2924 r3085 20 20 def __init__(self, domain, vertex_values=None): 21 21 22 from pyvolution. mesh import Mesh22 from pyvolution.neighbour_mesh import Mesh 23 23 from Numeric import array, zeros, Float 24 24 -
inundation/pyvolution/test_least_squares.py
r2778 r3085 8 8 9 9 from pyvolution.least_squares import * 10 from pyvolution.neighbour_mesh import Mesh 11 10 12 from Numeric import allclose, array, transpose 11 13 … … 819 821 820 822 def test_fit_and_interpolation(self): 821 from mesh import Mesh822 823 823 824 a = [0.0, 0.0] … … 912 913 using another set of points. 913 914 """ 914 from mesh import Mesh915 916 915 917 916 #Setup mesh used to represent fitted function … … 1003 1002 """ 1004 1003 1005 from mesh import Mesh1006 1007 1008 1004 #Setup mesh used to represent discontinuous function 1009 1005 a = [0.0, 0.0] … … 1288 1284 coordinate system as defined by origin. 1289 1285 """ 1290 from mesh import Mesh1291 1286 1292 1287 #Setup mesh used to represent fitted function … … 1824 1819 using another set of points. 1825 1820 """ 1826 from mesh import Mesh1827 1828 1821 1829 1822 #Setup mesh used to represent fitted function … … 1869 1862 Check that exceedance in fitted values are caught. 1870 1863 """ 1871 from mesh import Mesh1872 1873 1864 1874 1865 #Setup mesh used to represent fitted function -
inundation/pyvolution/test_mesh.py
r3072 r3085 10 10 from math import sqrt 11 11 12 from mesh import *12 from neighbour_mesh import * 13 13 from mesh_factory import rectangular 14 14 from config import epsilon … … 710 710 def test_boundary_polygon(self): 711 711 from mesh_factory import rectangular 712 from mesh import Mesh712 #from mesh import Mesh 713 713 from Numeric import zeros, Float 714 714 … … 730 730 731 731 def test_boundary_polygon_II(self): 732 from mesh import Mesh733 732 from Numeric import zeros, Float 734 733 … … 770 769 """ 771 770 772 from mesh import Mesh773 771 from Numeric import zeros, Float 774 772 … … 811 809 """ 812 810 813 from mesh import Mesh814 811 from Numeric import zeros, Float 815 812 from mesh_factory import rectangular … … 855 852 856 853 """ 857 from mesh import Mesh858 854 from Numeric import zeros, Float 859 855
Note: See TracChangeset
for help on using the changeset viewer.