Changeset 5701


Ignore:
Timestamp:
09/08/10 08:27:05 (15 years ago)
Author:
Mathieu Morlighem
Message:

minor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Loads/Icefront.cpp

    r5633 r5701  
    1818#include "../../include/include.h"
    1919/*}}}*/
     20
     21/*Load macros*/
     22#define NUMVERTICESSEG 2
     23#define NUMVERTICESQUA 4
     24#define NDOF1 1
     25#define NDOF2 2
     26#define NDOF3 3
     27#define NDOF4 4
    2028
    2129/*Icefront constructors and destructor*/
     
    389397
    390398        int       i;
    391         const int numgrids = 2;
    392         const int NDOF2    = 2;
    393         const int numdofs = numgrids *NDOF2;
     399        const int numnodes= NUMVERTICESSEG;
     400        const int numdofs = numnodes *NDOF2;
    394401        int*      doflist=NULL;
    395         double    xyz_list[numgrids][3];
     402        double    xyz_list[numnodes][3];
    396403
    397404        /*Objects: */
     
    444451        /* Get dof list and node coordinates: */
    445452        GetDofList(&doflist,MacAyealApproximationEnum);
    446         GetVerticesCoordinates(&xyz_list[0][0],nodes,numgrids);
     453        GetVerticesCoordinates(&xyz_list[0][0],nodes,numnodes);
    447454       
    448455        /*Get Matpar parameters*/
    449456        rho_water=matpar->GetRhoWater();
    450         rho_ice=matpar->GetRhoIce();
    451         gravity=matpar->GetG();
     457        rho_ice  =matpar->GetRhoIce();
     458        gravity  =matpar->GetG();
    452459
    453460        /*Get normal*/
     
    495502                beam->GetNodalFunctions(&L[0],gauss_coord);
    496503
    497                 for (i=0;i<numgrids;i++){
     504                for (i=0;i<numnodes;i++){
    498505                        pe_g[2*i+0]+= pressure*Jdet*gauss_weights[ig]*normal[0]*L[i];
    499506                        pe_g[2*i+1]+= pressure*Jdet*gauss_weights[ig]*normal[1]*L[i];
     
    517524        int i,j;
    518525
    519         const int numgrids=4;
    520         const int NDOF2=2;
    521         const int numdofs=numgrids*NDOF2;
     526        const int numnodes=NUMVERTICESQUA;
     527        const int numdofs=numnodes*NDOF2;
    522528        int*      doflist=NULL;
    523529
    524         double xyz_list[numgrids][3];
    525         double xyz_list_quad[numgrids+1][3]; //center node
     530        double xyz_list[numnodes][3];
     531        double xyz_list_quad[numnodes+1][3]; //center node
    526532
    527533        double thickness_list[6]; //from penta element
     
    567573        /* Get dof list and node coordinates: */
    568574        GetDofList(&doflist,PattynApproximationEnum);
    569         GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids);
     575        GetVerticesCoordinates(&xyz_list[0][0], nodes, numnodes);
    570576       
    571577        //Identify which grids are comprised in the quad:
     
    654660        int i,j;
    655661
    656         const int numgrids=4;
    657         const int NDOF4=4;
    658         const int numdofs=numgrids*NDOF4;
     662        const int numnodes=4;
     663        const int numdofs=numnodes*NDOF4;
    659664        int*      doflist=NULL;
    660665
    661         double xyz_list[numgrids][3];
    662         double xyz_list_quad[numgrids+1][3]; //center node
     666        double xyz_list[numnodes][3];
     667        double xyz_list_quad[numnodes+1][3]; //center node
    663668
    664669        double thickness_list[6]; //from penta element
     
    706711        /* Get dof list and node coordinates: */
    707712        GetDofList(&doflist,StokesApproximationEnum);
    708         GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids);
     713        GetVerticesCoordinates(&xyz_list[0][0], nodes, numnodes);
    709714       
    710715        //Identify which grids are comprised in the quad:
     
    13821387
    13831388        /*Build unit outward pointing vector*/
    1384         const int numgrids=2;
     1389        const int numnodes=NUMVERTICESSEG;
    13851390        double vector[2];
    13861391        double norm;
Note: See TracChangeset for help on using the changeset viewer.