Changeset 3313


Ignore:
Timestamp:
03/22/10 10:07:43 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added Size of each field of BamgMesh and BamgGeom instead of Num

Location:
issm/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/@bamgmesh/bamgmesh.m

    r3311 r3313  
    1212        bm.Triangles=[];
    1313        bm.Quadrilaterals=[];
    14         bm.AllEdges=[];
     14        bm.ElementEdges=[];
    1515        bm.Segments=[];
    1616        bm.VerticesOnGeometricVertex=[];
  • issm/trunk/src/mex/Bamg/Bamg.cpp

    r3311 r3313  
    2626        /*create bamg geometry input*/
    2727        BamgGeomInit(&bamggeom_in);
    28         FetchData(&bamggeom_in.Vertices,&bamggeom_in.NumVertices,NULL,mxGetField(BAMGGEOMETRY,0,"Vertices"));
    29         FetchData(&bamggeom_in.Edges,&bamggeom_in.NumEdges,NULL,mxGetField(BAMGGEOMETRY,0,"Edges"));
    30         FetchData(&bamggeom_in.Corners,&bamggeom_in.NumCorners,NULL,mxGetField(BAMGGEOMETRY,0,"Corners"));
    31         FetchData(&bamggeom_in.RequiredVertices,&bamggeom_in.NumRequiredVertices,NULL,mxGetField(BAMGGEOMETRY,0,"RequiredVertices"));
    32         FetchData(&bamggeom_in.RequiredEdges,&bamggeom_in.NumRequiredEdges,NULL,mxGetField(BAMGGEOMETRY,0,"RequiredEdges"));
     28        FetchData(&bamggeom_in.Vertices,        &bamggeom_in.VerticesSize[0],        &bamggeom_in.VerticesSize[1],        mxGetField(BAMGGEOMETRY,0,"Vertices"));
     29        FetchData(&bamggeom_in.Edges,           &bamggeom_in.EdgesSize[0],           &bamggeom_in.EdgesSize[1],           mxGetField(BAMGGEOMETRY,0,"Edges"));
     30        FetchData(&bamggeom_in.Corners,         &bamggeom_in.CornersSize[0],         &bamggeom_in.CornersSize[1],         mxGetField(BAMGGEOMETRY,0,"Corners"));
     31        FetchData(&bamggeom_in.RequiredVertices,&bamggeom_in.RequiredVerticesSize[0],&bamggeom_in.RequiredVerticesSize[1],mxGetField(BAMGGEOMETRY,0,"RequiredVertices"));
     32        FetchData(&bamggeom_in.RequiredEdges,   &bamggeom_in.RequiredEdgesSize[0],   &bamggeom_in.RequiredEdgesSize[1],   mxGetField(BAMGGEOMETRY,0,"RequiredEdges"));
     33        FetchData(&bamggeom_in.CrackedEdges,    &bamggeom_in.CrackedEdgesSize[0],    &bamggeom_in.CrackedEdgesSize[1],    mxGetField(BAMGGEOMETRY,0,"CrackedEdges"));
     34        FetchData(&bamggeom_in.SubDomains,      &bamggeom_in.SubDomainsSize[0],      &bamggeom_in.SubDomainsSize[1],      mxGetField(BAMGGEOMETRY,0,"SubDomains"));
    3335        FetchData(&bamggeom_in.hVertices,&lines,&cols,mxGetField(BAMGGEOMETRY,0,"hVertices"));
    34         FetchData(&bamggeom_in.CrackedEdges,&bamggeom_in.NumCrackedEdges,NULL,mxGetField(BAMGGEOMETRY,0,"CrackedEdges"));
    35         FetchData(&bamggeom_in.SubDomains,&bamggeom_in.NumSubDomains,NULL,mxGetField(BAMGGEOMETRY,0,"SubDomains"));
    36         if (bamggeom_in.hVertices && (cols!=1 || lines!=bamggeom_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'hVertices' should be [%i %i]",bamggeom_in.NumVertices,1));}
     36        if (bamggeom_in.hVertices && (cols!=1 || lines!=bamggeom_in.VerticesSize[0])){throw ErrorException(__FUNCT__,exprintf("the size of 'hVertices' should be [%i %i]",bamggeom_in.VerticesSize[0],1));}
    3737
    3838        /*create bamg mesh input*/
    3939        BamgMeshInit(&bamgmesh_in);
    40         FetchData(&bamgmesh_in.Vertices,&bamgmesh_in.NumVertices,NULL,mxGetField(BAMGMESH,0,"Vertices"));
    41         FetchData(&bamgmesh_in.Triangles,&bamgmesh_in.NumTriangles,NULL,mxGetField(BAMGMESH,0,"Triangles"));
     40        FetchData(&bamgmesh_in.Triangles,&bamgmesh_in.TrianglesSize[0],&bamgmesh_in.TrianglesSize[1],mxGetField(BAMGMESH,0,"Triangles"));
     41        FetchData(&bamgmesh_in.Vertices, &bamgmesh_in.VerticesSize[0], &bamgmesh_in.VerticesSize[1], mxGetField(BAMGMESH,0,"Vertices"));
     42        FetchData(&bamgmesh_in.Edges,    &bamgmesh_in.EdgesSize[0],    &bamgmesh_in.EdgesSize[1],    mxGetField(BAMGMESH,0,"Edges"));
     43        FetchData(&bamgmesh_in.Segments, &bamgmesh_in.SegmentsSize[0], &bamgmesh_in.SegmentsSize[1], mxGetField(BAMGMESH,0,"Segments"));
     44        FetchData(&bamgmesh_in.CrackedEdges,&bamgmesh_in.CrackedEdgesSize[0],&bamgmesh_in.CrackedEdgesSize[1],mxGetField(BAMGMESH,0,"CrackedEdges"));
     45        FetchData(&bamgmesh_in.EdgesOnGeometricEdge,&bamgmesh_in.EdgesOnGeometricEdgeSize[0],&bamgmesh_in.EdgesOnGeometricEdgeSize[1],mxGetField(BAMGMESH,0,"EdgesOnGeometricEdge"));
     46        FetchData(&bamgmesh_in.VerticesOnGeometricEdge,&bamgmesh_in.VerticesOnGeometricEdgeSize[0],&bamgmesh_in.VerticesOnGeometricEdgeSize[1],mxGetField(BAMGMESH,0,"VerticesOnGeometricEdge"));
     47        FetchData(&bamgmesh_in.VerticesOnGeometricVertex,&bamgmesh_in.VerticesOnGeometricVertexSize[0],&bamgmesh_in.VerticesOnGeometricVertexSize[1],mxGetField(BAMGMESH,0,"VerticesOnGeometricVertex"));
    4248        FetchData(&bamgmesh_in.hVertices,&lines,&cols,mxGetField(BAMGMESH,0,"hVertices"));
    43         FetchData(&bamgmesh_in.Segments,&bamgmesh_in.NumSegments,NULL,mxGetField(BAMGMESH,0,"Segments"));
    44         FetchData(&bamgmesh_in.CrackedEdges,&bamgmesh_in.NumCrackedEdges,NULL,mxGetField(BAMGMESH,0,"CrackedEdges"));
    45         FetchData(&bamgmesh_in.Edges,&bamgmesh_in.NumEdges,NULL,mxGetField(BAMGMESH,0,"Edges"));
    46         FetchData(&bamgmesh_in.EdgesOnGeometricEdge,&bamgmesh_in.NumEdgesOnGeometricEdge,NULL,mxGetField(BAMGMESH,0,"EdgesOnGeometricEdge"));
    47         FetchData(&bamgmesh_in.VerticesOnGeometricEdge,&bamgmesh_in.NumVerticesOnGeometricEdge,NULL,mxGetField(BAMGMESH,0,"VerticesOnGeometricEdge"));
    48         FetchData(&bamgmesh_in.VerticesOnGeometricVertex,&bamgmesh_in.NumVerticesOnGeometricVertex,NULL,mxGetField(BAMGMESH,0,"VerticesOnGeometricVertex"));
    49         if (bamgmesh_in.hVertices && (cols!=1 || lines!=bamgmesh_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'hVertices' should be [%i %i]",bamgmesh_in.NumVertices,1));}
     49        if (bamgmesh_in.hVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){throw ErrorException(__FUNCT__,exprintf("the size of 'hVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));}
    5050
    5151        /*create bamg options input*/
     
    7272        FetchData(&bamgopts.MaximalAngleOfCorner,mxGetField(BAMGOPTIONS,0,"MaximalAngleOfCorner"));
    7373        FetchData(&bamgopts.hminVertices,&lines,&cols,mxGetField(BAMGOPTIONS,0,"hminVertices"));
    74         if (bamgopts.hminVertices && (cols!=1 || lines!=bamgmesh_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'hminVertices' should be [%i %i]",bamgmesh_in.NumVertices,1));}
     74        if (bamgopts.hminVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){throw ErrorException(__FUNCT__,exprintf("the size of 'hminVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));}
    7575        FetchData(&bamgopts.hmaxVertices,&lines,&cols,mxGetField(BAMGOPTIONS,0,"hmaxVertices"));
    76         if (bamgopts.hmaxVertices && (cols!=1 || lines!=bamgmesh_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'hmaxVertices' should be [%i %i]",bamgmesh_in.NumVertices,1));}
     76        if (bamgopts.hmaxVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){throw ErrorException(__FUNCT__,exprintf("the size of 'hmaxVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));}
    7777        FetchData(&bamgopts.metric,&lines,&cols,mxGetField(BAMGOPTIONS,0,"metric"));
    78         if (bamgopts.metric && (cols!=3 || lines!=bamgmesh_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'metric' should be [%i %i]",bamgmesh_in.NumVertices,3));}
     78        if (bamgopts.metric && (cols!=3 || lines!=bamgmesh_in.VerticesSize[0])){throw ErrorException(__FUNCT__,exprintf("the size of 'metric' should be [%i %i]",bamgmesh_in.VerticesSize[0],3));}
    7979        FetchData(&bamgopts.field,&lines,&bamgopts.numfields,mxGetField(BAMGOPTIONS,0,"field"));
    80         if (bamgopts.field && lines!=bamgmesh_in.NumVertices){throw ErrorException(__FUNCT__,exprintf("the size of 'field' should be [%i %i]",bamgmesh_in.NumVertices,bamgopts.numfields));}
     80        if (bamgopts.field && lines!=bamgmesh_in.VerticesSize[0]){throw ErrorException(__FUNCT__,exprintf("the size of 'field' should be [%i %i]",bamgmesh_in.VerticesSize[0],bamgopts.numfields));}
    8181        FetchData(&bamgopts.err,NULL,&cols,mxGetField(BAMGOPTIONS,0,"err"));
    8282        if (bamgopts.numfields!=0 && cols!=bamgopts.numfields){throw ErrorException(__FUNCT__,exprintf("the size of 'err' should be the same as 'field'"));}
Note: See TracChangeset for help on using the changeset viewer.