Changeset 18492
- Timestamp:
- 09/10/14 12:40:38 (11 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 43 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/m4/analyses.m4
r18181 r18492 11 11 12 12 dnl with-AdjointBalancethickness{{{ 13 13 14 AC_ARG_WITH([AdjointBalancethickness], 15 14 16 AS_HELP_STRING([--with-AdjointBalancethickness = YES], [compile with AdjointBalancethickness capabilities (default is yes)]), 17 15 18 [ADJOINTBALANCETHICKNESS=$withval],[ADJOINTBALANCETHICKNESS=yes]) 19 16 20 AC_MSG_CHECKING(for AdjointBalancethickness capability compilation) 17 21 22 18 23 HAVE_ADJOINTBALANCETHICKNESS=no 24 19 25 if test "x$ADJOINTBALANCETHICKNESS" = "xyes"; then 26 20 27 HAVE_ADJOINTBALANCETHICKNESS=yes 28 21 29 AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS_],[1],[with AdjointBalancethicknesscapability]) 22 fi 30 31 fi 32 23 33 AM_CONDITIONAL([ADJOINTBALANCETHICKNESS], [test x$HAVE_ADJOINTBALANCETHICKNESS = xyes]) 34 24 35 AC_MSG_RESULT($HAVE_ADJOINTBALANCETHICKNESS) 36 25 37 dnl }}} 26 38 dnl with-AdjointBalancethickness2{{{ 39 27 40 AC_ARG_WITH([AdjointBalancethickness2], 41 28 42 AS_HELP_STRING([--with-AdjointBalancethickness2 = YES], [compile with AdjointBalancethickness2 capabilities (default is yes)]), 43 29 44 [ADJOINTBALANCETHICKNESS2=$withval],[ADJOINTBALANCETHICKNESS2=yes]) 45 30 46 AC_MSG_CHECKING(for AdjointBalancethickness2 capability compilation) 31 47 48 32 49 HAVE_ADJOINTBALANCETHICKNESS2=no 50 33 51 if test "x$ADJOINTBALANCETHICKNESS2" = "xyes"; then 52 34 53 HAVE_ADJOINTBALANCETHICKNESS2=yes 54 35 55 AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS2_],[1],[with AdjointBalancethickness2capability]) 36 fi 56 57 fi 58 37 59 AM_CONDITIONAL([ADJOINTBALANCETHICKNESS2], [test x$HAVE_ADJOINTBALANCETHICKNESS2 = xyes]) 60 38 61 AC_MSG_RESULT($HAVE_ADJOINTBALANCETHICKNESS2) 62 39 63 dnl }}} 40 64 dnl with-AdjointHoriz{{{ 65 41 66 AC_ARG_WITH([AdjointHoriz], 67 42 68 AS_HELP_STRING([--with-AdjointHoriz = YES], [compile with AdjointHoriz capabilities (default is yes)]), 69 43 70 [ADJOINTHORIZ=$withval],[ADJOINTHORIZ=yes]) 71 44 72 AC_MSG_CHECKING(for AdjointHoriz capability compilation) 45 73 74 46 75 HAVE_ADJOINTHORIZ=no 76 47 77 if test "x$ADJOINTHORIZ" = "xyes"; then 78 48 79 HAVE_ADJOINTHORIZ=yes 80 49 81 AC_DEFINE([_HAVE_ADJOINTHORIZ_],[1],[with AdjointHorizcapability]) 50 fi 82 83 fi 84 51 85 AM_CONDITIONAL([ADJOINTHORIZ], [test x$HAVE_ADJOINTHORIZ = xyes]) 86 52 87 AC_MSG_RESULT($HAVE_ADJOINTHORIZ) 88 53 89 dnl }}} 54 90 dnl with-Balancethickness{{{ 91 55 92 AC_ARG_WITH([Balancethickness], 93 56 94 AS_HELP_STRING([--with-Balancethickness = YES], [compile with Balancethickness capabilities (default is yes)]), 95 57 96 [BALANCETHICKNESS=$withval],[BALANCETHICKNESS=yes]) 97 58 98 AC_MSG_CHECKING(for Balancethickness capability compilation) 59 99 100 60 101 HAVE_BALANCETHICKNESS=no 102 61 103 if test "x$BALANCETHICKNESS" = "xyes"; then 104 62 105 HAVE_BALANCETHICKNESS=yes 106 63 107 AC_DEFINE([_HAVE_BALANCETHICKNESS_],[1],[with Balancethicknesscapability]) 64 fi 108 109 fi 110 65 111 AM_CONDITIONAL([BALANCETHICKNESS], [test x$HAVE_BALANCETHICKNESS = xyes]) 112 66 113 AC_MSG_RESULT($HAVE_BALANCETHICKNESS) 114 67 115 dnl }}} 68 116 dnl with-Balancethickness2{{{ 117 69 118 AC_ARG_WITH([Balancethickness2], 119 70 120 AS_HELP_STRING([--with-Balancethickness2 = YES], [compile with Balancethickness2 capabilities (default is yes)]), 121 71 122 [BALANCETHICKNESS2=$withval],[BALANCETHICKNESS2=yes]) 123 72 124 AC_MSG_CHECKING(for Balancethickness2 capability compilation) 73 125 126 74 127 HAVE_BALANCETHICKNESS2=no 128 75 129 if test "x$BALANCETHICKNESS2" = "xyes"; then 130 76 131 HAVE_BALANCETHICKNESS2=yes 132 77 133 AC_DEFINE([_HAVE_BALANCETHICKNESS2_],[1],[with Balancethickness2capability]) 78 fi 134 135 fi 136 79 137 AM_CONDITIONAL([BALANCETHICKNESS2], [test x$HAVE_BALANCETHICKNESS2 = xyes]) 138 80 139 AC_MSG_RESULT($HAVE_BALANCETHICKNESS2) 140 81 141 dnl }}} 82 142 dnl with-BalancethicknessSoft{{{ 143 83 144 AC_ARG_WITH([BalancethicknessSoft], 145 84 146 AS_HELP_STRING([--with-BalancethicknessSoft = YES], [compile with BalancethicknessSoft capabilities (default is yes)]), 147 85 148 [BALANCETHICKNESSSOFT=$withval],[BALANCETHICKNESSSOFT=yes]) 149 86 150 AC_MSG_CHECKING(for BalancethicknessSoft capability compilation) 87 151 152 88 153 HAVE_BALANCETHICKNESSSOFT=no 154 89 155 if test "x$BALANCETHICKNESSSOFT" = "xyes"; then 156 90 157 HAVE_BALANCETHICKNESSSOFT=yes 158 91 159 AC_DEFINE([_HAVE_BALANCETHICKNESSSOFT_],[1],[with BalancethicknessSoftcapability]) 92 fi 160 161 fi 162 93 163 AM_CONDITIONAL([BALANCETHICKNESSSOFT], [test x$HAVE_BALANCETHICKNESSSOFT = xyes]) 164 94 165 AC_MSG_RESULT($HAVE_BALANCETHICKNESSSOFT) 166 95 167 dnl }}} 96 168 dnl with-Balancevelocity{{{ 169 97 170 AC_ARG_WITH([Balancevelocity], 171 98 172 AS_HELP_STRING([--with-Balancevelocity = YES], [compile with Balancevelocity capabilities (default is yes)]), 173 99 174 [BALANCEVELOCITY=$withval],[BALANCEVELOCITY=yes]) 175 100 176 AC_MSG_CHECKING(for Balancevelocity capability compilation) 101 177 178 102 179 HAVE_BALANCEVELOCITY=no 180 103 181 if test "x$BALANCEVELOCITY" = "xyes"; then 182 104 183 HAVE_BALANCEVELOCITY=yes 184 105 185 AC_DEFINE([_HAVE_BALANCEVELOCITY_],[1],[with Balancevelocitycapability]) 106 fi 186 187 fi 188 107 189 AM_CONDITIONAL([BALANCEVELOCITY], [test x$HAVE_BALANCEVELOCITY = xyes]) 190 108 191 AC_MSG_RESULT($HAVE_BALANCEVELOCITY) 192 109 193 dnl }}} 110 194 dnl with-L2ProjectionEPL{{{ 195 111 196 AC_ARG_WITH([L2ProjectionEPL], 197 112 198 AS_HELP_STRING([--with-L2ProjectionEPL = YES], [compile with L2ProjectionEPL capabilities (default is yes)]), 199 113 200 [L2PROJECTIONEPL=$withval],[L2PROJECTIONEPL=yes]) 201 114 202 AC_MSG_CHECKING(for L2ProjectionEPL capability compilation) 115 203 204 116 205 HAVE_L2PROJECTIONEPL=no 206 117 207 if test "x$L2PROJECTIONEPL" = "xyes"; then 208 118 209 HAVE_L2PROJECTIONEPL=yes 210 119 211 AC_DEFINE([_HAVE_L2PROJECTIONEPL_],[1],[with L2ProjectionEPLcapability]) 120 fi 212 213 fi 214 121 215 AM_CONDITIONAL([L2PROJECTIONEPL], [test x$HAVE_L2PROJECTIONEPL = xyes]) 216 122 217 AC_MSG_RESULT($HAVE_L2PROJECTIONEPL) 218 123 219 dnl }}} 124 220 dnl with-L2ProjectionBase{{{ 221 125 222 AC_ARG_WITH([L2ProjectionBase], 223 126 224 AS_HELP_STRING([--with-L2ProjectionBase = YES], [compile with L2ProjectionBase capabilities (default is yes)]), 225 127 226 [L2PROJECTIONBASE=$withval],[L2PROJECTIONBASE=yes]) 227 128 228 AC_MSG_CHECKING(for L2ProjectionBase capability compilation) 129 229 230 130 231 HAVE_L2PROJECTIONBASE=no 232 131 233 if test "x$L2PROJECTIONBASE" = "xyes"; then 234 132 235 HAVE_L2PROJECTIONBASE=yes 236 133 237 AC_DEFINE([_HAVE_L2PROJECTIONBASE_],[1],[with L2ProjectionBasecapability]) 134 fi 238 239 fi 240 135 241 AM_CONDITIONAL([L2PROJECTIONBASE], [test x$HAVE_L2PROJECTIONBASE = xyes]) 242 136 243 AC_MSG_RESULT($HAVE_L2PROJECTIONBASE) 244 137 245 dnl }}} 138 246 dnl with-DamageEvolution{{{ 247 139 248 AC_ARG_WITH([DamageEvolution], 249 140 250 AS_HELP_STRING([--with-DamageEvolution = YES], [compile with DamageEvolution capabilities (default is yes)]), 251 141 252 [DAMAGEEVOLUTION=$withval],[DAMAGEEVOLUTION=yes]) 253 142 254 AC_MSG_CHECKING(for DamageEvolution capability compilation) 143 255 256 144 257 HAVE_DAMAGEEVOLUTION=no 258 145 259 if test "x$DAMAGEEVOLUTION" = "xyes"; then 260 146 261 HAVE_DAMAGEEVOLUTION=yes 262 147 263 AC_DEFINE([_HAVE_DAMAGEEVOLUTION_],[1],[with DamageEvolutioncapability]) 148 fi 264 265 fi 266 149 267 AM_CONDITIONAL([DAMAGEEVOLUTION], [test x$HAVE_DAMAGEEVOLUTION = xyes]) 268 150 269 AC_MSG_RESULT($HAVE_DAMAGEEVOLUTION) 270 151 271 dnl }}} 152 272 dnl with-Stressbalance{{{ 273 153 274 AC_ARG_WITH([Stressbalance], 275 154 276 AS_HELP_STRING([--with-Stressbalance = YES], [compile with Stressbalance capabilities (default is yes)]), 277 155 278 [STRESSBALANCE=$withval],[STRESSBALANCE=yes]) 279 156 280 AC_MSG_CHECKING(for Stressbalance capability compilation) 157 281 282 158 283 HAVE_STRESSBALANCE=no 284 159 285 if test "x$STRESSBALANCE" = "xyes"; then 286 160 287 HAVE_STRESSBALANCE=yes 288 161 289 AC_DEFINE([_HAVE_STRESSBALANCE_],[1],[with Stressbalancecapability]) 162 fi 290 291 fi 292 163 293 AM_CONDITIONAL([STRESSBALANCE], [test x$HAVE_STRESSBALANCE = xyes]) 294 164 295 AC_MSG_RESULT($HAVE_STRESSBALANCE) 296 165 297 dnl }}} 166 298 dnl with-StressbalanceSIA{{{ 299 167 300 AC_ARG_WITH([StressbalanceSIA], 301 168 302 AS_HELP_STRING([--with-StressbalanceSIA = YES], [compile with StressbalanceSIA capabilities (default is yes)]), 303 169 304 [STRESSBALANCESIA=$withval],[STRESSBALANCESIA=yes]) 305 170 306 AC_MSG_CHECKING(for StressbalanceSIA capability compilation) 171 307 308 172 309 HAVE_STRESSBALANCESIA=no 310 173 311 if test "x$STRESSBALANCESIA" = "xyes"; then 312 174 313 HAVE_STRESSBALANCESIA=yes 314 175 315 AC_DEFINE([_HAVE_STRESSBALANCESIA_],[1],[with StressbalanceSIAcapability]) 176 fi 316 317 fi 318 177 319 AM_CONDITIONAL([STRESSBALANCESIA], [test x$HAVE_STRESSBALANCESIA = xyes]) 320 178 321 AC_MSG_RESULT($HAVE_STRESSBALANCESIA) 322 179 323 dnl }}} 180 324 dnl with-StressbalanceVertical{{{ 325 181 326 AC_ARG_WITH([StressbalanceVertical], 327 182 328 AS_HELP_STRING([--with-StressbalanceVertical = YES], [compile with StressbalanceVertical capabilities (default is yes)]), 329 183 330 [STRESSBALANCEVERTICAL=$withval],[STRESSBALANCEVERTICAL=yes]) 331 184 332 AC_MSG_CHECKING(for StressbalanceVertical capability compilation) 185 333 334 186 335 HAVE_STRESSBALANCEVERTICAL=no 336 187 337 if test "x$STRESSBALANCEVERTICAL" = "xyes"; then 338 188 339 HAVE_STRESSBALANCEVERTICAL=yes 340 189 341 AC_DEFINE([_HAVE_STRESSBALANCEVERTICAL_],[1],[with StressbalanceVerticalcapability]) 190 fi 342 343 fi 344 191 345 AM_CONDITIONAL([STRESSBALANCEVERTICAL], [test x$HAVE_STRESSBALANCEVERTICAL = xyes]) 346 192 347 AC_MSG_RESULT($HAVE_STRESSBALANCEVERTICAL) 348 193 349 dnl }}} 194 350 dnl with-Enthalpy{{{ 351 195 352 AC_ARG_WITH([Enthalpy], 353 196 354 AS_HELP_STRING([--with-Enthalpy = YES], [compile with Enthalpy capabilities (default is yes)]), 355 197 356 [ENTHALPY=$withval],[ENTHALPY=yes]) 357 198 358 AC_MSG_CHECKING(for Enthalpy capability compilation) 199 359 360 200 361 HAVE_ENTHALPY=no 362 201 363 if test "x$ENTHALPY" = "xyes"; then 364 202 365 HAVE_ENTHALPY=yes 366 203 367 AC_DEFINE([_HAVE_ENTHALPY_],[1],[with Enthalpycapability]) 204 fi 368 369 fi 370 205 371 AM_CONDITIONAL([ENTHALPY], [test x$HAVE_ENTHALPY = xyes]) 372 206 373 AC_MSG_RESULT($HAVE_ENTHALPY) 374 207 375 dnl }}} 208 376 dnl with-HydrologyShreve{{{ 377 209 378 AC_ARG_WITH([HydrologyShreve], 379 210 380 AS_HELP_STRING([--with-HydrologyShreve = YES], [compile with HydrologyShreve capabilities (default is yes)]), 381 211 382 [HYDROLOGYSHREVE=$withval],[HYDROLOGYSHREVE=yes]) 383 212 384 AC_MSG_CHECKING(for HydrologyShreve capability compilation) 213 385 386 214 387 HAVE_HYDROLOGYSHREVE=no 388 215 389 if test "x$HYDROLOGYSHREVE" = "xyes"; then 390 216 391 HAVE_HYDROLOGYSHREVE=yes 392 217 393 AC_DEFINE([_HAVE_HYDROLOGYSHREVE_],[1],[with HydrologyShrevecapability]) 218 fi 394 395 fi 396 219 397 AM_CONDITIONAL([HYDROLOGYSHREVE], [test x$HAVE_HYDROLOGYSHREVE = xyes]) 398 220 399 AC_MSG_RESULT($HAVE_HYDROLOGYSHREVE) 400 221 401 dnl }}} 222 402 dnl with-HydrologyDCInefficient{{{ 403 223 404 AC_ARG_WITH([HydrologyDCInefficient], 405 224 406 AS_HELP_STRING([--with-HydrologyDCInefficient = YES], [compile with HydrologyDCInefficient capabilities (default is yes)]), 407 225 408 [HYDROLOGYDCINEFFICIENT=$withval],[HYDROLOGYDCINEFFICIENT=yes]) 409 226 410 AC_MSG_CHECKING(for HydrologyDCInefficient capability compilation) 227 411 412 228 413 HAVE_HYDROLOGYDCINEFFICIENT=no 414 229 415 if test "x$HYDROLOGYDCINEFFICIENT" = "xyes"; then 416 230 417 HAVE_HYDROLOGYDCINEFFICIENT=yes 418 231 419 AC_DEFINE([_HAVE_HYDROLOGYDCINEFFICIENT_],[1],[with HydrologyDCInefficientcapability]) 232 fi 420 421 fi 422 233 423 AM_CONDITIONAL([HYDROLOGYDCINEFFICIENT], [test x$HAVE_HYDROLOGYDCINEFFICIENT = xyes]) 424 234 425 AC_MSG_RESULT($HAVE_HYDROLOGYDCINEFFICIENT) 426 235 427 dnl }}} 236 428 dnl with-HydrologyDCEfficient{{{ 429 237 430 AC_ARG_WITH([HydrologyDCEfficient], 431 238 432 AS_HELP_STRING([--with-HydrologyDCEfficient = YES], [compile with HydrologyDCEfficient capabilities (default is yes)]), 433 239 434 [HYDROLOGYDCEFFICIENT=$withval],[HYDROLOGYDCEFFICIENT=yes]) 435 240 436 AC_MSG_CHECKING(for HydrologyDCEfficient capability compilation) 241 437 438 242 439 HAVE_HYDROLOGYDCEFFICIENT=no 440 243 441 if test "x$HYDROLOGYDCEFFICIENT" = "xyes"; then 442 244 443 HAVE_HYDROLOGYDCEFFICIENT=yes 444 245 445 AC_DEFINE([_HAVE_HYDROLOGYDCEFFICIENT_],[1],[with HydrologyDCEfficientcapability]) 246 fi 446 447 fi 448 247 449 AM_CONDITIONAL([HYDROLOGYDCEFFICIENT], [test x$HAVE_HYDROLOGYDCEFFICIENT = xyes]) 450 248 451 AC_MSG_RESULT($HAVE_HYDROLOGYDCEFFICIENT) 452 249 453 dnl }}} 250 454 dnl with-Melting{{{ 455 251 456 AC_ARG_WITH([Melting], 457 252 458 AS_HELP_STRING([--with-Melting = YES], [compile with Melting capabilities (default is yes)]), 459 253 460 [MELTING=$withval],[MELTING=yes]) 461 254 462 AC_MSG_CHECKING(for Melting capability compilation) 255 463 464 256 465 HAVE_MELTING=no 466 257 467 if test "x$MELTING" = "xyes"; then 468 258 469 HAVE_MELTING=yes 470 259 471 AC_DEFINE([_HAVE_MELTING_],[1],[with Meltingcapability]) 260 fi 472 473 fi 474 261 475 AM_CONDITIONAL([MELTING], [test x$HAVE_MELTING = xyes]) 476 262 477 AC_MSG_RESULT($HAVE_MELTING) 478 263 479 dnl }}} 264 480 dnl with-Masstransport{{{ 481 265 482 AC_ARG_WITH([Masstransport], 483 266 484 AS_HELP_STRING([--with-Masstransport = YES], [compile with Masstransport capabilities (default is yes)]), 485 267 486 [MASSTRANSPORT=$withval],[MASSTRANSPORT=yes]) 487 268 488 AC_MSG_CHECKING(for Masstransport capability compilation) 269 489 490 270 491 HAVE_MASSTRANSPORT=no 492 271 493 if test "x$MASSTRANSPORT" = "xyes"; then 494 272 495 HAVE_MASSTRANSPORT=yes 496 273 497 AC_DEFINE([_HAVE_MASSTRANSPORT_],[1],[with Masstransportcapability]) 274 fi 498 499 fi 500 275 501 AM_CONDITIONAL([MASSTRANSPORT], [test x$HAVE_MASSTRANSPORT = xyes]) 502 276 503 AC_MSG_RESULT($HAVE_MASSTRANSPORT) 504 277 505 dnl }}} 278 506 dnl with-FreeSurfaceBase{{{ 507 279 508 AC_ARG_WITH([FreeSurfaceBase], 509 280 510 AS_HELP_STRING([--with-FreeSurfaceBase = YES], [compile with FreeSurfaceBase capabilities (default is yes)]), 511 281 512 [FREESURFACEBASE=$withval],[FREESURFACEBASE=yes]) 513 282 514 AC_MSG_CHECKING(for FreeSurfaceBase capability compilation) 283 515 516 284 517 HAVE_FREESURFACEBASE=no 518 285 519 if test "x$FREESURFACEBASE" = "xyes"; then 520 286 521 HAVE_FREESURFACEBASE=yes 522 287 523 AC_DEFINE([_HAVE_FREESURFACEBASE_],[1],[with FreeSurfaceBasecapability]) 288 fi 524 525 fi 526 289 527 AM_CONDITIONAL([FREESURFACEBASE], [test x$HAVE_FREESURFACEBASE = xyes]) 528 290 529 AC_MSG_RESULT($HAVE_FREESURFACEBASE) 530 291 531 dnl }}} 292 532 dnl with-FreeSurfaceTop{{{ 533 293 534 AC_ARG_WITH([FreeSurfaceTop], 535 294 536 AS_HELP_STRING([--with-FreeSurfaceTop = YES], [compile with FreeSurfaceTop capabilities (default is yes)]), 537 295 538 [FREESURFACETOP=$withval],[FREESURFACETOP=yes]) 539 296 540 AC_MSG_CHECKING(for FreeSurfaceTop capability compilation) 297 541 542 298 543 HAVE_FREESURFACETOP=no 544 299 545 if test "x$FREESURFACETOP" = "xyes"; then 546 300 547 HAVE_FREESURFACETOP=yes 548 301 549 AC_DEFINE([_HAVE_FREESURFACETOP_],[1],[with FreeSurfaceTopcapability]) 302 fi 550 551 fi 552 303 553 AM_CONDITIONAL([FREESURFACETOP], [test x$HAVE_FREESURFACETOP = xyes]) 554 304 555 AC_MSG_RESULT($HAVE_FREESURFACETOP) 556 305 557 dnl }}} 306 558 dnl with-ExtrudeFromBase{{{ 559 307 560 AC_ARG_WITH([ExtrudeFromBase], 561 308 562 AS_HELP_STRING([--with-ExtrudeFromBase = YES], [compile with ExtrudeFromBase capabilities (default is yes)]), 563 309 564 [EXTRUDEFROMBASE=$withval],[EXTRUDEFROMBASE=yes]) 565 310 566 AC_MSG_CHECKING(for ExtrudeFromBase capability compilation) 311 567 568 312 569 HAVE_EXTRUDEFROMBASE=no 570 313 571 if test "x$EXTRUDEFROMBASE" = "xyes"; then 572 314 573 HAVE_EXTRUDEFROMBASE=yes 574 315 575 AC_DEFINE([_HAVE_EXTRUDEFROMBASE_],[1],[with ExtrudeFromBasecapability]) 316 fi 576 577 fi 578 317 579 AM_CONDITIONAL([EXTRUDEFROMBASE], [test x$HAVE_EXTRUDEFROMBASE = xyes]) 580 318 581 AC_MSG_RESULT($HAVE_EXTRUDEFROMBASE) 582 319 583 dnl }}} 320 584 dnl with-ExtrudeFromTop{{{ 585 321 586 AC_ARG_WITH([ExtrudeFromTop], 587 322 588 AS_HELP_STRING([--with-ExtrudeFromTop = YES], [compile with ExtrudeFromTop capabilities (default is yes)]), 589 323 590 [EXTRUDEFROMTOP=$withval],[EXTRUDEFROMTOP=yes]) 591 324 592 AC_MSG_CHECKING(for ExtrudeFromTop capability compilation) 325 593 594 326 595 HAVE_EXTRUDEFROMTOP=no 596 327 597 if test "x$EXTRUDEFROMTOP" = "xyes"; then 598 328 599 HAVE_EXTRUDEFROMTOP=yes 600 329 601 AC_DEFINE([_HAVE_EXTRUDEFROMTOP_],[1],[with ExtrudeFromTopcapability]) 330 fi 602 603 fi 604 331 605 AM_CONDITIONAL([EXTRUDEFROMTOP], [test x$HAVE_EXTRUDEFROMTOP = xyes]) 606 332 607 AC_MSG_RESULT($HAVE_EXTRUDEFROMTOP) 608 333 609 dnl }}} 334 610 dnl with-DepthAverage{{{ 611 335 612 AC_ARG_WITH([DepthAverage], 613 336 614 AS_HELP_STRING([--with-DepthAverage = YES], [compile with DepthAverage capabilities (default is yes)]), 615 337 616 [DEPTHAVERAGE=$withval],[DEPTHAVERAGE=yes]) 617 338 618 AC_MSG_CHECKING(for DepthAverage capability compilation) 339 619 620 340 621 HAVE_DEPTHAVERAGE=no 622 341 623 if test "x$DEPTHAVERAGE" = "xyes"; then 624 342 625 HAVE_DEPTHAVERAGE=yes 626 343 627 AC_DEFINE([_HAVE_DEPTHAVERAGE_],[1],[with DepthAveragecapability]) 344 fi 628 629 fi 630 345 631 AM_CONDITIONAL([DEPTHAVERAGE], [test x$HAVE_DEPTHAVERAGE = xyes]) 632 346 633 AC_MSG_RESULT($HAVE_DEPTHAVERAGE) 634 347 635 dnl }}} 348 636 dnl with-SmoothedSurfaceSlopeX{{{ 637 349 638 AC_ARG_WITH([SmoothedSurfaceSlopeX], 639 350 640 AS_HELP_STRING([--with-SmoothedSurfaceSlopeX = YES], [compile with SmoothedSurfaceSlopeX capabilities (default is yes)]), 641 351 642 [SMOOTHEDSURFACESLOPEX=$withval],[SMOOTHEDSURFACESLOPEX=yes]) 643 352 644 AC_MSG_CHECKING(for SmoothedSurfaceSlopeX capability compilation) 353 645 646 354 647 HAVE_SMOOTHEDSURFACESLOPEX=no 648 355 649 if test "x$SMOOTHEDSURFACESLOPEX" = "xyes"; then 650 356 651 HAVE_SMOOTHEDSURFACESLOPEX=yes 652 357 653 AC_DEFINE([_HAVE_SMOOTHEDSURFACESLOPEX_],[1],[with SmoothedSurfaceSlopeXcapability]) 358 fi 654 655 fi 656 359 657 AM_CONDITIONAL([SMOOTHEDSURFACESLOPEX], [test x$HAVE_SMOOTHEDSURFACESLOPEX = xyes]) 658 360 659 AC_MSG_RESULT($HAVE_SMOOTHEDSURFACESLOPEX) 660 361 661 dnl }}} 362 662 dnl with-SmoothedSurfaceSlopeY{{{ 663 363 664 AC_ARG_WITH([SmoothedSurfaceSlopeY], 665 364 666 AS_HELP_STRING([--with-SmoothedSurfaceSlopeY = YES], [compile with SmoothedSurfaceSlopeY capabilities (default is yes)]), 667 365 668 [SMOOTHEDSURFACESLOPEY=$withval],[SMOOTHEDSURFACESLOPEY=yes]) 669 366 670 AC_MSG_CHECKING(for SmoothedSurfaceSlopeY capability compilation) 367 671 672 368 673 HAVE_SMOOTHEDSURFACESLOPEY=no 674 369 675 if test "x$SMOOTHEDSURFACESLOPEY" = "xyes"; then 676 370 677 HAVE_SMOOTHEDSURFACESLOPEY=yes 678 371 679 AC_DEFINE([_HAVE_SMOOTHEDSURFACESLOPEY_],[1],[with SmoothedSurfaceSlopeYcapability]) 372 fi 680 681 fi 682 373 683 AM_CONDITIONAL([SMOOTHEDSURFACESLOPEY], [test x$HAVE_SMOOTHEDSURFACESLOPEY = xyes]) 684 374 685 AC_MSG_RESULT($HAVE_SMOOTHEDSURFACESLOPEY) 686 687 dnl }}} 688 dnl with-Thermal{{{ 689 690 AC_ARG_WITH([Thermal], 691 692 AS_HELP_STRING([--with-Thermal = YES], [compile with Thermal capabilities (default is yes)]), 693 694 [THERMAL=$withval],[THERMAL=yes]) 695 696 AC_MSG_CHECKING(for Thermal capability compilation) 697 698 699 HAVE_THERMAL=no 700 701 if test "x$THERMAL" = "xyes"; then 702 703 HAVE_THERMAL=yes 704 705 AC_DEFINE([_HAVE_THERMAL_],[1],[with Thermalcapability]) 706 707 fi 708 709 AM_CONDITIONAL([THERMAL], [test x$HAVE_THERMAL = xyes]) 710 711 AC_MSG_RESULT($HAVE_THERMAL) 712 375 713 dnl }}} 376 714 dnl with-UzawaPressure{{{ 715 377 716 AC_ARG_WITH([UzawaPressure], 717 378 718 AS_HELP_STRING([--with-UzawaPressure = YES], [compile with UzawaPressure capabilities (default is yes)]), 719 379 720 [UZAWAPRESSURE=$withval],[UZAWAPRESSURE=yes]) 721 380 722 AC_MSG_CHECKING(for UzawaPressure capability compilation) 381 723 724 382 725 HAVE_UZAWAPRESSURE=no 726 383 727 if test "x$UZAWAPRESSURE" = "xyes"; then 728 384 729 HAVE_UZAWAPRESSURE=yes 730 385 731 AC_DEFINE([_HAVE_UZAWAPRESSURE_],[1],[with UzawaPressurecapability]) 386 fi 732 733 fi 734 387 735 AM_CONDITIONAL([UZAWAPRESSURE], [test x$HAVE_UZAWAPRESSURE = xyes]) 736 388 737 AC_MSG_RESULT($HAVE_UZAWAPRESSURE) 389 dnl }}} 390 dnl with-Thermal{{{ 391 AC_ARG_WITH([Thermal], 392 AS_HELP_STRING([--with-Thermal = YES], [compile with Thermal capabilities (default is yes)]), 393 [THERMAL=$withval],[THERMAL=yes]) 394 AC_MSG_CHECKING(for Thermal capability compilation) 395 396 HAVE_THERMAL=no 397 if test "x$THERMAL" = "xyes"; then 398 HAVE_THERMAL=yes 399 AC_DEFINE([_HAVE_THERMAL_],[1],[with Thermalcapability]) 400 fi 401 AM_CONDITIONAL([THERMAL], [test x$HAVE_THERMAL = xyes]) 402 AC_MSG_RESULT($HAVE_THERMAL) 738 403 739 dnl }}} 404 740 dnl with-Gia{{{ 741 405 742 AC_ARG_WITH([Gia], 743 406 744 AS_HELP_STRING([--with-Gia = YES], [compile with Gia capabilities (default is yes)]), 745 407 746 [GIA=$withval],[GIA=yes]) 747 408 748 AC_MSG_CHECKING(for Gia capability compilation) 409 749 750 410 751 HAVE_GIA=no 752 411 753 if test "x$GIA" = "xyes"; then 754 412 755 HAVE_GIA=yes 756 413 757 AC_DEFINE([_HAVE_GIA_],[1],[with Giacapability]) 414 fi 758 759 fi 760 415 761 AM_CONDITIONAL([GIA], [test x$HAVE_GIA = xyes]) 762 416 763 AC_MSG_RESULT($HAVE_GIA) 764 765 dnl }}} 766 dnl with-Seaice{{{ 767 768 AC_ARG_WITH([Seaice], 769 770 AS_HELP_STRING([--with-Seaice = YES], [compile with Seaice capabilities (default is yes)]), 771 772 [SEAICE=$withval],[SEAICE=yes]) 773 774 AC_MSG_CHECKING(for Seaice capability compilation) 775 776 777 HAVE_SEAICE=no 778 779 if test "x$SEAICE" = "xyes"; then 780 781 HAVE_SEAICE=yes 782 783 AC_DEFINE([_HAVE_SEAICE_],[1],[with Seaicecapability]) 784 785 fi 786 787 AM_CONDITIONAL([SEAICE], [test x$HAVE_SEAICE = xyes]) 788 789 AC_MSG_RESULT($HAVE_SEAICE) 790 417 791 dnl }}} 418 792 dnl with-Meshdeformation{{{ 793 419 794 AC_ARG_WITH([Meshdeformation], 795 420 796 AS_HELP_STRING([--with-Meshdeformation = YES], [compile with Meshdeformation capabilities (default is yes)]), 797 421 798 [MESHDEFORMATION=$withval],[MESHDEFORMATION=yes]) 799 422 800 AC_MSG_CHECKING(for Meshdeformation capability compilation) 423 801 802 424 803 HAVE_MESHDEFORMATION=no 804 425 805 if test "x$MESHDEFORMATION" = "xyes"; then 806 426 807 HAVE_MESHDEFORMATION=yes 808 427 809 AC_DEFINE([_HAVE_MESHDEFORMATION_],[1],[with Meshdeformationcapability]) 428 fi 810 811 fi 812 429 813 AM_CONDITIONAL([MESHDEFORMATION], [test x$HAVE_MESHDEFORMATION = xyes]) 814 430 815 AC_MSG_RESULT($HAVE_MESHDEFORMATION) 816 431 817 dnl }}} 432 818 dnl with-Levelset{{{ 819 433 820 AC_ARG_WITH([Levelset], 821 434 822 AS_HELP_STRING([--with-Levelset = YES], [compile with Levelset capabilities (default is yes)]), 823 435 824 [LEVELSET=$withval],[LEVELSET=yes]) 825 436 826 AC_MSG_CHECKING(for Levelset capability compilation) 437 827 828 438 829 HAVE_LEVELSET=no 830 439 831 if test "x$LEVELSET" = "xyes"; then 832 440 833 HAVE_LEVELSET=yes 834 441 835 AC_DEFINE([_HAVE_LEVELSET_],[1],[with Levelsetcapability]) 442 fi 836 837 fi 838 443 839 AM_CONDITIONAL([LEVELSET], [test x$HAVE_LEVELSET = xyes]) 840 444 841 AC_MSG_RESULT($HAVE_LEVELSET) 842 445 843 dnl }}} 446 844 dnl with-Extrapolation{{{ 845 447 846 AC_ARG_WITH([Extrapolation], 847 448 848 AS_HELP_STRING([--with-Extrapolation = YES], [compile with Extrapolation capabilities (default is yes)]), 849 449 850 [EXTRAPOLATION=$withval],[EXTRAPOLATION=yes]) 851 450 852 AC_MSG_CHECKING(for Extrapolation capability compilation) 451 853 854 452 855 HAVE_EXTRAPOLATION=no 856 453 857 if test "x$EXTRAPOLATION" = "xyes"; then 858 454 859 HAVE_EXTRAPOLATION=yes 860 455 861 AC_DEFINE([_HAVE_EXTRAPOLATION_],[1],[with Extrapolationcapability]) 456 fi 862 863 fi 864 457 865 AM_CONDITIONAL([EXTRAPOLATION], [test x$HAVE_EXTRAPOLATION = xyes]) 866 458 867 AC_MSG_RESULT($HAVE_EXTRAPOLATION) 868 459 869 dnl }}} 460 870 dnl with-LsfReinitialization{{{ 871 461 872 AC_ARG_WITH([LsfReinitialization], 873 462 874 AS_HELP_STRING([--with-LsfReinitialization = YES], [compile with LsfReinitialization capabilities (default is yes)]), 875 463 876 [LSFREINITIALIZATION=$withval],[LSFREINITIALIZATION=yes]) 877 464 878 AC_MSG_CHECKING(for LsfReinitialization capability compilation) 465 879 880 466 881 HAVE_LSFREINITIALIZATION=no 882 467 883 if test "x$LSFREINITIALIZATION" = "xyes"; then 884 468 885 HAVE_LSFREINITIALIZATION=yes 886 469 887 AC_DEFINE([_HAVE_LSFREINITIALIZATION_],[1],[with LsfReinitializationcapability]) 470 fi 888 889 fi 890 471 891 AM_CONDITIONAL([LSFREINITIALIZATION], [test x$HAVE_LSFREINITIALIZATION = xyes]) 892 472 893 AC_MSG_RESULT($HAVE_LSFREINITIALIZATION) 894 473 895 dnl }}} 474 896 -
issm/trunk-jpl/src/c/Makefile.am
r18370 r18492 108 108 ./classes/Materials/Matice.h\ 109 109 ./classes/Materials/Matice.cpp\ 110 ./classes/Materials/Matseaice.h\ 111 ./classes/Materials/Matseaice.cpp\ 110 112 ./classes/Materials/Matpar.h\ 111 113 ./classes/Materials/Matpar.cpp\ … … 649 651 issm_sources += ./analyses/DepthAverageAnalysis.cpp 650 652 endif 653 if SEAICE 654 issm_sources += ./cores/seaice_core.cpp 655 issm_sources += ./analyses/SeaiceAnalysis.cpp 656 endif 651 657 if THERMAL 652 658 issm_sources += ./analyses/ThermalAnalysis.cpp -
issm/trunk-jpl/src/c/analyses/EnumToAnalysis.cpp
r18179 r18492 101 101 case GiaAnalysisEnum : return new GiaAnalysis(); 102 102 #endif 103 #ifdef _HAVE_SEAICE_ 104 case SeaiceAnalysisEnum : return new SeaiceAnalysis(); 105 #endif 103 106 #ifdef _HAVE_MESHDEFORMATION_ 104 107 case MeshdeformationAnalysisEnum : return new MeshdeformationAnalysis(); -
issm/trunk-jpl/src/c/analyses/analyses.h
r18179 r18492 34 34 #include "./SmoothedSurfaceSlopeXAnalysis.h" 35 35 #include "./SmoothedSurfaceSlopeYAnalysis.h" 36 #include "./SeaiceAnalysis.h" 36 37 #include "./StressbalanceAnalysis.h" 37 38 #include "./StressbalanceSIAAnalysis.h" -
issm/trunk-jpl/src/c/bamg/Mesh.cpp
r18488 r18492 242 242 else if (Gh.NbRef==0) delete &Gh; 243 243 } 244 if(&BTh && (&BTh != this) ){244 if(&BTh && (&BTh != this) && false){ 245 245 if (BTh.NbRef>0) BTh.NbRef--; 246 246 else if (BTh.NbRef==0) delete &BTh; … … 4505 4505 int verbose=bamgopts->verbose; 4506 4506 4507 Gh.NbRef++;// add a ref to Gh 4508 4509 /************************************************************************* 4510 * method in 2 steps 4511 * 1 - compute the number of new edges to allocate 4512 * 2 - construct the edges 4513 * remark: 4514 * in this part we suppose to have a background mesh with the same geometry 4515 * 4516 * To construct the discretization of the new mesh we have to 4517 * rediscretize the boundary of background Mesh 4518 * because we have only the pointeur from the background mesh to the geometry. 4519 * We need the abcisse of the background mesh vertices on geometry 4520 * so a vertex is 4521 * 0 on GeomVertex ; 4522 * 1 on GeomEdge + abcisse 4523 * 2 internal 4524 *************************************************************************/ 4525 4526 //Check that background mesh and current mesh do have the same geometry 4527 _assert_(&BTh.Gh==&Gh); 4528 BTh.NbRef++; // add a ref to BackGround Mesh 4529 4530 //Initialize new mesh 4531 BTh.SetVertexFieldOn(); 4532 int* bcurve = new int[Gh.nbcurves]; // 4533 4534 /* There are 2 ways to make the loop 4535 * 1) on the geometry 4536 * 2) on the background mesh 4537 * if you do the loop on geometry, we don't have the pointeur on background, 4538 * and if you do the loop in background we have the pointeur on geometry 4539 * so do the walk on background */ 4540 4541 NbVerticesOnGeomVertex=0; 4542 NbVerticesOnGeomEdge=0; 4543 4544 /*STEP 1 copy of Required vertices*/ 4545 4546 int i; 4547 for (i=0;i<Gh.nbv;i++) if (Gh[i].Required()) NbVerticesOnGeomVertex++; 4548 printf("\n"); 4549 if(NbVerticesOnGeomVertex >= maxnbv){ 4550 _error_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv); 4551 } 4552 4553 VerticesOnGeomVertex = new VertexOnGeom[ NbVerticesOnGeomVertex]; 4554 VertexOnBThVertex = new VertexOnVertex[NbVerticesOnGeomVertex]; 4555 4556 //At this point there is NO vertex but vertices should have been allocated by Init 4557 _assert_(vertices); 4507 /*Intermediaries*/ 4508 int i,k; 4509 int nbcurves = 0; 4510 int NbNewPoints,NbEdgeCurve; 4511 double lcurve,lstep,s; 4512 const int MaxSubEdge = 10; 4513 4514 R2 AB; 4515 GeomVertex *a, *b; 4516 BamgVertex *va,*vb; 4517 GeomEdge *e; 4518 4519 // add a ref to GH to make sure that it is not destroyed by mistake 4520 Gh.NbRef++; 4521 4522 //build background mesh flag (1 if background, else 0) 4523 bool background=(&BTh != this); 4524 4525 /*Build VerticesOnGeomVertex*/ 4526 4527 //Compute the number of geometrical vertices that we are going to use to mesh 4558 4528 for (i=0;i<Gh.nbv;i++){ 4559 if (Gh[i].Required()) {//Gh vertices Required 4560 vertices[nbv] =Gh[i]; 4561 vertices[nbv].i=I2(0,0); 4562 Gh[i].MeshVertexHook = vertices + nbv;// save Geom -> Th 4563 VerticesOnGeomVertex[nbv]= VertexOnGeom(vertices[nbv],Gh[i]); 4529 if (Gh[i].Required()) NbVerticesOnGeomVertex++; 4530 } 4531 //allocate 4532 VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex]; 4533 if(NbVerticesOnGeomVertex >= maxnbv) _error_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv); 4534 _assert_(nbv==0); 4535 //Build VerticesOnGeomVertex 4536 for (i=0;i<Gh.nbv;i++){ 4537 /* Add vertex only if required*/ 4538 if (Gh[i].Required()) {//Gh vertices Required 4539 4540 //Add the vertex 4541 _assert_(nbv<maxnbv); 4542 vertices[nbv]=Gh[i]; 4543 4544 //Add pointer from geometry (Gh) to vertex from mesh (Th) 4545 Gh[i].MeshVertexHook=vertices+nbv; 4546 4547 //Build VerticesOnGeomVertex for current point 4548 VerticesOnGeomVertex[nbv]=VertexOnGeom(*Gh[i].MeshVertexHook,Gh[i]); 4549 4550 //nbv increment 4564 4551 nbv++; 4565 4552 } 4566 else Gh[i].MeshVertexHook=0; 4567 } 4568 for (i=0;i<BTh.NbVerticesOnGeomVertex;i++){ 4569 VertexOnGeom &vog=BTh.VerticesOnGeomVertex[i]; 4570 if (vog.IsRequiredVertex()){ 4571 GeomVertex* gv=vog; 4572 BamgVertex *bv = vog; 4573 _assert_(gv->MeshVertexHook); // use of Geom -> Th 4574 VertexOnBThVertex[NbVertexOnBThVertex++]=VertexOnVertex(gv->MeshVertexHook,bv); 4575 gv->MeshVertexHook->m = bv->m; // for taking the metric of the background mesh 4576 } 4577 } 4578 _assert_(NbVertexOnBThVertex==NbVerticesOnGeomVertex); /*This might be due to MaxCornerAngle too small*/ 4579 4580 /*STEP 2: reseed boundary edges*/ 4581 4582 // find the begining of the curve in BTh 4583 Gh.UnMarkEdges(); 4584 int bfind=0; 4585 for (int i=0;i<Gh.nbcurves;i++) bcurve[i]=-1; 4586 4587 /*Loop over the backgrounf mesh BTh edges*/ 4588 for (int iedge=0;iedge<BTh.nbe;iedge++){ 4589 Edge &ei = BTh.edges[iedge]; 4590 4591 /*Loop over the 2 vertices of the current edge*/ 4592 for(int je=0;je<2;je++){ 4593 4594 /* If one of the vertex is required we are in a new curve*/ 4595 if (ei[je].GeomEdgeHook->IsRequiredVertex()){ 4596 4597 /*Get curve number*/ 4598 int nc=ei.GeomEdgeHook->CurveNumber; 4599 4600 //_printf_("Dealing with curve number " << nc << "\n"); 4601 //_printf_("edge on geometry is same as GhCurve? " << (ei.GeomEdgeHook==Gh.curves[nc].FirstEdge || ei.GeomEdgeHook==Gh.curves[nc].LastEdge)?"yes":"no\n"); 4602 //if(ei.GeomEdgeHook==Gh.curves[nc].FirstEdge || ei.GeomEdgeHook==Gh.curves[nc].LastEdge){ 4603 // _printf_("Do we have the right extremity? curve first vertex -> " << ((GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].FirstEdge)[Gh.curves[nc].FirstVertexIndex])?"yes":"no\n"); 4604 // _printf_("Do we have the right extremity? curve last vertex -> " << ((GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].LastEdge)[Gh.curves[nc].LastVertexIndex])?"yes":"no\n"); 4605 //} 4606 //BUG FIX from original bamg 4607 /*Check that we are on the same edge and right vertex (0 or 1) */ 4608 if(ei.GeomEdgeHook==Gh.curves[nc].FirstEdge && (GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].FirstEdge)[Gh.curves[nc].FirstVertexIndex]){ 4609 bcurve[nc]=iedge*2+je; 4610 bfind++; 4611 } 4612 else if ((ei.GeomEdgeHook==Gh.curves[nc].LastEdge && (GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].LastEdge)[Gh.curves[nc].LastVertexIndex]) && bcurve[nc]==-1){ 4613 bcurve[nc]=iedge*2+je; 4614 bfind++; 4615 } 4616 } 4617 } 4618 } 4619 if (bfind!=Gh.nbcurves){ 4620 delete [] bcurve; 4621 _error_("problem generating number of curves (" << Gh.nbcurves << " found in the geometry but " << bfind << " curve found in the mesh)"); 4622 } 4623 4624 // method in 2 + 1 step 4625 // 0.0) compute the length and the number of vertex to do allocation 4626 // 1.0) recompute the length 4627 // 1.1) compute the vertex 4628 4629 long nbex=0,NbVerticesOnGeomEdgex=0; 4630 for (int step=0; step <2;step++){ 4631 4632 long NbOfNewPoints=0; 4633 long NbOfNewEdge=0; 4634 long iedge; 4553 } 4554 4555 /*Build VerticesOnGeomEdge*/ 4556 4557 //check that edges is still empty (Init) 4558 _assert_(!edges); 4559 4560 /* Now we are going to create the first edges corresponding 4561 * to the one present in the geometry provided. 4562 * We proceed in 2 steps 4563 * -step 0: we count all the edges 4564 * we allocate the number of edges at the end of step 0 4565 * -step 1: the edges are created */ 4566 for (int step=0;step<2;step++){ 4567 4568 //initialize number of edges and number of edges max 4569 long nbex=0; 4570 nbe=0; 4571 long NbVerticesOnGeomEdge0=NbVerticesOnGeomEdge; 4635 4572 Gh.UnMarkEdges(); 4636 double L=0; 4637 4638 /*Go through all geometrical curve*/ 4639 for (int icurve=0;icurve<Gh.nbcurves;icurve++){ 4640 4641 /*Get edge and vertex (index) of background mesh on this curve*/ 4642 iedge=bcurve[icurve]/2; 4643 int jedge=bcurve[icurve]%2; 4644 4645 /*Get edge of Bth with index iedge*/ 4646 Edge &ei = BTh.edges[iedge]; 4647 4648 /*Initialize variables*/ 4649 double Lstep=0; // step between two points (phase==1) 4650 long NbCreatePointOnCurve=0;// Nb of new points on curve (phase==1) 4651 4652 /*Do phase 0 to step*/ 4653 for(int phase=0;phase<=step;phase++){ 4654 4655 /*Current curve pointer*/ 4656 Curve *curve= Gh.curves+icurve; 4657 4658 /*Get index of current curve*/ 4659 int icurveequi= Gh.GetId(curve); 4660 4661 /*For phase 0, check that we are at the begining of the curve only*/ 4662 if(phase==0 && icurveequi!=icurve) continue; 4663 4664 int k0=jedge,k1; 4665 Edge* pe= BTh.edges+iedge; 4666 int iedgeequi=bcurve[icurveequi]/2; 4667 int jedgeequi=bcurve[icurveequi]%2; 4668 4669 int k0equi=jedgeequi,k1equi; 4670 Edge * peequi= BTh.edges+iedgeequi; 4671 GeomEdge *ongequi = peequi->GeomEdgeHook; 4672 4673 double sNew=Lstep;// abscisse of the new points (phase==1) 4674 L=0;// length of the curve 4675 long i=0;// index of new points on the curve 4676 GeomVertex * GA0 = *(*peequi)[k0equi].GeomEdgeHook; 4677 BamgVertex *A0; 4678 A0 = GA0->MeshVertexHook; // the vertex in new mesh 4679 BamgVertex *A1; 4680 VertexOnGeom *GA1; 4681 Edge* PreviousNewEdge = 0; 4682 4683 // New Curve phase 4684 _assert_(A0-vertices>=0 && A0-vertices<nbv); 4685 if(ongequi->Required()){ 4686 GeomVertex *GA1 = *(*peequi)[1-k0equi].GeomEdgeHook; 4687 A1 = GA1->MeshVertexHook; // 4688 } 4689 else { 4690 for(;;){ 4691 Edge &ee=*pe; 4692 Edge &eeequi=*peequi; 4693 k1 = 1-k0; // next vertex of the edge 4694 k1equi= 1 - k0equi; 4695 _assert_(pe && ee.GeomEdgeHook); 4696 ee.GeomEdgeHook->SetMark(); 4697 BamgVertex & v0=ee[0], & v1=ee[1]; 4698 R2 AB=(R2)v1-(R2)v0; 4699 double L0=L,LAB; 4700 LAB=LengthInterpole(v0.m,v1.m,AB); 4701 L+= LAB; 4702 4703 if (phase){ 4704 // computation of the new points for the given curve 4705 while ((i!=NbCreatePointOnCurve) && sNew<=L) { 4706 4707 //some checks 4708 _assert_(sNew>=L0); 4709 _assert_(LAB); 4710 _assert_(vertices && nbv<maxnbv); 4711 _assert_(edges && nbe<nbex); 4712 _assert_(VerticesOnGeomEdge && NbVerticesOnGeomEdge<NbVerticesOnGeomEdgex); 4713 4714 // new vertex on edge 4715 A1=vertices+nbv++; 4716 GA1=VerticesOnGeomEdge+NbVerticesOnGeomEdge; 4717 Edge* e = edges + nbe++; 4718 double se= (sNew-L0)/LAB; 4719 if (se<0 || se>=1.000000001){ 4720 _error_("Problem creating point on a boundary: se=" << se << " should be in [0 1]"); 4721 } 4722 se = abscisseInterpole(v0.m,v1.m,AB,se,1); 4723 if (se<0 || se>1){ 4724 _error_("Problem creating point on a boundary: se=" << se << " should be in [0 1]"); 4725 } 4726 se = k1 ? se : 1. - se; 4727 se = k1==k1equi ? se : 1. - se; 4728 VertexOnBThEdge[NbVerticesOnGeomEdge++] = VertexOnEdge(A1,&eeequi,se); // save 4729 ongequi=Gh.ProjectOnCurve(eeequi,se,*A1,*GA1); 4730 A1->ReferenceNumber = eeequi.ReferenceNumber; 4731 A1->DirOfSearch =NoDirOfSearch; 4732 e->GeomEdgeHook = ongequi; 4733 e->v[0]=A0; 4734 e->v[1]=A1; 4735 e->ReferenceNumber = eeequi.ReferenceNumber; 4736 e->adj[0]=PreviousNewEdge; 4737 4738 if (PreviousNewEdge) PreviousNewEdge->adj[1]=e; 4739 PreviousNewEdge=e; 4740 A0=A1; 4741 sNew += Lstep; 4742 if (++i== NbCreatePointOnCurve) break; 4573 nbcurves=0; 4574 4575 //go through the edges of the geometry 4576 for (i=0;i<Gh.nbe;i++){ 4577 4578 //ei = current Geometrical edge 4579 GeomEdge &ei=Gh.edges[i]; 4580 4581 //loop over the two vertices of the edge ei 4582 for(int j=0;j<2;j++) { 4583 4584 /*Take only required vertices (corner->beginning of a new curve)*/ 4585 if (!ei.Mark() && ei[j].Required()){ 4586 4587 long nbvend=0; 4588 Edge* PreviousNewEdge=NULL; 4589 lstep = -1; 4590 4591 /*If Edge is required (do that only once for the 2 vertices)*/ 4592 if(ei.Required()){ 4593 if (j==0){ 4594 //do not create internal points if required (take it as is) 4595 if(step==0) nbe++; 4596 else{ 4597 e=&ei; 4598 a=ei(0); 4599 b=ei(1); 4600 4601 //check that edges has been allocated 4602 _assert_(edges); 4603 edges[nbe].v[0]=a->MeshVertexHook; 4604 edges[nbe].v[1]=b->MeshVertexHook;; 4605 edges[nbe].ReferenceNumber = e->ReferenceNumber; 4606 edges[nbe].GeomEdgeHook = e; 4607 edges[nbe].adj[0] = 0; 4608 edges[nbe].adj[1] = 0; 4609 nbe++; 4743 4610 } 4744 4611 } 4745 4746 //some checks 4747 _assert_(ee.GeomEdgeHook->CurveNumber==ei.GeomEdgeHook->CurveNumber); 4748 if (ee[k1].GeomEdgeHook->IsRequiredVertex()) { 4749 _assert_(eeequi[k1equi].GeomEdgeHook->IsRequiredVertex()); 4750 GeomVertex * GA1 = *eeequi[k1equi].GeomEdgeHook; 4751 A1=GA1->MeshVertexHook;// the vertex in new mesh 4752 _assert_(A1-vertices>=0 && A1-vertices<nbv); 4753 break; 4612 } 4613 4614 /*If Edge is not required: we are on a curve*/ 4615 else { 4616 for (int kstep=0;kstep<=step;kstep++){ 4617 //kstep=0, compute number of edges (discretize curve) 4618 //kstep=1 create the points and edge 4619 PreviousNewEdge=0; 4620 NbNewPoints=0; 4621 NbEdgeCurve=0; 4622 if (nbvend>=maxnbv) _error_("maximum number of vertices too low! Check the domain outline or increase maxnbv"); 4623 lcurve =0; 4624 s = lstep; //-1 initially, then length of each sub edge 4625 4626 /*reminder: i = edge number, j=[0;1] vertex index in edge*/ 4627 k=j; // k = vertex index in edge (0 or 1) 4628 e=&ei; // e = reference of current edge 4629 a=ei(k); // a = pointer toward the kth vertex of the current edge 4630 va = a->MeshVertexHook; // va = pointer toward mesh vertex associated 4631 e->SetMark(); // Mark edge 4632 4633 /*Loop until we reach the end of the curve*/ 4634 for(;;){ 4635 k = 1-k; // other vertx index of the curve 4636 b = (*e)(k); // b = pointer toward the other vertex of the current edge 4637 AB= b->r - a->r; // AB = vector of the current edge 4638 Metric MA = background ? BTh.MetricAt(a->r) :a->m ; //Get metric associated to A 4639 Metric MB = background ? BTh.MetricAt(b->r) :b->m ; //Get metric associated to B 4640 double ledge = (MA(AB) + MB(AB))/2; //Get edge length in metric 4641 4642 /* We are now creating the mesh edges from the geometrical edge selected above. 4643 * The edge will be divided according to the metric previously computed and cannot 4644 * be divided more than 10 times (MaxSubEdge). */ 4645 4646 //By default, there is only one subedge that is the geometrical edge itself 4647 int NbSubEdge = 1; 4648 4649 //initialize lSubEdge, holding the length of each subedge (cannot be higher than 10) 4650 double lSubEdge[MaxSubEdge]; 4651 4652 //Build Subedges according to the edge length 4653 if (ledge < 1.5){ 4654 //if ledge < 1.5 (between one and 2), take the edge as is 4655 lSubEdge[0] = ledge; 4656 } 4657 //else, divide the edge 4658 else { 4659 //compute number of subedges (division of the edge), Maximum is 10 4660 NbSubEdge = Min( MaxSubEdge, (int) (ledge +0.5)); 4661 /*Now, we are going to divide the edge according to the metric. 4662 * Get segment by sement along the edge. 4663 * Build lSubEdge, which holds the distance between the first vertex 4664 * of the edge and the next point on the edge according to the 4665 * discretization (each SubEdge is AB)*/ 4666 R2 A,B; 4667 A=a->r; 4668 Metric MAs=MA,MBs; 4669 ledge=0; 4670 double x =0, xstep= 1./NbSubEdge; 4671 for (int kk=0; kk < NbSubEdge; kk++,A=B,MAs=MBs ) { 4672 x += xstep; 4673 B = e->F(k ? x : 1-x); 4674 MBs= background ? BTh.MetricAt(B) : Metric(1-x,MA,x,MB); 4675 AB = A-B; 4676 lSubEdge[kk]=(ledge+=(MAs(AB)+MBs(AB))/2); 4677 } 4678 } 4679 4680 double lcurveb = lcurve+ledge; 4681 4682 /*Now, create corresponding points*/ 4683 while(s>=lcurve && s<=lcurveb && nbv<nbvend){ 4684 4685 /*Schematic of current curve 4686 * 4687 * a vb b // vertex 4688 * 0 ll0 ll1 ledge // length from a 4689 * + --- + - ... - + --S-- + --- + - ... - + // where is S 4690 * 0 kk0 kk1 NbSubEdge // Sub edge index 4691 * 4692 */ 4693 4694 double ss = s-lcurve; 4695 4696 /*Find the SubEdge containing ss using Dichotomy*/ 4697 int kk0=-1,kk1=NbSubEdge-1,kkk; 4698 double ll0=0,ll1=ledge,llk; 4699 while (kk1-kk0>1){ 4700 if (ss < (llk=lSubEdge[kkk=(kk0+kk1)/2])) 4701 kk1=kkk,ll1=llk; 4702 else 4703 kk0=kkk,ll0=llk; 4704 } 4705 _assert_(kk1!=kk0); 4706 4707 /*Curvilinear coordinate in [0 1] of ss in current edge*/ 4708 // WARNING: This is what we would do 4709 // ssa = (ss-ll0)/(ll1-ll0); 4710 // aa = (kk0+ssa)/NbSubEdge 4711 // This is what Bamg does: 4712 double sbb = (ss-ll0)/(ll1-ll0); 4713 /*Curvilinear coordinate in [0 1] of ss in current curve*/ 4714 double bb = (kk1+sbb)/NbSubEdge; 4715 double aa = 1-bb; 4716 4717 // new vertex on edge 4718 vb = &vertices[nbv++]; 4719 vb->m = Metric(aa,a->m,bb,b->m); 4720 vb->ReferenceNumber = e->ReferenceNumber; 4721 vb->DirOfSearch =NoDirOfSearch; 4722 double abcisse = k ? bb : aa; 4723 vb->r = e->F(abcisse); 4724 VerticesOnGeomEdge[NbVerticesOnGeomEdge++]= VertexOnGeom(*vb,*e,abcisse); 4725 4726 // to take into account the direction of the edge 4727 s += lstep; 4728 edges[nbe].v[0]=va; 4729 edges[nbe].v[1]=vb; 4730 edges[nbe].ReferenceNumber =e->ReferenceNumber; 4731 edges[nbe].GeomEdgeHook = e; 4732 edges[nbe].adj[0] = PreviousNewEdge; 4733 if(PreviousNewEdge) PreviousNewEdge->adj[1]=&edges[nbe]; 4734 PreviousNewEdge=edges+nbe; 4735 nbe++; 4736 va = vb; 4737 } 4738 4739 /*We just added one edge to the curve: Go to the next one*/ 4740 lcurve = lcurveb; 4741 e->SetMark(); 4742 a=b; 4743 4744 /*If b is required, we are on a new curve->break*/ 4745 if (b->Required()) break; 4746 int kprev=k; 4747 k = e->AdjVertexIndex[kprev];// next vertices 4748 e = e->Adj[kprev]; 4749 _assert_(e); 4750 }// for(;;) 4751 vb = b->MeshVertexHook; 4752 4753 /*Number of edges in the last disretized curve*/ 4754 NbEdgeCurve = Max((long) (lcurve +0.5), (long) 1); 4755 /*Number of internal vertices in the last disretized curve*/ 4756 NbNewPoints = NbEdgeCurve-1; 4757 if(!kstep){ 4758 NbVerticesOnGeomEdge0 += NbNewPoints; 4759 nbcurves++; 4760 } 4761 nbvend=nbv+NbNewPoints; 4762 lstep = lcurve / NbEdgeCurve; //approximately one 4763 }// end of curve -- 4764 if (edges) { // last edges of the curves 4765 edges[nbe].v[0]=va; 4766 edges[nbe].v[1]=vb; 4767 edges[nbe].ReferenceNumber = e->ReferenceNumber; 4768 edges[nbe].GeomEdgeHook = e; 4769 edges[nbe].adj[0] = PreviousNewEdge; 4770 edges[nbe].adj[1] = 0; 4771 if(PreviousNewEdge) PreviousNewEdge->adj[1] = & edges[nbe]; 4772 nbe++; 4754 4773 } 4755 if (!ee.adj[k1]) { 4756 _error_("adj edge " << BTh.GetId(ee) << ", nbe=" << nbe << ", Gh.vertices=" << Gh.vertices); 4757 } 4758 pe = ee.adj[k1]; // next edge 4759 k0 = pe->Intersection(ee); 4760 peequi= eeequi.adj[k1equi]; // next edge 4761 k0equi=peequi->Intersection(eeequi); 4762 }// for(;;) end of the curve 4774 else nbe += NbEdgeCurve; 4775 } // end on curve --- 4763 4776 } 4764 4765 if (phase){ // construction of the last edge 4766 Edge* e=edges + nbe++; 4767 e->GeomEdgeHook = ongequi; 4768 e->v[0]=A0; 4769 e->v[1]=A1; 4770 e->ReferenceNumber = peequi->ReferenceNumber; 4771 e->adj[0]=PreviousNewEdge; 4772 e->adj[1]=0; 4773 if (PreviousNewEdge) PreviousNewEdge->adj[1]=e; 4774 PreviousNewEdge = e; 4775 4776 _assert_(i==NbCreatePointOnCurve); 4777 } 4778 4779 if (!phase) { // 4780 long NbSegOnCurve = Max((long)(L+0.5),(long) 1);// nb of seg 4781 Lstep = L/NbSegOnCurve; 4782 NbCreatePointOnCurve = NbSegOnCurve-1; 4783 NbOfNewEdge += NbSegOnCurve; 4784 NbOfNewPoints += NbCreatePointOnCurve; 4785 } 4786 } 4787 }// end of curve loop 4788 4789 //Allocate memory 4790 if(step==0){ 4791 if(nbv+NbOfNewPoints > maxnbv) { 4792 _error_("too many vertices on geometry: " << nbv+NbOfNewPoints << " >= " << maxnbv); 4793 } 4794 edges = new Edge[NbOfNewEdge]; 4795 nbex = NbOfNewEdge; 4796 if(NbOfNewPoints) { 4797 VerticesOnGeomEdge = new VertexOnGeom[NbOfNewPoints]; 4798 NbVertexOnBThEdge = NbOfNewPoints; 4799 VertexOnBThEdge = new VertexOnEdge[NbOfNewPoints]; 4800 NbVerticesOnGeomEdgex = NbOfNewPoints; 4801 } 4802 NbOfNewPoints =0; 4803 NbOfNewEdge = 0; 4804 } 4805 } 4806 _assert_(nbe!=0); 4807 delete [] bcurve; 4777 } 4778 } // for (i=0;i<nbe;i++) 4779 if(!step) { 4780 _assert_(!edges); 4781 _assert_(!VerticesOnGeomEdge); 4782 4783 edges = new Edge[nbex=nbe]; 4784 if(NbVerticesOnGeomEdge0) VerticesOnGeomEdge = new VertexOnGeom[NbVerticesOnGeomEdge0]; 4785 4786 // do the vertex on a geometrical vertex 4787 _assert_(VerticesOnGeomEdge || NbVerticesOnGeomEdge0==0); 4788 NbVerticesOnGeomEdge0 = NbVerticesOnGeomEdge; 4789 } 4790 else{ 4791 _assert_(NbVerticesOnGeomEdge==NbVerticesOnGeomEdge0); 4792 } 4793 } 4794 4808 4795 4809 4796 //Insert points inside existing triangles -
issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp
r18237 r18492 20 20 21 21 bool isefficientlayer; 22 int hydrology_model,smb_model ;22 int hydrology_model,smb_model,materials_type; 23 23 iomodel->Constant(&hydrology_model,HydrologyModelEnum); 24 24 iomodel->Constant(&smb_model,SurfaceforcingsEnum); 25 iomodel->Constant(&materials_type,MaterialsEnum); 25 26 26 27 this->mid = matpar_mid; 27 iomodel->Constant(&this->rho_ice,MaterialsRhoIceEnum); 28 iomodel->Constant(&this->rho_water,MaterialsRhoSeawaterEnum); 29 iomodel->Constant(&this->rho_freshwater,MaterialsRhoFreshwaterEnum); 30 iomodel->Constant(&this->mu_water,MaterialsMuWaterEnum); 31 iomodel->Constant(&this->heatcapacity,MaterialsHeatcapacityEnum); 32 iomodel->Constant(&this->thermalconductivity,MaterialsThermalconductivityEnum); 33 iomodel->Constant(&this->temperateiceconductivity,MaterialsTemperateiceconductivityEnum); 34 iomodel->Constant(&this->latentheat,MaterialsLatentheatEnum); 35 iomodel->Constant(&this->beta,MaterialsBetaEnum); 36 iomodel->Constant(&this->meltingpoint,MaterialsMeltingpointEnum); 37 iomodel->Constant(&this->referencetemperature,ConstantsReferencetemperatureEnum); 38 iomodel->Constant(&this->mixed_layer_capacity,MaterialsMixedLayerCapacityEnum); 39 iomodel->Constant(&this->thermal_exchange_velocity,MaterialsThermalExchangeVelocityEnum); 40 iomodel->Constant(&this->g,ConstantsGEnum); 41 42 switch(smb_model){ 43 case SMBEnum: 44 /*Nothing to add*/ 45 break; 46 case SMBpddEnum: 47 iomodel->Constant(&this->desfac,SurfaceforcingsDesfacEnum); 48 iomodel->Constant(&this->s0p,SurfaceforcingsS0pEnum); 49 break; 50 case SMBgradientsEnum: 51 /*Nothing to add*/ 52 break; 53 case SMBhenningEnum: 54 /*Nothing to add*/ 55 break; 56 case SMBcomponentsEnum: 57 /*Nothing to add*/ 58 break; 59 case SMBmeltcomponentsEnum: 60 /*Nothing to add*/ 28 29 switch(materials_type){ 30 case MaticeEnum: 31 iomodel->Constant(&this->rho_ice,MaterialsRhoIceEnum); 32 iomodel->Constant(&this->rho_water,MaterialsRhoSeawaterEnum); 33 iomodel->Constant(&this->rho_freshwater,MaterialsRhoFreshwaterEnum); 34 iomodel->Constant(&this->mu_water,MaterialsMuWaterEnum); 35 iomodel->Constant(&this->heatcapacity,MaterialsHeatcapacityEnum); 36 iomodel->Constant(&this->thermalconductivity,MaterialsThermalconductivityEnum); 37 iomodel->Constant(&this->temperateiceconductivity,MaterialsTemperateiceconductivityEnum); 38 iomodel->Constant(&this->latentheat,MaterialsLatentheatEnum); 39 iomodel->Constant(&this->beta,MaterialsBetaEnum); 40 iomodel->Constant(&this->meltingpoint,MaterialsMeltingpointEnum); 41 iomodel->Constant(&this->referencetemperature,ConstantsReferencetemperatureEnum); 42 iomodel->Constant(&this->mixed_layer_capacity,MaterialsMixedLayerCapacityEnum); 43 iomodel->Constant(&this->thermal_exchange_velocity,MaterialsThermalExchangeVelocityEnum); 44 iomodel->Constant(&this->g,ConstantsGEnum); 45 46 switch(smb_model){ 47 case SMBEnum: 48 /*Nothing to add*/ 49 break; 50 case SMBpddEnum: 51 iomodel->Constant(&this->desfac,SurfaceforcingsDesfacEnum); 52 iomodel->Constant(&this->s0p,SurfaceforcingsS0pEnum); 53 break; 54 case SMBgradientsEnum: 55 /*Nothing to add*/ 56 break; 57 case SMBhenningEnum: 58 /*Nothing to add*/ 59 break; 60 case SMBcomponentsEnum: 61 /*Nothing to add*/ 62 break; 63 case SMBmeltcomponentsEnum: 64 /*Nothing to add*/ 65 break; 66 default: 67 _error_("Surface mass balance model "<<EnumToStringx(smb_model)<<" not supported yet"); 68 } 69 if(hydrology_model==HydrologydcEnum){ 70 iomodel->Constant(&this->sediment_compressibility,HydrologydcSedimentCompressibilityEnum); 71 iomodel->Constant(&this->sediment_porosity,HydrologydcSedimentPorosityEnum); 72 iomodel->Constant(&this->sediment_thickness,HydrologydcSedimentThicknessEnum); 73 iomodel->Constant(&this->water_compressibility,HydrologydcWaterCompressibilityEnum); 74 iomodel->Constant(&isefficientlayer,HydrologydcIsefficientlayerEnum); 75 76 if(isefficientlayer){ 77 iomodel->Constant(&this->epl_compressibility,HydrologydcEplCompressibilityEnum); 78 iomodel->Constant(&this->epl_porosity,HydrologydcEplPorosityEnum); 79 iomodel->Constant(&this->epl_init_thickness,HydrologydcEplInitialThicknessEnum); 80 iomodel->Constant(&this->epl_max_thickness,HydrologydcEplMaxThicknessEnum); 81 iomodel->Constant(&this->epl_conductivity,HydrologydcEplConductivityEnum); 82 } 83 } 84 else if(hydrology_model==HydrologyshreveEnum){ 85 /*Nothing to add*/ 86 } 87 else{ 88 _error_("Hydrology model "<<EnumToStringx(hydrology_model)<<" not supported yet"); 89 } 90 91 /*gia: */ 92 iomodel->Constant(&this->lithosphere_shear_modulus,MaterialsLithosphereShearModulusEnum); 93 iomodel->Constant(&this->lithosphere_density,MaterialsLithosphereDensityEnum); 94 iomodel->Constant(&this->mantle_shear_modulus,MaterialsMantleShearModulusEnum); 95 iomodel->Constant(&this->mantle_density,MaterialsMantleDensityEnum); 96 break; 97 case MatseaiceEnum: 98 iomodel->Constant(&this->poisson,MaterialsPoissonEnum); 99 iomodel->Constant(&this->young_modulus,MaterialsYoungModulusEnum); 100 iomodel->Constant(&this->ridging_exponent,MaterialsRidgingExponentEnum); 101 iomodel->Constant(&this->cohesion,MaterialsCohesionEnum); 102 iomodel->Constant(&this->internal_friction_coef,MaterialsInternalFrictionCoefEnum); 103 iomodel->Constant(&this->compression_coef,MaterialsCompressionCoefEnum); 104 iomodel->Constant(&this->traction_coef,MaterialsTractionCoefEnum); 105 iomodel->Constant(&this->g,ConstantsGEnum); 61 106 break; 62 107 default: 63 _error_("Surface mass balance model "<<EnumToStringx(smb_model)<<" not supported yet"); 64 } 65 if(hydrology_model==HydrologydcEnum){ 66 iomodel->Constant(&this->sediment_compressibility,HydrologydcSedimentCompressibilityEnum); 67 iomodel->Constant(&this->sediment_porosity,HydrologydcSedimentPorosityEnum); 68 iomodel->Constant(&this->sediment_thickness,HydrologydcSedimentThicknessEnum); 69 iomodel->Constant(&this->water_compressibility,HydrologydcWaterCompressibilityEnum); 70 iomodel->Constant(&isefficientlayer,HydrologydcIsefficientlayerEnum); 71 72 if(isefficientlayer){ 73 iomodel->Constant(&this->epl_compressibility,HydrologydcEplCompressibilityEnum); 74 iomodel->Constant(&this->epl_porosity,HydrologydcEplPorosityEnum); 75 iomodel->Constant(&this->epl_init_thickness,HydrologydcEplInitialThicknessEnum); 76 iomodel->Constant(&this->epl_max_thickness,HydrologydcEplMaxThicknessEnum); 77 iomodel->Constant(&this->epl_conductivity,HydrologydcEplConductivityEnum); 78 } 79 } 80 else if(hydrology_model==HydrologyshreveEnum){ 81 /*Nothing to add*/ 82 } 83 else{ 84 _error_("Hydrology model "<<EnumToStringx(hydrology_model)<<" not supported yet"); 85 } 86 87 /*gia: */ 88 iomodel->Constant(&this->lithosphere_shear_modulus,MaterialsLithosphereShearModulusEnum); 89 iomodel->Constant(&this->lithosphere_density,MaterialsLithosphereDensityEnum); 90 iomodel->Constant(&this->mantle_shear_modulus,MaterialsMantleShearModulusEnum); 91 iomodel->Constant(&this->mantle_density,MaterialsMantleDensityEnum); 108 _error_("Material not supported yet"); 109 } 92 110 } 93 111 /*}}}*/ … … 293 311 case HydrologydcWaterCompressibilityEnum: return this->water_compressibility; 294 312 case ConstantsGEnum: return this->g; 313 case MaterialsPoissonEnum: return this->poisson; 314 case MaterialsYoungModulusEnum: return this->young_modulus; 315 case MaterialsRidgingExponentEnum: return this->ridging_exponent; 316 case MaterialsCohesionEnum: return this->cohesion; 317 case MaterialsInternalFrictionCoefEnum: return this->internal_friction_coef; 318 case MaterialsCompressionCoefEnum: return this->compression_coef; 319 case MaterialsTractionCoefEnum: return this->traction_coef; 295 320 default: _error_("Enum "<<EnumToStringx(enum_in)<<" not supported yet"); 296 321 } -
issm/trunk-jpl/src/c/classes/Materials/Matpar.h
r18237 r18492 50 50 IssmDouble mantle_shear_modulus; 51 51 IssmDouble mantle_density; 52 53 /*Sea ice*/ 54 IssmDouble poisson; 55 IssmDouble young_modulus; 56 IssmDouble ridging_exponent; 57 IssmDouble cohesion; 58 IssmDouble internal_friction_coef; 59 IssmDouble compression_coef; 60 IssmDouble traction_coef; 52 61 53 62 public: -
issm/trunk-jpl/src/c/classes/Vertex.cpp
r18063 r18492 32 32 this->domaintype = iomodel->domaintype; 33 33 34 _assert_(iomodel->Data(BaseEnum) && iomodel->Data(ThicknessEnum) && iomodel->numbernodetoelementconnectivity);35 34 switch(iomodel->domaintype){ 36 35 case Domain3DEnum: 37 case Domain2DhorizontalEnum:36 _assert_(iomodel->Data(BaseEnum) && iomodel->Data(ThicknessEnum)); 38 37 this->sigma = (iomodel->Data(MeshZEnum)[i]-iomodel->Data(BaseEnum)[i])/(iomodel->Data(ThicknessEnum)[i]); 39 38 break; 39 case Domain2DhorizontalEnum: 40 this->sigma = 0.; 41 break; 40 42 case Domain2DverticalEnum: 43 _assert_(iomodel->Data(BaseEnum) && iomodel->Data(ThicknessEnum)); 41 44 this->sigma = (iomodel->Data(MeshYEnum)[i]-iomodel->Data(BaseEnum)[i])/(iomodel->Data(ThicknessEnum)[i]); 42 45 break; 43 46 } 44 47 48 _assert_(iomodel->numbernodetoelementconnectivity); 45 49 this->connectivity = iomodel->numbernodetoelementconnectivity[i]; 46 50 -
issm/trunk-jpl/src/c/classes/classes.h
r17472 r18492 78 78 #include "./Materials/Material.h" 79 79 #include "./Materials/Matice.h" 80 #include "./Materials/Matseaice.h" 80 81 #include "./Materials/Matpar.h" 81 82 -
issm/trunk-jpl/src/c/cores/AnalysisConfiguration.cpp
r18485 r18492 148 148 break; 149 149 150 case SeaiceSolutionEnum: 151 numanalyses=1; 152 analyses=xNew<int>(numanalyses); 153 analyses[0]=SeaiceAnalysisEnum; 154 break; 155 150 156 default: 151 157 _error_("solution type: " << EnumToStringx(solutiontype) << " not supported yet!"); -
issm/trunk-jpl/src/c/cores/CorePointerFromSolutionEnum.cpp
r17831 r18492 69 69 solutioncore=&damage_core; 70 70 break; 71 case SeaiceSolutionEnum: 72 solutioncore=&seaice_core; 73 break; 71 74 default: 72 75 _error_("solution type: " << EnumToStringx(solutiontype) << " not supported yet!"); -
issm/trunk-jpl/src/c/cores/cores.h
r18134 r18492 45 45 void gia_core(FemModel* femmodel); 46 46 void damage_core(FemModel* femmodel); 47 void seaice_core(FemModel* femmodel); 47 48 IssmDouble objectivefunction(IssmDouble search_scalar,FemModel* femmodel); 48 49 -
issm/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp
r15104 r18492 200 200 201 201 /*clean up*/ 202 printf("-------------- file: Bamgx.cpp line: %i\n",__LINE__); 202 203 delete &Th; 204 printf("-------------- file: Bamgx.cpp line: %i\n",__LINE__); 203 205 //delete &BTh; 204 206 /*}}}*/ … … 207 209 /*No error return*/ 208 210 if (verbosity>1) _printf_(" Exiting Bamg.\n"); 211 printf("-------------- file: Bamgx.cpp line: %i\n",__LINE__); 209 212 return noerr; 210 213 -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
r18237 r18492 79 79 } 80 80 break; 81 case MatseaiceEnum: 82 iomodel->FetchDataToInput(elements,MaterialsDamageEnum); 83 for (i=0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matseaice(i+1,i,iomodel)); 84 break; 81 85 default: 82 86 _error_("Materials "<<EnumToStringx(materials_type)<<" not supported"); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r18093 r18492 43 43 parameters->AddObject(iomodel->CopyConstantObject(DomainTypeEnum)); 44 44 parameters->AddObject(iomodel->CopyConstantObject(DomainDimensionEnum)); 45 parameters->AddObject(iomodel->CopyConstantObject(MeshElementtypeEnum));46 45 parameters->AddObject(iomodel->CopyConstantObject(SettingsOutputFrequencyEnum)); 47 parameters->AddObject(iomodel->CopyConstantObject(SteadystateReltolEnum));48 parameters->AddObject(iomodel->CopyConstantObject(SteadystateMaxiterEnum));49 46 parameters->AddObject(iomodel->CopyConstantObject(ConstantsYtsEnum)); 50 47 parameters->AddObject(iomodel->CopyConstantObject(TimesteppingStartTimeEnum)); … … 57 54 parameters->AddObject(iomodel->CopyConstantObject(DebugProfilingEnum)); 58 55 parameters->AddObject(iomodel->CopyConstantObject(MeshAverageVertexConnectivityEnum)); 59 parameters->AddObject(iomodel->CopyConstantObject(ConstantsReferencetemperatureEnum));60 56 parameters->AddObject(iomodel->CopyConstantObject(SettingsWaitonlockEnum)); 61 57 parameters->AddObject(iomodel->CopyConstantObject(MeshNumberofelementsEnum)); … … 63 59 parameters->AddObject(iomodel->CopyConstantObject(SettingsResultsOnNodesEnum)); 64 60 parameters->AddObject(iomodel->CopyConstantObject(SettingsIoGatherEnum)); 65 parameters->AddObject(iomodel->CopyConstantObject(GroundinglineMigrationEnum));66 parameters->AddObject(iomodel->CopyConstantObject(TransientIsstressbalanceEnum));67 parameters->AddObject(iomodel->CopyConstantObject(TransientIsmasstransportEnum));68 parameters->AddObject(iomodel->CopyConstantObject(TransientIsthermalEnum));69 parameters->AddObject(iomodel->CopyConstantObject(TransientIsgroundinglineEnum));70 parameters->AddObject(iomodel->CopyConstantObject(TransientIsgiaEnum));71 parameters->AddObject(iomodel->CopyConstantObject(TransientIslevelsetEnum));72 parameters->AddObject(iomodel->CopyConstantObject(TransientIsdamageevolutionEnum));73 parameters->AddObject(iomodel->CopyConstantObject(TransientIshydrologyEnum));74 parameters->AddObject(iomodel->CopyConstantObject(MaterialsRheologyLawEnum));75 61 parameters->AddObject(iomodel->CopyConstantObject(AutodiffIsautodiffEnum)); 76 62 parameters->AddObject(iomodel->CopyConstantObject(QmuIsdakotaEnum)); 77 63 parameters->AddObject(iomodel->CopyConstantObject(InversionIscontrolEnum)); 78 64 parameters->AddObject(iomodel->CopyConstantObject(InversionTypeEnum)); 79 parameters->AddObject(iomodel->CopyConstantObject(GiaCrossSectionShapeEnum)); 80 81 /*For stress balance only*/ 82 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsFSEnum)); 83 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceRiftPenaltyThresholdEnum)); 84 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceMaxiterEnum)); 85 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceRestolEnum)); 86 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceReltolEnum)); 87 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceAbstolEnum)); 88 if(iomodel->domaintype==Domain3DEnum) 89 parameters->AddObject(iomodel->CopyConstantObject(MeshNumberoflayersEnum)); 65 if(solution_type==SeaiceSolutionEnum){ 66 } 67 else{ 68 parameters->AddObject(iomodel->CopyConstantObject(MeshElementtypeEnum)); 69 parameters->AddObject(iomodel->CopyConstantObject(SteadystateReltolEnum)); 70 parameters->AddObject(iomodel->CopyConstantObject(SteadystateMaxiterEnum)); 71 parameters->AddObject(iomodel->CopyConstantObject(ConstantsReferencetemperatureEnum)); 72 parameters->AddObject(iomodel->CopyConstantObject(GroundinglineMigrationEnum)); 73 parameters->AddObject(iomodel->CopyConstantObject(TransientIsstressbalanceEnum)); 74 parameters->AddObject(iomodel->CopyConstantObject(TransientIsmasstransportEnum)); 75 parameters->AddObject(iomodel->CopyConstantObject(TransientIsthermalEnum)); 76 parameters->AddObject(iomodel->CopyConstantObject(TransientIsgroundinglineEnum)); 77 parameters->AddObject(iomodel->CopyConstantObject(TransientIsgiaEnum)); 78 parameters->AddObject(iomodel->CopyConstantObject(TransientIslevelsetEnum)); 79 parameters->AddObject(iomodel->CopyConstantObject(TransientIsdamageevolutionEnum)); 80 parameters->AddObject(iomodel->CopyConstantObject(TransientIshydrologyEnum)); 81 parameters->AddObject(iomodel->CopyConstantObject(MaterialsRheologyLawEnum)); 82 parameters->AddObject(iomodel->CopyConstantObject(GiaCrossSectionShapeEnum)); 83 84 /*For stress balance only*/ 85 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsFSEnum)); 86 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceRiftPenaltyThresholdEnum)); 87 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceMaxiterEnum)); 88 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceRestolEnum)); 89 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceReltolEnum)); 90 parameters->AddObject(iomodel->CopyConstantObject(StressbalanceAbstolEnum)); 91 if(iomodel->domaintype==Domain3DEnum) 92 parameters->AddObject(iomodel->CopyConstantObject(MeshNumberoflayersEnum)); 93 } 90 94 91 95 /*Surface mass balance parameters*/ … … 129 133 /*Nothing to add to parameters*/ 130 134 break; 135 case SeaiceatmEnum: 136 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsRhoAirEnum)); 137 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsAirCoefEnum)); 138 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsAirLinDragCoefEnum)); 139 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsAirQuadDragCoefEnum)); 140 break; 131 141 default: 132 142 _error_("Surface mass balance model "<<EnumToStringx(smb_model)<<" not supported yet"); … … 144 154 parameters->AddObject(iomodel->CopyConstantObject(BasalforcingsDeepwaterElevationEnum)); 145 155 parameters->AddObject(iomodel->CopyConstantObject(BasalforcingsUpperwaterElevationEnum)); 156 break; 157 case SeaiceoceanEnum: 158 parameters->AddObject(iomodel->CopyConstantObject(BasalforcingsRhoOceanEnum)); 159 parameters->AddObject(iomodel->CopyConstantObject(BasalforcingsOceanCoefEnum)); 160 parameters->AddObject(iomodel->CopyConstantObject(BasalforcingsOceanLinDragCoefEnum)); 161 parameters->AddObject(iomodel->CopyConstantObject(BasalforcingsOceanQuadDragCoefEnum)); 162 parameters->AddObject(iomodel->CopyConstantObject(BasalforcingsOceanTurningAngleEnum)); 146 163 break; 147 164 default: -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r18476 r18492 387 387 GiaSolutionEnum, 388 388 GiaAnalysisEnum, 389 SeaiceSolutionEnum, 390 SeaiceAnalysisEnum, 389 391 MeshdeformationSolutionEnum, 390 392 MeshdeformationAnalysisEnum, … … 742 744 LevelsetfunctionPicardEnum, 743 745 /*}}}*/ 746 /*Sea Ice {{{*/ 747 SeaiceatmEnum, 748 SeaiceoceanEnum, 749 SeaiceThicknessEnum, 750 SeaiceConcentrationEnum, 751 SeaiceSpcvxEnum, 752 SeaiceSpcvyEnum, 753 BasalforcingsRhoOceanEnum, 754 BasalforcingsOceanCoefEnum, 755 BasalforcingsOceanLinDragCoefEnum, 756 BasalforcingsOceanQuadDragCoefEnum, 757 BasalforcingsOceanTurningAngleEnum, 758 BasalforcingsOceanSshEnum, 759 BasalforcingsOceanVxEnum, 760 BasalforcingsOceanVyEnum, 761 SurfaceforcingsRhoAirEnum, 762 SurfaceforcingsAirCoefEnum, 763 SurfaceforcingsAirLinDragCoefEnum, 764 SurfaceforcingsAirQuadDragCoefEnum, 765 SurfaceforcingsWindVxEnum, 766 SurfaceforcingsWindVyEnum, 767 MatseaiceEnum, 768 MaterialsPoissonEnum, 769 MaterialsYoungModulusEnum, 770 MaterialsDamageEnum, 771 MaterialsRidgingExponentEnum, 772 MaterialsCohesionEnum, 773 MaterialsInternalFrictionCoefEnum, 774 MaterialsCompressionCoefEnum, 775 MaterialsTractionCoefEnum, 776 VxStarEnum, 777 VyStarEnum, 778 /*}}}*/ 744 779 MaximumNumberOfDefinitionsEnum 745 780 }; -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r18476 r18492 390 390 case GiaSolutionEnum : return "GiaSolution"; 391 391 case GiaAnalysisEnum : return "GiaAnalysis"; 392 case SeaiceSolutionEnum : return "SeaiceSolution"; 393 case SeaiceAnalysisEnum : return "SeaiceAnalysis"; 392 394 case MeshdeformationSolutionEnum : return "MeshdeformationSolution"; 393 395 case MeshdeformationAnalysisEnum : return "MeshdeformationAnalysis"; … … 702 704 case LevelsetfunctionSlopeYEnum : return "LevelsetfunctionSlopeY"; 703 705 case LevelsetfunctionPicardEnum : return "LevelsetfunctionPicard"; 706 case SeaiceatmEnum : return "Seaiceatm"; 707 case SeaiceoceanEnum : return "Seaiceocean"; 708 case SeaiceThicknessEnum : return "SeaiceThickness"; 709 case SeaiceConcentrationEnum : return "SeaiceConcentration"; 710 case SeaiceSpcvxEnum : return "SeaiceSpcvx"; 711 case SeaiceSpcvyEnum : return "SeaiceSpcvy"; 712 case BasalforcingsRhoOceanEnum : return "BasalforcingsRhoOcean"; 713 case BasalforcingsOceanCoefEnum : return "BasalforcingsOceanCoef"; 714 case BasalforcingsOceanLinDragCoefEnum : return "BasalforcingsOceanLinDragCoef"; 715 case BasalforcingsOceanQuadDragCoefEnum : return "BasalforcingsOceanQuadDragCoef"; 716 case BasalforcingsOceanTurningAngleEnum : return "BasalforcingsOceanTurningAngle"; 717 case BasalforcingsOceanSshEnum : return "BasalforcingsOceanSsh"; 718 case BasalforcingsOceanVxEnum : return "BasalforcingsOceanVx"; 719 case BasalforcingsOceanVyEnum : return "BasalforcingsOceanVy"; 720 case SurfaceforcingsRhoAirEnum : return "SurfaceforcingsRhoAir"; 721 case SurfaceforcingsAirCoefEnum : return "SurfaceforcingsAirCoef"; 722 case SurfaceforcingsAirLinDragCoefEnum : return "SurfaceforcingsAirLinDragCoef"; 723 case SurfaceforcingsAirQuadDragCoefEnum : return "SurfaceforcingsAirQuadDragCoef"; 724 case SurfaceforcingsWindVxEnum : return "SurfaceforcingsWindVx"; 725 case SurfaceforcingsWindVyEnum : return "SurfaceforcingsWindVy"; 726 case MatseaiceEnum : return "Matseaice"; 727 case MaterialsPoissonEnum : return "MaterialsPoisson"; 728 case MaterialsYoungModulusEnum : return "MaterialsYoungModulus"; 729 case MaterialsDamageEnum : return "MaterialsDamage"; 730 case MaterialsRidgingExponentEnum : return "MaterialsRidgingExponent"; 731 case MaterialsCohesionEnum : return "MaterialsCohesion"; 732 case MaterialsInternalFrictionCoefEnum : return "MaterialsInternalFrictionCoef"; 733 case MaterialsCompressionCoefEnum : return "MaterialsCompressionCoef"; 734 case MaterialsTractionCoefEnum : return "MaterialsTractionCoef"; 735 case VxStarEnum : return "VxStar"; 736 case VyStarEnum : return "VyStar"; 704 737 case MaximumNumberOfDefinitionsEnum : return "MaximumNumberOfDefinitions"; 705 738 default : return "unknown"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r18476 r18492 399 399 else if (strcmp(name,"GiaSolution")==0) return GiaSolutionEnum; 400 400 else if (strcmp(name,"GiaAnalysis")==0) return GiaAnalysisEnum; 401 else if (strcmp(name,"SeaiceSolution")==0) return SeaiceSolutionEnum; 402 else if (strcmp(name,"SeaiceAnalysis")==0) return SeaiceAnalysisEnum; 401 403 else if (strcmp(name,"MeshdeformationSolution")==0) return MeshdeformationSolutionEnum; 402 404 else if (strcmp(name,"MeshdeformationAnalysis")==0) return MeshdeformationAnalysisEnum; … … 504 506 else if (strcmp(name,"MeltingOffset")==0) return MeltingOffsetEnum; 505 507 else if (strcmp(name,"Misfit")==0) return MisfitEnum; 506 else if (strcmp(name,"Pressure")==0) return PressureEnum;507 else if (strcmp(name,"PressurePicard")==0) return PressurePicardEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"AndroidFrictionCoefficient")==0) return AndroidFrictionCoefficientEnum; 511 if (strcmp(name,"Pressure")==0) return PressureEnum; 512 else if (strcmp(name,"PressurePicard")==0) return PressurePicardEnum; 513 else if (strcmp(name,"AndroidFrictionCoefficient")==0) return AndroidFrictionCoefficientEnum; 512 514 else if (strcmp(name,"ResetPenalties")==0) return ResetPenaltiesEnum; 513 515 else if (strcmp(name,"SegmentOnIceShelf")==0) return SegmentOnIceShelfEnum; … … 627 629 else if (strcmp(name,"SurfaceObservation")==0) return SurfaceObservationEnum; 628 630 else if (strcmp(name,"WeightsSurfaceObservation")==0) return WeightsSurfaceObservationEnum; 629 else if (strcmp(name,"MinVel")==0) return MinVelEnum;630 else if (strcmp(name,"MaxVel")==0) return MaxVelEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"MinVx")==0) return MinVxEnum; 634 if (strcmp(name,"MinVel")==0) return MinVelEnum; 635 else if (strcmp(name,"MaxVel")==0) return MaxVelEnum; 636 else if (strcmp(name,"MinVx")==0) return MinVxEnum; 635 637 else if (strcmp(name,"MaxVx")==0) return MaxVxEnum; 636 638 else if (strcmp(name,"MaxAbsVx")==0) return MaxAbsVxEnum; … … 717 719 else if (strcmp(name,"LevelsetfunctionSlopeY")==0) return LevelsetfunctionSlopeYEnum; 718 720 else if (strcmp(name,"LevelsetfunctionPicard")==0) return LevelsetfunctionPicardEnum; 721 else if (strcmp(name,"Seaiceatm")==0) return SeaiceatmEnum; 722 else if (strcmp(name,"Seaiceocean")==0) return SeaiceoceanEnum; 723 else if (strcmp(name,"SeaiceThickness")==0) return SeaiceThicknessEnum; 724 else if (strcmp(name,"SeaiceConcentration")==0) return SeaiceConcentrationEnum; 725 else if (strcmp(name,"SeaiceSpcvx")==0) return SeaiceSpcvxEnum; 726 else if (strcmp(name,"SeaiceSpcvy")==0) return SeaiceSpcvyEnum; 727 else if (strcmp(name,"BasalforcingsRhoOcean")==0) return BasalforcingsRhoOceanEnum; 728 else if (strcmp(name,"BasalforcingsOceanCoef")==0) return BasalforcingsOceanCoefEnum; 729 else if (strcmp(name,"BasalforcingsOceanLinDragCoef")==0) return BasalforcingsOceanLinDragCoefEnum; 730 else if (strcmp(name,"BasalforcingsOceanQuadDragCoef")==0) return BasalforcingsOceanQuadDragCoefEnum; 731 else if (strcmp(name,"BasalforcingsOceanTurningAngle")==0) return BasalforcingsOceanTurningAngleEnum; 732 else if (strcmp(name,"BasalforcingsOceanSsh")==0) return BasalforcingsOceanSshEnum; 733 else if (strcmp(name,"BasalforcingsOceanVx")==0) return BasalforcingsOceanVxEnum; 734 else if (strcmp(name,"BasalforcingsOceanVy")==0) return BasalforcingsOceanVyEnum; 735 else if (strcmp(name,"SurfaceforcingsRhoAir")==0) return SurfaceforcingsRhoAirEnum; 736 else if (strcmp(name,"SurfaceforcingsAirCoef")==0) return SurfaceforcingsAirCoefEnum; 737 else if (strcmp(name,"SurfaceforcingsAirLinDragCoef")==0) return SurfaceforcingsAirLinDragCoefEnum; 738 else if (strcmp(name,"SurfaceforcingsAirQuadDragCoef")==0) return SurfaceforcingsAirQuadDragCoefEnum; 739 else if (strcmp(name,"SurfaceforcingsWindVx")==0) return SurfaceforcingsWindVxEnum; 740 else if (strcmp(name,"SurfaceforcingsWindVy")==0) return SurfaceforcingsWindVyEnum; 741 else if (strcmp(name,"Matseaice")==0) return MatseaiceEnum; 742 else if (strcmp(name,"MaterialsPoisson")==0) return MaterialsPoissonEnum; 743 else if (strcmp(name,"MaterialsYoungModulus")==0) return MaterialsYoungModulusEnum; 744 else if (strcmp(name,"MaterialsDamage")==0) return MaterialsDamageEnum; 745 else if (strcmp(name,"MaterialsRidgingExponent")==0) return MaterialsRidgingExponentEnum; 746 else if (strcmp(name,"MaterialsCohesion")==0) return MaterialsCohesionEnum; 747 else if (strcmp(name,"MaterialsInternalFrictionCoef")==0) return MaterialsInternalFrictionCoefEnum; 748 else if (strcmp(name,"MaterialsCompressionCoef")==0) return MaterialsCompressionCoefEnum; 749 else if (strcmp(name,"MaterialsTractionCoef")==0) return MaterialsTractionCoefEnum; 750 else if (strcmp(name,"VxStar")==0) return VxStarEnum; 751 else if (strcmp(name,"VyStar")==0) return VyStarEnum; 719 752 else if (strcmp(name,"MaximumNumberOfDefinitions")==0) return MaximumNumberOfDefinitionsEnum; 720 753 else stage=7; -
issm/trunk-jpl/src/m/classes/geometry.m
r17931 r18492 58 58 function md = checkconsistency(obj,md,solution,analyses) % {{{ 59 59 60 if (solution==SeaiceSolutionEnum()), 61 return; 62 end 63 60 64 if (solution==TransientSolutionEnum() & md.transient.isgia) | (solution==GiaSolutionEnum()), 61 65 md = checkfield(md,'fieldname','geometry.thickness','forcing',1,'NaN',1,'>=',0); -
issm/trunk-jpl/src/m/classes/mask.m
r18068 r18492 40 40 end % }}} 41 41 function md = checkconsistency(obj,md,solution,analyses) % {{{ 42 if (solution==SeaiceSolutionEnum()), 43 return; 44 end 42 45 43 46 md = checkfield(md,'fieldname','mask.groundedice_levelset','size',[md.mesh.numberofvertices 1]); … … 61 64 WriteData(fid,'object',obj,'fieldname','ice_levelset','format','DoubleMat','mattype',1); 62 65 66 if(md.private.solution==SeaiceSolutionEnum()), 67 return; 68 end 69 63 70 % get mask of vertices of elements with ice 64 71 isice=md.mask.ice_levelset<=0.; -
issm/trunk-jpl/src/m/classes/model.m
r18480 r18492 39 39 gia = 0; 40 40 41 seaice = 0; 42 41 43 autodiff = 0; 42 44 flaim = 0; … … 132 134 case 0 133 135 md=setdefaultparameters(md); 136 case 1 137 if strcmpi(varargin{1},'seaice'), 138 md=setdefaultparameters(md); 139 md.materials = matseaice(); 140 md.surfaceforcings = seaiceatm(); 141 md.basalforcings = seaiceocean(); 142 md.initialization = seaiceinitialization(); 143 else 144 error('model constructor not supported yet'); 145 end 146 134 147 otherwise 135 148 error('model constructor error message: 0 of 1 argument only in input.'); … … 1118 1131 md.transient = transient(); 1119 1132 md.gia = gia(); 1133 md.seaice = seaice(); 1120 1134 md.autodiff = autodiff(); 1121 1135 md.flaim = flaim(); … … 1295 1309 disp(sprintf('%19s: %-22s -- %s','radaroverlay' ,['[1x1 ' class(obj.radaroverlay) ']'],'radar image for plot overlay')); 1296 1310 disp(sprintf('%19s: %-22s -- %s','miscellaneous' ,['[1x1 ' class(obj.miscellaneous) ']'],'miscellaneous fields')); 1311 disp(sprintf('%19s: %-22s -- %s','seaice' ,['[1x1 ' class(obj.seaice) ']'],'parameters for Sea Ice solution')); 1297 1312 end % }}} 1298 1313 function memory(obj) % {{{ -
issm/trunk-jpl/src/m/classes/stressbalance.m
r17931 r18492 210 210 function marshall(obj,md,fid) % {{{ 211 211 212 WriteData(fid,'object',obj,'class','stressbalance','fieldname','vertex_pairing','format','DoubleMat','mattype',3); 213 214 if md.private.solution==SeaiceSolutionEnum, 215 return; 216 end 217 212 218 yts=365.0*24.0*3600.0; 213 219 … … 223 229 WriteData(fid,'object',obj,'class','stressbalance','fieldname','maxiter','format','Integer'); 224 230 WriteData(fid,'object',obj,'class','stressbalance','fieldname','shelf_dampening','format','Integer'); 225 WriteData(fid,'object',obj,'class','stressbalance','fieldname','vertex_pairing','format','DoubleMat','mattype',3);226 231 WriteData(fid,'object',obj,'class','stressbalance','fieldname','penalty_factor','format','Double'); 227 232 WriteData(fid,'object',obj,'class','stressbalance','fieldname','rift_penalty_lock','format','Integer'); -
issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.m
r17831 r18492 91 91 analyses=[DamageEvolutionAnalysisEnum()]; 92 92 93 case SeaiceSolutionEnum(), 94 analyses=[SeaiceAnalysisEnum()]; 95 93 96 otherwise 94 97 error('%s%s%s',' solution type: ',EnumToString(solutiontype),' not supported yet!'); -
issm/trunk-jpl/src/m/enum/EnumDefinitions.py
r18476 r18492 382 382 def GiaSolutionEnum(): return StringToEnum("GiaSolution")[0] 383 383 def GiaAnalysisEnum(): return StringToEnum("GiaAnalysis")[0] 384 def SeaiceSolutionEnum(): return StringToEnum("SeaiceSolution")[0] 385 def SeaiceAnalysisEnum(): return StringToEnum("SeaiceAnalysis")[0] 384 386 def MeshdeformationSolutionEnum(): return StringToEnum("MeshdeformationSolution")[0] 385 387 def MeshdeformationAnalysisEnum(): return StringToEnum("MeshdeformationAnalysis")[0] … … 694 696 def LevelsetfunctionSlopeYEnum(): return StringToEnum("LevelsetfunctionSlopeY")[0] 695 697 def LevelsetfunctionPicardEnum(): return StringToEnum("LevelsetfunctionPicard")[0] 698 def SeaiceatmEnum(): return StringToEnum("Seaiceatm")[0] 699 def SeaiceoceanEnum(): return StringToEnum("Seaiceocean")[0] 700 def SeaiceThicknessEnum(): return StringToEnum("SeaiceThickness")[0] 701 def SeaiceConcentrationEnum(): return StringToEnum("SeaiceConcentration")[0] 702 def SeaiceSpcvxEnum(): return StringToEnum("SeaiceSpcvx")[0] 703 def SeaiceSpcvyEnum(): return StringToEnum("SeaiceSpcvy")[0] 704 def BasalforcingsRhoOceanEnum(): return StringToEnum("BasalforcingsRhoOcean")[0] 705 def BasalforcingsOceanCoefEnum(): return StringToEnum("BasalforcingsOceanCoef")[0] 706 def BasalforcingsOceanLinDragCoefEnum(): return StringToEnum("BasalforcingsOceanLinDragCoef")[0] 707 def BasalforcingsOceanQuadDragCoefEnum(): return StringToEnum("BasalforcingsOceanQuadDragCoef")[0] 708 def BasalforcingsOceanTurningAngleEnum(): return StringToEnum("BasalforcingsOceanTurningAngle")[0] 709 def BasalforcingsOceanSshEnum(): return StringToEnum("BasalforcingsOceanSsh")[0] 710 def BasalforcingsOceanVxEnum(): return StringToEnum("BasalforcingsOceanVx")[0] 711 def BasalforcingsOceanVyEnum(): return StringToEnum("BasalforcingsOceanVy")[0] 712 def SurfaceforcingsRhoAirEnum(): return StringToEnum("SurfaceforcingsRhoAir")[0] 713 def SurfaceforcingsAirCoefEnum(): return StringToEnum("SurfaceforcingsAirCoef")[0] 714 def SurfaceforcingsAirLinDragCoefEnum(): return StringToEnum("SurfaceforcingsAirLinDragCoef")[0] 715 def SurfaceforcingsAirQuadDragCoefEnum(): return StringToEnum("SurfaceforcingsAirQuadDragCoef")[0] 716 def SurfaceforcingsWindVxEnum(): return StringToEnum("SurfaceforcingsWindVx")[0] 717 def SurfaceforcingsWindVyEnum(): return StringToEnum("SurfaceforcingsWindVy")[0] 718 def MatseaiceEnum(): return StringToEnum("Matseaice")[0] 719 def MaterialsPoissonEnum(): return StringToEnum("MaterialsPoisson")[0] 720 def MaterialsYoungModulusEnum(): return StringToEnum("MaterialsYoungModulus")[0] 721 def MaterialsDamageEnum(): return StringToEnum("MaterialsDamage")[0] 722 def MaterialsRidgingExponentEnum(): return StringToEnum("MaterialsRidgingExponent")[0] 723 def MaterialsCohesionEnum(): return StringToEnum("MaterialsCohesion")[0] 724 def MaterialsInternalFrictionCoefEnum(): return StringToEnum("MaterialsInternalFrictionCoef")[0] 725 def MaterialsCompressionCoefEnum(): return StringToEnum("MaterialsCompressionCoef")[0] 726 def MaterialsTractionCoefEnum(): return StringToEnum("MaterialsTractionCoef")[0] 727 def VxStarEnum(): return StringToEnum("VxStar")[0] 728 def VyStarEnum(): return StringToEnum("VyStar")[0] 696 729 def MaximumNumberOfDefinitionsEnum(): return StringToEnum("MaximumNumberOfDefinitions")[0]
Note:
See TracChangeset
for help on using the changeset viewer.