Changeset 3085


Ignore:
Timestamp:
Jun 5, 2006, 5:03:48 PM (18 years ago)
Author:
ole
Message:

Moved pyvolution.mesh.py to pyvolution.test_mesh.py in order to avoid confusion with pmesh.

Location:
inundation
Files:
12 edited
1 moved

Legend:

Unmodified
Added
Removed
  • inundation/fit_interpolate/general_fit_interpolate.py

    r2897 r3085  
    2525
    2626from caching.caching import cache
    27 from pyvolution.mesh import Mesh
     27from pyvolution.neighbour_mesh import Mesh
    2828from utilities.sparse import Sparse, Sparse_CSR
    2929from utilities.cg_solve import conjugate_gradient, VectorShapeError
  • inundation/fit_interpolate/interpolate.py

    r3055 r3085  
    2525
    2626from caching.caching import cache
    27 from pyvolution.mesh import Mesh
     27from pyvolution.neighbour_mesh import Mesh
    2828from utilities.sparse import Sparse, Sparse_CSR
    2929from utilities.cg_solve import conjugate_gradient, VectorShapeError
  • inundation/fit_interpolate/test_fit.py

    r3014 r3085  
    1010
    1111from fit import *
     12from pyvolution.neighbour_mesh import Mesh
    1213from utilities.sparse import Sparse, Sparse_CSR
    1314from coordinate_transforms.geo_reference import Geo_reference
     
    199200
    200201    def test_fit_and_interpolation(self):
    201         from mesh import Mesh
    202202
    203203        a = [0.0, 0.0]
     
    366366        coordinate system as defined by origin.
    367367        """
    368         from mesh import Mesh
    369368
    370369        #Setup mesh used to represent fitted function
  • inundation/pymetis/metis-4.0/Lib/mesh.c

    r2051 r3085  
    2424                      idxtype *dxadj, idxtype *dadjncy)
    2525{
     26
     27
    2628  int esizes[] = {-1, 3, 4, 8, 4};
    2729
  • inundation/pymetis/metis-4.0/Lib/meshpart.c

    r2051 r3085  
    3131  esize = esizes[*etype];
    3232
     33  printf("Inside METIS_PartMeshNodal\n");
     34 
    3335  if (*numflag == 1)
    3436    ChangeMesh2CNumbering((*ne)*esize, elmnts);
     
    3739  adjncy = idxmalloc(20*(*nn), "METIS_MESHPARTNODAL: adjncy");
    3840
     41  printf("Calling METIS_MeshToNodal\n");
    3942  METIS_MeshToNodal(ne, nn, elmnts, etype, &pnumflag, xadj, adjncy);
    40 
     43  printf("After METIS_MeshToNodal\n");
     44   
    4145  adjncy = realloc(adjncy, xadj[*nn]*sizeof(idxtype));
    4246
    4347  options[0] = 0;
     48  printf("Calling METIS_PartGraphKway\n"); 
    4449  METIS_PartGraphKway(nn, xadj, adjncy, NULL, NULL, &wgtflag, &pnumflag, nparts, options, edgecut, npart);
    4550
    4651  /* OK, now compute an element partition based on the nodal partition npart */
     52  printf("Starting loop 1\n"); 
    4753  idxset(*ne, -1, epart);
    4854  pwgts = idxsmalloc(*nparts, 0, "METIS_MESHPARTNODAL: pwgts");
     
    5965  }
    6066
     67  printf("Starting loop 2\n");   
    6168  maxpwgt = 1.03*(*ne)/(*nparts);
    6269  for (i=0; i<*ne; i++) {
     
    96103  }
    97104
     105  printf("ChangeMesh2FNumbering2\n");   
    98106  if (*numflag == 1)
    99107    ChangeMesh2FNumbering2((*ne)*esize, elmnts, *ne, *nn, epart, npart);
    100108
     109  printf("Free\n");       
    101110  GKfree(&xadj, &adjncy, &pwgts, LTERM);
     111  printf("Done\n");     
    102112
    103113}
  • inundation/pymetis/pymetis/metis.c

    r2847 r3085  
    6464    return NULL;
    6565
     66  printf("Hello 1\n");
    6667  elem_arr = (PyArrayObject *) PyArray_ContiguousFromObject(elements, PyArray_NOTYPE, 1, 1);
    6768
     
    7273   * converted to arrays of idxtype for metis to work on them.
    7374   */
     75  printf("Hello 2\n");   
    7476  if(elem_arr->descr->type_num == PyArray_LONG){
    7577    elem_c_arr = (idxtype *)malloc(*(elem_arr->dimensions) * sizeof(idxtype));
     
    8890    elem_c_arr = (idxtype *)elem_arr->data;
    8991
     92  printf("Hello 3\n");   
    9093  epart = (idxtype *)malloc(ne * sizeof(idxtype));
    9194  if(epart == NULL){
     
    101104    return NULL;
    102105  }
     106  printf("Hello 4\n");
    103107  bridge_partMeshNodal(&ne, &nn, elem_c_arr, &etype, &numflag, &nparts, &edgecut, epart, npart);
    104108
     109  printf("Hello 5\n"); 
    105110  dims[0] = ne;
    106111  epart_pyarr = (PyArrayObject *)PyArray_FromDimsAndData(1, dims, PyArray_INT, (char *)epart);
  • inundation/pymetis/pymetis/metis_bridge.c

    r2678 r3085  
    1313
    1414void 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
    1518  METIS_PartMeshNodal(ne, nn, elmnts, etype, numflag, nparts, edgecut, epart, npart);
    1619}
  • inundation/pyvolution/domain.py

    r3021 r3085  
    88"""
    99
    10 from pyvolution.mesh import Mesh
     10from pyvolution.neighbour_mesh import Mesh
    1111from pyvolution.generic_boundary_conditions import Boundary
    1212from pyvolution.generic_boundary_conditions import File_boundary
  • inundation/pyvolution/least_squares.py

    r2884 r3085  
    2525#from general_mesh import General_mesh
    2626from Numeric import zeros, array, Float, Int, transpose, concatenate, ArrayType, NewAxis
    27 from pyvolution.mesh import Mesh
     27from pyvolution.neighbour_mesh import Mesh
    2828
    2929from Numeric import dot, zeros, take, compress, array, Float, Int, transpose, concatenate, ArrayType
  • inundation/pyvolution/quantity.py

    r2924 r3085  
    2020    def __init__(self, domain, vertex_values=None):
    2121
    22         from pyvolution.mesh import Mesh
     22        from pyvolution.neighbour_mesh import Mesh
    2323        from Numeric import array, zeros, Float
    2424
  • inundation/pyvolution/test_least_squares.py

    r2778 r3085  
    88
    99from pyvolution.least_squares import *
     10from pyvolution.neighbour_mesh import Mesh
     11
    1012from Numeric import allclose, array, transpose
    1113
     
    819821
    820822    def test_fit_and_interpolation(self):
    821         from mesh import Mesh
    822823
    823824        a = [0.0, 0.0]
     
    912913        using another set of points.
    913914        """
    914         from mesh import Mesh
    915 
    916915
    917916        #Setup mesh used to represent fitted function
     
    10031002        """
    10041003       
    1005         from mesh import Mesh
    1006 
    1007 
    10081004        #Setup mesh used to represent discontinuous function
    10091005        a = [0.0, 0.0]
     
    12881284        coordinate system as defined by origin.
    12891285        """
    1290         from mesh import Mesh
    12911286
    12921287        #Setup mesh used to represent fitted function
     
    18241819        using another set of points.
    18251820        """
    1826         from mesh import Mesh
    1827 
    18281821
    18291822        #Setup mesh used to represent fitted function
     
    18691862        Check that exceedance in fitted values are caught.
    18701863        """
    1871         from mesh import Mesh
    1872 
    18731864
    18741865        #Setup mesh used to represent fitted function
  • inundation/pyvolution/test_mesh.py

    r3072 r3085  
    1010from math import sqrt
    1111
    12 from mesh import *
     12from neighbour_mesh import *
    1313from mesh_factory import rectangular
    1414from config import epsilon
     
    710710    def test_boundary_polygon(self):
    711711        from mesh_factory import rectangular
    712         from mesh import Mesh
     712        #from mesh import Mesh
    713713        from Numeric import zeros, Float
    714714
     
    730730
    731731    def test_boundary_polygon_II(self):
    732         from mesh import Mesh
    733732        from Numeric import zeros, Float
    734733       
     
    770769        """
    771770
    772         from mesh import Mesh
    773771        from Numeric import zeros, Float
    774772
     
    811809        """
    812810
    813         from mesh import Mesh
    814811        from Numeric import zeros, Float
    815812        from mesh_factory import rectangular       
     
    855852       
    856853        """
    857         from mesh import Mesh
    858854        from Numeric import zeros, Float
    859855       
Note: See TracChangeset for help on using the changeset viewer.