Changeset 8303


Ignore:
Timestamp:
05/16/11 15:42:41 (14 years ago)
Author:
seroussi
Message:

changed from grid to node in c

Location:
issm/trunk/src/c
Files:
56 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp

    r3595 r8303  
    2727        /*Contour:*/
    2828        Contour* contouri=NULL;
    29         int      numgrids;
     29        int      numnodes;
    3030        double*  xc=NULL;
    3131        double*  yc=NULL;
     
    6363        for (i=0;i<numcontours;i++){
    6464                contouri=*(contours+i);
    65                 numgrids=contouri->nods;
     65                numnodes=contouri->nods;
    6666                xc=contouri->x;
    6767                yc=contouri->y;
    68                 IsInPoly(in_nod,xc,yc,numgrids,x,y,i0,i1,edgevalue);
     68                IsInPoly(in_nod,xc,yc,numnodes,x,y,i0,i1,edgevalue);
    6969        }
    7070
  • issm/trunk/src/c/modules/ContourToNodesx/ContourToNodesx.cpp

    r3595 r8303  
    1111        /*Contour:*/
    1212        Contour* contouri=NULL;
    13         int      numgrids;
     13        int      numnodes;
    1414        double*  xc=NULL;
    1515        double*  yc=NULL;
     
    2424        for (i=0;i<numcontours;i++){
    2525                contouri=*(contours+i);
    26                 numgrids=contouri->nods;
     26                numnodes=contouri->nods;
    2727                xc=contouri->x;
    2828                yc=contouri->y;
    29                 IsInPoly(flags,xc,yc,numgrids,x,y,0,nods,edgevalue);
     29                IsInPoly(flags,xc,yc,numnodes,x,y,0,nods,edgevalue);
    3030        }
    3131
  • issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp

    r8224 r8303  
    5353                        GetVectorFromInputsx(&vertex_response,elements,nodes, vertices, loads, materials, parameters, StringToEnumx(root),VertexEnum);
    5454
    55                         /*Now, average it onto the partition grids: */
     55                        /*Now, average it onto the partition nodes: */
    5656                        AverageOntoPartitionx(&qmu_response,elements,nodes,vertices,loads,materials,parameters,vertex_response);
    5757
  • issm/trunk/src/c/modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp

    r7340 r8303  
    1212void       AgressiveMigration(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){ //{{{1
    1313
    14         /*Here, whatever grids inside the ice sheet want to unground, we allow -> instantaneous transmission of water through the bedrock: */
     14        /*Here, whatever nodes inside the ice sheet want to unground, we allow -> instantaneous transmission of water through the bedrock: */
    1515
    1616        int i,j;
  • issm/trunk/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp

    r8046 r8303  
    242242        sprintf(kfold->name      ,"ISSM Targets");
    243243        kfold->visibility=1;
    244 //      sprintf(kfold->descript  ,"Elements=%d, Grids=%d",melem,mncon);
     244//      sprintf(kfold->descript  ,"Elements=%d, Nodes=%d",melem,mncon);
    245245        sprintf(kfold->descript  ,"campaign{\n");
    246246        strcat(kfold->descript  ,"  evaluator ClaspTargetEvaluator;\n");
  • issm/trunk/src/c/modules/MeshPartitionx/MeshPartitionx.cpp

    r6412 r8303  
    11/*!\file:  MeshPartition.cpp
    2  * \brief partition elements and grids across a cluster of size numprocs.
     2 * \brief partition elements and nodes across a cluster of size numprocs.
    33 */
    44
     
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofgrids,double* elements,
    12                 int numberofelements2d,int numberofgrids2d,double* elements2d,int numlayers,int elements_width, int dim,int num_procs){
     11int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes,double* elements,
     12                int numberofelements2d,int numberofnodes2d,double* elements2d,int numlayers,int elements_width, int dim,int num_procs){
    1313
    1414        int noerr=1;
     
    3232        if(dim==2){
    3333                epart=(int*)xmalloc(numberofelements*sizeof(int));
    34                 npart=(int*)xmalloc(numberofgrids*sizeof(int));
     34                npart=(int*)xmalloc(numberofnodes*sizeof(int));
    3535                index=(int*)xmalloc(elements_width*numberofelements*sizeof(int));
    3636                for (i=0;i<numberofelements;i++){
     
    4242                /*Partition using Metis:*/
    4343                if (num_procs>1){
    44                         METIS_PartMeshNodal(&numberofelements,&numberofgrids, index, &etype, &numflag, &num_procs, &edgecut, epart, npart);
     44                        METIS_PartMeshNodal(&numberofelements,&numberofnodes, index, &etype, &numflag, &num_procs, &edgecut, epart, npart);
    4545                }
    4646                else if (num_procs==1){
    4747                        /*METIS does not know how to deal with one cpu only!*/
    4848                        for (i=0;i<numberofelements;i++) epart[i]=0;
    49                         for (i=0;i<numberofgrids;i++)    npart[i]=0;
     49                        for (i=0;i<numberofnodes;i++)    npart[i]=0;
    5050                }
    5151                else _error_("At least one processor is required");
     
    5656                /*First build concatenated 2d mesh  from 2d_coll and 2d_noncoll: */
    5757                epart2d=(int*)xmalloc(numberofelements2d*sizeof(int));
    58                 npart2d=(int*)xmalloc(numberofgrids2d*sizeof(int));
     58                npart2d=(int*)xmalloc(numberofnodes2d*sizeof(int));
    5959                index2d=(int*)xmalloc(3*numberofelements2d*sizeof(int));
    6060
     
    6767                /*Partition using Metis:*/
    6868                if (num_procs>1){
    69                         METIS_PartMeshNodal(&numberofelements2d,&numberofgrids2d, index2d, &etype2d, &numflag, &num_procs, &edgecut, epart2d, npart2d);
     69                        METIS_PartMeshNodal(&numberofelements2d,&numberofnodes2d, index2d, &etype2d, &numflag, &num_procs, &edgecut, epart2d, npart2d);
    7070                }
    7171                else if (num_procs==1){
    7272                        /*METIS does not know how to deal with one cpu only!*/
    7373                        for (i=0;i<numberofelements2d;i++) epart2d[i]=0;
    74                         for (i=0;i<numberofgrids2d;i++)    npart2d[i]=0;
     74                        for (i=0;i<numberofnodes2d;i++)    npart2d[i]=0;
    7575                }
    7676                else _error_("At least one processor is required");
     
    8888
    8989                /*Extrude npart2d to npart, using numlayers: */
    90                 npart=(int*)xmalloc(numberofgrids*sizeof(int));
     90                npart=(int*)xmalloc(numberofnodes*sizeof(int));
    9191               
    9292                count=0;
    9393                for(i=0;i<(numlayers);i++){
    94                         for(j=0;j<numberofgrids2d;j++){
     94                        for(j=0;j<numberofnodes2d;j++){
    9595                                npart[count]=npart2d[j];
    9696                                count++;
  • issm/trunk/src/c/modules/MeshPartitionx/MeshPartitionx.h

    r4021 r8303  
    77
    88/* local prototypes: */
    9 int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofgrids,double* elements,
    10                 int numberofelements2d,int numberofgrids2d,double* elements2d,int numlayers,int elements_width, int dim,int numareas);
     9int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes,double* elements,
     10                int numberofelements2d,int numberofnodes2d,double* elements2d,int numlayers,int elements_width, int dim,int numareas);
    1111       
    1212#endif /* _MESHPARTITIONX_H */
  • issm/trunk/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp

    r6412 r8303  
    44#include "./MeshProfileIntersectionx.h"
    55               
    6 void ElementSegment(DataSet* segments_dataset,int el,double* xgrids,double* ygrids,double* xsegment,double* ysegment){
     6void ElementSegment(DataSet* segments_dataset,int el,double* xnodes,double* ynodes,double* xsegment,double* ysegment){
    77
    8         /*We have a tria element (xgrids,ygrids) and a segment (xsegment,ysegment). Find whether they intersect.
     8        /*We have a tria element (xnodes,ynodes) and a segment (xsegment,ysegment). Find whether they intersect.
    99         * If they do, create a Segment object with the intersection, and add to segments_dataset dataset: */
    1010
     
    2323       
    2424        /*edge 1: */
    25         xel[0]=xgrids[0];  yel[0]=ygrids[0]; xel[1]=xgrids[1];  yel[1]=ygrids[1];
     25        xel[0]=xnodes[0];  yel[0]=ynodes[0]; xel[1]=xnodes[1];  yel[1]=ynodes[1];
    2626        edge1=SegmentIntersect(&alpha1,&alpha2, xel,yel,xsegment,ysegment); //alpha1: segment coordinate of intersection. alpha2: same thing for second interesection if it exists (colinear edges)
    2727
    2828        /*edge 2: */
    29         xel[0]=xgrids[1];  yel[0]=ygrids[1]; xel[1]=xgrids[2];  yel[1]=ygrids[2];
     29        xel[0]=xnodes[1];  yel[0]=ynodes[1]; xel[1]=xnodes[2];  yel[1]=ynodes[2];
    3030        edge2=SegmentIntersect(&beta1,&beta2, xel,yel,xsegment,ysegment);
    3131
    3232        /*edge 3: */
    33         xel[0]=xgrids[2];  yel[0]=ygrids[2]; xel[1]=xgrids[0];  yel[1]=ygrids[0];
     33        xel[0]=xnodes[2];  yel[0]=ynodes[2]; xel[1]=xnodes[0];  yel[1]=ynodes[0];
    3434        edge3=SegmentIntersect(&gamma1,&gamma2, xel,yel,xsegment,ysegment);
    3535
     
    6565                /*segment intersect only 1 edge. Figure out where the first point in the segment is, inside or outside the element,
    6666                 * this will decide the coordinate: */
    67                 if (NodeInElement(xgrids,ygrids,xsegment[0],ysegment[0])){
     67                if (NodeInElement(xnodes,ynodes,xsegment[0],ysegment[0])){
    6868                        coord1=0;
    6969                        if(edge1==IntersectEnum){coord2=alpha1;}
     
    8787        else{
    8888                /*No interesections, but the segment might be entirely inside this triangle!: */
    89                 if ( (NodeInElement(xgrids,ygrids,xsegment[0],ysegment[0])) && (NodeInElement(xgrids,ygrids,xsegment[1],ysegment[1])) ){
     89                if ( (NodeInElement(xnodes,ynodes,xsegment[0],ysegment[0])) && (NodeInElement(xnodes,ynodes,xsegment[1],ysegment[1])) ){
    9090                        segments_dataset->AddObject(new  Segment(el+1,xsegment[0],ysegment[0],xsegment[1],ysegment[1]));
    9191                }
  • issm/trunk/src/c/modules/MeshProfileIntersectionx/ElementSegmentsIntersection.cpp

    r4785 r8303  
    44#include "./MeshProfileIntersectionx.h"
    55               
    6 void ElementSegmentsIntersection(DataSet* segments_dataset,int el, double* xgrids,double* ygrids,double* xc,double* yc,int numgrids){
     6void ElementSegmentsIntersection(DataSet* segments_dataset,int el, double* xnodes,double* ynodes,double* xc,double* yc,int numnodes){
    77
    88        int i;
     
    1111
    1212        /*Loop through contour: */
    13         for(i=0;i<numgrids-1;i++){
     13        for(i=0;i<numnodes-1;i++){
    1414
    1515                xsegment[0]=xc[i];
     
    1818                ysegment[1]=yc[i+1];
    1919
    20                 ElementSegment(segments_dataset,el, xgrids,ygrids,xsegment,ysegment);
     20                ElementSegment(segments_dataset,el, xnodes,ynodes,xsegment,ysegment);
    2121
    2222        }
  • issm/trunk/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp

    r4773 r8303  
    1212        /*Contour:*/
    1313        Contour* contouri=NULL;
    14         int      numgrids;
     14        int      numnodes;
    1515        double*  xc=NULL;
    1616        double*  yc=NULL;
     
    3636                /*retrieve contour info: */
    3737                contouri=*(contours+i);
    38                 numgrids=contouri->nods;
     38                numnodes=contouri->nods;
    3939                xc=contouri->x;
    4040                yc=contouri->y;
    4141
    4242                /*determine segmentsi and numsegsi for this contour and the mesh intersection: */
    43                 MeshSegmentsIntersection(&segmentsi,&numsegsi,index,x,y,nel,nods,xc,yc,numgrids);
     43                MeshSegmentsIntersection(&segmentsi,&numsegsi,index,x,y,nel,nods,xc,yc,numnodes);
    4444               
    4545                /*save segmentsi: */
  • issm/trunk/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.h

    r4785 r8303  
    1212/* local prototypes: */
    1313void MeshProfileIntersectionx( double** psegments, int* pnumseg, int* index, double* x, double* y, int nel, int nods,  Contour** contours,int numcontours);
    14 void MeshSegmentsIntersection(double** psegments, int* pnumsegs,int* index, double* x, double* y, int nel, int nods, double* xc, double* yc, int numgrids);
    15 void ElementSegmentsIntersection(DataSet* segments_dataset,int el, double* xgrids,double* ygrids,double* xc,double* yc,int numgrids);
    16 void ElementSegment(DataSet* segments_dataset,int el,double* xgrids,double* ygrids,double* xsegment,double* ysegment);
     14void MeshSegmentsIntersection(double** psegments, int* pnumsegs,int* index, double* x, double* y, int nel, int nods, double* xc, double* yc, int numnodes);
     15void ElementSegmentsIntersection(DataSet* segments_dataset,int el, double* xnodes,double* ynodes,double* xc,double* yc,int numnodes);
     16void ElementSegment(DataSet* segments_dataset,int el,double* xnodes,double* ynodes,double* xsegment,double* ysegment);
    1717int  SegmentIntersect(double* palpha, double* pbeta, double* x1, double* y1, double* x2, double* y2);
    18 bool NodeInElement(double* xgrids, double* ygrids, double x, double y);
     18bool NodeInElement(double* xnodes, double* ynodes, double x, double y);
    1919
    2020#endif /* _MESHPROFILEINTERSECTIONX_H */
  • issm/trunk/src/c/modules/MeshProfileIntersectionx/MeshSegmentsIntersection.cpp

    r4785 r8303  
    44#include "./MeshProfileIntersectionx.h"
    55
    6 void MeshSegmentsIntersection(double** psegments, int* pnumsegs,int* index, double* x, double* y, int nel, int nods, double* xc, double* yc, int numgrids){
     6void MeshSegmentsIntersection(double** psegments, int* pnumsegs,int* index, double* x, double* y, int nel, int nods, double* xc, double* yc, int numnodes){
    77
    88        int      i,j;
     
    1515        /*intermediary: */
    1616        DataSet* segments_dataset=NULL;
    17         double   xgrids[3];
    18         double   ygrids[3];
     17        double   xnodes[3];
     18        double   ynodes[3];
    1919
    2020        /*We don't know how many segments  we are going to get, so have a dynamic container: */
     
    2424        for(i=0;i<nel;i++){
    2525                for(j=0;j<3;j++){
    26                         xgrids[j]=x[*(index+3*i+j)];
    27                         ygrids[j]=y[*(index+3*i+j)];
     26                        xnodes[j]=x[*(index+3*i+j)];
     27                        ynodes[j]=y[*(index+3*i+j)];
    2828                }
    29                 ElementSegmentsIntersection(segments_dataset,i,xgrids,ygrids,xc,yc,numgrids);
     29                ElementSegmentsIntersection(segments_dataset,i,xnodes,ynodes,xc,yc,numnodes);
    3030        }
    3131
  • issm/trunk/src/c/modules/MeshProfileIntersectionx/NodeInElement.cpp

    r4785 r8303  
    44#include "./MeshProfileIntersectionx.h"
    55
    6 bool NodeInElement(double* xgrids, double* ygrids, double x, double y){
     6bool NodeInElement(double* xnodes, double* ynodes, double x, double y){
    77
    88        double x1,y1;
     
    1212        double det;
    1313
    14         x1=xgrids[0];
    15         x2=xgrids[1];
    16         x3=xgrids[2];
    17         y1=ygrids[0];
    18         y2=ygrids[1];
    19         y3=ygrids[2];
     14        x1=xnodes[0];
     15        x2=xnodes[1];
     16        x3=xnodes[2];
     17        y1=ynodes[0];
     18        y2=ynodes[1];
     19        y3=ynodes[2];
    2020
    2121
  • issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp

    r8288 r8303  
    4040        /*First fetch data: */
    4141        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    42         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    43         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    44         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    45         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     42        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     43        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     44        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     45        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    4646        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    47         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     47        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4848
    4949        if(continuous_galerkin){
     
    8686        /*Clean fetched data: */
    8787        xfree((void**)&iomodel->elements);
    88         xfree((void**)&iomodel->gridonbed);
    89         xfree((void**)&iomodel->gridonsurface);
    90         xfree((void**)&iomodel->gridonicesheet);
    91         xfree((void**)&iomodel->gridonwater);
    92         xfree((void**)&iomodel->gridoniceshelf);
     88        xfree((void**)&iomodel->nodeonbed);
     89        xfree((void**)&iomodel->nodeonsurface);
     90        xfree((void**)&iomodel->nodeonicesheet);
     91        xfree((void**)&iomodel->nodeonwater);
     92        xfree((void**)&iomodel->nodeoniceshelf);
    9393        xfree((void**)&iomodel->vertices_type);
    9494
  • issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateConstraintsBalancevelocities.cpp

    r8288 r8303  
    3838                        if ((int)iomodel->spcvelocity[6*i+0] && (int)iomodel->spcvelocity[6*i+1]){ //spc if vx and vy are constrained
    3939
    40                                 /*This grid needs to be spc'd: */
     40                                /*This node needs to be spc'd: */
    4141                                constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,
    4242                                                                pow( pow(*(iomodel->spcvelocity+6*i+4),2.0) + pow(*(iomodel->spcvelocity+6*i+5),2.0) ,0.5),BalancevelocitiesAnalysisEnum));
  • issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateNodesBalancevelocities.cpp

    r8288 r8303  
    3232
    3333        /*First fetch data: */
    34         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    35         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    36         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    37         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    3838        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4040        for (i=0;i<iomodel->numberofvertices;i++){
    4141
     
    4949
    5050        /*Clean fetched data: */
    51         xfree((void**)&iomodel->gridonbed);
    52         xfree((void**)&iomodel->gridonsurface);
    53         xfree((void**)&iomodel->gridonicesheet);
    54         xfree((void**)&iomodel->gridoniceshelf);
    55         xfree((void**)&iomodel->gridonwater);
     51        xfree((void**)&iomodel->nodeonbed);
     52        xfree((void**)&iomodel->nodeonsurface);
     53        xfree((void**)&iomodel->nodeonicesheet);
     54        xfree((void**)&iomodel->nodeoniceshelf);
     55        xfree((void**)&iomodel->nodeonwater);
    5656        xfree((void**)&iomodel->vertices_type);
    5757
  • issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp

    r7516 r8303  
    3232       
    3333        /*First fetch data: */
    34         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    35         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    36         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    37         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    3838        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
     
    5050
    5151        /*Clean fetched data: */
    52         xfree((void**)&iomodel->gridonbed);
    53         xfree((void**)&iomodel->gridonsurface);
    54         xfree((void**)&iomodel->gridonicesheet);
    55         xfree((void**)&iomodel->gridonwater);
    56         xfree((void**)&iomodel->gridoniceshelf);
     52        xfree((void**)&iomodel->nodeonbed);
     53        xfree((void**)&iomodel->nodeonsurface);
     54        xfree((void**)&iomodel->nodeonicesheet);
     55        xfree((void**)&iomodel->nodeonwater);
     56        xfree((void**)&iomodel->nodeoniceshelf);
    5757        xfree((void**)&iomodel->vertices_type);
    5858       
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r6715 r8303  
    3333        /*Spcs: fetch data: */
    3434        IoModelFetchData(&iomodel->spcvelocity,NULL,NULL,iomodel_handle,"spcvelocity");
    35         IoModelFetchData(&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter");
    36         IoModelFetchData(&iomodel->gridonmacayeal,NULL,NULL,iomodel_handle,"gridonmacayeal");
    37         if(iomodel->dim==3)IoModelFetchData(&iomodel->gridonpattyn,NULL,NULL,iomodel_handle,"gridonpattyn");
    38         if(iomodel->dim==3)IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes");
     35        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
     36        IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle,"nodeonmacayeal");
     37        if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonpattyn,NULL,NULL,iomodel_handle,"nodeonpattyn");
     38        if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
    3939        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    4040        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
     
    5151                        if ((int)iomodel->vertices_type[i]==MacAyealPattynApproximationEnum){
    5252                                /*If grionmacayeal, spc pattyn dofs: 3 & 4*/
    53                                         if ((int)iomodel->gridonpattyn[i]){
     53                                        if ((int)iomodel->nodeonpattyn[i]){
    5454                                                constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    5555                                                count++;
     
    6666
    6767                                        }
    68                                         else if ((int)iomodel->gridonmacayeal[i]){
     68                                        else if ((int)iomodel->nodeonmacayeal[i]){
    6969                                                constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    7070                                                count++;
     
    8181
    8282                                        }
    83                                         else _error_("if vertices_type is MacAyealPattyn, you shoud have gridonpattyn or gridonmacayeal");
     83                                        else _error_("if vertices_type is MacAyealPattyn, you shoud have nodeonpattyn or nodeonmacayeal");
    8484                        }
    8585                        /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
    8686                        else if ((int)iomodel->vertices_type[i]==PattynStokesApproximationEnum){
    8787                                /*If grion,pattyn spc stokes dofs: 3 4 & 5*/
    88                                         if ((int)iomodel->gridonpattyn[i]){
     88                                        if ((int)iomodel->nodeonpattyn[i]){
    8989                                                constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    9090                                                count++;
     
    103103
    104104                                        }
    105                                         else if ((int)iomodel->gridonstokes[i]){ //spc pattyn grids: 1 & 2
     105                                        else if ((int)iomodel->nodeonstokes[i]){ //spc pattyn nodes: 1 & 2
    106106                                                constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    107107                                                count++;
     
    121121                                                }
    122122                                        }
    123                                         else _error_("if vertices_type is PattynStokes, you shoud have gridonpattyn or gridonstokes");
     123                                        else _error_("if vertices_type is PattynStokes, you shoud have nodeonpattyn or nodeonstokes");
    124124                        }
    125125                        /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
    126126                        else if ((int)iomodel->vertices_type[i]==MacAyealStokesApproximationEnum){
    127127                                /*If grion,pattyn spc stokes dofs: 3 4 & 5*/
    128                                         if ((int)iomodel->gridonmacayeal[i]){
     128                                        if ((int)iomodel->nodeonmacayeal[i]){
    129129                                                constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    130130                                                count++;
     
    143143
    144144                                        }
    145                                         else if ((int)iomodel->gridonstokes[i]){ //spc macayeal grids: 1 & 2
     145                                        else if ((int)iomodel->nodeonstokes[i]){ //spc macayeal nodes: 1 & 2
    146146                                                constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    147147                                                count++;
     
    161161                                                }
    162162                                        }
    163                                         else _error_("if vertices_type is MacAyealStokes, you shoud have gridonmacayeal or gridonstokes");
     163                                        else _error_("if vertices_type is MacAyealStokes, you shoud have nodeonmacayeal or nodeonstokes");
    164164                        }
    165165                        /*Now add the regular spcs*/
    166166                        else{
    167                                 if ((int)iomodel->spcvelocity[6*i+0] || (int)iomodel->gridonhutter[i]){
     167                                if ((int)iomodel->spcvelocity[6*i+0] || (int)iomodel->nodeonhutter[i]){
    168168                                        constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,*(iomodel->spcvelocity+6*i+3)/iomodel->yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    169169                                        count++;
    170170                                }
    171171                               
    172                                 if ((int)iomodel->spcvelocity[6*i+1] || (int)iomodel->gridonhutter[i]){
     172                                if ((int)iomodel->spcvelocity[6*i+1] || (int)iomodel->nodeonhutter[i]){
    173173                                        constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,*(iomodel->spcvelocity+6*i+4)/iomodel->yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
    174174                                        count++;
     
    188188        /*Free data: */
    189189        xfree((void**)&iomodel->spcvelocity);
    190         xfree((void**)&iomodel->gridonhutter);
    191         xfree((void**)&iomodel->gridonmacayeal);
    192         xfree((void**)&iomodel->gridonpattyn);
    193         xfree((void**)&iomodel->gridonstokes);
     190        xfree((void**)&iomodel->nodeonhutter);
     191        xfree((void**)&iomodel->nodeonmacayeal);
     192        xfree((void**)&iomodel->nodeonpattyn);
     193        xfree((void**)&iomodel->nodeonstokes);
    194194        xfree((void**)&iomodel->vertices_type);
    195195        xfree((void**)&iomodel->surface);
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp

    r7152 r8303  
    3535        if (!iomodel->ismacayealpattyn & !iomodel->isstokes)goto cleanup_and_return;
    3636       
    37         /*Create pressure loads as boundary conditions. Pay attention to the partitioning if we are running in parallel (the grids
     37        /*Create pressure loads as boundary conditions. Pay attention to the partitioning if we are running in parallel (the nodes
    3838         * referenced by a certain load must belong to the cluster node): */
    3939        IoModelFetchData(&iomodel->pressureload,&iomodel->numberofpressureloads,NULL,iomodel_handle,"pressureload");
     
    5151                if (iomodel->dim==2) segment_width=4;
    5252                else segment_width=6;
    53                 element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (grid1 grid2 ... elem fill)
     53                element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (node1 node2 ... elem fill)
    5454
    5555                /*Now, if this element is not in the partition, pass: */
     
    102102        xfree((void**)&iomodel->bed);
    103103
    104         /*create penalties for grids on the base of icesheet. We must have wb=ub*db/dx+vb*db/dy */
    105         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    106         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    107         IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes");
     104        /*create penalties for nodes on the base of icesheet. We must have wb=ub*db/dx+vb*db/dy */
     105        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     106        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     107        IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
    108108        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    109109        IoModelFetchData(&iomodel->spcvelocity,NULL,NULL,iomodel_handle,"spcvelocity");
     
    115115                if(iomodel->my_vertices[i]==1 && iomodel->singlenodetoelementconnectivity[i]!=0){
    116116
    117                         //if ((iomodel->gridonbed[i]) && (iomodel->gridonstokes[i])){
    118                         if ((iomodel->gridonbed[i]) && (iomodel->gridonicesheet[i]) && (iomodel->gridonstokes[i])){
     117                        //if ((iomodel->nodeonbed[i]) && (iomodel->nodeonstokes[i])){
     118                        if ((iomodel->nodeonbed[i]) && (iomodel->nodeonicesheet[i]) && (iomodel->nodeonstokes[i])){
    119119                               
    120120                                loads->AddObject(new Pengrid(iomodel->loadcounter+count+1,i,iomodel,DiagnosticHorizAnalysisEnum));
     
    124124        }
    125125
    126         xfree((void**)&iomodel->gridonbed);
    127         xfree((void**)&iomodel->gridonstokes);
    128         xfree((void**)&iomodel->gridonicesheet);
     126        xfree((void**)&iomodel->nodeonbed);
     127        xfree((void**)&iomodel->nodeonstokes);
     128        xfree((void**)&iomodel->nodeonicesheet);
    129129        xfree((void**)&iomodel->elements);
    130130        xfree((void**)&iomodel->spcvelocity);
     
    160160        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    161161        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    162         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     162        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    163163       
    164164        for(i=0;i<iomodel->numrifts;i++){
     
    175175        xfree((void**)&iomodel->bed);
    176176        xfree((void**)&iomodel->surface);
    177         xfree((void**)&iomodel->gridoniceshelf);
     177        xfree((void**)&iomodel->nodeoniceshelf);
    178178
    179179        cleanup_and_return:
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp

    r7442 r8303  
    3535
    3636        /*Create nodes: */
    37         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    38         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    39         IoModelFetchData(&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter");
    40         IoModelFetchData(&iomodel->gridonmacayeal,NULL,NULL,iomodel_handle,"gridonmacayeal");
    41         IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes");
    42         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    43         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
    44         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     37        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     38        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     39        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
     40        IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle,"nodeonmacayeal");
     41        IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
     42        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     43        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
     44        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4545        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
     46        IoModelFetchData(&iomodel->diagnostic_ref,NULL,NULL,iomodel_handle,"diagnostic_ref");
    4647       
    4748        for (i=0;i<iomodel->numberofvertices;i++){
     
    5556
    5657        /*Clean fetched data: */
    57         xfree((void**)&iomodel->gridonbed);
    58         xfree((void**)&iomodel->gridonsurface);
    59         xfree((void**)&iomodel->gridonhutter);
    60         xfree((void**)&iomodel->gridonmacayeal);
    61         xfree((void**)&iomodel->gridonstokes);
    62         xfree((void**)&iomodel->gridonicesheet);
    63         xfree((void**)&iomodel->gridoniceshelf);
    64         xfree((void**)&iomodel->gridonwater);
     58        xfree((void**)&iomodel->nodeonbed);
     59        xfree((void**)&iomodel->nodeonsurface);
     60        xfree((void**)&iomodel->nodeonhutter);
     61        xfree((void**)&iomodel->nodeonmacayeal);
     62        xfree((void**)&iomodel->nodeonstokes);
     63        xfree((void**)&iomodel->nodeonicesheet);
     64        xfree((void**)&iomodel->nodeoniceshelf);
     65        xfree((void**)&iomodel->nodeonwater);
    6566        xfree((void**)&iomodel->vertices_type);
     67        xfree((void**)&iomodel->diagnostic_ref);       
    6668
    6769        cleanup_and_return:
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp

    r7310 r8303  
    4747                IoModelFetchData(&iomodel->accumulation_rate,NULL,NULL,iomodel_handle,"accumulation_rate");
    4848                IoModelFetchData(&iomodel->melting_rate,NULL,NULL,iomodel_handle,"melting_rate");
    49                 IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes");
     49                IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
    5050        }
    5151        if(iomodel->control_analysis){
     
    8383        xfree((void**)&iomodel->accumulation_rate);
    8484        xfree((void**)&iomodel->melting_rate);
    85         xfree((void**)&iomodel->gridonstokes);
     85        xfree((void**)&iomodel->nodeonstokes);
    8686        xfree((void**)&iomodel->vx);
    8787        xfree((void**)&iomodel->vy);
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp

    r5184 r8303  
    3232        /*Fetch data: */
    3333        IoModelFetchData(&iomodel->spcvelocity,NULL,NULL,iomodel_handle,"spcvelocity");
    34         IoModelFetchData(&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter");
     34        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
    3535
    3636        /*Initialize conunter*/
    3737        count=0;
    3838
    39         /*vx and vy are spc'd if we are not on gridonhutter: */
     39        /*vx and vy are spc'd if we are not on nodeonhutter: */
    4040        for (i=0;i<iomodel->numberofvertices;i++){
    4141                /*keep only this partition's nodes:*/
    4242                if((iomodel->my_vertices[i])){
    43                         if (!(int)iomodel->gridonhutter[i]){
     43                        if (!(int)iomodel->nodeonhutter[i]){
    4444
    4545                                constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHutterAnalysisEnum));
     
    6464
    6565        /*Free data: */
    66         xfree((void**)&iomodel->gridonhutter);
     66        xfree((void**)&iomodel->nodeonhutter);
    6767        xfree((void**)&iomodel->spcvelocity);
    6868
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp

    r7516 r8303  
    3535
    3636        /*First fetch data: */
    37         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    38         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    39         IoModelFetchData(&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter");
    40         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    41         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     37        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     38        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     39        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
     40        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     41        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    4242        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    4343        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    44         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     44        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4545
    4646        CreateNumberNodeToElementConnectivity(iomodel);
     
    5757
    5858        /*Clean fetched data: */
    59         xfree((void**)&iomodel->gridonbed);
    60         xfree((void**)&iomodel->gridonsurface);
    61         xfree((void**)&iomodel->gridonhutter);
    62         xfree((void**)&iomodel->gridonicesheet);
    63         xfree((void**)&iomodel->gridoniceshelf);
     59        xfree((void**)&iomodel->nodeonbed);
     60        xfree((void**)&iomodel->nodeonsurface);
     61        xfree((void**)&iomodel->nodeonhutter);
     62        xfree((void**)&iomodel->nodeonicesheet);
     63        xfree((void**)&iomodel->nodeoniceshelf);
    6464        xfree((void**)&iomodel->elements);
    65         xfree((void**)&iomodel->gridonwater);
     65        xfree((void**)&iomodel->nodeonwater);
    6666        xfree((void**)&iomodel->numbernodetoelementconnectivity);
    6767        xfree((void**)&iomodel->vertices_type);
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp

    r6972 r8303  
    2424
    2525        /*Fetch data needed: */
    26         IoModelFetchData(&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter");
     26        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
    2727        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    2828        IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,"thickness_coeff");
    2929        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    3030        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    31         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    32         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
     31        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     32        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    3333        IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
    3434        IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
     
    5252
    5353        /*Free data: */
    54         xfree((void**)&iomodel->gridonhutter);
     54        xfree((void**)&iomodel->nodeonhutter);
    5555        xfree((void**)&iomodel->thickness);
    5656        xfree((void**)&iomodel->thickness_coeff);
    5757        xfree((void**)&iomodel->surface);
    5858        xfree((void**)&iomodel->bed);
    59         xfree((void**)&iomodel->gridonsurface);
    60         xfree((void**)&iomodel->gridonbed);
     59        xfree((void**)&iomodel->nodeonsurface);
     60        xfree((void**)&iomodel->nodeonbed);
    6161        xfree((void**)&iomodel->drag_coefficient);
    6262        xfree((void**)&iomodel->rheology_B);
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp

    r5803 r8303  
    3131        /*Fetch data: */
    3232        IoModelFetchData(&iomodel->spcvelocity,NULL,NULL,iomodel_handle,"spcvelocity");
    33         IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes");
     33        IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
    3434
    3535        /*Initialize counter*/
     
    4242                if(iomodel->my_vertices[i]){
    4343
    44                         if ((int)iomodel->gridonstokes[i]){
     44                        if ((int)iomodel->nodeonstokes[i]){
    4545                                constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticVertAnalysisEnum)); //spc to zero as vertical velocity is done in Horiz for Stokes
    4646                                count++;
     
    5757        /*Free data: */
    5858        xfree((void**)&iomodel->spcvelocity);
    59         xfree((void**)&iomodel->gridonstokes);
     59        xfree((void**)&iomodel->nodeonstokes);
    6060
    6161        cleanup_and_return:
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp

    r7516 r8303  
    3535       
    3636        /*First fetch data: */
    37         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    38         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    39         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    40         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     37        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     38        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     39        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     40        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    4141        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    42         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     42        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4343
    4444        for (i=0;i<iomodel->numberofvertices;i++){
     
    5353
    5454        /*Clean fetched data: */
    55         xfree((void**)&iomodel->gridonbed);
    56         xfree((void**)&iomodel->gridonsurface);
    57         xfree((void**)&iomodel->gridonicesheet);
    58         xfree((void**)&iomodel->gridoniceshelf);
    59         xfree((void**)&iomodel->gridonwater);
     55        xfree((void**)&iomodel->nodeonbed);
     56        xfree((void**)&iomodel->nodeonsurface);
     57        xfree((void**)&iomodel->nodeonicesheet);
     58        xfree((void**)&iomodel->nodeoniceshelf);
     59        xfree((void**)&iomodel->nodeonwater);
    6060        xfree((void**)&iomodel->vertices_type);
    6161       
  • issm/trunk/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp

    r8287 r8303  
    11/*!\file:  DistributeNumDofs.cpp
    2  * \brief: figure out the maximum number of dofs per grid.
     2 * \brief: figure out the maximum number of dofs per node.
    33 */
    44
  • issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp

    r6235 r8303  
    7070                el1=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+2)-1; //matlab indexing to c indexing
    7171                el2=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+3)-1; //matlab indexing to c indexing
    72                 epart[el2]=epart[el1]; //ensures that this pair of elements will be in the same partition, as well as the corresponding grids;
     72                epart[el2]=epart[el1]; //ensures that this pair of elements will be in the same partition, as well as the corresponding vertices;
    7373        }
    7474
  • issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp

    r7640 r8303  
    3232
    3333        /*Create nodes and vertices: */
    34         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    35         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    36         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    37         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    3838        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
     
    5050
    5151        /*Clean fetched data: */
    52         xfree((void**)&iomodel->gridonbed);
    53         xfree((void**)&iomodel->gridonsurface);
    54         xfree((void**)&iomodel->gridonicesheet);
    55         xfree((void**)&iomodel->gridonwater);
    56         xfree((void**)&iomodel->gridoniceshelf);
     52        xfree((void**)&iomodel->nodeonbed);
     53        xfree((void**)&iomodel->nodeonsurface);
     54        xfree((void**)&iomodel->nodeonicesheet);
     55        xfree((void**)&iomodel->nodeonwater);
     56        xfree((void**)&iomodel->nodeoniceshelf);
    5757        xfree((void**)&iomodel->vertices_type);
    5858       
  • issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r6412 r8303  
    2828        if(!loads) loads = new Loads(LoadsEnum);
    2929
    30         //create penalties for grids: no grid can have a temperature over the melting point
    31         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
     30        //create penalties for nodes: no node can have a temperature over the melting point
     31        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    3232        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    3333        CreateSingleNodeToElementConnectivity(iomodel);
     
    3737                if((iomodel->my_vertices[i]==1)){
    3838
    39                         if (iomodel->gridonbed[i]){
     39                        if (iomodel->nodeonbed[i]){
    4040                               
    4141                                loads->AddObject(new Pengrid(iomodel->loadcounter+i+1,i,iomodel,MeltingAnalysisEnum));
     
    4343                }
    4444        }
    45         xfree((void**)&iomodel->gridonbed);
     45        xfree((void**)&iomodel->nodeonbed);
    4646        xfree((void**)&iomodel->elements);
    4747        xfree((void**)&iomodel->singlenodetoelementconnectivity);
  • issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp

    r7516 r8303  
    3232
    3333        /*First fetch data: */
    34         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    35         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    36         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    37         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    3838        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
     
    5050
    5151        /*Clean fetched data: */
    52         xfree((void**)&iomodel->gridonbed);
    53         xfree((void**)&iomodel->gridonsurface);
    54         xfree((void**)&iomodel->gridonicesheet);
    55         xfree((void**)&iomodel->gridonwater);
    56         xfree((void**)&iomodel->gridoniceshelf);
     52        xfree((void**)&iomodel->nodeonbed);
     53        xfree((void**)&iomodel->nodeonsurface);
     54        xfree((void**)&iomodel->nodeonicesheet);
     55        xfree((void**)&iomodel->nodeonwater);
     56        xfree((void**)&iomodel->nodeoniceshelf);
    5757        xfree((void**)&iomodel->vertices_type);
    5858
  • issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp

    r7843 r8303  
    5858        /*Create Penpair for penalties: */
    5959        IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,"penalties");
    60         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
     60        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    6161
    6262        for(i=0;i<iomodel->numpenalties;i++){
     
    6868
    6969                        /*Skip if one of the two is not on the bed*/
    70                         if(!iomodel->gridonbed[(int)iomodel->penalties[2*i+0]-1] || !iomodel->gridonbed[(int)iomodel->penalties[2*i+1]-1]) continue;
     70                        if(!iomodel->nodeonbed[(int)iomodel->penalties[2*i+0]-1] || !iomodel->nodeonbed[(int)iomodel->penalties[2*i+1]-1]) continue;
    7171
    7272                        /*Get node ids*/
     
    8585        /*free ressources: */
    8686        xfree((void**)&iomodel->penalties);
    87         xfree((void**)&iomodel->gridonbed);
     87        xfree((void**)&iomodel->nodeonbed);
    8888
    8989
  • issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp

    r7516 r8303  
    4040        /*First fetch data: */
    4141        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    42         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    43         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    44         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    45         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     42        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     43        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     44        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     45        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    4646        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    47         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     47        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4848
    4949        if(continuous_galerkin){
     
    8585
    8686        /*Clean fetched data: */
    87         xfree((void**)&iomodel->gridonbed);
    88         xfree((void**)&iomodel->gridonsurface);
    89         xfree((void**)&iomodel->gridonicesheet);
    90         xfree((void**)&iomodel->gridoniceshelf);
    91         xfree((void**)&iomodel->gridonwater);
     87        xfree((void**)&iomodel->nodeonbed);
     88        xfree((void**)&iomodel->nodeonsurface);
     89        xfree((void**)&iomodel->nodeonicesheet);
     90        xfree((void**)&iomodel->nodeoniceshelf);
     91        xfree((void**)&iomodel->nodeonwater);
    9292        xfree((void**)&iomodel->elements);
    9393        xfree((void**)&iomodel->vertices_type);
  • issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp

    r8224 r8303  
    144144
    145145                        if (strncmp(variabledescriptors[i],"scaled_",7)==0){
    146                                 /*Ok, we are dealing with a variable that is distributed over grids. Recover the name of the variable (ex: scaled_Thickness): */
     146                                /*Ok, we are dealing with a variable that is distributed over nodes. Recover the name of the variable (ex: scaled_Thickness): */
    147147                                sscanf(variabledescriptors[i],"scaled_%s",tag);
    148148                               
  • issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp

    r7516 r8303  
    3232       
    3333        /*First fetch data: */
    34         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    35         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    36         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    37         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    3838        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
     
    5050
    5151        /*Clean fetched data: */
    52         xfree((void**)&iomodel->gridonbed);
    53         xfree((void**)&iomodel->gridonsurface);
    54         xfree((void**)&iomodel->gridonicesheet);
    55         xfree((void**)&iomodel->gridoniceshelf);
    56         xfree((void**)&iomodel->gridonwater);
     52        xfree((void**)&iomodel->nodeonbed);
     53        xfree((void**)&iomodel->nodeonsurface);
     54        xfree((void**)&iomodel->nodeonicesheet);
     55        xfree((void**)&iomodel->nodeoniceshelf);
     56        xfree((void**)&iomodel->nodeonwater);
    5757        xfree((void**)&iomodel->vertices_type);
    5858       
  • issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp

    r6237 r8303  
    4848                        }
    4949
    50                 } //if((my_grids[i]==1))
     50                } //if((my_nodes[i]==1))
    5151        }
    5252
  • issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r6412 r8303  
    2929        if (iomodel->dim==2) _error_("2d meshes not supported yet");
    3030
    31         //create penalties for grids: no grid can have a temperature over the melting point
     31        //create penalties for nodes: no node can have a temperature over the melting point
    3232        IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature");
    3333        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
     
    3939                if((iomodel->my_vertices[i]==1)){
    4040
    41                         if (!iomodel->spctemperature[2*i]){ //No penalty applied on spc grids!
     41                        if (!iomodel->spctemperature[2*i]){ //No penalty applied on spc nodes!
    4242
    4343                                loads->AddObject(new Pengrid(iomodel->loadcounter+i+1,i,iomodel,ThermalAnalysisEnum));
  • issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp

    r7516 r8303  
    3232
    3333        /*Create nodes and vertices: */
    34         IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    35         IoModelFetchData(&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface");
    36         IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet");
    37         IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    3838        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->gridonwater,NULL,NULL,iomodel_handle,"gridonwater");
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
     
    5050
    5151        /*Clean fetched data: */
    52         xfree((void**)&iomodel->gridonbed);
    53         xfree((void**)&iomodel->gridonsurface);
    54         xfree((void**)&iomodel->gridonicesheet);
    55         xfree((void**)&iomodel->gridonwater);
    56         xfree((void**)&iomodel->gridoniceshelf);
     52        xfree((void**)&iomodel->nodeonbed);
     53        xfree((void**)&iomodel->nodeonsurface);
     54        xfree((void**)&iomodel->nodeonicesheet);
     55        xfree((void**)&iomodel->nodeonwater);
     56        xfree((void**)&iomodel->nodeoniceshelf);
    5757        xfree((void**)&iomodel->vertices_type);
    5858       
  • issm/trunk/src/c/modules/PenaltyConstraintsx/RiftConstraints.cpp

    r6412 r8303  
    312312        double penetration;
    313313
    314         /*Ok, we are going to find the grid pairs which are not penetrating, even though they
     314        /*Ok, we are going to find the node pairs which are not penetrating, even though they
    315315         * are penalised. We will release only the one with has least <0 penetration. : */
    316316
     
    349349        Riftfront* riftfront=NULL;
    350350
    351         /*Ok, we are going to find the grid pairs which are not penetrating, even though they
     351        /*Ok, we are going to find the node pairs which are not penetrating, even though they
    352352         * are penalised. We will release only the one with has least <0 penetration. : */
    353353        int unstable=0;
  • issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.cpp

    r5772 r8303  
    11/*!\file SpcNodesx
    2  * \brief: establish single point constraints on all grids, as well as constraints vector.
     2 * \brief: establish single point constraints on all nodes, as well as constraints vector.
    33 */
    44
  • issm/trunk/src/c/modules/TriaSearchx/TriaSearchx.cpp

    r5391 r8303  
    1313using namespace std;
    1414
    15 void TriaSearchx(double** ptria,double* index,int nel, double* x, double* y, int nods,double* x0, double* y0,int numberofgrids){
     15void TriaSearchx(double** ptria,double* index,int nel, double* x, double* y, int nods,double* x0, double* y0,int numberofnodes){
    1616
    1717        /*Output*/
     
    1919
    2020        /*allocate: */
    21         tria=(double*)xmalloc(numberofgrids*sizeof(double));
     21        tria=(double*)xmalloc(numberofnodes*sizeof(double));
    2222
    2323        /*Intermediary*/
     
    3636        Th.CreateSingleVertexToTriangleConnectivity();
    3737
    38         for(i=0;i<numberofgrids;i++){
     38        for(i=0;i<numberofnodes;i++){
    3939
    4040                //Get current point coordinates
  • issm/trunk/src/c/modules/TriaSearchx/TriaSearchx.h

    r5357 r8303  
    99
    1010/* local prototypes: */
    11 void TriaSearchx(double** ptria,double* index,int nel, double* x, double* y, int nods,double* x0, double* y0,int numberofgrids);
     11void TriaSearchx(double** ptria,double* index,int nel, double* x, double* y, int nods,double* x0, double* y0,int numberofnodes);
    1212
    1313#endif
  • issm/trunk/src/c/objects/Contour.cpp

    r6412 r8303  
    1717        int i;
    1818
    19         _printf_(true,"Number of grids in contour: %i\n",contour->nods);
    20         _printf_(true,"Grid coordinates: \n");
     19        _printf_(true,"Number of nodes in contour: %i\n",contour->nods);
     20        _printf_(true,"Node coordinates: \n");
    2121        for (i=0;i<contour->nods;i++){
    2222                _printf_(true,"%lf %lf\n",*(contour->x+i),*(contour->y+i));
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r8287 r8303  
    593593
    594594        /*Figure out if this penta is collapsed. If so, then bailout, except if it is at the
    595           bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build
     595          bedrock, in which case we spawn a tria element using the 3 first nodes, and use it to build
    596596          the stiffness matrix. */
    597597        if (!IsOnBed()) return NULL;
     
    602602
    603603        /*Spawn Tria element from the base of the Penta: */
    604         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     604        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    605605        ElementMatrix* Ke=tria->CreateKMatrixBalancethickness();
    606606        delete tria->matice; delete tria;
     
    618618
    619619        /*Figure out if this penta is collapsed. If so, then bailout, except if it is at the
    620           bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build
     620          bedrock, in which case we spawn a tria element using the 3 first nodes, and use it to build
    621621          the stiffness matrix. */
    622622        if (!IsOnBed()) return NULL;
     
    627627
    628628        /*Spawn Tria element from the base of the Penta: */
    629         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     629        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    630630        ElementMatrix* Ke=tria->CreateKMatrixBalancevelocities();
    631631        delete tria->matice; delete tria;
     
    678678        /*Find penta on bed as pattyn must be coupled to the dofs on the bed: */
    679679        Penta* pentabase=GetBasalElement();
    680         Tria* tria=pentabase->SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     680        Tria* tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    681681
    682682        /*Initialize Element matrix*/
     
    738738        if(IsOnShelf() || !IsOnBed()) return NULL;
    739739
    740         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     740        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    741741        ElementMatrix* Ke=tria->CreateKMatrixCouplingMacAyealPattynFriction();
    742742        delete tria->matice; delete tria;
     
    789789        /*Find penta on bed as stokes must be coupled to the dofs on the bed: */
    790790        Penta* pentabase=GetBasalElement();
    791         Tria* tria=pentabase->SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     791        Tria* tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    792792
    793793        /*Initialize Element matrix and return if necessary*/
     
    10931093
    10941094        /*Figure out if this penta is collapsed. If so, then bailout, except if it is at the
    1095           bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build
     1095          bedrock, in which case we spawn a tria element using the 3 first nodes, and use it to build
    10961096          the stiffness matrix. */
    10971097        if (!IsOnBed()) return NULL;
     
    11011101
    11021102        /*Call Tria function*/
    1103         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1103        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    11041104        ElementMatrix* Ke=tria->CreateKMatrixDiagnosticMacAyeal();
    11051105        delete tria->matice; delete tria;
     
    11511151        /*Find penta on bed as this is a macayeal elements: */
    11521152        pentabase=GetBasalElement();
    1153         tria=pentabase->SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1153        tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    11541154
    11551155        /*Initialize Element matrix*/
     
    12171217        if(IsOnShelf() || !IsOnBed()) return NULL;
    12181218
    1219         /*Build a tria element using the 3 grids of the base of the penta. Then use
     1219        /*Build a tria element using the 3 nodes of the base of the penta. Then use
    12201220         * the tria functionality to build a friction stiffness matrix on these 3
    1221          * grids: */
    1222         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1221         * nodes: */
     1222        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    12231223        ElementMatrix* Ke=tria->CreateKMatrixDiagnosticMacAyealFriction();
    12241224        delete tria->matice; delete tria;
     
    13461346        if(IsOnShelf() || !IsOnBed()) return NULL;
    13471347
    1348         /*Build a tria element using the 3 grids of the base of the penta. Then use
     1348        /*Build a tria element using the 3 nodes of the base of the penta. Then use
    13491349         * the tria functionality to build a friction stiffness matrix on these 3
    1350          * grids: */
    1351         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1350         * nodes: */
     1351        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    13521352        ElementMatrix* Ke=tria->CreateKMatrixDiagnosticPattynFriction();
    13531353        delete tria->matice; delete tria;
     
    16391639        if (!IsOnBed()) return NULL;
    16401640
    1641         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1641        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    16421642        ElementMatrix* Ke=tria->CreateKMatrixMelting();
    16431643
     
    16551655        this->InputDepthAverageAtBase(VyEnum,VyAverageEnum);
    16561656
    1657         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1657        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    16581658        ElementMatrix* Ke=tria->CreateKMatrixPrognostic();
    16591659        delete tria->matice; delete tria;
     
    16721672        if (!IsOnBed()) return NULL;
    16731673
    1674         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1674        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    16751675        ElementMatrix* Ke=tria->CreateKMatrixSlope();
    16761676        delete tria->matice; delete tria;
     
    19571957
    19581958        /*Call Tria function*/
    1959         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1959        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    19601960        ElementVector* pe=tria->CreatePVectorAdjointHoriz();
    19611961        delete tria->matice; delete tria;
     
    19711971
    19721972        /*Call Tria function*/
    1973         Tria* tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     1973        Tria* tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    19741974        ElementVector* pe=tria->CreatePVectorAdjointHoriz();
    19751975        delete tria->matice; delete tria;
     
    19891989
    19901990        /*Call Tria function*/
    1991         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1991        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    19921992        ElementVector* pe=tria->CreatePVectorBalancethickness();
    19931993        delete tria->matice; delete tria;
     
    20112011
    20122012        /*Call Tria function*/
    2013         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     2013        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    20142014        ElementVector* pe=tria->CreatePVectorBalancevelocities();
    20152015        delete tria->matice; delete tria;
     
    24812481
    24822482        /*Call Tria function*/
    2483         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     2483        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    24842484        ElementVector* pe=tria->CreatePVectorDiagnosticMacAyeal();
    24852485        delete tria->matice; delete tria;
     
    26982698
    26992699        /*Call Tria function*/
    2700         Tria* tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     2700        Tria* tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    27012701        ElementVector* pe=tria->CreatePVectorAdjointStokes();
    27022702        delete tria->matice; delete tria;
     
    27822782
    27832783        /*Call Tria function*/
    2784         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     2784        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    27852785        ElementVector* pe=tria->CreatePVectorDiagnosticBaseVert();
    27862786        delete tria->matice; delete tria;
     
    28052805
    28062806        /*Call Tria function*/
    2807         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     2807        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    28082808        ElementVector* pe=tria->CreatePVectorPrognostic();
    28092809        delete tria->matice; delete tria;
     
    28232823
    28242824        /*Call Tria function*/
    2825         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     2825        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    28262826        ElementVector* pe=tria->CreatePVectorSlope();
    28272827        delete tria->matice; delete tria;
     
    29402940
    29412941        /*Call Tria function*/
    2942         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     2942        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    29432943        ElementVector* pe=tria->CreatePVectorThermalShelf();
    29442944        delete tria->matice; delete tria;
     
    29552955
    29562956        /*Call Tria function*/
    2957         Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     2957        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    29582958        ElementVector* pe=tria->CreatePVectorThermalSheet();
    29592959        delete tria->matice; delete tria;
     
    30503050                this->InputDepthAverageAtBase(RheologyBEnum,RheologyBbarEnum,MaterialsEnum);
    30513051
    3052                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     3052                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
    30533053                tria->GradjB(gradient);
    30543054                delete tria->matice; delete tria;
     
    30653065
    30663066                /*B is a 2d field, use MacAyeal(2d) gradient even if it is Stokes or Pattyn*/
    3067                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     3067                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
    30683068                tria->GradjB(gradient);
    30693069                delete tria->matice; delete tria;
     
    30903090        if (approximation==MacAyealApproximationEnum || approximation==PattynApproximationEnum){
    30913091                /*MacAyeal or Pattyn*/
    3092                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     3092                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    30933093                tria->GradjDrag(gradient);
    30943094                delete tria->matice; delete tria;
     
    30963096        else if (approximation==StokesApproximationEnum){
    30973097                /*Stokes*/
    3098                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     3098                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    30993099                tria->GradjDragStokes(gradient);
    31003100                delete tria->matice; delete tria;
     
    33623362        Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
    33633363
    3364         /*If the element is a coupling, do nothing: every grid is also on an other elements
     3364        /*If the element is a coupling, do nothing: every node is also on an other elements
    33653365         * (as coupling is between MacAyeal and Pattyn) so the other element will take care of it*/
    33663366        GetDofList(&doflist,approximation,GsetEnum);
     
    57325732                this->InputDepthAverageAtBase(RheologyBEnum,RheologyBbarEnum,MaterialsEnum);
    57335733
    5734                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     5734                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
    57355735                J=tria->RegularizeInversion();
    57365736                delete tria->matice; delete tria;
     
    57505750                this->matice->inputs->AddInput((Input*)B_copy);
    57515751
    5752                 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     5752                tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    57535753                J=tria->RegularizeInversion();
    57545754                delete tria->matice; delete tria;
     
    58505850                /*This element should be collapsed into a tria element at its base. Create this tria element,
    58515851                 * and compute SurfaceArea*/
    5852                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     5852                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
    58535853                S=tria->SurfaceArea();
    58545854                delete tria->matice; delete tria;
     
    58575857        else{
    58585858
    5859                 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     5859                tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    58605860                S=tria->SurfaceArea();
    58615861                delete tria->matice; delete tria;
     
    58875887                /*This element should be collapsed into a tria element at its base. Create this tria element,
    58885888                 * and compute SurfaceAverageVelMisfit*/
    5889                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     5889                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
    58905890                J=tria->SurfaceAverageVelMisfit(process_units);
    58915891                delete tria->matice; delete tria;
     
    58945894        else{
    58955895
    5896                 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     5896                tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    58975897                J=tria->SurfaceAverageVelMisfit(process_units);
    58985898                delete tria->matice; delete tria;
     
    59245924                /*This element should be collapsed into a tria element at its base. Create this tria element,
    59255925                 * and compute SurfaceAbsVelMisfit*/
    5926                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     5926                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
    59275927                J=tria->SurfaceAbsVelMisfit(process_units);
    59285928                delete tria->matice; delete tria;
     
    59315931        else{
    59325932
    5933                 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     5933                tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    59345934                J=tria->SurfaceAbsVelMisfit(process_units);
    59355935                delete tria->matice; delete tria;
     
    59615961                /*This element should be collapsed into a tria element at its base. Create this tria element,
    59625962                 * and compute SurfaceLogVelMisfit*/
    5963                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     5963                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
    59645964                J=tria->SurfaceLogVelMisfit(process_units);
    59655965                delete tria->matice; delete tria;
     
    59685968        else{
    59695969
    5970                 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     5970                tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    59715971                J=tria->SurfaceLogVelMisfit(process_units);
    59725972                delete tria->matice; delete tria;
     
    60006000                /*This element should be collapsed into a tria element at its base. Create this tria element,
    60016001                 * and compute SurfaceLogVxVyMisfit*/
    6002                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     6002                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
    60036003                J=tria->SurfaceLogVxVyMisfit(process_units);
    60046004                delete tria->matice; delete tria;
     
    60076007        else{
    60086008
    6009                 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     6009                tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    60106010                J=tria->SurfaceLogVxVyMisfit(process_units);
    60116011                delete tria->matice; delete tria;
     
    60616061                /*This element should be collapsed into a tria element at its base. Create this tria element,
    60626062                 * and compute SurfaceRelVelMisfit*/
    6063                 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     6063                tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
    60646064                J=tria->SurfaceRelVelMisfit(process_units);
    60656065                delete tria->matice; delete tria;
     
    60686068        else{
    60696069
    6070                 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     6070                tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    60716071                J=tria->SurfaceRelVelMisfit(process_units);
    60726072                delete tria->matice; delete tria;
     
    61336133        _error_("Not implemented yet");
    61346134
    6135         tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
     6135        tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    61366136        J=tria->ThicknessAbsMisfit(process_units);
    61376137        delete tria->matice; delete tria;
     
    62216221                        if(*(iomodel->elements_type+index)==PattynStokesApproximationEnum){
    62226222                                /*Create VzPattyn and VzStokes Enums*/
    6223                                 if(iomodel->vz && iomodel->gridonstokes){
    6224                                         for(i=0;i<6;i++) nodeinputs[i]=iomodel->vz[penta_vertex_ids[i]-1]/iomodel->yts*iomodel->gridonstokes[penta_vertex_ids[i]-1];
     6223                                if(iomodel->vz && iomodel->nodeonstokes){
     6224                                        for(i=0;i<6;i++) nodeinputs[i]=iomodel->vz[penta_vertex_ids[i]-1]/iomodel->yts*iomodel->nodeonstokes[penta_vertex_ids[i]-1];
    62256225                                        this->inputs->AddInput(new PentaVertexInput(VzStokesEnum,nodeinputs));
    6226                                         for(i=0;i<6;i++) nodeinputs[i]=iomodel->vz[penta_vertex_ids[i]-1]/iomodel->yts*(1-iomodel->gridonstokes[penta_vertex_ids[i]-1]);
     6226                                        for(i=0;i<6;i++) nodeinputs[i]=iomodel->vz[penta_vertex_ids[i]-1]/iomodel->yts*(1-iomodel->nodeonstokes[penta_vertex_ids[i]-1]);
    62276227                                        this->inputs->AddInput(new PentaVertexInput(VzPattynEnum,nodeinputs));
    62286228                                }
     
    62356235                        if(*(iomodel->elements_type+index)==MacAyealStokesApproximationEnum){
    62366236                                /*Create VzMacAyeal and VzStokes Enums*/
    6237                                 if(iomodel->vz && iomodel->gridonstokes){
    6238                                         for(i=0;i<6;i++) nodeinputs[i]=iomodel->vz[penta_vertex_ids[i]-1]/iomodel->yts*iomodel->gridonstokes[penta_vertex_ids[i]-1];
     6237                                if(iomodel->vz && iomodel->nodeonstokes){
     6238                                        for(i=0;i<6;i++) nodeinputs[i]=iomodel->vz[penta_vertex_ids[i]-1]/iomodel->yts*iomodel->nodeonstokes[penta_vertex_ids[i]-1];
    62396239                                        this->inputs->AddInput(new PentaVertexInput(VzStokesEnum,nodeinputs));
    6240                                         for(i=0;i<6;i++) nodeinputs[i]=iomodel->vz[penta_vertex_ids[i]-1]/iomodel->yts*(1-iomodel->gridonstokes[penta_vertex_ids[i]-1]);
     6240                                        for(i=0;i<6;i++) nodeinputs[i]=iomodel->vz[penta_vertex_ids[i]-1]/iomodel->yts*(1-iomodel->nodeonstokes[penta_vertex_ids[i]-1]);
    62416241                                        this->inputs->AddInput(new PentaVertexInput(VzMacAyealEnum,nodeinputs));
    62426242                                }
  • issm/trunk/src/c/objects/Elements/PentaRef.cpp

    r7070 r8303  
    6060void PentaRef::GetBMacAyealPattyn(double* B, double* xyz_list, GaussPenta* gauss){
    6161        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2.
    62          * For grid i, Bi can be expressed in the actual coordinate system
     62         * For node i, Bi can be expressed in the actual coordinate system
    6363         * by:
    6464         *       Bi=[ dh/dx          0      ]
    6565         *          [   0           dh/dy   ]
    6666         *          [ 1/2*dh/dy  1/2*dh/dx  ]
    67          * where h is the interpolation function for grid i.
     67         * where h is the interpolation function for node i.
    6868         *
    6969         * We assume B has been allocated already, of size: 5x(NDOF2*NUMNODESP1)
     
    9393void PentaRef::GetBMacAyealStokes(double* B, double* xyz_list, GaussPenta* gauss){
    9494        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2.
    95          * For grid i, Bi can be expressed in the actual coordinate system
     95         * For node i, Bi can be expressed in the actual coordinate system
    9696         * by:
    9797         *       Bi=[ dh/dx          0       0   0 ]
     
    9999         *          [ 1/2*dh/dy  1/2*dh/dx   0   0 ]
    100100         *          [   0            0       0   h ]
    101          * where h is the interpolation function for grid i.
     101         * where h is the interpolation function for node i.
    102102         *
    103103         * We assume B has been allocated already, of size: 5x(NDOF2*NUMNODESP1)
     
    139139void PentaRef::GetBPattyn(double* B, double* xyz_list, GaussPenta* gauss){
    140140        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2.
    141          * For grid i, Bi can be expressed in the actual coordinate system
     141         * For node i, Bi can be expressed in the actual coordinate system
    142142         * by:
    143143         *       Bi=[ dh/dx          0      ]
     
    146146         *          [ 1/2*dh/dz      0      ]
    147147         *          [  0         1/2*dh/dz  ]
    148          * where h is the interpolation function for grid i.
     148         * where h is the interpolation function for node i.
    149149         *
    150150         * We assume B has been allocated already, of size: 5x(NDOF2*NUMNODESP1)
     
    179179void PentaRef::GetBprimePattyn(double* B, double* xyz_list, GaussPenta* gauss_coord){
    180180        /*Compute B  prime matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2.
    181          * For grid i, Bi can be expressed in the actual coordinate system
     181         * For node i, Bi can be expressed in the actual coordinate system
    182182         * by:
    183183         *       Bi=[ 2*dh/dx     dh/dy   ]
     
    186186         *                [ dh/dz         0     ]
    187187         *                [  0         dh/dz    ]
    188          * where h is the interpolation function for grid i.
     188         * where h is the interpolation function for node i.
    189189         *
    190190         * We assume B has been allocated already, of size: 5x(NDOF2*NUMNODESP1)
     
    217217void PentaRef::GetBprimeMacAyealStokes(double* Bprime, double* xyz_list, GaussPenta* gauss){
    218218        /*Compute Bprime  matrix. Bprime=[Bprime1 Bprime2 Bprime3 Bprime4 Bprime5 Bprime6] where Bprimei is of size 5*NDOF2.
    219          * For grid i, Bprimei can be expressed in the actual coordinate system
     219         * For node i, Bprimei can be expressed in the actual coordinate system
    220220         * by:
    221221         *       Bprimei=[ 2*dh/dx    dh/dy   0   0 ]
    222222         *               [  dh/dx    2*dh/dy  0   0 ]
    223223         *               [  dh/dy     dh/dx   0   0 ]
    224          * where h is the interpolation function for grid i.
     224         * where h is the interpolation function for node i.
    225225         *
    226226         * We assume Bprime has been allocated already, of size: 5x(NDOF2*NUMNODESP1)
     
    258258
    259259        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 3*NDOF4.
    260          * For grid i, Bi can be expressed in the actual coordinate system
     260         * For node i, Bi can be expressed in the actual coordinate system
    261261         * by:          Bi=[ dh/dx          0              0       0  ]
    262262         *                                      [   0           dh/dy           0       0  ]
     
    267267         *                                      [   0             0             0       h  ]
    268268         *                                      [ dh/dx         dh/dy         dh/dz     0  ]
    269          *      where h is the interpolation function for grid i.
     269         *      where h is the interpolation function for node i.
    270270         *      Same thing for Bb except the last column that does not exist.
    271271         */
     
    324324void PentaRef::GetBprimeStokes(double* B_prime, double* xyz_list, GaussPenta* gauss){
    325325        /*      Compute B'  matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*NDOF2.
    326          *      For grid i, Bi' can be expressed in the actual coordinate system
     326         *      For node i, Bi' can be expressed in the actual coordinate system
    327327         *      by:
    328328         *                              Bi'=[  dh/dx   0          0       0]
     
    334334         *                                       [  dh/dx   dh/dy    dh/dz     0]
    335335         *                                       [   0      0          0       h]
    336          *      where h is the interpolation function for grid i.
     336         *      where h is the interpolation function for node i.
    337337         *
    338338         *      Same thing for the bubble fonction except that there is no fourth column
     
    391391void PentaRef::GetBArtdiff(double* B_artdiff, double* xyz_list, GaussPenta* gauss){
    392392        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1.
    393          * For grid i, Bi' can be expressed in the actual coordinate system
     393         * For node i, Bi' can be expressed in the actual coordinate system
    394394         * by:
    395395         *       Bi_artdiff=[ dh/dx ]
    396396         *                 [ dh/dy ]
    397          * where h is the interpolation function for grid i.
     397         * where h is the interpolation function for node i.
    398398         *
    399399         * We assume B has been allocated already, of size: 2x(NDOF1*NUMNODESP1)
     
    416416void PentaRef::GetBAdvec(double* B_advec, double* xyz_list, GaussPenta* gauss){
    417417        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1.
    418          * For grid i, Bi' can be expressed in the actual coordinate system
     418         * For node i, Bi' can be expressed in the actual coordinate system
    419419         * by:
    420420         *       Bi_advec =[ h ]
    421421         *                 [ h ]
    422422         *                 [ h ]
    423          * where h is the interpolation function for grid i.
     423         * where h is the interpolation function for node i.
    424424         *
    425425         * We assume B has been allocated already, of size: 3x(NDOF1*NUMNODESP1)
     
    443443void PentaRef::GetBConduct(double* B_conduct, double* xyz_list, GaussPenta* gauss){
    444444        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1.
    445          * For grid i, Bi' can be expressed in the actual coordinate system
     445         * For node i, Bi' can be expressed in the actual coordinate system
    446446         * by:
    447447         *       Bi_conduct=[ dh/dx ]
    448448         *                  [ dh/dy ]
    449449         *                  [ dh/dz ]
    450          * where h is the interpolation function for grid i.
     450         * where h is the interpolation function for node i.
    451451         *
    452452         * We assume B has been allocated already, of size: 3x(NDOF1*NUMNODESP1)
     
    470470void PentaRef::GetBVert(double* B, double* xyz_list, GaussPenta* gauss){
    471471        /*      Compute B  matrix. B=[dh1/dz dh2/dz dh3/dz dh4/dz dh5/dz dh6/dz];
    472                 where hi is the interpolation function for grid i.*/
     472                where hi is the interpolation function for node i.*/
    473473
    474474        int i;
     
    488488void PentaRef::GetBprimeAdvec(double* Bprime_advec, double* xyz_list, GaussPenta* gauss){
    489489        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1.
    490          * For grid i, Bi' can be expressed in the actual coordinate system
     490         * For node i, Bi' can be expressed in the actual coordinate system
    491491         * by:
    492492         *       Biprime_advec=[ dh/dx ]
    493493         *                     [ dh/dy ]
    494494         *                     [ dh/dz ]
    495          * where h is the interpolation function for grid i.
     495         * where h is the interpolation function for node i.
    496496         *
    497497         * We assume B has been allocated already, of size: 3x(NDOF1*NUMNODESP1)
     
    514514/*FUNCTION PentaRef::GetBprimeVert{{{1*/
    515515void PentaRef::GetBprimeVert(double* B, double* xyz_list, GaussPenta* gauss){
    516         /* Compute Bprime  matrix. Bprime=[L1 L2 L3 L4 L5 L6] where Li is the nodal function for grid i*/
     516        /* Compute Bprime  matrix. Bprime=[L1 L2 L3 L4 L5 L6] where Li is the nodal function for node i*/
    517517
    518518        GetNodalFunctionsP1(B, gauss);
     
    524524        /*
    525525         * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof.
    526          * For grid i, Li can be expressed in the actual coordinate system
     526         * For node i, Li can be expressed in the actual coordinate system
    527527         * by:
    528528         *       Li=[ h    0    0   0]
     
    540540         *                    [ 0    h    0   0]
    541541         *                    [ 0    0    h   0]
    542          * where h is the interpolation function for grid i.
     542         * where h is the interpolation function for node i.
    543543         */
    544544
     
    621621        /*
    622622         * Compute Lprime  matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof.
    623          * For grid i, Lpi can be expressed in the actual coordinate system
     623         * For node i, Lpi can be expressed in the actual coordinate system
    624624         * by:
    625625         *       Lpi=[ h    0    0   0]
     
    637637         *           [ 0    0    0   h]
    638638         *           [ 0    0    0   h]
    639          * where h is the interpolation function for grid i.
     639         * where h is the interpolation function for node i.
    640640         */
    641641        int i;
     
    717717        /*
    718718         * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof.
    719          * For grid i, Li can be expressed in the actual coordinate system
     719         * For node i, Li can be expressed in the actual coordinate system
    720720         * by:
    721721         *       Li=[ h    0 ]
     
    727727         *                    [ h    0 ]
    728728         *                    [ 0    h ]
    729          * where h is the interpolation function for grid i.
     729         * where h is the interpolation function for node i.
    730730         */
    731731
     
    768768        /*
    769769         * Compute Lprime  matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof.
    770          * For grid i, Lpi can be expressed in the actual coordinate system
     770         * For node i, Lpi can be expressed in the actual coordinate system
    771771         * by:
    772772         *       Lpi=[ h    0    0   0]
     
    778778         *           [ 0    0    0   h]
    779779         *           [ 0    0    0   h]
    780          * where h is the interpolation function for grid i.
     780         * where h is the interpolation function for node i.
    781781         */
    782782        int i;
     
    834834        /*
    835835         * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof.
    836          * For grid i, Li can be expressed in the actual coordinate system
     836         * For node i, Li can be expressed in the actual coordinate system
    837837         * by:
    838838         *       Li=[ h    0    0   0]
     
    840840         *                    [ 0    0    h   0]
    841841         *                    [ 0    0    h   0]
    842          * where h is the interpolation function for grid i.
     842         * where h is the interpolation function for node i.
    843843         */
    844844
     
    881881        /*
    882882         * Compute Lprime  matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof.
    883          * For grid i, Lpi can be expressed in the actual coordinate system
     883         * For node i, Lpi can be expressed in the actual coordinate system
    884884         * by:
    885885         *       Lpi=[ h    0 ]
     
    887887         *                     [ h    0 ]
    888888         *                     [ 0    h ]
    889          * where h is the interpolation function for grid i.
     889         * where h is the interpolation function for node i.
    890890         */
    891891        int i;
     
    12841284/*FUNCTION PentaRef::GetParameterDerivativeValue{{{1*/
    12851285void PentaRef::GetParameterDerivativeValue(double* p, double* plist,double* xyz_list, GaussPenta* gauss){
    1286         /*From grid values of parameter p (p_list[0], p_list[1], p_list[2], p_list[3], p_list[4] and p_list[4]), return parameter derivative value at gaussian point specified by gauss_coord:
     1286        /*From node values of parameter p (p_list[0], p_list[1], p_list[2], p_list[3], p_list[4] and p_list[4]), return parameter derivative value at gaussian point specified by gauss_coord:
    12871287         *   dp/dx=p_list[0]*dh1/dx+p_list[1]*dh2/dx+p_list[2]*dh3/dx+p_list[3]*dh4/dx+p_list[4]*dh5/dx+p_list[5]*dh6/dx;
    12881288         *   dp/dy=p_list[0]*dh1/dy+p_list[1]*dh2/dy+p_list[2]*dh3/dy+p_list[3]*dh4/dy+p_list[4]*dh5/dy+p_list[5]*dh6/dy;
  • issm/trunk/src/c/objects/Elements/TriaRef.cpp

    r6987 r8303  
    5959void TriaRef::GetBMacAyeal(double* B, double* xyz_list, GaussTria* gauss){
    6060        /*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2.
    61          * For grid i, Bi can be expressed in the actual coordinate system
     61         * For node i, Bi can be expressed in the actual coordinate system
    6262         * by:
    6363         *       Bi=[ dh/dx           0    ]
    6464         *          [   0           dh/dy  ]
    6565         *          [ 1/2*dh/dy  1/2*dh/dx ]
    66          * where h is the interpolation function for grid i.
     66         * where h is the interpolation function for node i.
    6767         *
    6868         * We assume B has been allocated already, of size: 3x(NDOF2*NUMNODES)
     
    9090
    9191        /*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2.
    92          * For grid i, Bi can be expressed in the actual coordinate system
     92         * For node i, Bi can be expressed in the actual coordinate system
    9393         * by:
    9494         *       Bi=[   dh/dx         0     ]
    9595         *          [       0       dh/dy   ]
    9696         *          [  1/2*dh/dy  1/2*dh/dx ]
    97          * where h is the interpolation function for grid i.
     97         * where h is the interpolation function for node i.
    9898         *
    9999         * We assume B has been allocated already, of size: 3x(NDOF2*NUMNODES)
     
    158158void TriaRef::GetBPrognostic(double* B_prog, double* xyz_list, GaussTria* gauss){
    159159        /*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2.
    160          * For grid i, Bi can be expressed in the actual coordinate system
     160         * For node i, Bi can be expressed in the actual coordinate system
    161161         * by:
    162162         *       Bi=[ h ]
    163163         *          [ h ]
    164          * where h is the interpolation function for grid i.
     164         * where h is the interpolation function for node i.
    165165         *
    166166         * We assume B_prog has been allocated already, of size: 2x(NDOF1*NUMNODES)
     
    183183
    184184        /*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2.
    185          * For grid i, Bi' can be expressed in the actual coordinate system
     185         * For node i, Bi' can be expressed in the actual coordinate system
    186186         * by:
    187187         *       Bi_prime=[ 2*dh/dx    dh/dy ]
    188188         *                [   dh/dx  2*dh/dy ]
    189189         *                [   dh/dy    dh/dx ]
    190          * where h is the interpolation function for grid i.
     190         * where h is the interpolation function for node i.
    191191         *
    192192         * We assume B' has been allocated already, of size: 3x(NDOF2*NUMNODES)
     
    214214
    215215        /*Compute Bprime  matrix. Bprime=[Bprime1 Bprime2 Bprime3] where Bprimei is of size 3*NDOF2.
    216          * For grid i, Bprimei can be expressed in the actual coordinate system
     216         * For node i, Bprimei can be expressed in the actual coordinate system
    217217         * by:
    218218         *       Bprimei=[  dh/dx    0   ]
     
    220220         *               [  dh/dy  dh/dx ]
    221221         *               [  dh/dx  dh/dy ]
    222          * where h is the interpolation function for grid i.
     222         * where h is the interpolation function for node i.
    223223         *
    224224         * We assume Bprime has been allocated already, of size: 3x(NDOF2*NUMNODES)
     
    247247void TriaRef::GetBprimePrognostic(double* Bprime_prog, double* xyz_list, GaussTria* gauss){
    248248        /*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2.
    249          * For grid i, Bi' can be expressed in the actual coordinate system
     249         * For node i, Bi' can be expressed in the actual coordinate system
    250250         * by:
    251251         *       Bi_prime=[ dh/dx ]
    252252         *                [ dh/dy ]
    253          * where h is the interpolation function for grid i.
     253         * where h is the interpolation function for node i.
    254254         *
    255255         * We assume B' has been allocated already, of size: 3x(NDOF2*NUMNODES)
     
    272272void TriaRef::GetL(double* L, double* xyz_list,GaussTria* gauss,int numdof){
    273273        /*Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof.
    274          * For grid i, Li can be expressed in the actual coordinate system
     274         * For node i, Li can be expressed in the actual coordinate system
    275275         * by:
    276276         *       numdof=1:
     
    279279         *                 Li=[ h   0 ]
    280280         *                    [ 0   h ]
    281          * where h is the interpolation function for grid i.
     281         * where h is the interpolation function for node i.
    282282         *
    283283         * We assume L has been allocated already, of size: NUMNODES (numdof=1), or numdofx(numdof*NUMNODES) (numdof=2)
  • issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp

    r8224 r8303  
    195195        int i,j;
    196196
    197         const int numgrids=6;
     197        const int numnodes=6;
    198198        const int DOFVELOCITY=3;
    199199        double B[8][27];
    200         double B_reduced[6][DOFVELOCITY*numgrids];
    201         double velocity[numgrids][DOFVELOCITY];
     200        double B_reduced[6][DOFVELOCITY*numnodes];
     201        double velocity[numnodes][DOFVELOCITY];
    202202
    203203        /*Get B matrix: */
     
    226226
    227227        /*Here, we are computing the strain rate of (vx,0,0)*/
    228         for(i=0;i<numgrids;i++){
     228        for(i=0;i<numnodes;i++){
    229229                velocity[i][0]=this->values[i];
    230230                velocity[i][1]=0.0;
     
    232232        }
    233233        /*Multiply B by velocity, to get strain rate: */
    234         MatrixMultiply(&B_reduced[0][0],6,DOFVELOCITY*numgrids,0,&velocity[0][0],DOFVELOCITY*numgrids,1,0,epsilonvx,0);
     234        MatrixMultiply(&B_reduced[0][0],6,DOFVELOCITY*numnodes,0,&velocity[0][0],DOFVELOCITY*numnodes,1,0,epsilonvx,0);
    235235
    236236}
     
    240240        int i,j;
    241241
    242         const int numgrids=6;
     242        const int numnodes=6;
    243243        const int DOFVELOCITY=3;
    244244        double B[8][27];
    245         double B_reduced[6][DOFVELOCITY*numgrids];
    246         double velocity[numgrids][DOFVELOCITY];
     245        double B_reduced[6][DOFVELOCITY*numnodes];
     246        double velocity[numnodes][DOFVELOCITY];
    247247
    248248        /*Get B matrix: */
     
    271271
    272272        /*Here, we are computing the strain rate of (0,vy,0)*/
    273         for(i=0;i<numgrids;i++){
     273        for(i=0;i<numnodes;i++){
    274274                velocity[i][0]=0.0;
    275275                velocity[i][1]=this->values[i];
     
    277277        }
    278278        /*Multiply B by velocity, to get strain rate: */
    279         MatrixMultiply(&B_reduced[0][0],6,DOFVELOCITY*numgrids,0,&velocity[0][0],DOFVELOCITY*numgrids,1,0,epsilonvy,0);
     279        MatrixMultiply(&B_reduced[0][0],6,DOFVELOCITY*numnodes,0,&velocity[0][0],DOFVELOCITY*numnodes,1,0,epsilonvy,0);
    280280
    281281}
     
    285285        int i,j;
    286286
    287         const int numgrids=6;
     287        const int numnodes=6;
    288288        const int DOFVELOCITY=3;
    289289        double B[8][27];
    290         double B_reduced[6][DOFVELOCITY*numgrids];
    291         double velocity[numgrids][DOFVELOCITY];
     290        double B_reduced[6][DOFVELOCITY*numnodes];
     291        double velocity[numnodes][DOFVELOCITY];
    292292
    293293        /*Get B matrix: */
     
    316316
    317317        /*Here, we are computing the strain rate of (0,0,vz)*/
    318         for(i=0;i<numgrids;i++){
     318        for(i=0;i<numnodes;i++){
    319319                velocity[i][0]=0.0;
    320320                velocity[i][1]=0.0;
     
    323323
    324324        /*Multiply B by velocity, to get strain rate: */
    325         MatrixMultiply(&B_reduced[0][0],6,DOFVELOCITY*numgrids,0,&velocity[0][0],DOFVELOCITY*numgrids,1,0,epsilonvz,0);
     325        MatrixMultiply(&B_reduced[0][0],6,DOFVELOCITY*numnodes,0,&velocity[0][0],DOFVELOCITY*numnodes,1,0,epsilonvz,0);
    326326
    327327}
     
    331331
    332332        int i;
    333         const int numgrids=6;
    334         double B[5][NDOF2*numgrids];
    335         double velocity[numgrids][NDOF2];
     333        const int numnodes=6;
     334        double B[5][NDOF2*numnodes];
     335        double velocity[numnodes][NDOF2];
    336336
    337337        /*Get B matrix: */
     
    339339
    340340        /*Here, we are computing the strain rate of (vx,0)*/
    341         for(i=0;i<numgrids;i++){
     341        for(i=0;i<numnodes;i++){
    342342                velocity[i][0]=this->values[i];
    343343                velocity[i][1]=0.0;
     
    345345
    346346        /*Multiply B by velocity, to get strain rate: */
    347         MatrixMultiply( &B[0][0],5,NDOF2*numgrids,0,
    348                                 &velocity[0][0],NDOF2*numgrids,1,0,
     347        MatrixMultiply( &B[0][0],5,NDOF2*numnodes,0,
     348                                &velocity[0][0],NDOF2*numnodes,1,0,
    349349                                epsilonvx,0);
    350350
     
    355355
    356356        int i;
    357         const int numgrids=6;
    358         double B[5][NDOF2*numgrids];
    359         double velocity[numgrids][NDOF2];
     357        const int numnodes=6;
     358        double B[5][NDOF2*numnodes];
     359        double velocity[numnodes][NDOF2];
    360360
    361361        /*Get B matrix: */
     
    363363
    364364        /*Here, we are computing the strain rate of (0,vy)*/
    365         for(i=0;i<numgrids;i++){
     365        for(i=0;i<numnodes;i++){
    366366                velocity[i][0]=0.0;
    367367                velocity[i][1]=this->values[i];
     
    369369
    370370        /*Multiply B by velocity, to get strain rate: */
    371         MatrixMultiply( &B[0][0],5,NDOF2*numgrids,0,
    372                                 &velocity[0][0],NDOF2*numgrids,1,0,
     371        MatrixMultiply( &B[0][0],5,NDOF2*numnodes,0,
     372                                &velocity[0][0],NDOF2*numnodes,1,0,
    373373                                epsilonvy,0);
    374374
     
    414414       
    415415        int i;
    416         const int numgrids=6;
    417 
    418         for(i=0;i<numgrids;i++) if (values[i]<minimum) values[i]=minimum;
     416        const int numnodes=6;
     417
     418        for(i=0;i<numnodes;i++) if (values[i]<minimum) values[i]=minimum;
    419419}
    420420/*}}}*/
     
    423423
    424424        /*Output*/
    425         const int numgrids=6;
     425        const int numnodes=6;
    426426        double norm=0;
    427427
    428         for(int i=0;i<numgrids;i++) if(fabs(values[i])>norm) norm=fabs(values[i]);
     428        for(int i=0;i<numnodes;i++) if(fabs(values[i])>norm) norm=fabs(values[i]);
    429429        return norm;
    430430}
     
    433433double PentaVertexInput::Max(void){
    434434
    435         const int numgrids=6;
     435        const int numnodes=6;
    436436        double    max=values[0];
    437437
    438         for(int i=1;i<numgrids;i++){
     438        for(int i=1;i<numnodes;i++){
    439439                if(values[i]>max) max=values[i];
    440440        }
     
    445445double PentaVertexInput::MaxAbs(void){
    446446
    447         const int numgrids=6;
     447        const int numnodes=6;
    448448        double    max=fabs(values[0]);
    449449
    450         for(int i=1;i<numgrids;i++){
     450        for(int i=1;i<numnodes;i++){
    451451                if(fabs(values[i])>max) max=fabs(values[i]);
    452452        }
     
    457457double PentaVertexInput::Min(void){
    458458
    459         const int numgrids=6;
     459        const int numnodes=6;
    460460        double    min=values[0];
    461461
    462         for(int i=1;i<numgrids;i++){
     462        for(int i=1;i<numnodes;i++){
    463463                if(values[i]<min) min=values[i];
    464464        }
     
    469469double PentaVertexInput::MinAbs(void){
    470470
    471         const int numgrids=6;
     471        const int numnodes=6;
    472472        double    min=fabs(values[0]);
    473473
    474         for(int i=1;i<numgrids;i++){
     474        for(int i=1;i<numnodes;i++){
    475475                if(fabs(values[i])<min) min=fabs(values[i]);
    476476        }
     
    482482       
    483483        int i;
    484         const int numgrids=6;
    485 
    486         for(i=0;i<numgrids;i++)values[i]=values[i]*scale_factor;
     484        const int numnodes=6;
     485
     486        for(i=0;i<numnodes;i++)values[i]=values[i]*scale_factor;
    487487}
    488488/*}}}*/
     
    491491
    492492        int i;
    493         const int numgrids=6;
     493        const int numnodes=6;
    494494
    495495        /*xinput is of the same type, so cast it: */
     
    500500                case PentaVertexInputEnum:{
    501501                        PentaVertexInput* cast_input=(PentaVertexInput*)xinput;
    502                         for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);}
     502                        for(i=0;i<numnodes;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);}
    503503                        return;
    504504                case ControlInputEnum:{
     
    506506                        if(cont_input->values->Enum()!=PentaVertexInputEnum) _error_("not supported yet");
    507507                        PentaVertexInput* cast_input=(PentaVertexInput*)cont_input->values;
    508                         for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);}
     508                        for(i=0;i<numnodes;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);}
    509509                        return;
    510510                default:
     
    518518
    519519        int i;
    520         const int numgrids=6;
     520        const int numnodes=6;
    521521               
    522         if(!isnan(cm_min)) for(i=0;i<numgrids;i++)if (this->values[i]<cm_min)this->values[i]=cm_min;
    523         if(!isnan(cm_max)) for(i=0;i<numgrids;i++)if (this->values[i]>cm_max)this->values[i]=cm_max;
     522        if(!isnan(cm_min)) for(i=0;i<numnodes;i++)if (this->values[i]<cm_min)this->values[i]=cm_min;
     523        if(!isnan(cm_max)) for(i=0;i<numnodes;i++)if (this->values[i]>cm_max)this->values[i]=cm_max;
    524524
    525525}
     
    540540        /*Intermediaries*/
    541541        int i;
    542         const int  numgrids = 6;
     542        const int  numnodes = 6;
    543543        int        num_thickness_values;
    544544        double    *thickness_values = NULL;
     
    575575        PentaVertexInput *xinputB     = NULL;
    576576        int               B_numvalues;
    577         const int         numgrids    = 6;
    578         double            AdotBvalues[numgrids];
     577        const int         numnodes    = 6;
     578        double            AdotBvalues[numnodes];
    579579
    580580        /*Check that inputB is of the same type*/
     
    583583
    584584        /*Create point wise sum*/
    585         for(i=0;i<numgrids;i++){
     585        for(i=0;i<numnodes;i++){
    586586                _assert_(xinputB->values[i]!=0);
    587587                AdotBvalues[i]=this->values[i]/xinputB->values[i];
     
    606606        PentaVertexInput *xinputB     = NULL;
    607607        int               B_numvalues;
    608         const int         numgrids    = 6;
    609         double            minvalues[numgrids];
     608        const int         numnodes    = 6;
     609        double            minvalues[numnodes];
    610610
    611611        /*Check that inputB is of the same type*/
     
    614614
    615615        /*Create point wise min*/
    616         for(i=0;i<numgrids;i++){
     616        for(i=0;i<numnodes;i++){
    617617                if(this->values[i] > xinputB->values[i]) minvalues[i]=xinputB->values[i];
    618618                else minvalues[i]=this->values[i];
     
    637637        PentaVertexInput *xinputB     = NULL;
    638638        int               B_numvalues;
    639         const int         numgrids    = 6;
    640         double            maxvalues[numgrids];
     639        const int         numnodes    = 6;
     640        double            maxvalues[numnodes];
    641641
    642642        /*Check that inputB is of the same type*/
     
    645645
    646646        /*Create point wise max*/
    647         for(i=0;i<numgrids;i++){
     647        for(i=0;i<numnodes;i++){
    648648                if(this->values[i] < xinputB->values[i]) maxvalues[i]=xinputB->values[i];
    649649                else maxvalues[i]=this->values[i];
  • issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp

    r8224 r8303  
    185185        /*Intermediary*/
    186186        int       i;
    187         const int numgrids=3;
    188         double B[3][NDOF2*numgrids];
     187        const int numnodes=3;
     188        double B[3][NDOF2*numnodes];
    189189        double velocity[3][NDOF2];
    190190
     
    198198        }
    199199        /*Get epsilon(vx) = B*velocity*/
    200         MatrixMultiply( &B[0][0],3,NDOF2*numgrids,0,
    201                                 &velocity[0][0],NDOF2*numgrids,1,0,
     200        MatrixMultiply( &B[0][0],3,NDOF2*numnodes,0,
     201                                &velocity[0][0],NDOF2*numnodes,1,0,
    202202                                epsilonvx,0);
    203203}
     
    208208        /*Intermediary*/
    209209        int       i;
    210         const int numgrids=3;
    211         double B[3][NDOF2*numgrids];
     210        const int numnodes=3;
     211        double B[3][NDOF2*numnodes];
    212212        double velocity[3][NDOF2];
    213213
     
    221221        }
    222222        /*Get epsilon(vy) = B*velocity*/
    223         MatrixMultiply( &B[0][0],3,NDOF2*numgrids,0,
    224                                 &velocity[0][0],NDOF2*numgrids,1,0,
     223        MatrixMultiply( &B[0][0],3,NDOF2*numnodes,0,
     224                                &velocity[0][0],NDOF2*numnodes,1,0,
    225225                                epsilonvy,0);
    226226}
     
    265265       
    266266        int i;
    267         const int numgrids=3;
    268 
    269         for(i=0;i<numgrids;i++) if (values[i]<minimum) values[i]=minimum;
     267        const int numnodes=3;
     268
     269        for(i=0;i<numnodes;i++) if (values[i]<minimum) values[i]=minimum;
    270270}
    271271/*}}}*/
     
    275275        /*Output*/
    276276        double norm=0;
    277         const int numgrids=3;
    278 
    279         for(int i=0;i<numgrids;i++) if(fabs(values[i])>norm) norm=fabs(values[i]);
     277        const int numnodes=3;
     278
     279        for(int i=0;i<numnodes;i++) if(fabs(values[i])>norm) norm=fabs(values[i]);
    280280        return norm;
    281281}
     
    284284double TriaVertexInput::Max(void){
    285285
    286         const int numgrids=3;
     286        const int numnodes=3;
    287287        double    max=values[0];
    288288
    289         for(int i=1;i<numgrids;i++){
     289        for(int i=1;i<numnodes;i++){
    290290                if(values[i]>max) max=values[i];
    291291        }
     
    296296double TriaVertexInput::MaxAbs(void){
    297297
    298         const int numgrids=3;
     298        const int numnodes=3;
    299299        double    max=fabs(values[0]);
    300300
    301         for(int i=1;i<numgrids;i++){
     301        for(int i=1;i<numnodes;i++){
    302302                if(fabs(values[i])>max) max=fabs(values[i]);
    303303        }
     
    308308double TriaVertexInput::Min(void){
    309309
    310         const int numgrids=3;
     310        const int numnodes=3;
    311311        double    min=values[0];
    312312
    313         for(int i=1;i<numgrids;i++){
     313        for(int i=1;i<numnodes;i++){
    314314                if(values[i]<min) min=values[i];
    315315        }
     
    320320double TriaVertexInput::MinAbs(void){
    321321
    322         const int numgrids=3;
     322        const int numnodes=3;
    323323        double    min=fabs(values[0]);
    324324
    325         for(int i=1;i<numgrids;i++){
     325        for(int i=1;i<numnodes;i++){
    326326                if(fabs(values[i])<min) min=fabs(values[i]);
    327327        }
     
    333333       
    334334        int i;
    335         const int numgrids=3;
    336 
    337         for(i=0;i<numgrids;i++)values[i]=values[i]*scale_factor;
     335        const int numnodes=3;
     336
     337        for(i=0;i<numnodes;i++)values[i]=values[i]*scale_factor;
    338338}
    339339/*}}}*/
     
    342342
    343343        int i;
    344         const int numgrids=3;
     344        const int numnodes=3;
    345345        double noise;
    346346
     
    351351         noise=min+(max-min)*(double)rand()/RAND_MAX;
    352352
    353         for(i=0;i<numgrids;i++)values[i]=values[i]+noise;
     353        for(i=0;i<numnodes;i++)values[i]=values[i]+noise;
    354354}
    355355/*}}}*/
     
    358358
    359359        int i;
    360         const int numgrids=3;
     360        const int numnodes=3;
    361361        TriaVertexInput*  xtriavertexinput=NULL;
    362362
     
    368368
    369369                case TriaVertexInputEnum :
    370                         for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xtriavertexinput->values[i];
     370                        for(i=0;i<numnodes;i++)this->values[i]=this->values[i]+scalar*xtriavertexinput->values[i];
    371371                        return;
    372372
     
    381381
    382382        int i;
    383         const int numgrids=3;
     383        const int numnodes=3;
    384384               
    385         if(!isnan(cm_min)) for(i=0;i<numgrids;i++)if (this->values[i]<cm_min)this->values[i]=cm_min;
    386         if(!isnan(cm_max)) for(i=0;i<numgrids;i++)if (this->values[i]>cm_max)this->values[i]=cm_max;
     385        if(!isnan(cm_min)) for(i=0;i<numnodes;i++)if (this->values[i]<cm_min)this->values[i]=cm_min;
     386        if(!isnan(cm_max)) for(i=0;i<numnodes;i++)if (this->values[i]>cm_max)this->values[i]=cm_max;
    387387
    388388}
     
    413413        TriaVertexInput *xinputB     = NULL;
    414414        int               B_numvalues;
    415         const int         numgrids    = 3;
    416         double            minvalues[numgrids];
     415        const int         numnodes    = 3;
     416        double            minvalues[numnodes];
    417417
    418418        /*Check that inputB is of the same type*/
     
    421421
    422422        /*Create point wise min*/
    423         for(i=0;i<numgrids;i++){
     423        for(i=0;i<numnodes;i++){
    424424                if(this->values[i] > xinputB->values[i]) minvalues[i]=xinputB->values[i];
    425425                else minvalues[i]=this->values[i];
     
    444444        TriaVertexInput *xinputB     = NULL;
    445445        int               B_numvalues;
    446         const int         numgrids    = 3;
    447         double            maxvalues[numgrids];
     446        const int         numnodes    = 3;
     447        double            maxvalues[numnodes];
    448448
    449449        /*Check that inputB is of the same type*/
     
    452452
    453453        /*Create point wise max*/
    454         for(i=0;i<numgrids;i++){
     454        for(i=0;i<numnodes;i++){
    455455                if(this->values[i] < xinputB->values[i]) maxvalues[i]=xinputB->values[i];
    456456                else maxvalues[i]=this->values[i];
  • issm/trunk/src/c/objects/IoModel.cpp

    r8238 r8303  
    4141        xfree((void**)&this->elements_type);
    4242        xfree((void**)&this->vertices_type);
    43         xfree((void**)&this->gridonhutter);
    44         xfree((void**)&this->gridonmacayeal);
     43        xfree((void**)&this->nodeonhutter);
     44        xfree((void**)&this->nodeonmacayeal);
    4545        if (this->dim==3){
    4646                xfree((void**)&this->elements2d);
    4747                xfree((void**)&this->upperelements);
    4848                xfree((void**)&this->lowerelements);
    49                 xfree((void**)&this->gridonpattyn);
     49                xfree((void**)&this->nodeonpattyn);
    5050        }
    5151        xfree((void**)&this->elementonbed);
    5252        xfree((void**)&this->elementonsurface);
    53         xfree((void**)&this->gridonbed);
    54         xfree((void**)&this->gridonsurface);
    55         xfree((void**)&this->gridonstokes);
     53        xfree((void**)&this->nodeonbed);
     54        xfree((void**)&this->nodeonsurface);
     55        xfree((void**)&this->nodeonstokes);
    5656        xfree((void**)&this->borderstokes);
    5757        xfree((void**)&this->thickness_obs);
     
    7474        xfree((void**)&this->elementoniceshelf);
    7575        xfree((void**)&this->elementonwater);
    76         xfree((void**)&this->gridonicesheet);
    77         xfree((void**)&this->gridoniceshelf);
    78         xfree((void**)&this->gridonwater);
     76        xfree((void**)&this->nodeonicesheet);
     77        xfree((void**)&this->nodeoniceshelf);
     78        xfree((void**)&this->nodeonwater);
    7979        xfree((void**)&this->pressureload);
    8080        xfree((void**)&this->spcvelocity);
     
    136136        IoModelFetchData(&this->dim,iomodel_handle,"dim");
    137137        /*!Get numberofelements and numberofvertices: */
    138         IoModelFetchData(&this->numberofvertices,iomodel_handle,"numberofgrids");
     138        IoModelFetchData(&this->numberofvertices,iomodel_handle,"numberofnodes");
    139139        IoModelFetchData(&this->numberofelements,iomodel_handle,"numberofelements");
    140140        /*!In case we are running 3d, we are going to need the collapsed and non-collapsed 2d meshes, from which the 3d mesh was extruded: */
     
    143143                /*!Deal with 2d mesh: */
    144144                IoModelFetchData(&this->numberofelements2d,iomodel_handle,"numberofelements2d");
    145                 IoModelFetchData(&this->numberofvertices2d,iomodel_handle,"numberofgrids2d");
     145                IoModelFetchData(&this->numberofvertices2d,iomodel_handle,"numberofnodes2d");
    146146                IoModelFetchData(&this->numlayers,iomodel_handle,"numlayers");
    147147        }
     
    264264        this->upperelements=NULL;
    265265        this->lowerelements=NULL;
    266         this->gridonhutter=NULL;
    267         this->gridonmacayeal=NULL;
    268         this->gridonpattyn=NULL;
     266        this->nodeonhutter=NULL;
     267        this->nodeonmacayeal=NULL;
     268        this->nodeonpattyn=NULL;
    269269        this->io_gather=1;
    270270       
     
    285285        this->elementonbed=NULL;
    286286        this->elementonsurface=NULL;
    287         this->gridonbed=NULL;
    288         this->gridonsurface=NULL;
    289         this->gridonstokes=NULL;
     287        this->nodeonbed=NULL;
     288        this->nodeonsurface=NULL;
     289        this->nodeonstokes=NULL;
    290290        this->borderstokes=NULL;
    291291        this->thickness_obs=NULL;
     
    297297        this->elementoniceshelf=NULL;
    298298        this->elementonwater=NULL;
    299         this->gridonicesheet=NULL;
    300         this->gridoniceshelf=NULL;
    301         this->gridonwater=NULL;
     299        this->nodeonicesheet=NULL;
     300        this->nodeoniceshelf=NULL;
     301        this->nodeonwater=NULL;
    302302
    303303        this->drag_type=0;
     
    422422                printf("IoModel penalties: \n");
    423423                printf("   number of penalties: %i\n",this->numpenalties);
    424                 printf("   grids: \n");
     424                printf("   nodes: \n");
    425425
    426426                for(i=0;i<this->numpenalties;i++){
  • issm/trunk/src/c/objects/IoModel.h

    r8238 r8303  
    4646                int     ismacayealpattyn;
    4747                int     isstokes;
    48                 double* gridonhutter;
    49                 double* gridonmacayeal;
    50                 double* gridonpattyn;
     48                double* nodeonhutter;
     49                double* nodeonmacayeal;
     50                double* nodeonpattyn;
    5151
    5252                /*results: */
     
    7676                double* elementonbed;
    7777                double* elementonsurface;
    78                 double* gridonbed;
    79                 double* gridonsurface;
    80                 double* gridonstokes;
     78                double* nodeonbed;
     79                double* nodeonsurface;
     80                double* nodeonstokes;
    8181                double* borderstokes;
    8282                double* thickness;
     
    8787                double* elementoniceshelf;
    8888                double* elementonwater;
    89                 double* gridonicesheet;
    90                 double* gridoniceshelf;
    91                 double* gridonwater;
     89                double* nodeonicesheet;
     90                double* nodeoniceshelf;
     91                double* nodeonwater;
    9292
    9393                /*friction: */
  • issm/trunk/src/c/objects/Loads/Icefront.cpp

    r8224 r8303  
    5858                segment_width=6;
    5959        }
    60         element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (grid1 grid2 ... elem fill)
     60        element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (node1 node2 ... elem fill)
    6161
    6262        /*Build ids for hook constructors: */
  • issm/trunk/src/c/objects/Loads/Pengrid.cpp

    r8224 r8303  
    462462
    463463        int    found=0;
    464         const int numgrids=1;
     464        const int numnodes=1;
    465465        double pressure;
    466466        double temperature;
  • issm/trunk/src/c/objects/Loads/Riftfront.cpp

    r8224 r8303  
    5151        /*intermediary: */
    5252        int el1    ,el2;
    53         int grid1  ,grid2;
    54 
    55         /*Ok, retrieve all the data needed to add a penalty between the two grids: */
     53        int node1  ,node2;
     54
     55        /*Ok, retrieve all the data needed to add a penalty between the two nodes: */
    5656        el1=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+2);
    5757        el2=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+3);
    5858
    59         grid1=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+0);
    60         grid2=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+1);
     59        node1=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+0);
     60        node2=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+1);
    6161
    6262        /*id: */
     
    6565
    6666        /*hooks: */
    67         riftfront_node_ids[0]=iomodel->nodecounter+grid1;
    68         riftfront_node_ids[1]=iomodel->nodecounter+grid2;
     67        riftfront_node_ids[0]=iomodel->nodecounter+node1;
     68        riftfront_node_ids[1]=iomodel->nodecounter+node2;
    6969        riftfront_elem_ids[0]=el1;
    7070        riftfront_elem_ids[1]=el2;
     
    9696        riftfront_friction=*(iomodel->riftinfo+RIFTINFOSIZE*i+8);
    9797        riftfront_fractionincrement=*(iomodel->riftinfo+RIFTINFOSIZE*i+10);
    98         riftfront_shelf=(bool)iomodel->gridoniceshelf[grid1-1];
     98        riftfront_shelf=(bool)iomodel->nodeoniceshelf[node1-1];
    9999
    100100        this->inputs->AddInput(new IntInput(TypeEnum,riftfront_type));
     
    623623
    624624        /*Ok, this rift is opening. We should put loads on both sides of the rift flanks. Because we are dealing with contact mechanics,
    625          * and we want to avoid zigzagging of the loads, we want lump the loads onto grids, not onto surfaces between grids.:*/
    626 
    627         /*Ok, to compute the pressure, we are going to need material properties, thickness and bed for the two grids. We assume those properties to
     625         * and we want to avoid zigzagging of the loads, we want lump the loads onto nodes, not onto surfaces between nodes.:*/
     626
     627        /*Ok, to compute the pressure, we are going to need material properties, thickness and bed for the two nodes. We assume those properties to
    628628         * be the same across the rift.: */
    629629
     
    660660        }
    661661
    662         /*Ok, add contribution to first grid, along the normal i==0: */
     662        /*Ok, add contribution to first node, along the normal i==0: */
    663663        for (j=0;j<2;j++){
    664664                pe->values[j]+=pressure*normal[j]*length;
    665665        }
    666666
    667         /*Add contribution to second grid, along the opposite normal: i==1 */
     667        /*Add contribution to second node, along the opposite normal: i==1 */
    668668        for (j=0;j<2;j++){
    669669                pe->values[2+j]+= -pressure*normal[j]*length;
     
    679679int Riftfront::Constrain(int* punstable){
    680680
    681         const int   numgrids        = 2;
     681        const int   numnodes        = 2;
    682682        double      max_penetration;
    683683        double      penetration;
     
    802802int   Riftfront::MaxPenetration(double* ppenetration){
    803803
    804         const int     numgrids=2;
     804        const int     numnodes=2;
    805805        double        max_penetration;
    806806        double        penetration=0;
     
    831831        tria2->GetParameterValue(&vy2,nodes[1],VyEnum);
    832832
    833         /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     833        /*Node1 faces node2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
    834834        penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
    835835
     
    902902
    903903
    904         const int   numgrids        = 2;
     904        const int   numnodes        = 2;
    905905        double      max_penetration;
    906906        double      penetration;
     
    953953int   Riftfront::PreConstrain(int* punstable){
    954954
    955         const int   numgrids    = 2;
     955        const int   numnodes    = 2;
    956956        double      penetration;
    957957        int         unstable;
  • issm/trunk/src/c/objects/Node.cpp

    r8287 r8303  
    5050        //intialize inputs, and add as many inputs per element as requested:
    5151        this->inputs=new Inputs();
    52         if (iomodel->gridonbed)      this->inputs->AddInput(new BoolInput(NodeOnBedEnum,(IssmBool)iomodel->gridonbed[io_index]));
    53         if (iomodel->gridonsurface)  this->inputs->AddInput(new BoolInput(NodeOnSurfaceEnum,(IssmBool)iomodel->gridonsurface[io_index]));
    54         if (iomodel->gridoniceshelf) this->inputs->AddInput(new BoolInput(NodeOnIceShelfEnum,(IssmBool)iomodel->gridoniceshelf[io_index]));
    55         if (iomodel->gridonicesheet) this->inputs->AddInput(new BoolInput(NodeOnIceSheetEnum,(IssmBool)iomodel->gridonicesheet[io_index]));
     52        if (iomodel->nodeonbed)      this->inputs->AddInput(new BoolInput(NodeOnBedEnum,(IssmBool)iomodel->nodeonbed[io_index]));
     53        if (iomodel->nodeonsurface)  this->inputs->AddInput(new BoolInput(NodeOnSurfaceEnum,(IssmBool)iomodel->nodeonsurface[io_index]));
     54        if (iomodel->nodeoniceshelf) this->inputs->AddInput(new BoolInput(NodeOnIceShelfEnum,(IssmBool)iomodel->nodeoniceshelf[io_index]));
     55        if (iomodel->nodeonicesheet) this->inputs->AddInput(new BoolInput(NodeOnIceSheetEnum,(IssmBool)iomodel->nodeonicesheet[io_index]));
    5656        if (iomodel->numbernodetoelementconnectivity) this->inputs->AddInput(new IntInput(NumberNodeToElementConnectivityEnum,(IssmInt)iomodel->numbernodetoelementconnectivity[io_index]));
    5757        if (analysis_type==DiagnosticHorizAnalysisEnum) this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->vertices_type[io_index]));
     
    6060
    6161        /*spc all nodes on water*/
    62         if (!iomodel->gridonwater) _error_("iomodel->gridonwater is NULL");
    63         if (iomodel->gridonwater[io_index]){
     62        if (!iomodel->nodeonwater) _error_("iomodel->nodeonwater is NULL");
     63        if (iomodel->nodeonwater[io_index]){
    6464                for(k=1;k<=gsize;k++){
    6565                        this->FreezeDof(k);
     
    7070        if (analysis_type==DiagnosticHorizAnalysisEnum){
    7171                if (iomodel->dim==3){
    72                         /*We have a  3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */
    73                         if (!iomodel->gridonbed) _error_("iomodel->gridonbed is NULL");
     72                        /*We have a  3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */
     73                        if (!iomodel->nodeonbed) _error_("iomodel->nodeonbed is NULL");
    7474                        if (!iomodel->vertices_type) _error_("iomodel->vertices_type is NULL");
    75                         if (iomodel->vertices_type[io_index]==MacAyealApproximationEnum && !iomodel->gridonbed[io_index]){
     75                        if (iomodel->vertices_type[io_index]==MacAyealApproximationEnum && !iomodel->nodeonbed[io_index]){
    7676                                for(k=1;k<=gsize;k++) this->FreezeDof(k);
    7777                        }
    78                         if (iomodel->vertices_type[io_index]==MacAyealPattynApproximationEnum && iomodel->gridonmacayeal[io_index]){
    79                                 if(!iomodel->gridonbed[io_index]){
     78                        if (iomodel->vertices_type[io_index]==MacAyealPattynApproximationEnum && iomodel->nodeonmacayeal[io_index]){
     79                                if(!iomodel->nodeonbed[io_index]){
    8080                                        for(k=1;k<=gsize;k++) this->FreezeDof(k);
    8181                                }
    8282                        }
    83                         if (iomodel->vertices_type[io_index]==MacAyealStokesApproximationEnum && iomodel->gridonmacayeal[io_index]){
    84                                 if(!iomodel->gridonbed[io_index]){
     83                        if (iomodel->vertices_type[io_index]==MacAyealStokesApproximationEnum && iomodel->nodeonmacayeal[io_index]){
     84                                if(!iomodel->nodeonbed[io_index]){
    8585                                        for(k=1;k<=2;k++) this->FreezeDof(k);
    8686                                }
     
    8888                }
    8989                /*spc all nodes on hutter*/
    90                 if (!iomodel->gridonhutter) _error_("iomodel->gridonhutter is NULL");
    91                 if (iomodel->gridonhutter[io_index]){
     90                if (!iomodel->nodeonhutter) _error_("iomodel->nodeonhutter is NULL");
     91                if (iomodel->nodeonhutter[io_index]){
    9292                        for(k=1;k<=gsize;k++){
    9393                                this->FreezeDof(k);
     
    100100        if (analysis_type==DiagnosticHutterAnalysisEnum){
    101101                /*Spc all nodes that are not Hutter*/
    102                 if (!iomodel->gridonhutter) _error_("iomodel->gridonhutter is NULL");
    103                 if (!iomodel->gridonhutter[io_index]){
     102                if (!iomodel->nodeonhutter) _error_("iomodel->nodeonhutter is NULL");
     103                if (!iomodel->nodeonhutter[io_index]){
    104104                        for(k=1;k<=gsize;k++){
    105105                                this->FreezeDof(k);
     
    118118                                ){
    119119                if (iomodel->dim==3){
    120                         /*On a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */
    121                         if (!iomodel->gridonbed) _error_("iomodel->gridonbed is NULL");
    122                         if (!iomodel->gridonbed[io_index]){
     120                        /*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */
     121                        if (!iomodel->nodeonbed) _error_("iomodel->nodeonbed is NULL");
     122                        if (!iomodel->nodeonbed[io_index]){
    123123                                for(k=1;k<=gsize;k++){
    124124                                        this->FreezeDof(k);
  • issm/trunk/src/c/objects/Object.h

    r4248 r8303  
    44 * \file Object.h
    55 * This prototype describes the Object class. This is an abstract class, parent
    6  * to any other objects (Quad, Tria, Grid, etc ...), that can be included in a
     6 * to any other objects (Quad, Tria, Node , etc ...), that can be included in a
    77 * DataSet.
    88 */
  • issm/trunk/src/c/objects/Segment.cpp

    r6412 r8303  
    5151        printf("Segment:\n");
    5252        printf("   eid: %i\n",eid);
    53         printf("   grid 1: %g|%g\n",this->x1,this->y1);
    54         printf("   grid 2: %g|%g\n",this->x2,this->y2);
     53        printf("   node 1: %g|%g\n",this->x1,this->y1);
     54        printf("   node 2: %g|%g\n",this->x2,this->y2);
    5555
    5656}
Note: See TracChangeset for help on using the changeset viewer.