Changeset 24933
- Timestamp:
- 05/30/20 22:13:21 (5 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.cpp
r24716 r24933 2502 2502 for(i=0;i<numnodes;i++){ 2503 2503 if(domaintype!=Domain2DverticalEnum){ 2504 lambdax[i]=values[i* NDOF2+0];2505 lambday[i]=values[i* NDOF2+1];2504 lambdax[i]=values[i*2+0]; 2505 lambday[i]=values[i*2+1]; 2506 2506 } 2507 2507 else {lambdax[i]=values[i];lambday[i]=0;} -
issm/trunk-jpl/src/c/analyses/BalancethicknessAnalysis.cpp
r24335 r24933 424 424 }/*}}}*/ 425 425 void BalancethicknessAnalysis::GetB(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 426 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.426 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 427 427 * For node i, Bi can be expressed in the actual coordinate system 428 428 * by: … … 431 431 * where N is the finiteelement function for node i. 432 432 * 433 * We assume B_prog has been allocated already, of size: 2x( NDOF1*numnodes)433 * We assume B_prog has been allocated already, of size: 2x(1*numnodes) 434 434 */ 435 435 … … 451 451 }/*}}}*/ 452 452 void BalancethicknessAnalysis::GetBprime(IssmDouble* Bprime,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 453 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3* NDOF2.453 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*2. 454 454 * For node i, Bi' can be expressed in the actual coordinate system 455 455 * by: … … 458 458 * where N is the finiteelement function for node i. 459 459 * 460 * We assume B' has been allocated already, of size: 3x( NDOF2*numnodes)460 * We assume B' has been allocated already, of size: 3x(2*numnodes) 461 461 */ 462 462 -
issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp
r24713 r24933 667 667 }/*}}}*/ 668 668 void DamageEvolutionAnalysis::GetB(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 669 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.669 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 670 670 * For node i, Bi can be expressed in the actual coordinate system 671 671 * by: … … 674 674 * where N is the finiteelement function for node i. 675 675 * 676 * We assume B_prog has been allocated already, of size: 2x( NDOF1*numnodes)676 * We assume B_prog has been allocated already, of size: 2x(1*numnodes) 677 677 */ 678 678 … … 695 695 }/*}}}*/ 696 696 void DamageEvolutionAnalysis::GetBprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 697 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3* NDOF2.697 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*2. 698 698 * For node i, Bi' can be expressed in the actual coordinate system 699 699 * by: … … 702 702 * where N is the finiteelement function for node i. 703 703 * 704 * We assume B' has been allocated already, of size: 3x( NDOF2*numnodes)704 * We assume B' has been allocated already, of size: 3x(2*numnodes) 705 705 */ 706 706 -
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
r24918 r24933 1288 1288 }/*}}}*/ 1289 1289 void EnthalpyAnalysis::GetBAdvec(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1290 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5* NDOF1.1290 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*1. 1291 1291 * For node i, Bi' can be expressed in the actual coordinate system 1292 1292 * by: … … 1296 1296 * where h is the interpolation function for node i. 1297 1297 * 1298 * We assume B has been allocated already, of size: 3x( NDOF1*NUMNODESP1)1298 * We assume B has been allocated already, of size: 3x(1*NUMNODESP1) 1299 1299 */ 1300 1300 … … 1317 1317 }/*}}}*/ 1318 1318 void EnthalpyAnalysis::GetBAdvecprime(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1319 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5* NDOF1.1319 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*1. 1320 1320 * For node i, Bi' can be expressed in the actual coordinate system 1321 1321 * by: … … 1325 1325 * where h is the interpolation function for node i. 1326 1326 * 1327 * We assume B has been allocated already, of size: 3x( NDOF1*numnodes)1327 * We assume B has been allocated already, of size: 3x(1*numnodes) 1328 1328 */ 1329 1329 … … 1509 1509 }/*}}}*/ 1510 1510 void EnthalpyAnalysis::GetBConduct(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1511 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5* NDOF1.1511 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*1. 1512 1512 * For node i, Bi' can be expressed in the actual coordinate system 1513 1513 * by: … … 1517 1517 * where h is the interpolation function for node i. 1518 1518 * 1519 * We assume B has been allocated already, of size: 3x( NDOF1*numnodes)1519 * We assume B has been allocated already, of size: 3x(1*numnodes) 1520 1520 */ 1521 1521 -
issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.cpp
r24861 r24933 335 335 }/*}}}*/ 336 336 void FreeSurfaceBaseAnalysis::GetB(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 337 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.337 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 338 338 * For node i, Bi can be expressed in the actual coordinate system 339 339 * by: … … 342 342 * where N is the finiteelement function for node i. 343 343 * 344 * We assume B_prog has been allocated already, of size: 2x( NDOF1*numnodes)344 * We assume B_prog has been allocated already, of size: 2x(1*numnodes) 345 345 */ 346 346 … … 363 363 }/*}}}*/ 364 364 void FreeSurfaceBaseAnalysis::GetBprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 365 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3* NDOF2.365 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*2. 366 366 * For node i, Bi' can be expressed in the actual coordinate system 367 367 * by: … … 370 370 * where N is the finiteelement function for node i. 371 371 * 372 * We assume B' has been allocated already, of size: 3x( NDOF2*numnodes)372 * We assume B' has been allocated already, of size: 3x(2*numnodes) 373 373 */ 374 374 -
issm/trunk-jpl/src/c/analyses/FreeSurfaceTopAnalysis.cpp
r24335 r24933 307 307 }/*}}}*/ 308 308 void FreeSurfaceTopAnalysis::GetB(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 309 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.309 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 310 310 * For node i, Bi can be expressed in the actual coordinate system 311 311 * by: … … 314 314 * where N is the finiteelement function for node i. 315 315 * 316 * We assume B_prog has been allocated already, of size: 2x( NDOF1*numnodes)316 * We assume B_prog has been allocated already, of size: 2x(1*numnodes) 317 317 */ 318 318 … … 335 335 }/*}}}*/ 336 336 void FreeSurfaceTopAnalysis::GetBprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 337 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3* NDOF2.337 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*2. 338 338 * For node i, Bi' can be expressed in the actual coordinate system 339 339 * by: … … 342 342 * where N is the finiteelement function for node i. 343 343 * 344 * We assume B' has been allocated already, of size: 3x( NDOF2*numnodes)344 * We assume B' has been allocated already, of size: 3x(2*numnodes) 345 345 */ 346 346 -
issm/trunk-jpl/src/c/analyses/GLheightadvectionAnalysis.cpp
r24861 r24933 246 246 247 247 void GLheightadvectionAnalysis::GetB(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 248 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.248 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 249 249 * For node i, Bi can be expressed in the actual coordinate system 250 250 * by: … … 253 253 * where N is the finiteelement function for node i. 254 254 * 255 * We assume B_prog has been allocated already, of size: 2x( NDOF1*numnodes)255 * We assume B_prog has been allocated already, of size: 2x(1*numnodes) 256 256 */ 257 257 … … 274 274 }/*}}}*/ 275 275 void GLheightadvectionAnalysis::GetBprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 276 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3* NDOF2.276 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*2. 277 277 * For node i, Bi' can be expressed in the actual coordinate system 278 278 * by: … … 281 281 * where N is the finiteelement function for node i. 282 282 * 283 * We assume B' has been allocated already, of size: 3x( NDOF2*numnodes)283 * We assume B' has been allocated already, of size: 3x(2*numnodes) 284 284 */ 285 285 -
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r24385 r24933 384 384 }/*}}}*/ 385 385 void HydrologyDCEfficientAnalysis::GetB(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 386 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.386 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 387 387 * For node i, Bi can be expressed in the actual coordinate system 388 388 * by: … … 391 391 * where N is the finiteelement function for node i. 392 392 * 393 * We assume B has been allocated already, of size: 3x( NDOF2*numnodes)393 * We assume B has been allocated already, of size: 3x(2*numnodes) 394 394 */ 395 395 -
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
r24861 r24933 473 473 }/*}}}*/ 474 474 void HydrologyDCInefficientAnalysis::GetB(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 475 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.475 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 476 476 * For node i, Bi can be expressed in the actual coordinate system 477 477 * by: … … 480 480 * where N is the finiteelement function for node i. 481 481 * 482 * We assume B has been allocated already, of size: 3x( NDOF2*numnodes)482 * We assume B has been allocated already, of size: 3x(2*numnodes) 483 483 */ 484 484 -
issm/trunk-jpl/src/c/analyses/HydrologyShreveAnalysis.cpp
r24861 r24933 287 287 }/*}}}*/ 288 288 void HydrologyShreveAnalysis::GetB(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 289 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.289 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 290 290 * For node i, Bi can be expressed in the actual coordinate system 291 291 * by: … … 294 294 * where N is the finiteelement function for node i. 295 295 * 296 * We assume B_prog has been allocated already, of size: 2x( NDOF1*numnodes)296 * We assume B_prog has been allocated already, of size: 2x(1*numnodes) 297 297 */ 298 298 … … 314 314 }/*}}}*/ 315 315 void HydrologyShreveAnalysis::GetBprime(IssmDouble* Bprime,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 316 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3* NDOF2.316 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*2. 317 317 * For node i, Bi' can be expressed in the actual coordinate system 318 318 * by: … … 321 321 * where N is the finiteelement function for node i. 322 322 * 323 * We assume B' has been allocated already, of size: 3x( NDOF2*numnodes)323 * We assume B' has been allocated already, of size: 3x(2*numnodes) 324 324 */ 325 325 -
issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
r24861 r24933 1815 1815 }/*}}}*/ 1816 1816 void StressbalanceAnalysis::GetBSSA(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1817 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.1817 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 1818 1818 * For node i, Bi can be expressed in the actual coordinate system 1819 1819 * by: … … 1824 1824 * where N is the finiteelement function for node i. 1825 1825 * 1826 * We assume B has been allocated already, of size: 3x( NDOF2*numnodes)1826 * We assume B has been allocated already, of size: 3x(2*numnodes) 1827 1827 */ 1828 1828 … … 1892 1892 }/*}}}*/ 1893 1893 void StressbalanceAnalysis::GetBSSAprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1894 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3* NDOF2.1894 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*2. 1895 1895 * For node i, Bi' can be expressed in the actual coordinate system 1896 1896 * by: … … 1901 1901 * where hNis the finiteelement function for node i. 1902 1902 * 1903 * We assume B' has been allocated already, of size: 3x( NDOF2*numnodes)1903 * We assume B' has been allocated already, of size: 3x(2*numnodes) 1904 1904 */ 1905 1905 … … 2807 2807 }/*}}}*/ 2808 2808 void StressbalanceAnalysis::GetBHO(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 2809 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5* NDOF2.2809 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*2. 2810 2810 * For node i, Bi can be expressed in the actual coordinate system 2811 2811 * by: … … 2819 2819 * where h is the interpolation function for node i. 2820 2820 * 2821 * We assume B has been allocated already, of size: 5x( NDOF2*numnodes)2821 * We assume B has been allocated already, of size: 5x(2*numnodes) 2822 2822 */ 2823 2823 … … 2892 2892 }/*}}}*/ 2893 2893 void StressbalanceAnalysis::GetBHOprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 2894 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3* NDOF2.2894 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*2. 2895 2895 * For node i, Bi' can be expressed in the actual coordinate system 2896 2896 * by: … … 2901 2901 * where hNis the finiteelement function for node i. 2902 2902 * 2903 * We assume B' has been allocated already, of size: 3x( NDOF2*numnodes)2903 * We assume B' has been allocated already, of size: 3x(2*numnodes) 2904 2904 */ 2905 2905 … … 3065 3065 int vnumnodes = element->NumberofNodesVelocity(); 3066 3066 int pnumnodes = element->NumberofNodesPressure(); 3067 int numdof = vnumnodes* NDOF3 + pnumnodes*NDOF1;3067 int numdof = vnumnodes*3 + pnumnodes*1; 3068 3068 3069 3069 /*Prepare coordinate system list*/ … … 4544 4544 }/*}}}*/ 4545 4545 void StressbalanceAnalysis::GetBFS(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 4546 /*Compute B matrix. B=[Bv1 Bv2 ... Bp1 Bp2 ...] where Bvi is of size 3* NDOF3.4546 /*Compute B matrix. B=[Bv1 Bv2 ... Bp1 Bp2 ...] where Bvi is of size 3*3. 4547 4547 * For node i, Bvi can be expressed in the actual coordinate system 4548 4548 * by: Bvi=[ dphi/dx 0 ] … … 4716 4716 }/*}}}*/ 4717 4717 void StressbalanceAnalysis::GetBFSprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 4718 /* Compute B' matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3* NDOF2.4718 /* Compute B' matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*2. 4719 4719 * For node i, Bi' can be expressed in the actual coordinate system 4720 4720 * by: … … 4829 4829 }/*}}}*/ 4830 4830 void StressbalanceAnalysis::GetBFSprimeUzawa(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 4831 /* Compute B' matrix. B'=[B1' B2' B3' B4' B5' B6'] where Bi' is of size 3* NDOF2.4831 /* Compute B' matrix. B'=[B1' B2' B3' B4' B5' B6'] where Bi' is of size 3*2. 4832 4832 * For node i, Bi' can be expressed in the actual coordinate system 4833 4833 * by: … … 4865 4865 }/*}}}*/ 4866 4866 void StressbalanceAnalysis::GetBFSprimevel(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 4867 /* Compute B' matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3* NDOF2.4867 /* Compute B' matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*2. 4868 4868 * For node i, Bi' can be expressed in the actual coordinate system 4869 4869 * by: … … 4950 4950 }/*}}}*/ 4951 4951 void StressbalanceAnalysis::GetBFSvel(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 4952 /*Compute B matrix. B=[Bv1 Bv2 ... Bp1 Bp2 ...] where Bvi is of size 3* NDOF3.4952 /*Compute B matrix. B=[Bv1 Bv2 ... Bp1 Bp2 ...] where Bvi is of size 3*3. 4953 4953 * For node i, Bvi can be expressed in the actual coordinate system 4954 4954 * by: Bvi=[ dphi/dx 0 ] … … 6717 6717 }/*}}}*/ 6718 6718 void StressbalanceAnalysis::GetBprimeSSAFS(IssmDouble* Bprime,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 6719 /*Compute Bprime matrix. Bprime=[Bprime1 Bprime2 Bprime3 Bprime4 Bprime5 Bprime6] where Bprimei is of size 5* NDOF2.6719 /*Compute Bprime matrix. Bprime=[Bprime1 Bprime2 Bprime3 Bprime4 Bprime5 Bprime6] where Bprimei is of size 5*2. 6720 6720 * For node i, Bprimei can be expressed in the actual coordinate system 6721 6721 * by: … … 6725 6725 * where h is the interpolation function for node i. 6726 6726 * 6727 * We assume Bprime has been allocated already, of size: 5x( NDOF2*NUMNODESP1)6727 * We assume Bprime has been allocated already, of size: 5x(2*NUMNODESP1) 6728 6728 */ 6729 6729 … … 6766 6766 }/*}}}*/ 6767 6767 void StressbalanceAnalysis::GetBprimeSSAFSTria(IssmDouble* Bprime,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 6768 /*Compute Bprime matrix. Bprime=[Bprime1 Bprime2 Bprime3] where Bprimei is of size 3* NDOF2.6768 /*Compute Bprime matrix. Bprime=[Bprime1 Bprime2 Bprime3] where Bprimei is of size 3*2. 6769 6769 * For node i, Bprimei can be expressed in the actual coordinate system 6770 6770 * by: … … 6775 6775 * where N is the finiteelement function for node i. 6776 6776 * 6777 * We assume Bprime has been allocated already, of size: 3x( NDOF2*numnodes)6777 * We assume Bprime has been allocated already, of size: 3x(2*numnodes) 6778 6778 */ 6779 6779 … … 6801 6801 }/*}}}*/ 6802 6802 void StressbalanceAnalysis::GetBSSAFS(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 6803 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5* NDOF2.6803 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*2. 6804 6804 * For node i, Bi can be expressed in the actual coordinate system 6805 6805 * by: … … 6810 6810 * where h is the interpolation function for node i. 6811 6811 * 6812 * We assume B has been allocated already, of size: 5x( NDOF2*NUMNODESP1)6812 * We assume B has been allocated already, of size: 5x(2*NUMNODESP1) 6813 6813 */ 6814 6814 … … 6859 6859 }/*}}}*/ 6860 6860 void StressbalanceAnalysis::GetBSSAFSTria(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 6861 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3* NDOF2.6861 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*2. 6862 6862 * For node i, Bi can be expressed in the actual coordinate system 6863 6863 * by: … … 6867 6867 * where N is the finiteelement function for node i. 6868 6868 * 6869 * We assume B has been allocated already, of size: 3x( NDOF2*numnodes)6869 * We assume B has been allocated already, of size: 3x(2*numnodes) 6870 6870 */ 6871 6871 … … 6891 6891 }/*}}}*/ 6892 6892 void StressbalanceAnalysis::GetBSSAHO(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 6893 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 3* NDOF2.6893 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 3*2. 6894 6894 * For node i, Bi can be expressed in the actual coordinate system 6895 6895 * by: … … 6899 6899 * where h is the interpolation function for node i. 6900 6900 * 6901 * We assume B has been allocated already, of size: 5x( NDOF2*NUMNODESP1)6901 * We assume B has been allocated already, of size: 5x(2*NUMNODESP1) 6902 6902 */ 6903 6903 -
issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.cpp
r24861 r24933 589 589 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ 590 590 for(i=0;i<numnodes;i++){ 591 vx[i]=values[i* NDOF2+0];592 vy[i]=values[i* NDOF2+1];591 vx[i]=values[i*2+0]; 592 vy[i]=values[i*2+1]; 593 593 594 594 /*Check solution*/ -
issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp
r24861 r24933 746 746 }/*}}}*/ 747 747 void ThermalAnalysis::GetBAdvec(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 748 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5* NDOF1.748 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*1. 749 749 * For node i, Bi' can be expressed in the actual coordinate system 750 750 * by: … … 754 754 * where h is the interpolation function for node i. 755 755 * 756 * We assume B has been allocated already, of size: 3x( NDOF1*NUMNODESP1)756 * We assume B has been allocated already, of size: 3x(1*NUMNODESP1) 757 757 */ 758 758 … … 775 775 }/*}}}*/ 776 776 void ThermalAnalysis::GetBAdvecprime(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 777 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5* NDOF1.777 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*1. 778 778 * For node i, Bi' can be expressed in the actual coordinate system 779 779 * by: … … 783 783 * where h is the interpolation function for node i. 784 784 * 785 * We assume B has been allocated already, of size: 3x( NDOF1*numnodes)785 * We assume B has been allocated already, of size: 3x(1*numnodes) 786 786 */ 787 787 … … 804 804 }/*}}}*/ 805 805 void ThermalAnalysis::GetBConduct(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 806 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5* NDOF1.806 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*1. 807 807 * For node i, Bi' can be expressed in the actual coordinate system 808 808 * by: … … 812 812 * where h is the interpolation function for node i. 813 813 * 814 * We assume B has been allocated already, of size: 3x( NDOF1*numnodes)814 * We assume B has been allocated already, of size: 3x(1*numnodes) 815 815 */ 816 816 -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r24861 r24933 2686 2686 void Penta::InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int enum_type){/*{{{*/ 2687 2687 2688 const int numdof = N DOF1*NUMVERTICES;2689 const int numdof2d = N DOF1*NUMVERTICES2D;2688 const int numdof = NUMVERTICES; 2689 const int numdof2d = NUMVERTICES2D; 2690 2690 2691 2691 IssmDouble values[numdof]; … … 2726 2726 void Penta::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/ 2727 2727 2728 const int numdof = N DOF1 *NUMVERTICES;2728 const int numdof = NUMVERTICES; 2729 2729 int *doflist = NULL; 2730 2730 IssmDouble values[numdof]; -
issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp
r22078 r24933 191 191 void PentaRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,Gauss* gauss_in){/*{{{*/ 192 192 /*The Jacobian is constant over the element, discard the gaussian points. 193 * J is assumed to have been allocated of size NDOF2xNDOF2.*/193 * J is assumed to have been allocated of size 2x2.*/ 194 194 195 195 IssmDouble A1,A2,A3; // area coordinates … … 235 235 j_const_reciprocal=SQRT3/12; 236 236 237 J[ NDOF3*0+0] = 0.25*(x1-x2-x4+x5)*zi+0.25*(-x1+x2-x4+x5);238 J[ NDOF3*1+0] = j_const_reciprocal*(x1+x2-2*x3-x4-x5+2*x6)*zi+j_const_reciprocal*(-x1-x2+2*x3-x4-x5+2*x6);239 J[ NDOF3*2+0] = j_const_reciprocal*(x1+x2-2*x3-x4-x5+2*x6)*eta+0.25*(x1-x2-x4+x5)*xi +0.25*(-x1+x5-x2+x4);240 241 J[ NDOF3*0+1] = 0.25*(y1-y2-y4+y5)*zi+0.25*(-y1+y2-y4+y5);242 J[ NDOF3*1+1] = j_const_reciprocal*(y1+y2-2*y3-y4-y5+2*y6)*zi+j_const_reciprocal*(-y1-y2+2*y3-y4-y5+2*y6);243 J[ NDOF3*2+1] = j_const_reciprocal*(y1+y2-2*y3-y4-y5+2*y6)*eta+0.25*(y1-y2-y4+y5)*xi+0.25*(y4-y1+y5-y2);244 245 J[ NDOF3*0+2] = 0.25*(z1-z2-z4+z5)*zi+0.25*(-z1+z2-z4+z5);246 J[ NDOF3*1+2] = j_const_reciprocal*(z1+z2-2*z3-z4-z5+2*z6)*zi+j_const_reciprocal*(-z1-z2+2*z3-z4-z5+2*z6);247 J[ NDOF3*2+2] = j_const_reciprocal*(z1+z2-2*z3-z4-z5+2*z6)*eta+0.25*(z1-z2-z4+z5)*xi+0.25*(-z1+z5-z2+z4);237 J[3*0+0] = 0.25*(x1-x2-x4+x5)*zi+0.25*(-x1+x2-x4+x5); 238 J[3*1+0] = j_const_reciprocal*(x1+x2-2*x3-x4-x5+2*x6)*zi+j_const_reciprocal*(-x1-x2+2*x3-x4-x5+2*x6); 239 J[3*2+0] = j_const_reciprocal*(x1+x2-2*x3-x4-x5+2*x6)*eta+0.25*(x1-x2-x4+x5)*xi +0.25*(-x1+x5-x2+x4); 240 241 J[3*0+1] = 0.25*(y1-y2-y4+y5)*zi+0.25*(-y1+y2-y4+y5); 242 J[3*1+1] = j_const_reciprocal*(y1+y2-2*y3-y4-y5+2*y6)*zi+j_const_reciprocal*(-y1-y2+2*y3-y4-y5+2*y6); 243 J[3*2+1] = j_const_reciprocal*(y1+y2-2*y3-y4-y5+2*y6)*eta+0.25*(y1-y2-y4+y5)*xi+0.25*(y4-y1+y5-y2); 244 245 J[3*0+2] = 0.25*(z1-z2-z4+z5)*zi+0.25*(-z1+z2-z4+z5); 246 J[3*1+2] = j_const_reciprocal*(z1+z2-2*z3-z4-z5+2*z6)*zi+j_const_reciprocal*(-z1-z2+2*z3-z4-z5+2*z6); 247 J[3*2+2] = j_const_reciprocal*(z1+z2-2*z3-z4-z5+2*z6)*eta+0.25*(z1-z2-z4+z5)*xi+0.25*(-z1+z5-z2+z4); 248 248 } 249 249 /*}}}*/ … … 1090 1090 void PentaRef::GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1091 1091 /*The Jacobian determinant is constant over the element, discard the gaussian points. 1092 * J is assumed to have been allocated of size NDOF2xNDOF2.*/1092 * J is assumed to have been allocated of size 2x2.*/ 1093 1093 1094 1094 IssmDouble x1=xyz_list[3*0+0]; … … 1106 1106 void PentaRef::GetTriaJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1107 1107 /*The Jacobian determinant is constant over the element, discard the gaussian points. 1108 * J is assumed to have been allocated of size NDOF2xNDOF2.*/1108 * J is assumed to have been allocated of size 2x2.*/ 1109 1109 1110 1110 IssmDouble x1=xyz_list[3*0+0]; -
issm/trunk-jpl/src/c/classes/Elements/SegRef.cpp
r20515 r24933 93 93 void SegRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussSeg* gauss){/*{{{*/ 94 94 /*The Jacobian determinant is constant over the element, discard the gaussian points. 95 * J is assumed to have been allocated of size NDOF2xNDOF2.*/95 * J is assumed to have been allocated of size 1.*/ 96 96 97 97 /*Call Jacobian routine to get the jacobian:*/ -
issm/trunk-jpl/src/c/classes/Elements/TetraRef.cpp
r20515 r24933 110 110 IssmDouble z4=xyz_list[3*3+2]; 111 111 112 J[ NDOF3*0+0] = x2-x1;113 J[ NDOF3*0+1] = y2-y1;114 J[ NDOF3*0+2] = z2-z1;115 116 J[ NDOF3*1+0] = x3-x1;117 J[ NDOF3*1+1] = y3-y1;118 J[ NDOF3*1+2] = z3-z1;119 120 J[ NDOF3*2+0] = x4-x1;121 J[ NDOF3*2+1] = y4-y1;122 J[ NDOF3*2+2] = z4-z1;112 J[3*0+0] = x2-x1; 113 J[3*0+1] = y2-y1; 114 J[3*0+2] = z2-z1; 115 116 J[3*1+0] = x3-x1; 117 J[3*1+1] = y3-y1; 118 J[3*1+2] = z3-z1; 119 120 J[3*2+0] = x4-x1; 121 J[3*2+1] = y4-y1; 122 J[3*2+2] = z4-z1; 123 123 } 124 124 /*}}}*/ 125 125 void TetraRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTetra* gauss){/*{{{*/ 126 126 /*The Jacobian determinant is constant over the element, discard the gaussian points. 127 * J is assumed to have been allocated of size NDOF2xNDOF2.*/127 * J is assumed to have been allocated of size 2x2.*/ 128 128 IssmDouble J[3][3]; 129 129 … … 139 139 void TetraRef::GetJacobianDeterminantFace(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTetra* gauss){/*{{{*/ 140 140 /*The Jacobian determinant is constant over the element, discard the gaussian points. 141 * J is assumed to have been allocated of size NDOF2xNDOF2.*/141 * J is assumed to have been allocated of size 2x2.*/ 142 142 143 143 IssmDouble x1=xyz_list[3*0+0]; -
issm/trunk-jpl/src/c/classes/Elements/TriaRef.cpp
r24240 r24933 90 90 void TriaRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 91 91 /*The Jacobian is constant over the element, discard the gaussian points. 92 * J is assumed to have been allocated of size NDOF2xNDOF2.*/92 * J is assumed to have been allocated of size 2x2.*/ 93 93 94 94 IssmDouble x1 = xyz_list[3*0+0]; … … 107 107 void TriaRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 108 108 /*The Jacobian determinant is constant over the element, discard the gaussian points. 109 * J is assumed to have been allocated of size NDOF2xNDOF2.*/109 * J is assumed to have been allocated of size 2x2.*/ 110 110 IssmDouble J[2][2]; 111 111 … … 121 121 void TriaRef::GetJacobianDeterminant3D(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 122 122 /*The Jacobian determinant is constant over the element, discard the gaussian points. 123 * J is assumed to have been allocated of size NDOF2xNDOF2.*/123 * J is assumed to have been allocated of size 2x2.*/ 124 124 IssmDouble J[2][2]; 125 125 -
issm/trunk-jpl/src/c/classes/Loads/Penpair.cpp
r23959 r24933 290 290 ElementMatrix* Penpair::PenaltyCreateKMatrixMasstransport(IssmDouble kmax){/*{{{*/ 291 291 292 const int numdof=NUMVERTICES* NDOF1;292 const int numdof=NUMVERTICES*1; 293 293 IssmDouble penalty_factor; 294 294 -
issm/trunk-jpl/src/c/classes/Loads/Riftfront.cpp
r24861 r24933 431 431 ElementMatrix* Riftfront::PenaltyCreateKMatrixStressbalanceHoriz(IssmDouble kmax){/*{{{*/ 432 432 433 const int numdof = NDOF2*NUMVERTICES;433 const int numdof = 2*NUMVERTICES; 434 434 IssmDouble thickness; 435 435 IssmDouble h[2]; -
issm/trunk-jpl/src/c/shared/Numerics/constants.h
r24593 r24933 11 11 const double PI=3.141592653589793238462643383279502884197169399375105820974944592308; // Macro definition conflicts with Dakota's declaration of PI 12 12 13 #define NDOF1 114 #define NDOF2 215 #define NDOF3 316 #define NDOF4 417 18 // /*Windows specific typefefs: */19 // #ifdef _INTEL_WIN_20 //21 // #ifndef NAN22 // //For reference, for Intel compile on win6423 // //#define NAN 0.0/0.024 // #define NAN (INFINITY-INFINITY)25 // #endif26 //27 // #ifndef INFINITY28 // //For reference, for Intel compile on win6429 // //#define INFINITY 1.0/0.030 // #define INFINITY (DBL_MAX+DBL_MAX)31 // #endif32 //33 // #endif /*_INTEL_WIN_*/34 35 13 #endif /*_ISSM_CONSTANTS_H_*/
Note:
See TracChangeset
for help on using the changeset viewer.