Changeset 5839
- Timestamp:
- 09/16/10 09:10:42 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Tria.cpp
r5831 r5839 705 705 /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */ 706 706 if (analysis_type==DiagnosticHorizAnalysisEnum || analysis_type==AdjointHorizAnalysisEnum){ 707 CreateKMatrixDiagnosticMacAyeal( Kgg,Kff,Kfs); 707 ElementMatrix* Ke=CreateKMatrixDiagnosticMacAyeal(); 708 Ke->AddToGlobal(Kgg,Kff,Kfs); 709 delete Ke; 708 710 } 709 711 else if (analysis_type==DiagnosticHutterAnalysisEnum){ … … 714 716 } 715 717 else if (analysis_type==PrognosticAnalysisEnum){ 716 if (GetElementType()==P1Enum) 717 CreateKMatrixPrognostic_CG( Kgg); 718 else if (GetElementType()==P1DGEnum) 719 CreateKMatrixPrognostic_DG( Kgg); 720 else 721 ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType())); 718 ElementMatrix* Ke=CreateKMatrixPrognostic(); 719 Ke->AddToGlobal(Kgg,Kff,Kfs); 720 delete Ke; 722 721 } 723 722 else if (analysis_type==BalancedthicknessAnalysisEnum || analysis_type==AdjointBalancedthicknessAnalysisEnum){ 724 if (GetElementType()==P1Enum) 725 CreateKMatrixBalancedthickness_CG( Kgg); 726 else if (GetElementType()==P1DGEnum) 727 CreateKMatrixBalancedthickness_DG( Kgg); 728 else 729 ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType())); 723 ElementMatrix* Ke=CreateKMatrixBalancedthickness(); 724 Ke->AddToGlobal(Kgg,Kff,Kfs); 725 delete Ke; 730 726 } 731 727 else if (analysis_type==BalancedvelocitiesAnalysisEnum){ … … 2391 2387 2392 2388 /*Tria specific routines: */ 2389 /*FUNCTION Tria::CreateKMatrixBalancedthickness {{{1*/ 2390 ElementMatrix* Tria::CreateKMatrixBalancedthickness(void){ 2391 2392 switch(GetElementType()){ 2393 case P1Enum: 2394 return CreateKMatrixBalancedthickness_CG(); 2395 case P1DGEnum: 2396 return CreateKMatrixBalancedthickness_DG(); 2397 default: 2398 ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType())); 2399 } 2400 2401 } 2402 /*}}}*/ 2393 2403 /*FUNCTION Tria::CreateKMatrixBalancedthickness_CG {{{1*/ 2394 void Tria::CreateKMatrixBalancedthickness_CG(Mat Kgg){2404 ElementMatrix* Tria::CreateKMatrixBalancedthickness_CG(void){ 2395 2405 2396 2406 /*Constants*/ … … 2415 2425 double Ke_gg_thickness1[numdof][numdof] = {0.0}; 2416 2426 double Ke_gg_thickness2[numdof][numdof] = {0.0}; 2417 int *doflist = NULL;2418 2427 GaussTria *gauss = NULL; 2419 2428 2420 /* Get node coordinates and dof list: */ 2429 /*Initialize Element matrix and return if necessary*/ 2430 if(IsOnWater()) return NULL; 2431 ElementMatrix* Ke=this->NewElementMatrix(NoneApproximationEnum); 2432 2433 /*Retrieve all Inputs and parameters: */ 2421 2434 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2422 GetDofList(&doflist,NoneApproximationEnum,GsetEnum);2423 2424 /*Retrieve all Inputs and parameters: */2425 2435 this->parameters->FindParam(&artdiff,ArtDiffEnum); 2426 2436 this->parameters->FindParam(&dim,DimEnum); … … 2484 2494 &Ke_gg_thickness2[0][0],0); 2485 2495 2486 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke _gg[i][j]+=Ke_gg_thickness1[i][j];2487 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke _gg[i][j]+=Ke_gg_thickness2[i][j];2496 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_thickness1[i][j]; 2497 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_thickness2[i][j]; 2488 2498 2489 2499 if(artdiff){ … … 2496 2506 &Ke_gg_gaussian[0][0],0); 2497 2507 2498 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke _gg[i][j]+=Ke_gg_gaussian[i][j];2508 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_gaussian[i][j]; 2499 2509 } 2500 2510 } 2501 2511 2502 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 2503 2504 /*Clean up*/ 2512 /*Clean up and return*/ 2505 2513 delete gauss; 2506 xfree((void**)&doflist);2514 return Ke; 2507 2515 } 2508 2516 /*}}}*/ 2509 2517 /*FUNCTION Tria::CreateKMatrixBalancedthickness_DG {{{1*/ 2510 void Tria::CreateKMatrixBalancedthickness_DG(Mat Kgg){2518 ElementMatrix* Tria::CreateKMatrixBalancedthickness_DG(void){ 2511 2519 2512 2520 /* local declarations */ 2521 const int numdof=NDOF1*NUMVERTICES; 2513 2522 int i,j; 2514 2515 /* node data: */ 2516 const int numdof=NDOF1*NUMVERTICES; 2523 int ig; 2517 2524 double xyz_list[NUMVERTICES][3]; 2518 int* doflist=NULL;2519 2520 /* gaussian points: */2521 int ig;2522 2525 GaussTria *gauss=NULL; 2523 2524 /* matrices: */2525 2526 double B[2][NUMVERTICES]; 2526 2527 double Bprime[2][NUMVERTICES]; … … 2531 2532 double Ke_gg2[numdof][numdof]={0.0}; 2532 2533 double Jdettria; 2533 2534 /*input parameters for structural analysis (diagnostic): */2535 2534 double vx,vy; 2536 2535 int dim; 2537 2536 2538 /* Get node coordinates and dof list: */ 2537 /*Initialize Element matrix and return if necessary*/ 2538 if(IsOnWater()) return NULL; 2539 ElementMatrix* Ke=this->NewElementMatrix(NoneApproximationEnum); 2540 2541 /*Retrieve all inputs and parameters*/ 2539 2542 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2540 GetDofList(&doflist,NoneApproximationEnum,GsetEnum);2541 2543 this->parameters->FindParam(&dim,DimEnum); 2542 2543 /*Retrieve all inputs we will be needed*/2544 2544 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input); 2545 2545 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input); … … 2551 2551 gauss->GaussPoint(ig); 2552 2552 2553 /* Get Jacobian determinant: */2554 GetJacobianDeterminant2d(&Jdettria, &xyz_list[0][0],gauss);2555 2556 /*Get B and B prime matrix: */2557 2553 /*WARNING: B and Bprime are inverted compared to usual prognostic!!!!*/ 2558 2554 GetBPrognostic(&Bprime[0][0], &xyz_list[0][0], gauss); 2559 2555 GetBprimePrognostic(&B[0][0], &xyz_list[0][0], gauss); 2560 2556 2561 //Get vx, vy and their derivatives at gauss point2562 2557 vx_input->GetParameterValue(&vx,gauss); 2563 2558 vy_input->GetParameterValue(&vy,gauss); 2564 2559 2560 GetJacobianDeterminant2d(&Jdettria, &xyz_list[0][0],gauss); 2565 2561 DL_scalar=-gauss->weight*Jdettria; 2566 2562 … … 2568 2564 DLprime[1][1]=DL_scalar*vy; 2569 2565 2570 //Do the triple product tL*D*L.2571 2566 TripleMultiply( &B[0][0],2,numdof,1, 2572 2567 &DLprime[0][0],2,2,0, … … 2574 2569 &Ke_gg2[0][0],0); 2575 2570 2576 /* Add the Ke_gg_gaussian, and optionally Ke_gg_drag_gaussian onto Ke_gg: */ 2577 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg2[i][j]; 2578 2579 } 2580 2581 /*Add Ke_gg to global matrix Kgg: */ 2582 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 2571 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg2[i][j]; 2572 } 2583 2573 2584 2574 /*Clean up and return*/ 2585 2575 delete gauss; 2586 xfree((void**)&doflist);2576 return Ke; 2587 2577 } 2588 2578 /*}}}*/ … … 2753 2743 /*}}}*/ 2754 2744 /*FUNCTION Tria::CreateKMatrixDiagnosticMacAyeal {{{1*/ 2755 void Tria::CreateKMatrixDiagnosticMacAyeal(Mat Kgg,Mat Kff, Mat Kfs){2745 ElementMatrix* Tria::CreateKMatrixDiagnosticMacAyeal(void){ 2756 2746 2757 2747 /*compute all stiffness matrices for this element*/ … … 2760 2750 ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2); 2761 2751 2762 /*Add Ke element stiffness matrix to global stiffness matrix: */ 2763 Ke->AddToGlobal(Kgg,Kff,Kfs); 2764 2765 /*Free ressources:*/ 2752 /*clean-up and return*/ 2766 2753 delete Ke1; 2767 2754 delete Ke2; 2768 delete Ke; 2755 return Ke; 2756 2769 2757 } 2770 2758 /*}}}*/ … … 2828 2816 &Ke_g[0][0],0); 2829 2817 2830 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[ numdof*j+i]+=Ke_g[i][j];2818 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_g[i][j]; 2831 2819 } 2832 2820 … … 2909 2897 &Ke_g[0][0],0); 2910 2898 2911 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[ numdof*j+i]+=Ke_g[i][j];2899 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_g[i][j]; 2912 2900 } 2913 2901 … … 3348 3336 } 3349 3337 /*}}}*/ 3338 /*FUNCTION Tria::CreateKMatrixPrognostic {{{1*/ 3339 ElementMatrix* Tria::CreateKMatrixPrognostic(void){ 3340 3341 switch(GetElementType()){ 3342 case P1Enum: 3343 return CreateKMatrixPrognostic_CG(); 3344 case P1DGEnum: 3345 return CreateKMatrixPrognostic_DG(); 3346 default: 3347 ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType())); 3348 } 3349 3350 } 3351 /*}}}*/ 3350 3352 /*FUNCTION Tria::CreateKMatrixPrognostic_CG {{{1*/ 3351 void Tria::CreateKMatrixPrognostic_CG(Mat Kgg){3353 ElementMatrix* Tria::CreateKMatrixPrognostic_CG(void){ 3352 3354 3353 3355 /* local declarations */ 3356 const int numdof=NDOF1*NUMVERTICES; 3354 3357 int i,j; 3355 3356 /* node data: */ 3357 const int numdof=NDOF1*NUMVERTICES; 3358 int ig; 3358 3359 double xyz_list[NUMVERTICES][3]; 3359 int* doflist=NULL;3360 3360 int numberofdofspernode=1; 3361 3362 /* gaussian points: */3363 int ig;3364 3361 GaussTria *gauss=NULL; 3365 3366 /* matrices: */3367 3362 double L[NUMVERTICES]; 3368 3363 double B[2][NUMVERTICES]; … … 3376 3371 double Ke_gg_thickness2[numdof][numdof]={0.0}; 3377 3372 double Jdettria; 3378 3379 /*input parameters for structural analysis (diagnostic): */3380 3373 double dvx[2]; 3381 3374 double dvy[2]; … … 3386 3379 double KDL[2][2]={0.0}; 3387 3380 int dim; 3388 3389 /*inputs: */3390 Input* vxaverage_input=NULL;3391 Input* vyaverage_input=NULL;3392 3381 double dt; 3393 3382 bool artdiff; 3394 3383 3395 /*retrieve some parameters: */ 3384 /*Initialize Element matrix and return if necessary*/ 3385 if(IsOnWater()) return NULL; 3386 ElementMatrix* Ke=this->NewElementMatrix(NoneApproximationEnum); 3387 3388 /*Retrieve all inputs and parameters*/ 3389 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 3396 3390 this->parameters->FindParam(&dt,DtEnum); 3397 3391 this->parameters->FindParam(&dim,DimEnum); 3398 3392 this->parameters->FindParam(&artdiff,ArtDiffEnum); 3399 3400 /* Get node coordinates and dof list: */ 3401 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 3402 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 3403 3404 /*Retrieve all inputs we will be needing: */ 3393 Input* vxaverage_input=NULL; 3394 Input* vyaverage_input=NULL; 3405 3395 if(dim==2){ 3406 3396 vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input); … … 3434 3424 gauss->GaussPoint(ig); 3435 3425 3436 /* Get Jacobian determinant: */3426 GetL(&L[0], &xyz_list[0][0], gauss,numberofdofspernode); 3437 3427 GetJacobianDeterminant2d(&Jdettria, &xyz_list[0][0],gauss); 3438 3428 3439 /*Get L matrix: */3440 GetL(&L[0], &xyz_list[0][0], gauss,numberofdofspernode);3441 3442 3429 DL_scalar=gauss->weight*Jdettria; 3443 3430 3444 /* Do the triple product tL*D*L: */3445 3431 TripleMultiply( &L[0],1,numdof,1, 3446 3432 &DL_scalar,1,1,0, … … 3448 3434 &Ke_gg_gaussian[0][0],0); 3449 3435 3450 /*Get B and B prime matrix: */3451 3436 GetBPrognostic(&B[0][0], &xyz_list[0][0], gauss); 3452 3437 GetBprimePrognostic(&Bprime[0][0], &xyz_list[0][0], gauss); 3453 3438 3454 //Get vx, vy and their derivatives at gauss point3455 3439 vxaverage_input->GetParameterValue(&vx,gauss); 3456 3440 vyaverage_input->GetParameterValue(&vy,gauss); 3457 3458 3441 vxaverage_input->GetParameterDerivativeValue(&dvx[0],&xyz_list[0][0],gauss); 3459 3442 vyaverage_input->GetParameterDerivativeValue(&dvy[0],&xyz_list[0][0],gauss); 3460 3461 3443 dvxdx=dvx[0]; 3462 3444 dvydy=dvy[1]; 3463 3464 3445 DL_scalar=dt*gauss->weight*Jdettria; 3465 3446 3466 //Create DL and DLprime matrix3467 3447 DL[0][0]=DL_scalar*dvxdx; 3468 3448 DL[1][1]=DL_scalar*dvydy; 3469 3470 3449 DLprime[0][0]=DL_scalar*vx; 3471 3450 DLprime[1][1]=DL_scalar*vy; 3472 3473 //Do the triple product tL*D*L.3474 //Ke_gg_thickness=B'*DL*B+B'*DLprime*Bprime;3475 3451 3476 3452 TripleMultiply( &B[0][0],2,numdof,1, … … 3484 3460 &Ke_gg_thickness2[0][0],0); 3485 3461 3486 /* Add the Ke_gg_gaussian, and optionally Ke_gg_drag_gaussian onto Ke_gg: */ 3487 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg_gaussian[i][j]; 3488 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg_thickness1[i][j]; 3489 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg_thickness2[i][j]; 3462 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_gaussian[i][j]; 3463 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_thickness1[i][j]; 3464 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_thickness2[i][j]; 3490 3465 3491 3466 if(artdiff){ 3492 3493 /* Compute artificial diffusivity */3494 3467 KDL[0][0]=DL_scalar*K[0][0]; 3495 3468 KDL[1][1]=DL_scalar*K[1][1]; … … 3500 3473 &Ke_gg_gaussian[0][0],0); 3501 3474 3502 /* Add artificial diffusivity matrix */ 3503 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg_gaussian[i][j]; 3504 3475 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_gaussian[i][j]; 3505 3476 } 3506 3507 } 3508 3509 /*Add Ke_gg to global matrix Kgg: */ 3510 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 3477 } 3511 3478 3512 3479 /*Clean up and return*/ 3513 3480 delete gauss; 3514 xfree((void**)&doflist);3481 return Ke; 3515 3482 } 3516 3483 /*}}}*/ 3517 3484 /*FUNCTION Tria::CreateKMatrixPrognostic_DG {{{1*/ 3518 void Tria::CreateKMatrixPrognostic_DG(Mat Kgg){3485 ElementMatrix* Tria::CreateKMatrixPrognostic_DG(void){ 3519 3486 3520 3487 /* local declarations */ 3521 3488 int i,j; 3522 3523 /* node data: */3524 3489 const int numdof=NDOF1*NUMVERTICES; 3525 3490 double xyz_list[NUMVERTICES][3]; 3526 3491 int* doflist=NULL; 3527 3492 int numberofdofspernode=1; 3528 3529 /* gaussian points: */3530 3493 int ig; 3531 3494 GaussTria *gauss=NULL; 3532 3533 /* matrices: */3534 3495 double L[NUMVERTICES]; 3535 3496 double B[2][NUMVERTICES]; … … 3542 3503 double Ke_gg2[numdof][numdof]={0.0}; 3543 3504 double Jdettria; 3544 3545 /*input parameters for structural analysis (diagnostic): */3546 3505 double vx,vy; 3547 3506 int dim; 3548 3549 /*inputs: */ 3507 double dt; 3508 3509 /*Initialize Element matrix and return if necessary*/ 3510 if(IsOnWater()) return NULL; 3511 ElementMatrix* Ke=this->NewElementMatrix(NoneApproximationEnum); 3512 3513 /*Retrieve all inputs and parameters*/ 3514 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 3515 this->parameters->FindParam(&dt,DtEnum); 3516 this->parameters->FindParam(&dim,DimEnum); 3550 3517 Input* vxaverage_input=NULL; 3551 3518 Input* vyaverage_input=NULL; 3552 double dt;3553 3554 /*retrieve some parameters: */3555 this->parameters->FindParam(&dt,DtEnum);3556 this->parameters->FindParam(&dim,DimEnum);3557 3558 /* Get node coordinates and dof list: */3559 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);3560 GetDofList(&doflist,NoneApproximationEnum,GsetEnum);3561 3562 /*Retrieve all inputs we will be needed*/3563 3519 if(dim==2){ 3564 3520 vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input); … … 3576 3532 gauss->GaussPoint(ig); 3577 3533 3578 /* Get Jacobian determinant: */ 3534 3535 GetL(&L[0], &xyz_list[0][0], gauss,numberofdofspernode); 3579 3536 GetJacobianDeterminant2d(&Jdettria, &xyz_list[0][0],gauss); 3580 3537 3581 /*Get L matrix: */3582 GetL(&L[0], &xyz_list[0][0], gauss,numberofdofspernode);3583 3584 3538 DL_scalar=gauss->weight*Jdettria; 3585 3539 3586 /* Do the triple product tL*D*L: */3587 3540 TripleMultiply( &L[0],1,numdof,1, 3588 3541 &DL_scalar,1,1,0, … … 3595 3548 GetBprimePrognostic(&B[0][0], &xyz_list[0][0], gauss); 3596 3549 3597 //Get vx, vy and their derivatives at gauss point3598 3550 vxaverage_input->GetParameterValue(&vx,gauss); 3599 3551 vyaverage_input->GetParameterValue(&vy,gauss); 3600 3601 3552 DL_scalar=-dt*gauss->weight*Jdettria; 3602 3553 … … 3604 3555 DLprime[1][1]=DL_scalar*vy; 3605 3556 3606 //Do the triple product tL*D*L.3607 3557 TripleMultiply( &B[0][0],2,numdof,1, 3608 3558 &DLprime[0][0],2,2,0, … … 3610 3560 &Ke_gg2[0][0],0); 3611 3561 3612 /* Add the Ke_gg_gaussian, and optionally Ke_gg_drag_gaussian onto Ke_gg: */ 3613 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg1[i][j]; 3614 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg2[i][j]; 3615 3616 } 3617 3618 /*Add Ke_gg to global matrix Kgg: */ 3619 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 3562 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg1[i][j]; 3563 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg2[i][j]; 3564 } 3620 3565 3621 3566 /*Clean up and return*/ 3622 3567 delete gauss; 3623 xfree((void**)&doflist);3568 return Ke; 3624 3569 } 3625 3570 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Tria.h
r5831 r5839 121 121 /*}}}*/ 122 122 /*Tria specific routines:{{{1*/ 123 void CreateKMatrixBalancedthickness_DG(Mat Kgg); 124 void CreateKMatrixBalancedthickness_CG(Mat Kgg); 123 ElementMatrix* CreateKMatrixBalancedthickness(void); 124 ElementMatrix* CreateKMatrixBalancedthickness_DG(void); 125 ElementMatrix* CreateKMatrixBalancedthickness_CG(void); 125 126 void CreateKMatrixBalancedvelocities(Mat Kgg); 126 void CreateKMatrixDiagnosticMacAyeal(Mat Kgg,Mat Kff, Mat Kfs);127 ElementMatrix* CreateKMatrixDiagnosticMacAyeal(void); 127 128 ElementMatrix* CreateKMatrixDiagnosticMacAyealViscous(void); 128 129 ElementMatrix* CreateKMatrixDiagnosticMacAyealFriction(void); … … 133 134 void CreateKMatrixDiagnosticSurfaceVert(Mat Kgg); 134 135 void CreateKMatrixMelting(Mat Kgg); 135 void CreateKMatrixPrognostic_CG(Mat Kgg); 136 void CreateKMatrixPrognostic_DG(Mat Kgg); 136 ElementMatrix* CreateKMatrixPrognostic(void); 137 ElementMatrix* CreateKMatrixPrognostic_CG(void); 138 ElementMatrix* CreateKMatrixPrognostic_DG(void); 137 139 void CreateKMatrixSlope(Mat Kgg); 138 140 void CreateKMatrixThermal(Mat Kgg); -
issm/trunk/src/c/objects/Numerics/ElementMatrix.cpp
r5834 r5839 358 358 for(i=0;i<nrows;i++){ 359 359 printf(" %i: ",i); 360 for(j=0;j<ncols;j++) printf("% g ",*(values+ncols*i+j));360 for(j=0;j<ncols;j++) printf("%10g ",*(values+ncols*i+j)); 361 361 printf("\n"); 362 362 } 363 363 364 364 printf(" gglobaldoflist (%p): ",gglobaldoflist); 365 365 if(gglobaldoflist) for(i=0;i<nrows;i++)printf("%i ",gglobaldoflist[i]); printf("\n"); 366 366 367 367 printf(" row_fsize: %i\n",row_fsize); 368 368 printf(" row_flocaldoflist (%p): ",row_flocaldoflist); 369 369 if(row_flocaldoflist) for(i=0;i<row_fsize;i++)printf("%i ",row_flocaldoflist[i]); printf("\n"); 370 370 printf(" row_fglobaldoflist (%p): ",row_fglobaldoflist); 371 371 if(row_fglobaldoflist)for(i=0;i<row_fsize;i++)printf("%i ",row_fglobaldoflist[i]); printf("\n"); … … 373 373 printf(" row_ssize: %i\n",row_ssize); 374 374 printf(" row_slocaldoflist (%p): ",row_slocaldoflist); 375 375 if(row_slocaldoflist)for(i=0;i<row_ssize;i++)printf("%i ",row_slocaldoflist[i]); printf("\n"); 376 376 printf(" row_sglobaldoflist (%p): ",row_sglobaldoflist); 377 377 if(row_sglobaldoflist)for(i=0;i<row_ssize;i++)printf("%i ",row_sglobaldoflist[i]); printf("\n");
Note:
See TracChangeset
for help on using the changeset viewer.