Changeset 5701
- Timestamp:
- 09/08/10 08:27:05 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Loads/Icefront.cpp
r5633 r5701 18 18 #include "../../include/include.h" 19 19 /*}}}*/ 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 20 28 21 29 /*Icefront constructors and destructor*/ … … 389 397 390 398 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; 394 401 int* doflist=NULL; 395 double xyz_list[num grids][3];402 double xyz_list[numnodes][3]; 396 403 397 404 /*Objects: */ … … 444 451 /* Get dof list and node coordinates: */ 445 452 GetDofList(&doflist,MacAyealApproximationEnum); 446 GetVerticesCoordinates(&xyz_list[0][0],nodes,num grids);453 GetVerticesCoordinates(&xyz_list[0][0],nodes,numnodes); 447 454 448 455 /*Get Matpar parameters*/ 449 456 rho_water=matpar->GetRhoWater(); 450 rho_ice =matpar->GetRhoIce();451 gravity =matpar->GetG();457 rho_ice =matpar->GetRhoIce(); 458 gravity =matpar->GetG(); 452 459 453 460 /*Get normal*/ … … 495 502 beam->GetNodalFunctions(&L[0],gauss_coord); 496 503 497 for (i=0;i<num grids;i++){504 for (i=0;i<numnodes;i++){ 498 505 pe_g[2*i+0]+= pressure*Jdet*gauss_weights[ig]*normal[0]*L[i]; 499 506 pe_g[2*i+1]+= pressure*Jdet*gauss_weights[ig]*normal[1]*L[i]; … … 517 524 int i,j; 518 525 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; 522 528 int* doflist=NULL; 523 529 524 double xyz_list[num grids][3];525 double xyz_list_quad[num grids+1][3]; //center node530 double xyz_list[numnodes][3]; 531 double xyz_list_quad[numnodes+1][3]; //center node 526 532 527 533 double thickness_list[6]; //from penta element … … 567 573 /* Get dof list and node coordinates: */ 568 574 GetDofList(&doflist,PattynApproximationEnum); 569 GetVerticesCoordinates(&xyz_list[0][0], nodes, num grids);575 GetVerticesCoordinates(&xyz_list[0][0], nodes, numnodes); 570 576 571 577 //Identify which grids are comprised in the quad: … … 654 660 int i,j; 655 661 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; 659 664 int* doflist=NULL; 660 665 661 double xyz_list[num grids][3];662 double xyz_list_quad[num grids+1][3]; //center node666 double xyz_list[numnodes][3]; 667 double xyz_list_quad[numnodes+1][3]; //center node 663 668 664 669 double thickness_list[6]; //from penta element … … 706 711 /* Get dof list and node coordinates: */ 707 712 GetDofList(&doflist,StokesApproximationEnum); 708 GetVerticesCoordinates(&xyz_list[0][0], nodes, num grids);713 GetVerticesCoordinates(&xyz_list[0][0], nodes, numnodes); 709 714 710 715 //Identify which grids are comprised in the quad: … … 1382 1387 1383 1388 /*Build unit outward pointing vector*/ 1384 const int num grids=2;1389 const int numnodes=NUMVERTICESSEG; 1385 1390 double vector[2]; 1386 1391 double norm;
Note:
See TracChangeset
for help on using the changeset viewer.