Changeset 26099


Ignore:
Timestamp:
03/15/21 21:27:31 (4 years ago)
Author:
Eric.Larour
Message:

CHG: new ElementCoordinatesx module, use for an optimized
version of the sea level core. Many bug fixes to get test2002
to run.

Location:
issm/trunk-jpl
Files:
3 added
26 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/m4/analyses.m4

    r26047 r26099  
    1010[
    1111
     12dnl with-HydrologyTws{{{
     13
     14AC_ARG_WITH([HydrologyTws],
     15
     16        AS_HELP_STRING([--with-HydrologyTws = YES], [compile with HydrologyTws capabilities (default is yes)]),
     17
     18        [HYDROLOGYTWS=$withval],[HYDROLOGYTWS=yes])
     19
     20AC_MSG_CHECKING(for HydrologyTws capability compilation)
     21
     22
     23HAVE_HYDROLOGYTWS=no
     24
     25if test "x$HYDROLOGYTWS" = "xyes"; then
     26
     27        HAVE_HYDROLOGYTWS=yes
     28
     29        AC_DEFINE([_HAVE_HYDROLOGYTWS_],[1],[with HydrologyTws capability])
     30
     31fi
     32
     33AM_CONDITIONAL([HYDROLOGYTWS], [test x$HAVE_HYDROLOGYTWS = xyes])
     34
     35AC_MSG_RESULT($HAVE_HYDROLOGYTWS)
     36
     37dnl }}}
    1238dnl with-AdjointBalancethickness2{{{
     39
    1340AC_ARG_WITH([AdjointBalancethickness2],
     41
    1442        AS_HELP_STRING([--with-AdjointBalancethickness2 = YES], [compile with AdjointBalancethickness2 capabilities (default is yes)]),
     43
    1544        [ADJOINTBALANCETHICKNESS2=$withval],[ADJOINTBALANCETHICKNESS2=yes])
     45
    1646AC_MSG_CHECKING(for AdjointBalancethickness2 capability compilation)
    1747
     48
    1849HAVE_ADJOINTBALANCETHICKNESS2=no
     50
    1951if test "x$ADJOINTBALANCETHICKNESS2" = "xyes"; then
     52
    2053        HAVE_ADJOINTBALANCETHICKNESS2=yes
     54
    2155        AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS2_],[1],[with AdjointBalancethickness2 capability])
    22 fi
     56
     57fi
     58
    2359AM_CONDITIONAL([ADJOINTBALANCETHICKNESS2], [test x$HAVE_ADJOINTBALANCETHICKNESS2 = xyes])
     60
    2461AC_MSG_RESULT($HAVE_ADJOINTBALANCETHICKNESS2)
     62
    2563dnl }}}
    2664dnl with-AdjointBalancethickness{{{
     65
    2766AC_ARG_WITH([AdjointBalancethickness],
     67
    2868        AS_HELP_STRING([--with-AdjointBalancethickness = YES], [compile with AdjointBalancethickness capabilities (default is yes)]),
     69
    2970        [ADJOINTBALANCETHICKNESS=$withval],[ADJOINTBALANCETHICKNESS=yes])
     71
    3072AC_MSG_CHECKING(for AdjointBalancethickness capability compilation)
    3173
     74
    3275HAVE_ADJOINTBALANCETHICKNESS=no
     76
    3377if test "x$ADJOINTBALANCETHICKNESS" = "xyes"; then
     78
    3479        HAVE_ADJOINTBALANCETHICKNESS=yes
     80
    3581        AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS_],[1],[with AdjointBalancethickness capability])
    36 fi
     82
     83fi
     84
    3785AM_CONDITIONAL([ADJOINTBALANCETHICKNESS], [test x$HAVE_ADJOINTBALANCETHICKNESS = xyes])
     86
    3887AC_MSG_RESULT($HAVE_ADJOINTBALANCETHICKNESS)
     88
    3989dnl }}}
    4090dnl with-AdjointHoriz{{{
     91
    4192AC_ARG_WITH([AdjointHoriz],
     93
    4294        AS_HELP_STRING([--with-AdjointHoriz = YES], [compile with AdjointHoriz capabilities (default is yes)]),
     95
    4396        [ADJOINTHORIZ=$withval],[ADJOINTHORIZ=yes])
     97
    4498AC_MSG_CHECKING(for AdjointHoriz capability compilation)
    4599
     100
    46101HAVE_ADJOINTHORIZ=no
     102
    47103if test "x$ADJOINTHORIZ" = "xyes"; then
     104
    48105        HAVE_ADJOINTHORIZ=yes
     106
    49107        AC_DEFINE([_HAVE_ADJOINTHORIZ_],[1],[with AdjointHoriz capability])
    50 fi
     108
     109fi
     110
    51111AM_CONDITIONAL([ADJOINTHORIZ], [test x$HAVE_ADJOINTHORIZ = xyes])
     112
    52113AC_MSG_RESULT($HAVE_ADJOINTHORIZ)
     114
    53115dnl }}}
    54116dnl with-Balancethickness2{{{
     117
    55118AC_ARG_WITH([Balancethickness2],
     119
    56120        AS_HELP_STRING([--with-Balancethickness2 = YES], [compile with Balancethickness2 capabilities (default is yes)]),
     121
    57122        [BALANCETHICKNESS2=$withval],[BALANCETHICKNESS2=yes])
     123
    58124AC_MSG_CHECKING(for Balancethickness2 capability compilation)
    59125
     126
    60127HAVE_BALANCETHICKNESS2=no
     128
    61129if test "x$BALANCETHICKNESS2" = "xyes"; then
     130
    62131        HAVE_BALANCETHICKNESS2=yes
     132
    63133        AC_DEFINE([_HAVE_BALANCETHICKNESS2_],[1],[with Balancethickness2 capability])
    64 fi
     134
     135fi
     136
    65137AM_CONDITIONAL([BALANCETHICKNESS2], [test x$HAVE_BALANCETHICKNESS2 = xyes])
     138
    66139AC_MSG_RESULT($HAVE_BALANCETHICKNESS2)
     140
    67141dnl }}}
    68142dnl with-Balancethickness{{{
     143
    69144AC_ARG_WITH([Balancethickness],
     145
    70146        AS_HELP_STRING([--with-Balancethickness = YES], [compile with Balancethickness capabilities (default is yes)]),
     147
    71148        [BALANCETHICKNESS=$withval],[BALANCETHICKNESS=yes])
     149
    72150AC_MSG_CHECKING(for Balancethickness capability compilation)
    73151
     152
    74153HAVE_BALANCETHICKNESS=no
     154
    75155if test "x$BALANCETHICKNESS" = "xyes"; then
     156
    76157        HAVE_BALANCETHICKNESS=yes
     158
    77159        AC_DEFINE([_HAVE_BALANCETHICKNESS_],[1],[with Balancethickness capability])
    78 fi
     160
     161fi
     162
    79163AM_CONDITIONAL([BALANCETHICKNESS], [test x$HAVE_BALANCETHICKNESS = xyes])
     164
    80165AC_MSG_RESULT($HAVE_BALANCETHICKNESS)
     166
    81167dnl }}}
    82168dnl with-BalancethicknessSoft{{{
     169
    83170AC_ARG_WITH([BalancethicknessSoft],
     171
    84172        AS_HELP_STRING([--with-BalancethicknessSoft = YES], [compile with BalancethicknessSoft capabilities (default is yes)]),
     173
    85174        [BALANCETHICKNESSSOFT=$withval],[BALANCETHICKNESSSOFT=yes])
     175
    86176AC_MSG_CHECKING(for BalancethicknessSoft capability compilation)
    87177
     178
    88179HAVE_BALANCETHICKNESSSOFT=no
     180
    89181if test "x$BALANCETHICKNESSSOFT" = "xyes"; then
     182
    90183        HAVE_BALANCETHICKNESSSOFT=yes
     184
    91185        AC_DEFINE([_HAVE_BALANCETHICKNESSSOFT_],[1],[with BalancethicknessSoft capability])
    92 fi
     186
     187fi
     188
    93189AM_CONDITIONAL([BALANCETHICKNESSSOFT], [test x$HAVE_BALANCETHICKNESSSOFT = xyes])
     190
    94191AC_MSG_RESULT($HAVE_BALANCETHICKNESSSOFT)
     192
    95193dnl }}}
    96194dnl with-Balancevelocity{{{
     195
    97196AC_ARG_WITH([Balancevelocity],
     197
    98198        AS_HELP_STRING([--with-Balancevelocity = YES], [compile with Balancevelocity capabilities (default is yes)]),
     199
    99200        [BALANCEVELOCITY=$withval],[BALANCEVELOCITY=yes])
     201
    100202AC_MSG_CHECKING(for Balancevelocity capability compilation)
    101203
     204
    102205HAVE_BALANCEVELOCITY=no
     206
    103207if test "x$BALANCEVELOCITY" = "xyes"; then
     208
    104209        HAVE_BALANCEVELOCITY=yes
     210
    105211        AC_DEFINE([_HAVE_BALANCEVELOCITY_],[1],[with Balancevelocity capability])
    106 fi
     212
     213fi
     214
    107215AM_CONDITIONAL([BALANCEVELOCITY], [test x$HAVE_BALANCEVELOCITY = xyes])
     216
    108217AC_MSG_RESULT($HAVE_BALANCEVELOCITY)
     218
    109219dnl }}}
    110220dnl with-DamageEvolution{{{
     221
    111222AC_ARG_WITH([DamageEvolution],
     223
    112224        AS_HELP_STRING([--with-DamageEvolution = YES], [compile with DamageEvolution capabilities (default is yes)]),
     225
    113226        [DAMAGEEVOLUTION=$withval],[DAMAGEEVOLUTION=yes])
     227
    114228AC_MSG_CHECKING(for DamageEvolution capability compilation)
    115229
     230
    116231HAVE_DAMAGEEVOLUTION=no
     232
    117233if test "x$DAMAGEEVOLUTION" = "xyes"; then
     234
    118235        HAVE_DAMAGEEVOLUTION=yes
     236
    119237        AC_DEFINE([_HAVE_DAMAGEEVOLUTION_],[1],[with DamageEvolution capability])
    120 fi
     238
     239fi
     240
    121241AM_CONDITIONAL([DAMAGEEVOLUTION], [test x$HAVE_DAMAGEEVOLUTION = xyes])
     242
    122243AC_MSG_RESULT($HAVE_DAMAGEEVOLUTION)
     244
    123245dnl }}}
    124246dnl with-DepthAverage{{{
     247
    125248AC_ARG_WITH([DepthAverage],
     249
    126250        AS_HELP_STRING([--with-DepthAverage = YES], [compile with DepthAverage capabilities (default is yes)]),
     251
    127252        [DEPTHAVERAGE=$withval],[DEPTHAVERAGE=yes])
     253
    128254AC_MSG_CHECKING(for DepthAverage capability compilation)
    129255
     256
    130257HAVE_DEPTHAVERAGE=no
     258
    131259if test "x$DEPTHAVERAGE" = "xyes"; then
     260
    132261        HAVE_DEPTHAVERAGE=yes
     262
    133263        AC_DEFINE([_HAVE_DEPTHAVERAGE_],[1],[with DepthAverage capability])
    134 fi
     264
     265fi
     266
    135267AM_CONDITIONAL([DEPTHAVERAGE], [test x$HAVE_DEPTHAVERAGE = xyes])
     268
    136269AC_MSG_RESULT($HAVE_DEPTHAVERAGE)
     270
    137271dnl }}}
    138272dnl with-Enthalpy{{{
     273
    139274AC_ARG_WITH([Enthalpy],
     275
    140276        AS_HELP_STRING([--with-Enthalpy = YES], [compile with Enthalpy capabilities (default is yes)]),
     277
    141278        [ENTHALPY=$withval],[ENTHALPY=yes])
     279
    142280AC_MSG_CHECKING(for Enthalpy capability compilation)
    143281
     282
    144283HAVE_ENTHALPY=no
     284
    145285if test "x$ENTHALPY" = "xyes"; then
     286
    146287        HAVE_ENTHALPY=yes
     288
    147289        AC_DEFINE([_HAVE_ENTHALPY_],[1],[with Enthalpy capability])
    148 fi
     290
     291fi
     292
    149293AM_CONDITIONAL([ENTHALPY], [test x$HAVE_ENTHALPY = xyes])
     294
    150295AC_MSG_RESULT($HAVE_ENTHALPY)
     296
    151297dnl }}}
    152298dnl with-Esa{{{
     299
    153300AC_ARG_WITH([Esa],
     301
    154302        AS_HELP_STRING([--with-Esa = YES], [compile with Esa capabilities (default is yes)]),
     303
    155304        [ESA=$withval],[ESA=yes])
     305
    156306AC_MSG_CHECKING(for Esa capability compilation)
    157307
     308
    158309HAVE_ESA=no
     310
    159311if test "x$ESA" = "xyes"; then
     312
    160313        HAVE_ESA=yes
     314
    161315        AC_DEFINE([_HAVE_ESA_],[1],[with Esa capability])
    162 fi
     316
     317fi
     318
    163319AM_CONDITIONAL([ESA], [test x$HAVE_ESA = xyes])
     320
    164321AC_MSG_RESULT($HAVE_ESA)
     322
    165323dnl }}}
    166324dnl with-Extrapolation{{{
     325
    167326AC_ARG_WITH([Extrapolation],
     327
    168328        AS_HELP_STRING([--with-Extrapolation = YES], [compile with Extrapolation capabilities (default is yes)]),
     329
    169330        [EXTRAPOLATION=$withval],[EXTRAPOLATION=yes])
     331
    170332AC_MSG_CHECKING(for Extrapolation capability compilation)
    171333
     334
    172335HAVE_EXTRAPOLATION=no
     336
    173337if test "x$EXTRAPOLATION" = "xyes"; then
     338
    174339        HAVE_EXTRAPOLATION=yes
     340
    175341        AC_DEFINE([_HAVE_EXTRAPOLATION_],[1],[with Extrapolation capability])
    176 fi
     342
     343fi
     344
    177345AM_CONDITIONAL([EXTRAPOLATION], [test x$HAVE_EXTRAPOLATION = xyes])
     346
    178347AC_MSG_RESULT($HAVE_EXTRAPOLATION)
     348
    179349dnl }}}
    180350dnl with-ExtrudeFromBase{{{
     351
    181352AC_ARG_WITH([ExtrudeFromBase],
     353
    182354        AS_HELP_STRING([--with-ExtrudeFromBase = YES], [compile with ExtrudeFromBase capabilities (default is yes)]),
     355
    183356        [EXTRUDEFROMBASE=$withval],[EXTRUDEFROMBASE=yes])
     357
    184358AC_MSG_CHECKING(for ExtrudeFromBase capability compilation)
    185359
     360
    186361HAVE_EXTRUDEFROMBASE=no
     362
    187363if test "x$EXTRUDEFROMBASE" = "xyes"; then
     364
    188365        HAVE_EXTRUDEFROMBASE=yes
     366
    189367        AC_DEFINE([_HAVE_EXTRUDEFROMBASE_],[1],[with ExtrudeFromBase capability])
    190 fi
     368
     369fi
     370
    191371AM_CONDITIONAL([EXTRUDEFROMBASE], [test x$HAVE_EXTRUDEFROMBASE = xyes])
     372
    192373AC_MSG_RESULT($HAVE_EXTRUDEFROMBASE)
     374
    193375dnl }}}
    194376dnl with-ExtrudeFromTop{{{
     377
    195378AC_ARG_WITH([ExtrudeFromTop],
     379
    196380        AS_HELP_STRING([--with-ExtrudeFromTop = YES], [compile with ExtrudeFromTop capabilities (default is yes)]),
     381
    197382        [EXTRUDEFROMTOP=$withval],[EXTRUDEFROMTOP=yes])
     383
    198384AC_MSG_CHECKING(for ExtrudeFromTop capability compilation)
    199385
     386
    200387HAVE_EXTRUDEFROMTOP=no
     388
    201389if test "x$EXTRUDEFROMTOP" = "xyes"; then
     390
    202391        HAVE_EXTRUDEFROMTOP=yes
     392
    203393        AC_DEFINE([_HAVE_EXTRUDEFROMTOP_],[1],[with ExtrudeFromTop capability])
    204 fi
     394
     395fi
     396
    205397AM_CONDITIONAL([EXTRUDEFROMTOP], [test x$HAVE_EXTRUDEFROMTOP = xyes])
     398
    206399AC_MSG_RESULT($HAVE_EXTRUDEFROMTOP)
     400
    207401dnl }}}
    208402dnl with-FreeSurfaceBase{{{
     403
    209404AC_ARG_WITH([FreeSurfaceBase],
     405
    210406        AS_HELP_STRING([--with-FreeSurfaceBase = YES], [compile with FreeSurfaceBase capabilities (default is yes)]),
     407
    211408        [FREESURFACEBASE=$withval],[FREESURFACEBASE=yes])
     409
    212410AC_MSG_CHECKING(for FreeSurfaceBase capability compilation)
    213411
     412
    214413HAVE_FREESURFACEBASE=no
     414
    215415if test "x$FREESURFACEBASE" = "xyes"; then
     416
    216417        HAVE_FREESURFACEBASE=yes
     418
    217419        AC_DEFINE([_HAVE_FREESURFACEBASE_],[1],[with FreeSurfaceBase capability])
    218 fi
     420
     421fi
     422
    219423AM_CONDITIONAL([FREESURFACEBASE], [test x$HAVE_FREESURFACEBASE = xyes])
     424
    220425AC_MSG_RESULT($HAVE_FREESURFACEBASE)
     426
    221427dnl }}}
    222428dnl with-FreeSurfaceTop{{{
     429
    223430AC_ARG_WITH([FreeSurfaceTop],
     431
    224432        AS_HELP_STRING([--with-FreeSurfaceTop = YES], [compile with FreeSurfaceTop capabilities (default is yes)]),
     433
    225434        [FREESURFACETOP=$withval],[FREESURFACETOP=yes])
     435
    226436AC_MSG_CHECKING(for FreeSurfaceTop capability compilation)
    227437
     438
    228439HAVE_FREESURFACETOP=no
     440
    229441if test "x$FREESURFACETOP" = "xyes"; then
     442
    230443        HAVE_FREESURFACETOP=yes
     444
    231445        AC_DEFINE([_HAVE_FREESURFACETOP_],[1],[with FreeSurfaceTop capability])
    232 fi
     446
     447fi
     448
    233449AM_CONDITIONAL([FREESURFACETOP], [test x$HAVE_FREESURFACETOP = xyes])
     450
    234451AC_MSG_RESULT($HAVE_FREESURFACETOP)
     452
    235453dnl }}}
    236454dnl with-GLheightadvection{{{
     455
    237456AC_ARG_WITH([GLheightadvection],
     457
    238458        AS_HELP_STRING([--with-GLheightadvection = YES], [compile with GLheightadvection capabilities (default is yes)]),
     459
    239460        [GLHEIGHTADVECTION=$withval],[GLHEIGHTADVECTION=yes])
     461
    240462AC_MSG_CHECKING(for GLheightadvection capability compilation)
    241463
     464
    242465HAVE_GLHEIGHTADVECTION=no
     466
    243467if test "x$GLHEIGHTADVECTION" = "xyes"; then
     468
    244469        HAVE_GLHEIGHTADVECTION=yes
     470
    245471        AC_DEFINE([_HAVE_GLHEIGHTADVECTION_],[1],[with GLheightadvection capability])
    246 fi
     472
     473fi
     474
    247475AM_CONDITIONAL([GLHEIGHTADVECTION], [test x$HAVE_GLHEIGHTADVECTION = xyes])
     476
    248477AC_MSG_RESULT($HAVE_GLHEIGHTADVECTION)
    249 dnl }}}
    250 dnl with-Gia{{{
    251 AC_ARG_WITH([Gia],
    252         AS_HELP_STRING([--with-Gia= YES], [compile with Gia capabilities (default is yes)]),
    253         [GIA=$withval],[GIA=yes])
    254 AC_MSG_CHECKING(for Gia capability compilation)
    255 
    256 HAVE_GIA=no
    257 if test "x$GIA" = "xyes"; then
    258         HAVE_GIA=yes
    259         AC_DEFINE([_HAVE_GIA_],[1],[with Giacapability])
    260 fi
    261 AM_CONDITIONAL([GIA], [test x$HAVE_GIA = xyes])
    262 AC_MSG_RESULT($HAVE_GIA)
     478
    263479dnl }}}
    264480dnl with-HydrologyDCEfficient{{{
     481
    265482AC_ARG_WITH([HydrologyDCEfficient],
     483
    266484        AS_HELP_STRING([--with-HydrologyDCEfficient = YES], [compile with HydrologyDCEfficient capabilities (default is yes)]),
     485
    267486        [HYDROLOGYDCEFFICIENT=$withval],[HYDROLOGYDCEFFICIENT=yes])
     487
    268488AC_MSG_CHECKING(for HydrologyDCEfficient capability compilation)
    269489
     490
    270491HAVE_HYDROLOGYDCEFFICIENT=no
     492
    271493if test "x$HYDROLOGYDCEFFICIENT" = "xyes"; then
     494
    272495        HAVE_HYDROLOGYDCEFFICIENT=yes
     496
    273497        AC_DEFINE([_HAVE_HYDROLOGYDCEFFICIENT_],[1],[with HydrologyDCEfficient capability])
    274 fi
     498
     499fi
     500
    275501AM_CONDITIONAL([HYDROLOGYDCEFFICIENT], [test x$HAVE_HYDROLOGYDCEFFICIENT = xyes])
     502
    276503AC_MSG_RESULT($HAVE_HYDROLOGYDCEFFICIENT)
     504
    277505dnl }}}
    278506dnl with-HydrologyDCInefficient{{{
     507
    279508AC_ARG_WITH([HydrologyDCInefficient],
     509
    280510        AS_HELP_STRING([--with-HydrologyDCInefficient = YES], [compile with HydrologyDCInefficient capabilities (default is yes)]),
     511
    281512        [HYDROLOGYDCINEFFICIENT=$withval],[HYDROLOGYDCINEFFICIENT=yes])
     513
    282514AC_MSG_CHECKING(for HydrologyDCInefficient capability compilation)
    283515
     516
    284517HAVE_HYDROLOGYDCINEFFICIENT=no
     518
    285519if test "x$HYDROLOGYDCINEFFICIENT" = "xyes"; then
     520
    286521        HAVE_HYDROLOGYDCINEFFICIENT=yes
     522
    287523        AC_DEFINE([_HAVE_HYDROLOGYDCINEFFICIENT_],[1],[with HydrologyDCInefficient capability])
    288 fi
     524
     525fi
     526
    289527AM_CONDITIONAL([HYDROLOGYDCINEFFICIENT], [test x$HAVE_HYDROLOGYDCINEFFICIENT = xyes])
     528
    290529AC_MSG_RESULT($HAVE_HYDROLOGYDCINEFFICIENT)
     530
     531dnl }}}
     532dnl with-HydrologyGlaDS{{{
     533
     534AC_ARG_WITH([HydrologyGlaDS],
     535
     536        AS_HELP_STRING([--with-HydrologyGlaDS = YES], [compile with HydrologyGlaDS capabilities (default is yes)]),
     537
     538        [HYDROLOGYGLADS=$withval],[HYDROLOGYGLADS=yes])
     539
     540AC_MSG_CHECKING(for HydrologyGlaDS capability compilation)
     541
     542
     543HAVE_HYDROLOGYGLADS=no
     544
     545if test "x$HYDROLOGYGLADS" = "xyes"; then
     546
     547        HAVE_HYDROLOGYGLADS=yes
     548
     549        AC_DEFINE([_HAVE_HYDROLOGYGLADS_],[1],[with HydrologyGlaDS capability])
     550
     551fi
     552
     553AM_CONDITIONAL([HYDROLOGYGLADS], [test x$HAVE_HYDROLOGYGLADS = xyes])
     554
     555AC_MSG_RESULT($HAVE_HYDROLOGYGLADS)
     556
     557dnl }}}
     558dnl with-HydrologyPism{{{
     559
     560AC_ARG_WITH([HydrologyPism],
     561
     562        AS_HELP_STRING([--with-HydrologyPism = YES], [compile with HydrologyPism capabilities (default is yes)]),
     563
     564        [HYDROLOGYPISM=$withval],[HYDROLOGYPISM=yes])
     565
     566AC_MSG_CHECKING(for HydrologyPism capability compilation)
     567
     568
     569HAVE_HYDROLOGYPISM=no
     570
     571if test "x$HYDROLOGYPISM" = "xyes"; then
     572
     573        HAVE_HYDROLOGYPISM=yes
     574
     575        AC_DEFINE([_HAVE_HYDROLOGYPISM_],[1],[with HydrologyPism capability])
     576
     577fi
     578
     579AM_CONDITIONAL([HYDROLOGYPISM], [test x$HAVE_HYDROLOGYPISM = xyes])
     580
     581AC_MSG_RESULT($HAVE_HYDROLOGYPISM)
     582
     583dnl }}}
     584dnl with-HydrologyShakti{{{
     585
     586AC_ARG_WITH([HydrologyShakti],
     587
     588        AS_HELP_STRING([--with-HydrologyShakti = YES], [compile with HydrologyShakti capabilities (default is yes)]),
     589
     590        [HYDROLOGYSHAKTI=$withval],[HYDROLOGYSHAKTI=yes])
     591
     592AC_MSG_CHECKING(for HydrologyShakti capability compilation)
     593
     594
     595HAVE_HYDROLOGYSHAKTI=no
     596
     597if test "x$HYDROLOGYSHAKTI" = "xyes"; then
     598
     599        HAVE_HYDROLOGYSHAKTI=yes
     600
     601        AC_DEFINE([_HAVE_HYDROLOGYSHAKTI_],[1],[with HydrologyShakti capability])
     602
     603fi
     604
     605AM_CONDITIONAL([HYDROLOGYSHAKTI], [test x$HAVE_HYDROLOGYSHAKTI = xyes])
     606
     607AC_MSG_RESULT($HAVE_HYDROLOGYSHAKTI)
     608
    291609dnl }}}
    292610dnl with-HydrologyShreve{{{
     611
    293612AC_ARG_WITH([HydrologyShreve],
     613
    294614        AS_HELP_STRING([--with-HydrologyShreve = YES], [compile with HydrologyShreve capabilities (default is yes)]),
     615
    295616        [HYDROLOGYSHREVE=$withval],[HYDROLOGYSHREVE=yes])
     617
    296618AC_MSG_CHECKING(for HydrologyShreve capability compilation)
    297619
     620
    298621HAVE_HYDROLOGYSHREVE=no
     622
    299623if test "x$HYDROLOGYSHREVE" = "xyes"; then
     624
    300625        HAVE_HYDROLOGYSHREVE=yes
     626
    301627        AC_DEFINE([_HAVE_HYDROLOGYSHREVE_],[1],[with HydrologyShreve capability])
    302 fi
     628
     629fi
     630
    303631AM_CONDITIONAL([HYDROLOGYSHREVE], [test x$HAVE_HYDROLOGYSHREVE = xyes])
     632
    304633AC_MSG_RESULT($HAVE_HYDROLOGYSHREVE)
    305 dnl }}}
    306 dnl with-HydrologyTws{{{
    307 AC_ARG_WITH([HydrologyTws],
    308         AS_HELP_STRING([--with-HydrologyTws = YES], [compile with HydrologyTws capabilities (default is yes)]),
    309         [HYDROLOGYTWS=$withval],[HYDROLOGYTWS=yes])
    310 AC_MSG_CHECKING(for HydrologyTws capability compilation)
    311 
    312 HAVE_HYDROLOGYTWS=no
    313 if test "x$HYDROLOGYTWS" = "xyes"; then
    314         HAVE_HYDROLOGYTWS=yes
    315         AC_DEFINE([_HAVE_HYDROLOGYTWS_],[1],[with HydrologyTws capability])
    316 fi
    317 AM_CONDITIONAL([HYDROLOGYTWS], [test x$HAVE_HYDROLOGYTWS = xyes])
    318 AC_MSG_RESULT($HAVE_HYDROLOGYTWS)
    319 dnl }}}
    320 dnl with-HydrologyGlaDS{{{
    321 AC_ARG_WITH([HydrologyGlaDS],
    322         AS_HELP_STRING([--with-HydrologyGlaDS = YES], [compile with HydrologyGlaDS capabilities (default is yes)]),
    323         [HYDROLOGYGLADS=$withval],[HYDROLOGYGLADS=yes])
    324 AC_MSG_CHECKING(for HydrologyGlaDS capability compilation)
    325 
    326 HAVE_HYDROLOGYGLADS=no
    327 if test "x$HYDROLOGYGLADS" = "xyes"; then
    328         HAVE_HYDROLOGYGLADS=yes
    329         AC_DEFINE([_HAVE_HYDROLOGYGLADS_],[1],[with HydrologyGlaDS capability])
    330 fi
    331 AM_CONDITIONAL([HYDROLOGYGLADS], [test x$HAVE_HYDROLOGYGLADS = xyes])
    332 AC_MSG_RESULT($HAVE_HYDROLOGYGLADS)
    333 dnl }}}
    334 dnl with-HydrologyShakti{{{
    335 AC_ARG_WITH([HydrologyShakti],
    336         AS_HELP_STRING([--with-HydrologyShakti = YES], [compile with HydrologyShakti capabilities (default is yes)]),
    337         [HYDROLOGYSHAKTI=$withval],[HYDROLOGYSHAKTI=yes])
    338 AC_MSG_CHECKING(for HydrologyShakti capability compilation)
    339 
    340 HAVE_HYDROLOGYSHAKTI=no
    341 if test "x$HYDROLOGYSHAKTI" = "xyes"; then
    342         HAVE_HYDROLOGYSHAKTI=yes
    343         AC_DEFINE([_HAVE_HYDROLOGYSHAKTI_],[1],[with HydrologyShakti capability])
    344 fi
    345 AM_CONDITIONAL([HYDROLOGYSHAKTI], [test x$HAVE_HYDROLOGYSHAKTI = xyes])
    346 AC_MSG_RESULT($HAVE_HYDROLOGYSHAKTI)
    347 dnl }}}
    348 dnl with-HydrologyPism{{{
    349 AC_ARG_WITH([HydrologyPism],
    350         AS_HELP_STRING([--with-HydrologyPism = YES], [compile with HydrologyPism capabilities (default is yes)]),
    351         [HYDROLOGYPISM=$withval],[HYDROLOGYPISM=yes])
    352 AC_MSG_CHECKING(for HydrologyPism capability compilation)
    353 
    354 HAVE_HYDROLOGYPISM=no
    355 if test "x$HYDROLOGYPISM" = "xyes"; then
    356         HAVE_HYDROLOGYPISM=yes
    357         AC_DEFINE([_HAVE_HYDROLOGYPISM_],[1],[with HydrologyPism capability])
    358 fi
    359 AM_CONDITIONAL([HYDROLOGYPISM], [test x$HAVE_HYDROLOGYPISM = xyes])
    360 AC_MSG_RESULT($HAVE_HYDROLOGYPISM)
     634
    361635dnl }}}
    362636dnl with-L2ProjectionBase{{{
     637
    363638AC_ARG_WITH([L2ProjectionBase],
     639
    364640        AS_HELP_STRING([--with-L2ProjectionBase = YES], [compile with L2ProjectionBase capabilities (default is yes)]),
     641
    365642        [L2PROJECTIONBASE=$withval],[L2PROJECTIONBASE=yes])
     643
    366644AC_MSG_CHECKING(for L2ProjectionBase capability compilation)
    367645
     646
    368647HAVE_L2PROJECTIONBASE=no
     648
    369649if test "x$L2PROJECTIONBASE" = "xyes"; then
     650
    370651        HAVE_L2PROJECTIONBASE=yes
     652
    371653        AC_DEFINE([_HAVE_L2PROJECTIONBASE_],[1],[with L2ProjectionBase capability])
    372 fi
     654
     655fi
     656
    373657AM_CONDITIONAL([L2PROJECTIONBASE], [test x$HAVE_L2PROJECTIONBASE = xyes])
     658
    374659AC_MSG_RESULT($HAVE_L2PROJECTIONBASE)
     660
    375661dnl }}}
    376662dnl with-L2ProjectionEPL{{{
     663
    377664AC_ARG_WITH([L2ProjectionEPL],
     665
    378666        AS_HELP_STRING([--with-L2ProjectionEPL = YES], [compile with L2ProjectionEPL capabilities (default is yes)]),
     667
    379668        [L2PROJECTIONEPL=$withval],[L2PROJECTIONEPL=yes])
     669
    380670AC_MSG_CHECKING(for L2ProjectionEPL capability compilation)
    381671
     672
    382673HAVE_L2PROJECTIONEPL=no
     674
    383675if test "x$L2PROJECTIONEPL" = "xyes"; then
     676
    384677        HAVE_L2PROJECTIONEPL=yes
     678
    385679        AC_DEFINE([_HAVE_L2PROJECTIONEPL_],[1],[with L2ProjectionEPL capability])
    386 fi
     680
     681fi
     682
    387683AM_CONDITIONAL([L2PROJECTIONEPL], [test x$HAVE_L2PROJECTIONEPL = xyes])
     684
    388685AC_MSG_RESULT($HAVE_L2PROJECTIONEPL)
     686
    389687dnl }}}
    390688dnl with-Levelset{{{
     689
    391690AC_ARG_WITH([Levelset],
     691
    392692        AS_HELP_STRING([--with-Levelset = YES], [compile with Levelset capabilities (default is yes)]),
     693
    393694        [LEVELSET=$withval],[LEVELSET=yes])
     695
    394696AC_MSG_CHECKING(for Levelset capability compilation)
    395697
     698
    396699HAVE_LEVELSET=no
     700
    397701if test "x$LEVELSET" = "xyes"; then
     702
    398703        HAVE_LEVELSET=yes
     704
    399705        AC_DEFINE([_HAVE_LEVELSET_],[1],[with Levelset capability])
    400 fi
     706
     707fi
     708
    401709AM_CONDITIONAL([LEVELSET], [test x$HAVE_LEVELSET = xyes])
     710
    402711AC_MSG_RESULT($HAVE_LEVELSET)
     712
    403713dnl }}}
    404714dnl with-Love{{{
     715
    405716AC_ARG_WITH([Love],
     717
    406718        AS_HELP_STRING([--with-Love = YES], [compile with Love capabilities (default is yes)]),
     719
    407720        [LOVE=$withval],[LOVE=yes])
     721
    408722AC_MSG_CHECKING(for Love capability compilation)
    409723
     724
    410725HAVE_LOVE=no
     726
    411727if test "x$LOVE" = "xyes"; then
     728
    412729        HAVE_LOVE=yes
     730
    413731        AC_DEFINE([_HAVE_LOVE_],[1],[with Love capability])
    414 fi
     732
     733fi
     734
    415735AM_CONDITIONAL([LOVE], [test x$HAVE_LOVE = xyes])
     736
    416737AC_MSG_RESULT($HAVE_LOVE)
     738
    417739dnl }}}
    418740dnl with-Masstransport{{{
     741
    419742AC_ARG_WITH([Masstransport],
     743
    420744        AS_HELP_STRING([--with-Masstransport = YES], [compile with Masstransport capabilities (default is yes)]),
     745
    421746        [MASSTRANSPORT=$withval],[MASSTRANSPORT=yes])
     747
    422748AC_MSG_CHECKING(for Masstransport capability compilation)
    423749
     750
    424751HAVE_MASSTRANSPORT=no
     752
    425753if test "x$MASSTRANSPORT" = "xyes"; then
     754
    426755        HAVE_MASSTRANSPORT=yes
     756
    427757        AC_DEFINE([_HAVE_MASSTRANSPORT_],[1],[with Masstransport capability])
    428 fi
     758
     759fi
     760
    429761AM_CONDITIONAL([MASSTRANSPORT], [test x$HAVE_MASSTRANSPORT = xyes])
     762
    430763AC_MSG_RESULT($HAVE_MASSTRANSPORT)
    431 dnl }}}
    432 dnl with-Oceanmasstransport{{{
    433 AC_ARG_WITH([Oceanmasstransport],
    434         AS_HELP_STRING([--with-Oceanmasstransport = YES], [compile with Oceanmasstransport capabilities (default is yes)]),
    435         [OCEANMASSTRANSPORT=$withval],[OCEANMASSTRANSPORT=yes])
    436 AC_MSG_CHECKING(for Oceanmasstransport capability compilation)
    437 
    438 HAVE_OCEANMASSTRANSPORT=no
    439 if test "x$OCEANMASSTRANSPORT" = "xyes"; then
    440         HAVE_OCEANMASSTRANSPORT=yes
    441         AC_DEFINE([_HAVE_OCEANMASSTRANSPORT_],[1],[with Oceanmasstransport capability])
    442 fi
    443 AM_CONDITIONAL([OCEANMASSTRANSPORT], [test x$HAVE_OCEANMASSTRANSPORT = xyes])
    444 AC_MSG_RESULT($HAVE_OCEANMASSTRANSPORT)
     764
    445765dnl }}}
    446766dnl with-Melting{{{
     767
    447768AC_ARG_WITH([Melting],
     769
    448770        AS_HELP_STRING([--with-Melting = YES], [compile with Melting capabilities (default is yes)]),
     771
    449772        [MELTING=$withval],[MELTING=yes])
     773
    450774AC_MSG_CHECKING(for Melting capability compilation)
    451775
     776
    452777HAVE_MELTING=no
     778
    453779if test "x$MELTING" = "xyes"; then
     780
    454781        HAVE_MELTING=yes
     782
    455783        AC_DEFINE([_HAVE_MELTING_],[1],[with Melting capability])
    456 fi
     784
     785fi
     786
    457787AM_CONDITIONAL([MELTING], [test x$HAVE_MELTING = xyes])
     788
    458789AC_MSG_RESULT($HAVE_MELTING)
     790
     791dnl }}}
     792dnl with-Oceantransport{{{
     793
     794AC_ARG_WITH([Oceantransport],
     795
     796        AS_HELP_STRING([--with-Oceantransport = YES], [compile with Oceantransport capabilities (default is yes)]),
     797
     798        [OCEANTRANSPORT=$withval],[OCEANTRANSPORT=yes])
     799
     800AC_MSG_CHECKING(for Oceantransport capability compilation)
     801
     802
     803HAVE_OCEANTRANSPORT=no
     804
     805if test "x$OCEANTRANSPORT" = "xyes"; then
     806
     807        HAVE_OCEANTRANSPORT=yes
     808
     809        AC_DEFINE([_HAVE_OCEANTRANSPORT_],[1],[with Oceantransport capability])
     810
     811fi
     812
     813AM_CONDITIONAL([OCEANTRANSPORT], [test x$HAVE_OCEANTRANSPORT = xyes])
     814
     815AC_MSG_RESULT($HAVE_OCEANTRANSPORT)
     816
     817dnl }}}
     818dnl with-Recovery{{{
     819
     820AC_ARG_WITH([Recovery],
     821
     822        AS_HELP_STRING([--with-Recovery = YES], [compile with Recovery capabilities (default is yes)]),
     823
     824        [RECOVERY=$withval],[RECOVERY=yes])
     825
     826AC_MSG_CHECKING(for Recovery capability compilation)
     827
     828
     829HAVE_RECOVERY=no
     830
     831if test "x$RECOVERY" = "xyes"; then
     832
     833        HAVE_RECOVERY=yes
     834
     835        AC_DEFINE([_HAVE_RECOVERY_],[1],[with Recovery capability])
     836
     837fi
     838
     839AM_CONDITIONAL([RECOVERY], [test x$HAVE_RECOVERY = xyes])
     840
     841AC_MSG_RESULT($HAVE_RECOVERY)
     842
    459843dnl }}}
    460844dnl with-Sampling{{{
     
    484868
    485869dnl }}}
    486 dnl with-Sealevelrise{{{
    487 AC_ARG_WITH([Sealevelrise],
    488         AS_HELP_STRING([--with-Sealevelrise = YES], [compile with Sealevelrise capabilities (default is yes)]),
    489         [SEALEVELRISE=$withval],[SEALEVELRISE=yes])
    490 AC_MSG_CHECKING(for Sealevelrise capability compilation)
    491 
    492 HAVE_SEALEVELRISE=no
    493 if test "x$SEALEVELRISE" = "xyes"; then
    494         HAVE_SEALEVELRISE=yes
    495         AC_DEFINE([_HAVE_SEALEVELRISE_],[1],[with Sealevelrise capability])
    496 fi
    497 AM_CONDITIONAL([SEALEVELRISE], [test x$HAVE_SEALEVELRISE = xyes])
    498 AC_MSG_RESULT($HAVE_SEALEVELRISE)
     870dnl with-Sealevelchange{{{
     871
     872AC_ARG_WITH([Sealevelchange],
     873
     874        AS_HELP_STRING([--with-Sealevelchange = YES], [compile with Sealevelchange capabilities (default is yes)]),
     875
     876        [SEALEVELCHANGE=$withval],[SEALEVELCHANGE=yes])
     877
     878AC_MSG_CHECKING(for Sealevelchange capability compilation)
     879
     880
     881HAVE_SEALEVELCHANGE=no
     882
     883if test "x$SEALEVELCHANGE" = "xyes"; then
     884
     885        HAVE_SEALEVELCHANGE=yes
     886
     887        AC_DEFINE([_HAVE_SEALEVELCHANGE_],[1],[with Sealevelchange capability])
     888
     889fi
     890
     891AM_CONDITIONAL([SEALEVELCHANGE], [test x$HAVE_SEALEVELCHANGE = xyes])
     892
     893AC_MSG_RESULT($HAVE_SEALEVELCHANGE)
     894
    499895dnl }}}
    500896dnl with-Smb{{{
     897
    501898AC_ARG_WITH([Smb],
     899
    502900        AS_HELP_STRING([--with-Smb = YES], [compile with Smb capabilities (default is yes)]),
     901
    503902        [SMB=$withval],[SMB=yes])
     903
    504904AC_MSG_CHECKING(for Smb capability compilation)
    505905
     906
    506907HAVE_SMB=no
     908
    507909if test "x$SMB" = "xyes"; then
     910
    508911        HAVE_SMB=yes
     912
    509913        AC_DEFINE([_HAVE_SMB_],[1],[with Smb capability])
    510 fi
     914
     915fi
     916
    511917AM_CONDITIONAL([SMB], [test x$HAVE_SMB = xyes])
     918
    512919AC_MSG_RESULT($HAVE_SMB)
     920
    513921dnl }}}
    514922dnl with-Smooth{{{
     923
    515924AC_ARG_WITH([Smooth],
     925
    516926        AS_HELP_STRING([--with-Smooth = YES], [compile with Smooth capabilities (default is yes)]),
     927
    517928        [SMOOTH=$withval],[SMOOTH=yes])
     929
    518930AC_MSG_CHECKING(for Smooth capability compilation)
    519931
     932
    520933HAVE_SMOOTH=no
     934
    521935if test "x$SMOOTH" = "xyes"; then
     936
    522937        HAVE_SMOOTH=yes
     938
    523939        AC_DEFINE([_HAVE_SMOOTH_],[1],[with Smooth capability])
    524 fi
     940
     941fi
     942
    525943AM_CONDITIONAL([SMOOTH], [test x$HAVE_SMOOTH = xyes])
     944
    526945AC_MSG_RESULT($HAVE_SMOOTH)
     946
    527947dnl }}}
    528948dnl with-Stressbalance{{{
     949
    529950AC_ARG_WITH([Stressbalance],
     951
    530952        AS_HELP_STRING([--with-Stressbalance = YES], [compile with Stressbalance capabilities (default is yes)]),
     953
    531954        [STRESSBALANCE=$withval],[STRESSBALANCE=yes])
     955
    532956AC_MSG_CHECKING(for Stressbalance capability compilation)
    533957
     958
    534959HAVE_STRESSBALANCE=no
     960
    535961if test "x$STRESSBALANCE" = "xyes"; then
     962
    536963        HAVE_STRESSBALANCE=yes
     964
    537965        AC_DEFINE([_HAVE_STRESSBALANCE_],[1],[with Stressbalance capability])
    538 fi
     966
     967fi
     968
    539969AM_CONDITIONAL([STRESSBALANCE], [test x$HAVE_STRESSBALANCE = xyes])
     970
    540971AC_MSG_RESULT($HAVE_STRESSBALANCE)
     972
    541973dnl }}}
    542974dnl with-StressbalanceSIA{{{
     975
    543976AC_ARG_WITH([StressbalanceSIA],
     977
    544978        AS_HELP_STRING([--with-StressbalanceSIA = YES], [compile with StressbalanceSIA capabilities (default is yes)]),
     979
    545980        [STRESSBALANCESIA=$withval],[STRESSBALANCESIA=yes])
     981
    546982AC_MSG_CHECKING(for StressbalanceSIA capability compilation)
    547983
     984
    548985HAVE_STRESSBALANCESIA=no
     986
    549987if test "x$STRESSBALANCESIA" = "xyes"; then
     988
    550989        HAVE_STRESSBALANCESIA=yes
     990
    551991        AC_DEFINE([_HAVE_STRESSBALANCESIA_],[1],[with StressbalanceSIA capability])
    552 fi
     992
     993fi
     994
    553995AM_CONDITIONAL([STRESSBALANCESIA], [test x$HAVE_STRESSBALANCESIA = xyes])
     996
    554997AC_MSG_RESULT($HAVE_STRESSBALANCESIA)
     998
    555999dnl }}}
    5561000dnl with-StressbalanceVertical{{{
     1001
    5571002AC_ARG_WITH([StressbalanceVertical],
     1003
    5581004        AS_HELP_STRING([--with-StressbalanceVertical = YES], [compile with StressbalanceVertical capabilities (default is yes)]),
     1005
    5591006        [STRESSBALANCEVERTICAL=$withval],[STRESSBALANCEVERTICAL=yes])
     1007
    5601008AC_MSG_CHECKING(for StressbalanceVertical capability compilation)
    5611009
     1010
    5621011HAVE_STRESSBALANCEVERTICAL=no
     1012
    5631013if test "x$STRESSBALANCEVERTICAL" = "xyes"; then
     1014
    5641015        HAVE_STRESSBALANCEVERTICAL=yes
     1016
    5651017        AC_DEFINE([_HAVE_STRESSBALANCEVERTICAL_],[1],[with StressbalanceVertical capability])
    566 fi
     1018
     1019fi
     1020
    5671021AM_CONDITIONAL([STRESSBALANCEVERTICAL], [test x$HAVE_STRESSBALANCEVERTICAL = xyes])
     1022
    5681023AC_MSG_RESULT($HAVE_STRESSBALANCEVERTICAL)
     1024
    5691025dnl }}}
    5701026dnl with-Thermal{{{
     1027
    5711028AC_ARG_WITH([Thermal],
     1029
    5721030        AS_HELP_STRING([--with-Thermal = YES], [compile with Thermal capabilities (default is yes)]),
     1031
    5731032        [THERMAL=$withval],[THERMAL=yes])
     1033
    5741034AC_MSG_CHECKING(for Thermal capability compilation)
    5751035
     1036
    5761037HAVE_THERMAL=no
     1038
    5771039if test "x$THERMAL" = "xyes"; then
     1040
    5781041        HAVE_THERMAL=yes
     1042
    5791043        AC_DEFINE([_HAVE_THERMAL_],[1],[with Thermal capability])
    580 fi
     1044
     1045fi
     1046
    5811047AM_CONDITIONAL([THERMAL], [test x$HAVE_THERMAL = xyes])
     1048
    5821049AC_MSG_RESULT($HAVE_THERMAL)
     1050
    5831051dnl }}}
    5841052dnl with-UzawaPressure{{{
     1053
    5851054AC_ARG_WITH([UzawaPressure],
     1055
    5861056        AS_HELP_STRING([--with-UzawaPressure = YES], [compile with UzawaPressure capabilities (default is yes)]),
     1057
    5871058        [UZAWAPRESSURE=$withval],[UZAWAPRESSURE=yes])
     1059
    5881060AC_MSG_CHECKING(for UzawaPressure capability compilation)
    5891061
     1062
    5901063HAVE_UZAWAPRESSURE=no
     1064
    5911065if test "x$UZAWAPRESSURE" = "xyes"; then
     1066
    5921067        HAVE_UZAWAPRESSURE=yes
     1068
    5931069        AC_DEFINE([_HAVE_UZAWAPRESSURE_],[1],[with UzawaPressure capability])
    594 fi
     1070
     1071fi
     1072
    5951073AM_CONDITIONAL([UZAWAPRESSURE], [test x$HAVE_UZAWAPRESSURE = xyes])
     1074
    5961075AC_MSG_RESULT($HAVE_UZAWAPRESSURE)
     1076
    5971077dnl }}}
    5981078
  • issm/trunk-jpl/src/c/Makefile.am

    r26051 r26099  
    212212        ./modules/NodalValuex/NodalValuex.cpp \
    213213        ./modules/VertexCoordinatesx/VertexCoordinatesx.cpp \
     214        ./modules/ElementCoordinatesx/ElementCoordinatesx.cpp \
    214215        ./modules/OutputResultsx/OutputResultsx.cpp \
    215216        ./modules/InputDepthAverageAtBasex/InputDepthAverageAtBasex.cpp \
     
    480481issm_sources += ./analyses/MasstransportAnalysis.cpp
    481482endif
    482 if OCEANMASSTRANSPORT
     483if OCEANTRANSPORT
    483484issm_sources += ./analyses/OceantransportAnalysis.cpp
    484485endif
     
    517518endif
    518519#}}}
    519 #Gia sources (only if have fortran){{{
    520 if GIA
     520#Love sources (only if have fortran){{{
     521if LOVE
     522if FORTRAN
     523issm_sources += \
     524        ./cores/love_core.cpp \
     525        ./analyses/LoveAnalysis.cpp \
     526        ./modules/FourierLoveCorex/FourierLoveCorex.cpp \
     527        ./modules/FourierLoveCorex/lnb_param.f90 \
     528        ./modules/FourierLoveCorex/model.f90 \
     529        ./modules/FourierLoveCorex/util.f90 \
     530        ./modules/FourierLoveCorex/lovenb_sub.f90 \
     531        ./modules/FourierLoveCorex/love_numbers.f90
     532endif
     533endif
     534#}}}
     535#Esa sources  {{{
     536if ESA
     537issm_sources += \
     538        ./cores/esa_core.cpp \
     539        ./analyses/EsaAnalysis.cpp
     540endif
     541#}}}
     542#Oceansources  {{{
     543if OCEAN
     544issm_sources += ./modules/OceanExchangeDatax/OceanExchangeDatax.cpp
     545endif
     546#}}}
     547#Sampling sources  {{{
     548if SAMPLING
     549issm_sources += \
     550        ./cores/sampling_core.cpp \
     551        ./analyses/SamplingAnalysis.cpp
     552endif
     553# }}}
     554#Slc sources  {{{
     555if SEALEVELCHANGE
     556issm_sources += \
     557        ./cores/sealevelchange_core.cpp \
     558        ./analyses/SealevelchangeAnalysis.cpp
     559
     560#gia ivins physics (only if have fortran)
    521561if FORTRAN
    522562issm_sources += \
     
    530570        ./modules/GiaDeflectionCorex/what0.f
    531571endif
    532 endif
    533 #}}}
    534 #Love sources (only if have fortran){{{
    535 if LOVE
    536 if FORTRAN
    537 issm_sources += \
    538         ./cores/love_core.cpp \
    539         ./analyses/LoveAnalysis.cpp \
    540         ./modules/FourierLoveCorex/FourierLoveCorex.cpp \
    541         ./modules/FourierLoveCorex/lnb_param.f90 \
    542         ./modules/FourierLoveCorex/model.f90 \
    543         ./modules/FourierLoveCorex/util.f90 \
    544         ./modules/FourierLoveCorex/lovenb_sub.f90 \
    545         ./modules/FourierLoveCorex/love_numbers.f90
    546 endif
    547 endif
    548 #}}}
    549 #Esa sources  {{{
    550 if ESA
    551 issm_sources += \
    552         ./cores/esa_core.cpp \
    553         ./analyses/EsaAnalysis.cpp
    554 endif
    555 #}}}
    556 #Oceansources  {{{
    557 if OCEAN
    558 issm_sources += ./modules/OceanExchangeDatax/OceanExchangeDatax.cpp
    559 endif
    560 #}}}
    561 #Sampling sources  {{{
    562 if SAMPLING
    563 issm_sources += \
    564         ./cores/sampling_core.cpp \
    565         ./analyses/SamplingAnalysis.cpp
    566 endif
    567 # }}}
    568 #Slc sources  {{{
    569 if SEALEVELRISE
    570 issm_sources += \
    571         ./cores/sealevelchange_core.cpp \
    572         ./analyses/SealevelchangeAnalysis.cpp
     572
    573573endif
    574574#}}}
  • issm/trunk-jpl/src/c/analyses/EnumToAnalysis.cpp

    r26047 r26099  
    1414
    1515        switch(analysis_enum){
     16                #ifdef _HAVE_HYDROLOGYTWS_
     17                case HydrologyTwsAnalysisEnum : return new HydrologyTwsAnalysis();
     18                #endif
    1619                #ifdef _HAVE_ADJOINTBALANCETHICKNESS2_
    1720                case AdjointBalancethickness2AnalysisEnum : return new AdjointBalancethickness2Analysis();
     
    7174                case HydrologyDCInefficientAnalysisEnum : return new HydrologyDCInefficientAnalysis();
    7275                #endif
    73                 #ifdef _HAVE_HYDROLOGYSHREVE_
    74                 case HydrologyShreveAnalysisEnum : return new HydrologyShreveAnalysis();
    75                 #endif
    7676                #ifdef _HAVE_HYDROLOGYGLADS_
    7777                case HydrologyGlaDSAnalysisEnum : return new HydrologyGlaDSAnalysis();
     78                #endif
     79                #ifdef _HAVE_HYDROLOGYPISM_
     80                case HydrologyPismAnalysisEnum : return new HydrologyPismAnalysis();
    7881                #endif
    7982                #ifdef _HAVE_HYDROLOGYSHAKTI_
    8083                case HydrologyShaktiAnalysisEnum : return new HydrologyShaktiAnalysis();
    8184                #endif
    82                 #ifdef _HAVE_HYDROLOGYPISM_
    83                 case HydrologyPismAnalysisEnum : return new HydrologyPismAnalysis();
     85                #ifdef _HAVE_HYDROLOGYSHREVE_
     86                case HydrologyShreveAnalysisEnum : return new HydrologyShreveAnalysis();
    8487                #endif
    8588                #ifdef _HAVE_L2PROJECTIONBASE_
     
    101104                case MeltingAnalysisEnum : return new MeltingAnalysis();
    102105                #endif
     106                #ifdef _HAVE_OCEANTRANSPORT_
     107                case OceantransportAnalysisEnum : return new OceantransportAnalysis();
     108                #endif
    103109                #ifdef _HAVE_SAMPLING_
    104110                case SamplingAnalysisEnum : return new SamplingAnalysis();
    105111                #endif
    106                 #ifdef _HAVE_SEALEVELRISE_
     112                #ifdef _HAVE_SEALEVELCHANGE_
    107113                case SealevelchangeAnalysisEnum : return new SealevelchangeAnalysis();
    108114                #endif
  • issm/trunk-jpl/src/c/analyses/OceantransportAnalysis.cpp

    r26076 r26099  
    1818}/*}}}*/
    1919int  OceantransportAnalysis::DofsPerNode(int** doflist,int domaintype,int approximation){/*{{{*/
    20         return 1;
     20        return 3;
    2121}/*}}}*/
    2222void OceantransportAnalysis::UpdateElements(Elements* elements,Inputs* inputs,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/
     
    5959        iomodel->ConstantToInput(inputs,elements,0.,OldAccumulatedDeltaBottomPressureEnum,P1Enum);
    6060        iomodel->FetchDataToInput(inputs,elements,"md.initialization.bottompressure",BottomPressureEnum);
     61        iomodel->FetchDataToInput(inputs,elements,"md.initialization.dsl",DslEnum);
     62        iomodel->FetchDataToInput(inputs,elements,"md.initialization.str",StrEnum);
    6163
    6264
  • issm/trunk-jpl/src/c/analyses/SealevelchangeAnalysis.cpp

    r26047 r26099  
    110110        IssmDouble*  partitionice=NULL;
    111111        IssmDouble*  partitionhydro=NULL;
     112        IssmDouble*  partitionocean=NULL;
    112113        IssmDouble*  bslcice_partition=NULL;
    113114        IssmDouble*  bslchydro_partition=NULL;
    114         int          npartice,nparthydro,nel;
     115        IssmDouble*  bslcocean_partition=NULL;
     116        int          npartice,nparthydro,npartocean,nel;
    115117
    116118
     
    159161                xDelete<IssmDouble>(partitionice);
    160162        }
     163       
    161164        iomodel->FetchData(&nparthydro,"md.solidearth.nparthydro");
    162165        parameters->AddObject(new IntParam(SolidearthNpartHydroEnum,nparthydro));
     
    168171                parameters->AddObject(new DoubleMatParam(CumBslcHydroPartitionEnum,bslchydro_partition,nparthydro,1));
    169172                xDelete<IssmDouble>(partitionhydro);
     173        }
     174
     175        iomodel->FetchData(&npartocean,"md.solidearth.npartocean");
     176        parameters->AddObject(new IntParam(SolidearthNpartOceanEnum,npartocean));
     177        if(npartocean){
     178                iomodel->FetchData(&partitionocean,&nel,NULL,"md.solidearth.partitionocean");
     179                parameters->AddObject(new DoubleMatParam(SolidearthPartitionOceanEnum,partitionocean,nel,1));
     180                parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.npartocean",SolidearthNpartOceanEnum));
     181                bslcocean_partition=xNewZeroInit<IssmDouble>(npartocean);
     182                parameters->AddObject(new DoubleMatParam(CumBslcOceanPartitionEnum,bslcocean_partition,npartocean,1));
     183                xDelete<IssmDouble>(partitionocean);
    170184        }
    171185
  • issm/trunk-jpl/src/c/classes/Elements/Element.h

    r26090 r26099  
    238238                virtual void       ElementResponse(IssmDouble* presponse,int response_enum)=0;
    239239                virtual void       ElementSizes(IssmDouble* phx,IssmDouble* phy,IssmDouble* phz)=0;
     240                virtual void       ElementCoordinates(Vector<IssmDouble>* vxe,Vector<IssmDouble>* vye,Vector<IssmDouble>* vze,bool spherical=false)=0;
    240241                virtual int        FiniteElement(void)=0;
    241242                virtual IssmDouble FloatingArea(bool scaled)=0;
     
    374375                virtual void          EsaGeodetic3D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast,IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx,IssmDouble* yy,IssmDouble* zz)=0;
    375376                #endif
    376                 #ifdef _HAVE_SEALEVELRISE_
     377                #ifdef _HAVE_SEALEVELCHANGE_
    377378                virtual void          SetSealevelMasks(SealevelMasks* masks)=0;
    378379                virtual IssmDouble    GetArea3D(void)=0;
     
    383384                virtual IssmDouble    SealevelchangeBarystaticHydro(IssmDouble* Sgi, SealevelMasks* masks,Vector<IssmDouble>* barystatic_contribution, IssmDouble* partition, IssmDouble oceanarea)=0;
    384385                virtual void          SealevelchangeBarystaticBottomPressure(IssmDouble* Sgi, SealevelMasks* masks)=0;
    385                 virtual void          SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx, IssmDouble* yy, IssmDouble* zz)=0;
     386                virtual void          SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx, IssmDouble* yy, IssmDouble* zz,
     387                                IssmDouble* xxe, IssmDouble* yye, IssmDouble* zze)=0;
    386388                virtual void          SealevelchangeSal(IssmDouble* Sgo, IssmDouble* Sg_old,SealevelMasks* mask)=0;
    387389                virtual void          DeformationFromSurfaceLoads(IssmDouble* Up, IssmDouble* North, IssmDouble* East, IssmDouble* Sg,SealevelMasks* masks)=0;
  • issm/trunk-jpl/src/c/classes/Elements/Penta.h

    r26090 r26099  
    7070                void           CreateInputTimeAverage(int transientinput_enum,int averagedinput_enum,IssmDouble start_time,IssmDouble end_time,int averaging_method);
    7171                void           ElementResponse(IssmDouble* presponse,int response_enum);
     72                void           ElementCoordinates(Vector<IssmDouble>* vxe,Vector<IssmDouble>* vye,Vector<IssmDouble>* vze,bool spherical=false){_error_("not implemented yet");};
    7273                void           ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz);
    7374                int            FiniteElement(void);
     
    214215                void    EsaGeodetic3D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast,IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx,IssmDouble* yy,IssmDouble* zz){_error_("not implemented yet!");};
    215216                #endif
    216                 #ifdef _HAVE_SEALEVELRISE_
     217                #ifdef _HAVE_SEALEVELCHANGE_
    217218                IssmDouble    OceanAverage(IssmDouble* Sg, SealevelMasks* masks){_error_("not implemented yet!");};
    218219                void    SetSealevelMasks(SealevelMasks* masks){_error_("not implemented yet!");};
    219220                void    SealevelchangeMomentOfInertia(IssmDouble* dI_list,IssmDouble* Sg_old, SealevelMasks* masks){_error_("not implemented yet!");};
    220                 void    SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx, IssmDouble* yy, IssmDouble* zz){_error_("not implemented yet!");};
     221                void    SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx, IssmDouble* yy, IssmDouble* zz,
     222                                        IssmDouble* xxe, IssmDouble* yye, IssmDouble* zze){_error_("not implemented yet!");};
    221223                IssmDouble    SealevelchangeBarystaticIce(IssmDouble* Sgi, SealevelMasks* masks, Vector<IssmDouble>* barystatic_contribution, IssmDouble* partition, IssmDouble oceanarea){_error_("not implemented yet!");};
    222224                IssmDouble    SealevelchangeBarystaticHydro(IssmDouble* Sgi, SealevelMasks* masks, Vector<IssmDouble>* barystatic_contribution, IssmDouble* partition,IssmDouble oceanarea){_error_("not implemented yet!");};
  • issm/trunk-jpl/src/c/classes/Elements/Seg.h

    r26090 r26099  
    5454                void        ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum,int control_interp){_error_("not implemented yet");};
    5555                void        ElementResponse(IssmDouble* presponse,int response_enum){_error_("not implemented yet");};
     56                void        ElementCoordinates(Vector<IssmDouble>* vxe,Vector<IssmDouble>* vye,Vector<IssmDouble>* vze,bool spherical=false){_error_("not implemented yet");};
    5657                void        ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){_error_("not implemented yet");};
    5758                int         FiniteElement(void);
     
    169170                void    EsaGeodetic3D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast,IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx,IssmDouble* yy,IssmDouble* zz){_error_("not implemented yet!");};
    170171#endif
    171 #ifdef _HAVE_SEALEVELRISE_
     172#ifdef _HAVE_SEALEVELCHANGE_
    172173                void    SealevelchangeMomentOfInertia(IssmDouble* dI_list,IssmDouble* Sg_old, SealevelMasks* masks){_error_("not implemented yet!");};
    173174                void    SetSealevelMasks(SealevelMasks* masks){_error_("not implemented yet!");};
    174                 void    SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx, IssmDouble* yy, IssmDouble* zz){_error_("not implemented yet!");};
     175                void    SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx, IssmDouble* yy, IssmDouble* zz,
     176                                        IssmDouble* xxe, IssmDouble* yye, IssmDouble* zze){_error_("not implemented yet!");};
    175177                IssmDouble    SealevelchangeBarystaticIce(IssmDouble* Sgi, SealevelMasks* masks, Vector<IssmDouble>* barystatic_contribution, IssmDouble* partition, IssmDouble oceanarea){_error_("not implemented yet!");};
    176178                IssmDouble    SealevelchangeBarystaticHydro(IssmDouble* Sgi, SealevelMasks* masks, Vector<IssmDouble>* barystatic_contribution, IssmDouble* partition,IssmDouble oceanarea){_error_("not implemented yet!");};
  • issm/trunk-jpl/src/c/classes/Elements/Tetra.h

    r26090 r26099  
    5353                IssmDouble  DragCoefficientAbsGradient(void){_error_("not implemented yet");};
    5454                void        ElementResponse(IssmDouble* presponse,int response_enum){_error_("not implemented yet");};
     55                void        ElementCoordinates(Vector<IssmDouble>* vxe,Vector<IssmDouble>* vye,Vector<IssmDouble>* vze,bool spherical=false){_error_("not implemented yet");};
    5556                void        ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz);
    5657                void        FaceOnBaseIndices(int* pindex1,int* pindex2,int* pindex3);
     
    176177                void    EsaGeodetic3D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast,IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx,IssmDouble* yy,IssmDouble* zz){_error_("not implemented yet!");};
    177178#endif
    178 #ifdef _HAVE_SEALEVELRISE_
     179#ifdef _HAVE_SEALEVELCHANGE_
    179180                void    SetSealevelMasks(SealevelMasks* masks){_error_("not implemented yet!");};
    180181                void    SealevelchangeMomentOfInertia(IssmDouble* dI_list,IssmDouble* Sg_old, SealevelMasks* masks){_error_("not implemented yet!");};
    181                 void    SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx, IssmDouble* yy, IssmDouble* zz){_error_("not implemented yet!");};
     182                void    SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx, IssmDouble* yy, IssmDouble* zz,
     183                                        IssmDouble* xxe, IssmDouble* yye, IssmDouble* zze){_error_("not implemented yet!");};
    182184                IssmDouble    SealevelchangeBarystaticIce(IssmDouble* Sgi, SealevelMasks* masks, Vector<IssmDouble>* barystatic_contribution, IssmDouble* partition, IssmDouble oceanarea){_error_("not implemented yet!");};
    183185                IssmDouble    SealevelchangeBarystaticHydro(IssmDouble* Sgi, SealevelMasks* masks, Vector<IssmDouble>* barystatic_contribution, IssmDouble* partition,IssmDouble oceanarea){_error_("not implemented yet!");};
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r26090 r26099  
    54115411/*}}}*/
    54125412#endif
    5413 #ifdef _HAVE_SEALEVELRISE_
     5413#ifdef _HAVE_SEALEVELCHANGE_
    54145414IssmDouble Tria::OceanAverage(IssmDouble* Sg, SealevelMasks* masks){ /*{{{*/
    54155415
     
    55415541}
    55425542/*}}}*/
    5543 void    Tria::SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz){ /*{{{*/
     5543void    Tria::SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz, IssmDouble* xxe, IssmDouble* yye, IssmDouble* zze){ /*{{{*/
     5544
    55445545        /*diverse:*/
    55455546        int gsize;
     
    56845685
    56855686        /*Add in inputs:*/
    5686         this->inputs->SetArrayInput(SealevelchangeIndicesEnum,this->lid,indices,gsize);
    56875687        this->inputs->SetArrayInput(SealevelchangeGEnum,this->lid,G,gsize);
    56885688        if(computeelastic){
     
    62196219}
    62206220/*}}}*/
     6221void    Tria::ElementCoordinates(Vector<IssmDouble>* vxe,Vector<IssmDouble>* vye,Vector<IssmDouble>* vze, bool spherical){/*{{{*/
     6222
     6223        /*Look for x,y,z coordinates:*/
     6224        IssmDouble xyz_list[NUMVERTICES][3];
     6225        IssmDouble xe,ye,ze;
     6226
     6227        /*Element XYZ list*/
     6228        ::GetVerticesCoordinates(&xyz_list[0][0],this->vertices,NUMVERTICES);
     6229
     6230        /*Find centroid:*/
     6231        xe=(xyz_list[0][0]+xyz_list[1][0]+xyz_list[2][0])/3.0;
     6232        ye=(xyz_list[0][1]+xyz_list[1][1]+xyz_list[2][1])/3.0;
     6233        ze=(xyz_list[0][2]+xyz_list[1][2]+xyz_list[2][2])/3.0;
     6234
     6235        if(!spherical){
     6236                vxe->SetValue(this->sid,xe,INS_VAL);
     6237                vye->SetValue(this->sid,ye,INS_VAL);
     6238                vze->SetValue(this->sid,ze,INS_VAL);
     6239        }
     6240        else _error_("spherical coordinates not supported yet!");
     6241        return;
     6242}
     6243/*}}}*/
     6244
     6245//new logic
     6246void    Tria::SealevelchangeGeometryOptim(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz, IssmDouble* xxe, IssmDouble* yye, IssmDouble* zze){ /*{{{*/
     6247
     6248        /*diverse:*/
     6249        int nel;
     6250        bool spherical=true;
     6251        IssmDouble llr_list[NUMVERTICES][3];
     6252        IssmDouble xyz_list[NUMVERTICES][3];
     6253        IssmDouble area,planetarea,planetradius;
     6254        IssmDouble I;  //change in ice thickness or water level(Farrel and Clarke, Equ. 4)
     6255        IssmDouble rho_earth;
     6256        IssmDouble lati,longi;
     6257        IssmDouble constant;
     6258        IssmDouble x,y,z,dx,dy,dz,N_azim,E_azim;
     6259        int sidlist[NUMVERTICES];
     6260
     6261        #ifdef _HAVE_RESTRICT_
     6262        IssmDouble* __restrict__ G=NULL;
     6263        IssmDouble* __restrict__ GU=NULL;
     6264        IssmDouble* __restrict__ GN=NULL;
     6265        IssmDouble* __restrict__ GE=NULL;
     6266        IssmDouble* __restrict__ G_elastic_precomputed=NULL;
     6267        IssmDouble* __restrict__ G_rigid_precomputed=NULL;
     6268        IssmDouble* __restrict__ U_elastic_precomputed=NULL;
     6269        IssmDouble* __restrict__ H_elastic_precomputed=NULL;
     6270        IssmDouble* __restrict__ lates=NULL;
     6271        IssmDouble* __restrict__ longes=NULL;
     6272        #else
     6273        IssmDouble* G=NULL;
     6274        IssmDouble* GU=NULL;
     6275        IssmDouble* GN=NULL;
     6276        IssmDouble* GE=NULL;
     6277        IssmDouble* G_elastic_precomputed=NULL;
     6278        IssmDouble* G_rigid_precomputed=NULL;
     6279        IssmDouble* U_elastic_precomputed=NULL;
     6280        IssmDouble* H_elastic_precomputed=NULL;
     6281        IssmDouble* lates=NULL;
     6282        IssmDouble* longes=NULL;
     6283        #endif
     6284
     6285        /*elastic green function:*/
     6286        int index;
     6287        int         M;
     6288
     6289        /*Computational flags:*/
     6290        bool computerigid = false;
     6291        bool computeelastic = false;
     6292        int  horiz;
     6293
     6294        /*recover parameters: */
     6295        rho_earth=FindParam(MaterialsEarthDensityEnum);
     6296        this->parameters->FindParam(&computerigid,SolidearthSettingsRigidEnum);
     6297        this->parameters->FindParam(&computeelastic,SolidearthSettingsElasticEnum);
     6298        this->parameters->FindParam(&nel,MeshNumberofelementsEnum);
     6299        this->parameters->FindParam(&planetarea,SolidearthPlanetAreaEnum);
     6300        this->parameters->FindParam(&planetradius,SolidearthPlanetRadiusEnum);
     6301        this->parameters->FindParam(&horiz,SolidearthSettingsHorizEnum);
     6302
     6303        /*compute area and add to inputs:*/
     6304        area=GetAreaSpherical();
     6305        this->inputs->SetDoubleInput(AreaEnum,this->lid,area);
     6306        this->AddInput(SealevelAreaEnum,&area,P0Enum);
     6307        if(!computerigid)return;
     6308
     6309        /*recover precomputed green function kernels:*/
     6310        DoubleVecParam* parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelchangeGRigidEnum)); _assert_(parameter);
     6311        parameter->GetParameterValueByPointer((IssmDouble**)&G_rigid_precomputed,&M);
     6312
     6313        /*allocate arrays:*/
     6314        G=xNewZeroInit<IssmDouble>(3*nel);
     6315        longes=xNewZeroInit<IssmDouble>(nel);
     6316        lates=xNewZeroInit<IssmDouble>(nel);
     6317
     6318        if(computeelastic){
     6319                parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelchangeGElasticEnum)); _assert_(parameter);
     6320                parameter->GetParameterValueByPointer((IssmDouble**)&G_elastic_precomputed,&M);
     6321
     6322                parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelchangeHElasticEnum)); _assert_(parameter);
     6323                parameter->GetParameterValueByPointer((IssmDouble**)&H_elastic_precomputed,&M);
     6324
     6325                parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelchangeUElasticEnum)); _assert_(parameter);
     6326                parameter->GetParameterValueByPointer((IssmDouble**)&U_elastic_precomputed,&M);
     6327
     6328                GU=xNewZeroInit<IssmDouble>(3*nel);
     6329                if(horiz){
     6330                        GN=xNewZeroInit<IssmDouble>(3*nel);
     6331                        GE=xNewZeroInit<IssmDouble>(3*nel);
     6332                }
     6333        }
     6334
     6335        /*retrieve coordinates: */
     6336        ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
     6337
     6338        /*compute centroids of all elements:*/
     6339        for(int i=0;i<nel;i++){
     6340                lates[i]= asin(zze[i]/planetradius);
     6341                longes[i]= atan2(yye[i],xxe[i]);
     6342        }
     6343       
     6344        constant=3/rho_earth*area/planetarea;
     6345
     6346        /*Recover vertex absolute id: */
     6347        this->GetVerticesSidList(&sidlist[0]);
     6348
     6349        for(int e=0;e<nel;e++){
     6350                for (int i=0;i<3;i++){
     6351                        IssmDouble alpha;
     6352                        IssmDouble delPhi,delLambda;
     6353                        /*recover info for this element and vertex:*/
     6354                        IssmDouble late=lates[e];
     6355                        IssmDouble longe=longes[e];
     6356                        int sid=sidlist[i];
     6357
     6358                        /*Compute alpha angle between centroid and current vertex and index into precomputed tables: */
     6359                        lati=latitude[sid]/180.*M_PI; longi=longitude[sid]/180.*M_PI;
     6360                        delPhi=fabs(lati-late); delLambda=fabs(longi-longe); if (delLambda>M_PI)delLambda=2*M_PI-delLambda;
     6361                        alpha=2.*asin(sqrt(pow(sin(delPhi/2),2)+cos(lati)*cos(late)*pow(sin(delLambda/2),2)));
     6362                        index=reCast<int,IssmDouble>( alpha/M_PI*reCast<IssmDouble,int>(M-1) );
     6363
     6364                        /*Rigid earth gravitational perturbation: */
     6365                        G[i*nel+e]+=G_rigid_precomputed[index];
     6366                       
     6367                        if(computeelastic){
     6368                                G[i*nel+e]+=G_elastic_precomputed[index];
     6369                        }
     6370                        G[i*nel+e]=G[i*nel+e]*constant;
     6371
     6372                        /*Elastic components:*/
     6373                        if(computeelastic){
     6374                                GU[i*nel+e] =  constant * U_elastic_precomputed[index];
     6375                                if(horiz){
     6376                                        /*Compute azimuths, both north and east components: */
     6377                                        x = xx[sid]; y = yy[sid]; z = zz[sid];
     6378                                        if(latitude[sid]==90){
     6379                                                x=1e-12; y=1e-12;
     6380                                        }
     6381                                        if(latitude[sid]==-90){
     6382                                                x=1e-12; y=1e-12;
     6383                                        }
     6384                                        dx = xxe[e]-x; dy = yye[e]-y; dz = zze[e]-z;
     6385                                        N_azim = (-z*x*dx-z*y*dy+(pow(x,2)+pow(y,2))*dz) /pow((pow(x,2)+pow(y,2))*(pow(x,2)+pow(y,2)+pow(z,2))*(pow(dx,2)+pow(dy,2)+pow(dz,2)),0.5);
     6386                                        E_azim = (-y*dx+x*dy) /pow((pow(x,2)+pow(y,2))*(pow(dx,2)+pow(dy,2)+pow(dz,2)),0.5);
     6387
     6388                                        GN[i*nel+e] = constant*H_elastic_precomputed[index]*N_azim;
     6389                                        GE[i*nel+e] = constant*H_elastic_precomputed[index]*E_azim;
     6390                                }
     6391                        }
     6392                }
     6393        }
     6394
     6395        /*Add in inputs:*/
     6396        this->inputs->SetArrayInput(SealevelchangeGEnum,this->lid,G,nel*3);
     6397        if(computeelastic){
     6398                this->inputs->SetArrayInput(SealevelchangeGUEnum,this->lid,GU,nel*3);
     6399                if(horiz){
     6400                        this->inputs->SetArrayInput(SealevelchangeGNEnum,this->lid,GN,nel*3);
     6401                        this->inputs->SetArrayInput(SealevelchangeGEEnum,this->lid,GE,nel*3);
     6402                }
     6403        }
     6404        this->inputs->SetDoubleInput(AreaEnum,this->lid,area);
     6405        this->AddInput(SealevelAreaEnum,&area,P0Enum);
     6406
     6407        /*Free allocations:*/
     6408        #ifdef _HAVE_RESTRICT_
     6409        delete G;
     6410        if(computeelastic){
     6411                delete GU;
     6412                if(horiz){
     6413                        delete GN;
     6414                        delete GE;
     6415                }
     6416        }
     6417        delete lates;
     6418        delete longes;
     6419        #else
     6420        xDelete(G);
     6421        if(computeelastic){
     6422                xDelete(GU);
     6423                if(horiz){
     6424                        xDelete(GN);
     6425                        xDelete(GE);
     6426                }
     6427        }
     6428        delete lates;
     6429        delete longes;
     6430        #endif
     6431
     6432        return;
     6433}
     6434/*}}}*/
     6435void    Tria::SealevelchangeBarystaticLoads(IssmDouble* barystatic_contribution,IssmDouble* localloads, SealevelMasks* masks, Matrix<IssmDouble>* barystatic_contribution_onpartition, IssmDouble* partition, IssmDouble oceanarea){ /*{{{*/
     6436
     6437        /*diverse:*/
     6438        IssmDouble area;
     6439        IssmDouble phi_ice=1.0; //WARNING: do not touch this, default is entire elemnt contributes barystatic
     6440        IssmDouble phi_water=1.0; //WARNING: do not touch this, default is entire elemnt contributes barystatic
     6441        IssmDouble I,W,BP;  //change in ice thickness, water column or bottom pressure (Farrel and Clarke, Equ. 4)
     6442        bool notfullygrounded=false;
     6443        bool scaleoceanarea= false;
     6444        bool computerigid= false;
     6445        int  glfraction=1;
     6446        int  npartice,nparthydro,npartocean;
     6447
     6448        /*flags:*/
     6449        bool isocean=false;
     6450        bool ishydro=false;
     6451        bool isice=false;
     6452
     6453        /*output: */
     6454        IssmDouble bslcice=0;
     6455        IssmDouble bslchydro=0;
     6456        IssmDouble bslcbp=0;
     6457
     6458        /*ice properties: */
     6459        IssmDouble rho_ice,rho_water,rho_freshwater;
     6460
     6461        /*constants:*/
     6462        IssmDouble constant=0;
     6463       
     6464        /*recover parameters:*/
     6465        this->parameters->FindParam(&isice,TransientIsmasstransportEnum);
     6466        this->parameters->FindParam(&isocean,TransientIsoceantransportEnum);
     6467        this->parameters->FindParam(&ishydro,TransientIshydrologyEnum);
     6468
     6469        /*early return if we are not on an ice cap, and we are not requesting
     6470         *hydrology or bottom pressure loads :*/
     6471        if(!isocean && !ishydro){
     6472                if(!masks->isiceonly[this->lid]){
     6473                #ifdef _ISSM_DEBUG_
     6474                        constant=0; this->AddInput(SealevelBarystaticMaskEnum,&constant,P0Enum);
     6475                #endif
     6476                /*barystatic_contribution[0]+=0;
     6477                barystatic_contribution[1]+=0;
     6478                barystatic_contribution[2]+=0;*/
     6479                return;
     6480                }
     6481        }
     6482
     6483        /*early return if we are fully floating and we are not doing bottom pressure loads:*/
     6484        if(!isocean){
     6485                if (masks->isfullyfloating[this->lid]){
     6486                        constant=0;
     6487                        #ifdef _ISSM_DEBUG_
     6488                        this->AddInput(SealevelBarystaticMaskEnum,&constant,P0Enum);
     6489                        #endif
     6490                        /*barystatic_contribution[0]+=0;
     6491                        barystatic_contribution[1]+=0;
     6492                        barystatic_contribution[2]+=0;*/
     6493                        return;
     6494                }
     6495        }
     6496
     6497        /*early return if we are not on the ocean and we are not doing ice mass transport of
     6498         * hydrology:*/
     6499        if(!isice  && !ishydro){
     6500                if(!masks->isoceanin[this->lid]){
     6501                        /*barystatic_contribution[0]+=0;
     6502                        barystatic_contribution[1]+=0;
     6503                        barystatic_contribution[2]+=0;*/
     6504                        return;
     6505                }
     6506
     6507        }
     6508       
     6509        /*if we are an ice shelf, are we fully grounded or not? (used later):*/
     6510        if (masks->notfullygrounded[this->lid]) notfullygrounded=true; //used later on.
     6511
     6512        /*recover some parameters:*/
     6513        rho_ice=FindParam(MaterialsRhoIceEnum);
     6514        rho_water=FindParam(MaterialsRhoSeawaterEnum);
     6515        this->parameters->FindParam(&computerigid,SolidearthSettingsRigidEnum);
     6516        this->parameters->FindParam(&scaleoceanarea,SolidearthSettingsOceanAreaScalingEnum);
     6517        this->parameters->FindParam(&glfraction,SolidearthSettingsGlfractionEnum);
     6518        this->parameters->FindParam(&npartice,SolidearthNpartIceEnum);
     6519        this->parameters->FindParam(&nparthydro,SolidearthNpartHydroEnum);
     6520
     6521        /*Get area of element: precomputed in the sealevelchange_geometry:*/
     6522        this->Element::GetInputValue(&area,AreaEnum);
     6523
     6524        /*Deal with ice loads if we are on grounded ice:*/
     6525        if(masks->isiceonly[this->lid] && !masks->isfullyfloating[this->lid]){ /*{{{*/
     6526
     6527                /*Compute fraction of the element that is grounded: */
     6528                if(notfullygrounded){
     6529                        IssmDouble xyz_list[NUMVERTICES][3];
     6530                        ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
     6531
     6532                        phi_ice=this->GetGroundedPortion(&xyz_list[0][0]); //watch out, this only works because of the Thales theorem! We are in 3D, but this routine is inherently for 2D trias
     6533                        if(glfraction==0)phi_ice=1;
     6534#ifdef _ISSM_DEBUG_
     6535                        this->AddInput(SealevelBarystaticMaskEnum,&phi_ice,P0Enum);
     6536#endif
     6537                }
     6538                else phi_ice=1.0;
     6539
     6540                /*Inform mask: */
     6541                constant+=100; //1 for ice.
     6542                #ifdef _ISSM_DEBUG_
     6543                this->AddInput(SealevelBarystaticMaskEnum,&constant,P0Enum);
     6544                #endif
     6545
     6546                /*Retrieve surface load for ice: */
     6547                Input* deltathickness_input=this->GetInput(DeltaIceThicknessEnum);
     6548                if (!deltathickness_input)_error_("delta thickness input needed to compute sea level change!");
     6549
     6550                /*/Average ice thickness over grounded area of the element only: {{{*/
     6551                if(!notfullygrounded)deltathickness_input->GetInputAverage(&I);
     6552                else{
     6553                        IssmDouble total_weight=0;
     6554                        bool mainlyfloating = true;
     6555                        int         point1;
     6556                        IssmDouble  fraction1,fraction2;
     6557
     6558                        /*Recover portion of element that is grounded*/
     6559                        this->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     6560                        Gauss* gauss = this->NewGauss(point1,fraction1,fraction2,mainlyfloating,2);
     6561
     6562                        /* Start  looping on the number of gaussian points and average over these gaussian points: */
     6563                        total_weight=0;
     6564                        I=0;
     6565                        while(gauss->next()){
     6566                                IssmDouble Ig=0;
     6567                                deltathickness_input->GetInputValue(&Ig,gauss);
     6568                                I+=Ig*gauss->weight;
     6569                                total_weight+=gauss->weight;
     6570                        }
     6571                        I=I/total_weight;
     6572                        delete gauss;
     6573                }
     6574                /*}}}*/
     6575
     6576                /*Compute barystatic contribution:*/
     6577                _assert_(oceanarea>0.);
     6578                if(scaleoceanarea) oceanarea=3.619e+14; // use true ocean area, m^2
     6579                bslcice = rho_ice*area*I/(oceanarea*rho_water);
     6580                _assert_(!xIsNan<IssmDouble>(bslcice));
     6581
     6582                /*Transfer thickness change into kg/m^2:*/
     6583                I=I*rho_ice*phi_ice;
     6584        } /*}}}*/
     6585
     6586        /*Deal with water loads if we are on ground:*/
     6587        if(!masks->isfullyfloating[this->lid]){
     6588
     6589                /*Retrieve water height at vertices: */
     6590                Input* deltathickness_input=this->GetInput(DeltaTwsEnum);
     6591                if (!deltathickness_input)_error_("DeltaTwsEnum input needed to compute sea level change!");
     6592                deltathickness_input->GetInputAverage(&W);
     6593
     6594                /*Compute barystatic component:*/
     6595                _assert_(oceanarea>0.);
     6596                if(scaleoceanarea) oceanarea=3.619e+14; // use true ocean area, m^2
     6597                bslchydro = rho_freshwater*area*phi_water*W/(oceanarea*rho_water);
     6598                _assert_(!xIsNan<IssmDouble>(bslchydro));
     6599
     6600                /*convert from m to kg/m^2:*/
     6601                W=W*rho_freshwater*phi_water;
     6602        }
     6603
     6604        /*Deal with ocean bottom pressures:*/
     6605        if(masks->isoceanin[this->lid]){
     6606
     6607                /*Retrieve bottom pressure change and average over the element: */
     6608                Input* bottompressure_change_input=this->GetInput(DeltaBottomPressureEnum);
     6609                if (!bottompressure_change_input)_error_("DeltaBottomPressureEnum pressure input needed to compute sea level change fingerprint!");
     6610                bottompressure_change_input->GetInputAverage(&BP);
     6611               
     6612                /*Compute barystatic component:*/
     6613                bslcbp = rho_water*area*BP/(oceanarea*rho_water);
     6614
     6615                /*convert from m to kg/m^2:*/
     6616                BP=BP*rho_water;
     6617        }
     6618
     6619        /*Plug all loads into total load vector:*/
     6620        localloads[this->lid]+=I+W+BP;
     6621       
     6622        /*Plug bslcice into barystatic contribution vector:*/
     6623        if(barystatic_contribution_onpartition){
     6624                int idi=reCast<int>(partition[this->Sid()])+1;
     6625                int idj=0;
     6626                idj=0;barystatic_contribution_onpartition->SetValues(1,&idi,1,&idj,&bslcice,ADD_VAL);
     6627                idj=1;barystatic_contribution_onpartition->SetValues(1,&idi,1,&idj,&bslchydro,ADD_VAL);
     6628                idj=2;barystatic_contribution_onpartition->SetValues(1,&idi,1,&idj,&bslcbp,ADD_VAL);
     6629        }
     6630
     6631        barystatic_contribution[0]+=bslcice;
     6632        barystatic_contribution[1]+=bslchydro;
     6633        barystatic_contribution[2]+=bslcbp;
     6634
     6635}
     6636/*}}}*/
     6637IssmDouble Tria::SealevelchangeConvolution(IssmDouble* loads){ /*{{{*/
     6638
     6639        /*sal green function:*/
     6640        IssmDouble* G=NULL;
     6641        IssmDouble Sealevel[NUMVERTICES]={0,0,0};
     6642
     6643        bool sal = false;
     6644        int  size;
     6645        int  nel;
     6646       
     6647        this->parameters->FindParam(&sal,SolidearthSettingsRigidEnum);
     6648        this->parameters->FindParam(&nel,MeshNumberofelementsEnum);
     6649        if(sal){
     6650                this->inputs->GetArrayPtr(SealevelchangeGEnum,this->lid,&G,&size);
     6651               
     6652                for(int i=0;i<NUMVERTICES;i++) {
     6653                        for (int e=0;e<nel;e++){
     6654                                Sealevel[i]+=G[i*nel+e]*loads[e];
     6655                        }
     6656                }
     6657
     6658                this->AddInput(SealevelRSLEnum,Sealevel,P1Enum);
     6659        }
     6660
     6661} /*}}}*/
     6662
    62216663#endif
    62226664
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r26090 r26099  
    7070                void        ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum,int control_interp);
    7171                void        CreateDistanceInputFromSegmentlist(IssmDouble* distances,int distanceenum);
     72                void        ElementCoordinates(Vector<IssmDouble>* vxe,Vector<IssmDouble>* vye,Vector<IssmDouble>* vze,bool spherical=false);
    7273                int         EdgeOnBaseIndex();
    7374                void        EdgeOnBaseIndices(int* pindex1,int* pindex);
     
    160161                void    EsaGeodetic3D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast,IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble* xx,IssmDouble* yy,IssmDouble* zz);
    161162                #endif
    162                 #ifdef _HAVE_SEALEVELRISE_
     163                #ifdef _HAVE_SEALEVELCHANGE_
    163164                IssmDouble OceanAverage(IssmDouble* Sg, SealevelMasks* masks);
    164165                void    SealevelchangeMomentOfInertia(IssmDouble* dI_list,IssmDouble* Sg_old,SealevelMasks* masks);
    165166                void    SetSealevelMasks(SealevelMasks* masks);
    166                 void    SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz);
     167                void    SealevelchangeGeometry(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz, IssmDouble* xxe, IssmDouble* yye, IssmDouble* zze);
     168                void    SealevelchangeGeometryOptim(IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz, IssmDouble* xxe, IssmDouble* yye, IssmDouble* zze);
     169
    167170                IssmDouble    SealevelchangeBarystaticIce(IssmDouble* Sgi, SealevelMasks* masks, Vector<IssmDouble>* barystatic_contribution, IssmDouble* partition, IssmDouble oceanarea);
    168171                IssmDouble    SealevelchangeBarystaticHydro(IssmDouble* Sgi, SealevelMasks* masks, Vector<IssmDouble>* barystatic_contribution, IssmDouble* partition,IssmDouble oceanarea);
     
    170173                void    SealevelchangeSal(IssmDouble* Sgo,IssmDouble* Sg_old,SealevelMasks* masks);
    171174                void    DeformationFromSurfaceLoads(IssmDouble* Up, IssmDouble* North, IssmDouble* East, IssmDouble* Sg,SealevelMasks* masks);
    172                 void   GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y);
     175                void    GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y);
     176                void    SealevelchangeBarystaticLoads(IssmDouble* barystatic_contribution,IssmDouble* localloads, SealevelMasks* masks, Matrix<IssmDouble>* barystatic_contribution_onpartition, IssmDouble* partition, IssmDouble oceanarea);
     177                IssmDouble SealevelchangeConvolution(IssmDouble* loads);
    173178                #endif
    174179                /*}}}*/
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r26091 r26099  
    844844                case TransientSolutionEnum:{
    845845                        /*We have multiple analyses here, process one by one*/
    846                         bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isgroundingline,isstressbalance,ismovingfront,ishydrology,isdamage,issmb,isslc,isesa,issampling;
     846                        bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isoceantransport,isgroundingline,isstressbalance,ismovingfront,ishydrology,isdamage,issmb,isslc,isesa,issampling;
    847847                        iomodel->FindConstant(&isthermal,"md.transient.isthermal");
    848848                        iomodel->FindConstant(&ismovingfront,"md.transient.ismovingfront");
    849849                        iomodel->FindConstant(&ismasstransport,"md.transient.ismasstransport");
     850                        iomodel->FindConstant(&isoceantransport,"md.transient.isoceantransport");
    850851                        iomodel->FindConstant(&isstressbalance,"md.transient.isstressbalance");
    851852                        iomodel->FindConstant(&isgroundingline,"md.transient.isgroundingline");
     
    892893                        if(isdamage){
    893894                                analyses_temp[numanalyses++]=DamageEvolutionAnalysisEnum;
     895                        }
     896                        if(isoceantransport){
     897                                analyses_temp[numanalyses++]=OceantransportAnalysisEnum;
    894898                        }
    895899                        if(isslc){
     
    47444748/*}}}*/
    47454749#endif
    4746 #ifdef _HAVE_SEALEVELRISE_
     4750#ifdef _HAVE_SEALEVELCHANGE_
    47474751void FemModel::SealevelchangeBarystatic(Vector<IssmDouble>* pRSLgi, IssmDouble* poceanarea, IssmDouble* pbslc,IssmDouble* pbslcice, IssmDouble* pbslchydro, IssmDouble** pbslcice_partition,IssmDouble** pbslchydro_partition,SealevelMasks* masks) { /*{{{*/
    47484752
     
    47564760        IssmDouble  oceanarea_cpu  = 0.;
    47574761        int bp_compute_fingerprints= 0;
     4762        bool isoceantransport=false;
    47584763
    47594764        Vector<IssmDouble>* bslcice_partition=NULL;
     
    47654770        IssmDouble* bslchydro_partition_serial=NULL;
    47664771        IssmDouble* partitionhydro=NULL;
     4772        bool istws=0;
    47674773        int nparthydro;
    4768         bool istws;
    4769 
     4774               
     4775        int npartocean;
     4776        Vector<IssmDouble>* bslcocean_partition=NULL;
     4777        IssmDouble* bslcocean_partition_serial=NULL;
     4778        IssmDouble* partitionocean=NULL;
    47704779
    47714780   /*Initialize temporary vector that will be used to sum barystatic components
     
    48004809                bslchydro_partition= new Vector<IssmDouble>(nparthydro);
    48014810        }
     4811
     4812        this->parameters->FindParam(&npartocean,SolidearthNpartOceanEnum);
     4813        if(npartocean){
     4814                this->parameters->FindParam(&partitionocean,&nel,NULL,SolidearthPartitionOceanEnum);
     4815                bslchydro_partition= new Vector<IssmDouble>(npartocean);
     4816        }
     4817        /*For later:
     4818        npartbarystatic=npartice;
     4819        if(nparthydro>npartbarystatic)npartbarystatic=nparthydro;
     4820        if(npartocean>npartbarystatic)npartbarystatic=npartocean;
     4821        bslc_partition=new Matrix(IssmDouble>(npartbarystatic,3);
     4822
     4823        bslc_cpu[0]=0; bslc_cpu[1]=0; bslc_cpu[2]=0;
     4824        for(Object* & object : this->elements->objects){
     4825                Element* element = xDynamicCast<Element*>(object);
     4826                element->SealevelchangeBarystaticLoads(&bslc_cpu[0], localloads,masks, bslcice_partition,partitionice,oceanarea);
     4827        }
     4828        MPI Bcast localloads -> loads
     4829
     4830        for(Object* & object : this->elements->objects){
     4831                Element* element = xDynamicCast<Element*>(object);
     4832                element->SealevelchangeConvolution(loads);
     4833        }
     4834        */
     4835
     4836
     4837
    48024838
    48034839
     
    48214857        /*Call the barystatic sea level change core for bottom pressures: */
    48224858        this->parameters->FindParam(&bp_compute_fingerprints,SolidearthSettingsComputeBpGrdEnum);
    4823         if(bp_compute_fingerprints){
     4859        this->parameters->FindParam(&isoceantransport,TransientIsoceantransportEnum);
     4860        if(bp_compute_fingerprints && isoceantransport){
    48244861                for(int i=0;i<elements->Size();i++){
    48254862                        Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
     
    51085145                element->GiaDeflection(wg,dwgdt, matlitho, x,y);
    51095146        }
     5147
     5148        /*Assemble parallel vector:*/
     5149        dwgdt->Assemble();
     5150        wg->Assemble();
    51105151}
    51115152/*}}}*/
  • issm/trunk-jpl/src/c/classes/FemModel.h

    r26049 r26099  
    163163                void EsaGeodetic3D(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz);
    164164                #endif
    165                 #ifdef _HAVE_SEALEVELRISE_
     165                #ifdef _HAVE_SEALEVELCHANGE_
    166166                void SealevelchangeBarystatic(Vector<IssmDouble>* pRSLgi, IssmDouble* poceanarea, IssmDouble* pbslc,IssmDouble* pbslcice, IssmDouble* pbslchydro, IssmDouble** pbslcice_partition,IssmDouble** pbslchydro_partition, SealevelMasks* masks);
    167167                void SealevelchangeSal(Vector<IssmDouble>* pSgo, Vector<IssmDouble>* pSg_old,  SealevelMasks* masks,bool verboseconvolution);
  • issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp

    r26072 r26099  
    8282        int index= EnumToIndex(enum_in);
    8383        if(this->inputs[index])this->inputs[index]->DeepEcho();
     84        return;
     85}
     86/*}}}*/
     87void Inputs::Echo(int enum_in){/*{{{*/
     88        _printf_("Inputs Echo:\n");
     89        int index= EnumToIndex(enum_in);
     90        if(this->inputs[index])this->inputs[index]->Echo();
    8491        return;
    8592}
  • issm/trunk-jpl/src/c/classes/Inputs/Inputs.h

    r26071 r26099  
    5050                void     DeepEcho(int enum_in);
    5151                void     Echo(void);
     52                void     Echo(int enum_in);
    5253                bool     Exist(int enum_type);
    5354                void     GetInputsInterpolations(int* pnuminputs,int** pinterpolations,int** penum);
  • issm/trunk-jpl/src/c/cores/oceantransport_core.cpp

    r26076 r26099  
    2121        bool   dakota_analysis;
    2222        int    solution_type;
     23        Vector<IssmDouble>*  ug  = NULL;
    2324
    2425        /*activate configuration*/
     
    4142         * and OceantransportSpcstrEnum  inputs in each element, assemble into a vector and feed to
    4243         * InputUpdateFromSolutionx which will deal with accumulating such inputs:*/
    43         Vector<IssmDouble>*  ug  = NULL;
    4444        GetSolutionFromInputsx(&ug,femmodel);
    4545        InputUpdateFromSolutionx(femmodel,ug);
    4646
    47         delete ug;
     47        SolidEarthOceanUpdates(femmodel);
    4848
    4949        if(solution_type==OceantransportSolutionEnum)femmodel->RequestedDependentsx();
     
    5151        /*profiler*/
    5252        femmodel->profiler->Stop(OCEANTRANSPORTCORE);
     53       
     54        /*free ressources:*/
     55        delete ug;
     56
    5357} /*}}}*/
    5458void SolidEarthOceanUpdates(FemModel* femmodel){ /*{{{*/
  • issm/trunk-jpl/src/c/cores/sealevelchange_core.cpp

    r26051 r26099  
    267267        /*get some of the updates into elements:*/
    268268        InputUpdateFromVectorx(femmodel,U_grd,SealevelUGrdEnum,VertexSIdEnum);
     269        InputUpdateFromVectorx(femmodel,N_grd,SealevelEnum,VertexSIdEnum);
    269270        InputUpdateFromVectorx(femmodel,N_grd,SealevelNGrdEnum,VertexSIdEnum);
    270271        if(RSLg)InputUpdateFromVectorx(femmodel,RSLg,SealevelRSLEnum,VertexSIdEnum);
     
    306307        int  step;
    307308        int computesealevel=0;
     309        bool isocean=false;
    308310        IssmDouble time;
    309311
     
    316318        femmodel->parameters->FindParam(&computesealevel,SolidearthSettingsComputesealevelchangeEnum);
    317319        if (!computesealevel)return;
     320
     321        /*early return if we have no ocean transport:*/
     322        femmodel->parameters->FindParam(&isocean,TransientIsoceantransportEnum);
     323        if(!isocean)return;
    318324       
    319325        /*Verbose: */
     
    406412        IssmDouble *yy    = NULL;
    407413        IssmDouble *zz    = NULL;
     414        IssmDouble *xxe    = NULL;
     415        IssmDouble *yye    = NULL;
     416        IssmDouble *zze    = NULL;
     417
    408418        int  horiz;
    409419        bool geometrydone = false;
     420        bool optim=false;
    410421
    411422               
     
    424435        /*first, recover lat,long and radius vectors from vertices: */
    425436        VertexCoordinatesx(&latitude,&longitude,&radius,femmodel->vertices,spherical);
     437        ElementCoordinatesx(&xxe,&yye,&zze,femmodel->elements);
    426438        if(horiz) VertexCoordinatesx(&xx,&yy,&zz,femmodel->vertices);
    427439
     
    430442        for(Object* & object : femmodel->elements->objects){
    431443                Element*   element=xDynamicCast<Element*>(object);
    432                 element->SealevelchangeGeometry(latitude,longitude,radius,xx,yy,zz);
     444                element->SealevelchangeGeometry(latitude,longitude,radius,xx,yy,zz,xxe,yye,zze);
     445                //if(optim) element->SealevelchangeGeometryOptim(latitude,longitude,radius,xx,yy,zz,xxe,yye,zze);
    433446        }
    434447
  • issm/trunk-jpl/src/c/modules/modules.h

    r26047 r26099  
    103103#include "./UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.h"
    104104#include "./VertexCoordinatesx/VertexCoordinatesx.h"
     105#include "./ElementCoordinatesx/ElementCoordinatesx.h"
    105106
    106107#ifdef _HAVE_OCEAN_
  • issm/trunk-jpl/src/c/shared/Enum/Enum.vim

    r26047 r26099  
    113113syn keyword cConstant CumBslcIceEnum
    114114syn keyword cConstant CumBslcHydroEnum
     115syn keyword cConstant CumBslcOceanEnum
    115116syn keyword cConstant CumBslcIcePartitionEnum
    116117syn keyword cConstant CumBslcHydroPartitionEnum
     118syn keyword cConstant CumBslcOceanPartitionEnum
    117119syn keyword cConstant CumGmtslcEnum
    118120syn keyword cConstant CumGmslcEnum
     
    290292syn keyword cConstant MeshNumberoflayersEnum
    291293syn keyword cConstant MeshNumberofverticesEnum
     294syn keyword cConstant MeshNumberofelementsEnum
    292295syn keyword cConstant MigrationMaxEnum
    293296syn keyword cConstant ModelIdEnum
     
    338341syn keyword cConstant SolidearthPartitionIceEnum
    339342syn keyword cConstant SolidearthPartitionHydroEnum
     343syn keyword cConstant SolidearthPartitionOceanEnum
    340344syn keyword cConstant SolidearthNpartIceEnum
     345syn keyword cConstant SolidearthNpartOceanEnum
    341346syn keyword cConstant SolidearthNpartHydroEnum
    342347syn keyword cConstant SolidearthPlanetRadiusEnum
  • issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

    r26047 r26099  
    107107        CumBslcIceEnum,
    108108        CumBslcHydroEnum,
     109        CumBslcOceanEnum,
    109110        CumBslcIcePartitionEnum,
    110111        CumBslcHydroPartitionEnum,
     112        CumBslcOceanPartitionEnum,
    111113        CumGmtslcEnum,
    112114        CumGmslcEnum,
     
    284286        MeshNumberoflayersEnum,
    285287        MeshNumberofverticesEnum,
     288        MeshNumberofelementsEnum,
    286289        MigrationMaxEnum,
    287290        ModelIdEnum,
     
    332335        SolidearthPartitionIceEnum,
    333336        SolidearthPartitionHydroEnum,
     337        SolidearthPartitionOceanEnum,
    334338        SolidearthNpartIceEnum,
     339        SolidearthNpartOceanEnum,
    335340        SolidearthNpartHydroEnum,
    336341        SolidearthPlanetRadiusEnum,
  • issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp

    r26047 r26099  
    115115                case CumBslcIceEnum : return "CumBslcIce";
    116116                case CumBslcHydroEnum : return "CumBslcHydro";
     117                case CumBslcOceanEnum : return "CumBslcOcean";
    117118                case CumBslcIcePartitionEnum : return "CumBslcIcePartition";
    118119                case CumBslcHydroPartitionEnum : return "CumBslcHydroPartition";
     120                case CumBslcOceanPartitionEnum : return "CumBslcOceanPartition";
    119121                case CumGmtslcEnum : return "CumGmtslc";
    120122                case CumGmslcEnum : return "CumGmslc";
     
    292294                case MeshNumberoflayersEnum : return "MeshNumberoflayers";
    293295                case MeshNumberofverticesEnum : return "MeshNumberofvertices";
     296                case MeshNumberofelementsEnum : return "MeshNumberofelements";
    294297                case MigrationMaxEnum : return "MigrationMax";
    295298                case ModelIdEnum : return "ModelId";
     
    340343                case SolidearthPartitionIceEnum : return "SolidearthPartitionIce";
    341344                case SolidearthPartitionHydroEnum : return "SolidearthPartitionHydro";
     345                case SolidearthPartitionOceanEnum : return "SolidearthPartitionOcean";
    342346                case SolidearthNpartIceEnum : return "SolidearthNpartIce";
     347                case SolidearthNpartOceanEnum : return "SolidearthNpartOcean";
    343348                case SolidearthNpartHydroEnum : return "SolidearthNpartHydro";
    344349                case SolidearthPlanetRadiusEnum : return "SolidearthPlanetRadius";
  • issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp

    r26047 r26099  
    115115              else if (strcmp(name,"CumBslcIce")==0) return CumBslcIceEnum;
    116116              else if (strcmp(name,"CumBslcHydro")==0) return CumBslcHydroEnum;
     117              else if (strcmp(name,"CumBslcOcean")==0) return CumBslcOceanEnum;
    117118              else if (strcmp(name,"CumBslcIcePartition")==0) return CumBslcIcePartitionEnum;
    118119              else if (strcmp(name,"CumBslcHydroPartition")==0) return CumBslcHydroPartitionEnum;
     120              else if (strcmp(name,"CumBslcOceanPartition")==0) return CumBslcOceanPartitionEnum;
    119121              else if (strcmp(name,"CumGmtslc")==0) return CumGmtslcEnum;
    120122              else if (strcmp(name,"CumGmslc")==0) return CumGmslcEnum;
     
    135137              else if (strcmp(name,"DamageStressUBound")==0) return DamageStressUBoundEnum;
    136138              else if (strcmp(name,"DebugProfiling")==0) return DebugProfilingEnum;
    137               else if (strcmp(name,"DomainDimension")==0) return DomainDimensionEnum;
    138               else if (strcmp(name,"DomainType")==0) return DomainTypeEnum;
    139139         else stage=2;
    140140   }
    141141   if(stage==2){
    142               if (strcmp(name,"DslModel")==0) return DslModelEnum;
     142              if (strcmp(name,"DomainDimension")==0) return DomainDimensionEnum;
     143              else if (strcmp(name,"DomainType")==0) return DomainTypeEnum;
     144              else if (strcmp(name,"DslModel")==0) return DslModelEnum;
    143145              else if (strcmp(name,"DslModelid")==0) return DslModelidEnum;
    144146              else if (strcmp(name,"DslNummodels")==0) return DslNummodelsEnum;
     
    258260              else if (strcmp(name,"LoveAllowLayerDeletion")==0) return LoveAllowLayerDeletionEnum;
    259261              else if (strcmp(name,"LoveForcingType")==0) return LoveForcingTypeEnum;
    260               else if (strcmp(name,"LoveFrequencies")==0) return LoveFrequenciesEnum;
    261               else if (strcmp(name,"LoveG0")==0) return LoveG0Enum;
    262262         else stage=3;
    263263   }
    264264   if(stage==3){
    265               if (strcmp(name,"LoveKernels")==0) return LoveKernelsEnum;
     265              if (strcmp(name,"LoveFrequencies")==0) return LoveFrequenciesEnum;
     266              else if (strcmp(name,"LoveG0")==0) return LoveG0Enum;
     267              else if (strcmp(name,"LoveKernels")==0) return LoveKernelsEnum;
    266268              else if (strcmp(name,"LoveMu0")==0) return LoveMu0Enum;
    267269              else if (strcmp(name,"LoveNfreq")==0) return LoveNfreqEnum;
     
    298300              else if (strcmp(name,"MeshNumberoflayers")==0) return MeshNumberoflayersEnum;
    299301              else if (strcmp(name,"MeshNumberofvertices")==0) return MeshNumberofverticesEnum;
     302              else if (strcmp(name,"MeshNumberofelements")==0) return MeshNumberofelementsEnum;
    300303              else if (strcmp(name,"MigrationMax")==0) return MigrationMaxEnum;
    301304              else if (strcmp(name,"ModelId")==0) return ModelIdEnum;
     
    346349              else if (strcmp(name,"SolidearthPartitionIce")==0) return SolidearthPartitionIceEnum;
    347350              else if (strcmp(name,"SolidearthPartitionHydro")==0) return SolidearthPartitionHydroEnum;
     351              else if (strcmp(name,"SolidearthPartitionOcean")==0) return SolidearthPartitionOceanEnum;
    348352              else if (strcmp(name,"SolidearthNpartIce")==0) return SolidearthNpartIceEnum;
     353              else if (strcmp(name,"SolidearthNpartOcean")==0) return SolidearthNpartOceanEnum;
    349354              else if (strcmp(name,"SolidearthNpartHydro")==0) return SolidearthNpartHydroEnum;
    350355              else if (strcmp(name,"SolidearthPlanetRadius")==0) return SolidearthPlanetRadiusEnum;
     
    378383              else if (strcmp(name,"SolidearthSettingsRigid")==0) return SolidearthSettingsRigidEnum;
    379384              else if (strcmp(name,"SolidearthSettingsRotation")==0) return SolidearthSettingsRotationEnum;
    380               else if (strcmp(name,"SealevelchangeRunCount")==0) return SealevelchangeRunCountEnum;
     385         else stage=4;
     386   }
     387   if(stage==4){
     388              if (strcmp(name,"SealevelchangeRunCount")==0) return SealevelchangeRunCountEnum;
    381389              else if (strcmp(name,"SealevelchangeTransitions")==0) return SealevelchangeTransitionsEnum;
    382390              else if (strcmp(name,"SealevelchangeUElastic")==0) return SealevelchangeUElasticEnum;
    383391              else if (strcmp(name,"SettingsIoGather")==0) return SettingsIoGatherEnum;
    384392              else if (strcmp(name,"SettingsNumResultsOnNodes")==0) return SettingsNumResultsOnNodesEnum;
    385          else stage=4;
    386    }
    387    if(stage==4){
    388               if (strcmp(name,"SettingsOutputFrequency")==0) return SettingsOutputFrequencyEnum;
     393              else if (strcmp(name,"SettingsOutputFrequency")==0) return SettingsOutputFrequencyEnum;
    389394              else if (strcmp(name,"SettingsCheckpointFrequency")==0) return SettingsCheckpointFrequencyEnum;
    390395              else if (strcmp(name,"SettingsResultsOnNodes")==0) return SettingsResultsOnNodesEnum;
     
    501506              else if (strcmp(name,"TransientIsmasstransport")==0) return TransientIsmasstransportEnum;
    502507              else if (strcmp(name,"TransientIsoceantransport")==0) return TransientIsoceantransportEnum;
    503               else if (strcmp(name,"TransientIsmovingfront")==0) return TransientIsmovingfrontEnum;
     508         else stage=5;
     509   }
     510   if(stage==5){
     511              if (strcmp(name,"TransientIsmovingfront")==0) return TransientIsmovingfrontEnum;
    504512              else if (strcmp(name,"TransientIsoceancoupling")==0) return TransientIsoceancouplingEnum;
    505513              else if (strcmp(name,"TransientIssampling")==0) return TransientIssamplingEnum;
    506514              else if (strcmp(name,"TransientIsslc")==0) return TransientIsslcEnum;
    507515              else if (strcmp(name,"TransientIssmb")==0) return TransientIssmbEnum;
    508          else stage=5;
    509    }
    510    if(stage==5){
    511               if (strcmp(name,"TransientIsstressbalance")==0) return TransientIsstressbalanceEnum;
     516              else if (strcmp(name,"TransientIsstressbalance")==0) return TransientIsstressbalanceEnum;
    512517              else if (strcmp(name,"TransientIsthermal")==0) return TransientIsthermalEnum;
    513518              else if (strcmp(name,"TransientNumRequestedOutputs")==0) return TransientNumRequestedOutputsEnum;
     
    624629              else if (strcmp(name,"EplHeadTransient")==0) return EplHeadTransientEnum;
    625630              else if (strcmp(name,"EsaEmotion")==0) return EsaEmotionEnum;
    626               else if (strcmp(name,"EsaNmotion")==0) return EsaNmotionEnum;
     631         else stage=6;
     632   }
     633   if(stage==6){
     634              if (strcmp(name,"EsaNmotion")==0) return EsaNmotionEnum;
    627635              else if (strcmp(name,"EsaRotationrate")==0) return EsaRotationrateEnum;
    628636              else if (strcmp(name,"EsaStrainratexx")==0) return EsaStrainratexxEnum;
    629637              else if (strcmp(name,"EsaStrainratexy")==0) return EsaStrainratexyEnum;
    630638              else if (strcmp(name,"EsaStrainrateyy")==0) return EsaStrainrateyyEnum;
    631          else stage=6;
    632    }
    633    if(stage==6){
    634               if (strcmp(name,"EsaUmotion")==0) return EsaUmotionEnum;
     639              else if (strcmp(name,"EsaUmotion")==0) return EsaUmotionEnum;
    635640              else if (strcmp(name,"EsaXmotion")==0) return EsaXmotionEnum;
    636641              else if (strcmp(name,"EsaYmotion")==0) return EsaYmotionEnum;
     
    747752              else if (strcmp(name,"RheologyBInitialguessMisfit")==0) return RheologyBInitialguessMisfitEnum;
    748753              else if (strcmp(name,"RheologyBbarAbsGradient")==0) return RheologyBbarAbsGradientEnum;
    749               else if (strcmp(name,"Sample")==0) return SampleEnum;
     754         else stage=7;
     755   }
     756   if(stage==7){
     757              if (strcmp(name,"Sample")==0) return SampleEnum;
    750758              else if (strcmp(name,"SamplingBeta")==0) return SamplingBetaEnum;
    751759              else if (strcmp(name,"SamplingKappa")==0) return SamplingKappaEnum;
    752760              else if (strcmp(name,"Sealevel")==0) return SealevelEnum;
    753761              else if (strcmp(name,"SealevelBarystaticMask")==0) return SealevelBarystaticMaskEnum;
    754          else stage=7;
    755    }
    756    if(stage==7){
    757               if (strcmp(name,"SealevelBarystaticOceanMask")==0) return SealevelBarystaticOceanMaskEnum;
     762              else if (strcmp(name,"SealevelBarystaticOceanMask")==0) return SealevelBarystaticOceanMaskEnum;
    758763              else if (strcmp(name,"SealevelNEsa")==0) return SealevelNEsaEnum;
    759764              else if (strcmp(name,"SealevelNEsaRate")==0) return SealevelNEsaRateEnum;
     
    870875              else if (strcmp(name,"SmbSzaValue")==0) return SmbSzaValueEnum;
    871876              else if (strcmp(name,"SmbT")==0) return SmbTEnum;
    872               else if (strcmp(name,"SmbTa")==0) return SmbTaEnum;
     877         else stage=8;
     878   }
     879   if(stage==8){
     880              if (strcmp(name,"SmbTa")==0) return SmbTaEnum;
    873881              else if (strcmp(name,"SmbTeValue")==0) return SmbTeValueEnum;
    874882              else if (strcmp(name,"SmbTemperaturesAnomaly")==0) return SmbTemperaturesAnomalyEnum;
    875883              else if (strcmp(name,"SmbTemperaturesLgm")==0) return SmbTemperaturesLgmEnum;
    876884              else if (strcmp(name,"SmbTemperaturesPresentday")==0) return SmbTemperaturesPresentdayEnum;
    877          else stage=8;
    878    }
    879    if(stage==8){
    880               if (strcmp(name,"SmbTemperaturesReconstructed")==0) return SmbTemperaturesReconstructedEnum;
     885              else if (strcmp(name,"SmbTemperaturesReconstructed")==0) return SmbTemperaturesReconstructedEnum;
    881886              else if (strcmp(name,"SmbTini")==0) return SmbTiniEnum;
    882887              else if (strcmp(name,"SmbTmean")==0) return SmbTmeanEnum;
     
    993998              else if (strcmp(name,"Outputdefinition33")==0) return Outputdefinition33Enum;
    994999              else if (strcmp(name,"Outputdefinition34")==0) return Outputdefinition34Enum;
    995               else if (strcmp(name,"Outputdefinition35")==0) return Outputdefinition35Enum;
     1000         else stage=9;
     1001   }
     1002   if(stage==9){
     1003              if (strcmp(name,"Outputdefinition35")==0) return Outputdefinition35Enum;
    9961004              else if (strcmp(name,"Outputdefinition36")==0) return Outputdefinition36Enum;
    9971005              else if (strcmp(name,"Outputdefinition37")==0) return Outputdefinition37Enum;
    9981006              else if (strcmp(name,"Outputdefinition38")==0) return Outputdefinition38Enum;
    9991007              else if (strcmp(name,"Outputdefinition39")==0) return Outputdefinition39Enum;
    1000          else stage=9;
    1001    }
    1002    if(stage==9){
    1003               if (strcmp(name,"Outputdefinition3")==0) return Outputdefinition3Enum;
     1008              else if (strcmp(name,"Outputdefinition3")==0) return Outputdefinition3Enum;
    10041009              else if (strcmp(name,"Outputdefinition40")==0) return Outputdefinition40Enum;
    10051010              else if (strcmp(name,"Outputdefinition41")==0) return Outputdefinition41Enum;
     
    11161121              else if (strcmp(name,"Constraints")==0) return ConstraintsEnum;
    11171122              else if (strcmp(name,"Contact")==0) return ContactEnum;
    1118               else if (strcmp(name,"Contour")==0) return ContourEnum;
     1123         else stage=10;
     1124   }
     1125   if(stage==10){
     1126              if (strcmp(name,"Contour")==0) return ContourEnum;
    11191127              else if (strcmp(name,"Contours")==0) return ContoursEnum;
    11201128              else if (strcmp(name,"ControlInput")==0) return ControlInputEnum;
    11211129              else if (strcmp(name,"ControlInputGrad")==0) return ControlInputGradEnum;
    11221130              else if (strcmp(name,"ControlInputMaxs")==0) return ControlInputMaxsEnum;
    1123          else stage=10;
    1124    }
    1125    if(stage==10){
    1126               if (strcmp(name,"ControlInputMins")==0) return ControlInputMinsEnum;
     1131              else if (strcmp(name,"ControlInputMins")==0) return ControlInputMinsEnum;
    11271132              else if (strcmp(name,"ControlInputValues")==0) return ControlInputValuesEnum;
    11281133              else if (strcmp(name,"CrouzeixRaviart")==0) return CrouzeixRaviartEnum;
     
    12391244              else if (strcmp(name,"LATaylorHood")==0) return LATaylorHoodEnum;
    12401245              else if (strcmp(name,"LambdaS")==0) return LambdaSEnum;
    1241               else if (strcmp(name,"LevelsetAnalysis")==0) return LevelsetAnalysisEnum;
     1246         else stage=11;
     1247   }
     1248   if(stage==11){
     1249              if (strcmp(name,"LevelsetAnalysis")==0) return LevelsetAnalysisEnum;
    12421250              else if (strcmp(name,"LevelsetfunctionPicard")==0) return LevelsetfunctionPicardEnum;
    12431251              else if (strcmp(name,"LinearFloatingMeltRate")==0) return LinearFloatingMeltRateEnum;
    12441252              else if (strcmp(name,"LliboutryDuval")==0) return LliboutryDuvalEnum;
    12451253              else if (strcmp(name,"Loads")==0) return LoadsEnum;
    1246          else stage=11;
    1247    }
    1248    if(stage==11){
    1249               if (strcmp(name,"LoveAnalysis")==0) return LoveAnalysisEnum;
     1254              else if (strcmp(name,"LoveAnalysis")==0) return LoveAnalysisEnum;
    12501255              else if (strcmp(name,"LoveHi")==0) return LoveHiEnum;
    12511256              else if (strcmp(name,"LoveHr")==0) return LoveHrEnum;
     
    13621367              else if (strcmp(name,"SSAApproximation")==0) return SSAApproximationEnum;
    13631368              else if (strcmp(name,"SSAFSApproximation")==0) return SSAFSApproximationEnum;
    1364               else if (strcmp(name,"SSAHOApproximation")==0) return SSAHOApproximationEnum;
     1369         else stage=12;
     1370   }
     1371   if(stage==12){
     1372              if (strcmp(name,"SSAHOApproximation")==0) return SSAHOApproximationEnum;
    13651373              else if (strcmp(name,"Scaled")==0) return ScaledEnum;
    13661374              else if (strcmp(name,"SealevelAbsolute")==0) return SealevelAbsoluteEnum;
    13671375              else if (strcmp(name,"SealevelEmotion")==0) return SealevelEmotionEnum;
    13681376              else if (strcmp(name,"SealevelInertiaTensorXZ")==0) return SealevelInertiaTensorXZEnum;
    1369          else stage=12;
    1370    }
    1371    if(stage==12){
    1372               if (strcmp(name,"SealevelInertiaTensorYZ")==0) return SealevelInertiaTensorYZEnum;
     1377              else if (strcmp(name,"SealevelInertiaTensorYZ")==0) return SealevelInertiaTensorYZEnum;
    13731378              else if (strcmp(name,"SealevelInertiaTensorZZ")==0) return SealevelInertiaTensorZZEnum;
    13741379              else if (strcmp(name,"SealevelNmotion")==0) return SealevelNmotionEnum;
  • issm/trunk-jpl/src/c/shared/Enum/Synchronize.sh

    r25627 r26099  
    1717
    1818#Deal with Analyses
    19 if false ; then
     19if true ; then
    2020#Build EnumToAnalysis.cpp {{{
    2121#Header
     
    3939#core
    4040cat temp | grep [a-zA-Z0-9]Analysis | \
    41         grep -v DefaultAnalysis | grep -v FlaimAnalysis | grep -v SurfaceSlopeAnalysis | grep -v BedSlopeAnalysis | \
     41        grep -v DefaultAnalysis | grep -v RecoveryAnalysis | grep -v FlaimAnalysis | grep -v SurfaceSlopeAnalysis | grep -v BedSlopeAnalysis | \
    4242        awk '{print "\t\t#ifdef _HAVE_"toupper(substr($1,1,length($1)-12))"_\n\t\t" "case " $1" : return new " substr($1,1,length($1)-4) "();\n\t\t#endif"}' \
    4343                >> $ISSM_DIR/src/c/analyses/EnumToAnalysis.cpp
  • issm/trunk-jpl/src/m/classes/initialization.m

    r26059 r26099  
    2222                sealevel            = NaN;
    2323                bottompressure      = NaN;
     24                dsl                 = NaN;
     25                str                 = NaN;
    2426                sample              = NaN;
    2527        end
     
    3941                        self.sealevel=project3d(md,'vector',self.sealevel,'type','node','layer',1);
    4042                        self.bottompressure=project3d(md,'vector',self.bottompressure,'type','node','layer',1);
     43                        self.dsl=project3d(md,'vector',self.dsl,'type','node','layer',1);
     44                        self.str=project3d(md,'vector',self.str,'type','node','layer',1);
    4145
    4246                        %Lithostatic pressure by default
     
    6670                        if ismember('OceantransportAnalysis',analyses)
    6771                                if strcmp(solution,'TransientSolution') & md.transient.isslc & md.transient.isoceantransport,
    68                                         md = checkfield(md,'fieldname','initialization.bottompressure','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]);
     72                                        md = checkfield(md,'fieldname','initialization.bottompressure','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]);
     73                                        md = checkfield(md,'fieldname','initialization.dsl','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]);
     74                                        md = checkfield(md,'fieldname','initialization.str','NaN',1,'Inf',1,'size',[1 1]);
    6975                                end
    7076                        end
     
    156162                        fielddisplay(self,'channelarea','subglacial water channel area (for GlaDS) [m2]');
    157163                        fielddisplay(self,'sample','Realization of a Gaussian random field');
     164                        fielddisplay(self,'bottompressure','Bottom pressures');
     165                        fielddisplay(self,'dsl','Dynamic sea level.');
     166                        fielddisplay(self,'str','Steric sea level.');
    158167                end % }}}
    159168                function marshall(self,prefix,md,fid) % {{{
     
    167176                        WriteData(fid,prefix,'object',self,'fieldname','sealevel','format','DoubleMat','mattype',1);
    168177                        WriteData(fid,prefix,'object',self,'fieldname','bottompressure','format','DoubleMat','mattype',1);
     178                        WriteData(fid,prefix,'object',self,'fieldname','str','format','DoubleMat','mattype',1);
     179                        WriteData(fid,prefix,'object',self,'fieldname','dsl','format','DoubleMat','mattype',1);
    169180                        WriteData(fid,prefix,'object',self,'fieldname','temperature','format','DoubleMat','mattype',1);
    170181                        WriteData(fid,prefix,'object',self,'fieldname','waterfraction','format','DoubleMat','mattype',1);
  • issm/trunk-jpl/src/m/classes/solidearth.m

    r26047 r26099  
    1515                partitionice           = [];
    1616                partitionhydro         = [];
     17                partitionocean         = [];
    1718        end
    1819        methods (Static)
     
    5556                        self.partitionice=[];
    5657                        self.partitionhydro=[];
     58                        self.partitionocean=[];
    5759
    5860                        %no external solutions by default:
     
    9496                        fielddisplay(self,'partitionice','ice partition vector for barystatic contribution');
    9597                        fielddisplay(self,'partitionhydro','hydro partition vector for barystatic contribution');
     98                        fielddisplay(self,'partitionocean','ocean partition vector for barystatic contribution');
    9699                        if isempty(self.external), fielddisplay(self,'external','external solution, of the type solidearthsolution'); end
    97100                        self.settings.disp();
     
    118121                                nparthydro=0;
    119122                        end
     123                        if ~isempty(self.partitionocean),
     124                                npartocean=max(self.partitionocean)+2;
     125                        else
     126                                npartocean=0;
     127                        end
     128
    120129
    121130                       
     
    124133                        WriteData(fid,prefix,'object',self,'fieldname','partitionhydro','mattype',1,'format','DoubleMat');
    125134                        WriteData(fid,prefix,'data',nparthydro,'format','Integer','name','md.solidearth.nparthydro');
     135                        WriteData(fid,prefix,'object',self,'fieldname','partitionocean','mattype',1,'format','DoubleMat');
     136                        WriteData(fid,prefix,'data',npartocean,'format','Integer','name','md.solidearth.npartocean');
    126137                       
    127138                        self.settings.marshall(prefix,md,fid);
  • issm/trunk-jpl/test/NightlyRun/test2002.m

    r26077 r26099  
    55md.mesh=gmshplanet('radius',6.371012*10^3,'resolution',700.); %700 km resolution mesh
    66
     7%Geometry for the bed, arbitrary thickness of 1000:
     8md.geometry.bed=-ones(md.mesh.numberofvertices,1);
     9md.geometry.base=md.geometry.bed;
     10md.geometry.thickness=1000*ones(md.mesh.numberofvertices,1);
     11md.geometry.surface=md.geometry.bed+md.geometry.thickness;
     12
     13
    714%parameterize solidearth solution:
    815%solidearth loading:  {{{
    9 md.masstransport.spcthickness=zeros(md.mesh.numberofelements+1,1);
    10 md.initialization.sealevel=zeros(md.mesh.numberofvertices,1);
     16md.masstransport.spcthickness=[md.geometry.thickness;0];
    1117md.dsl.global_average_thermosteric_sea_level=[0;0];
    1218md.dsl.sea_surface_height_above_geoid=zeros(md.mesh.numberofvertices+1,1);
    1319md.dsl.sea_water_pressure_at_sea_floor=zeros(md.mesh.numberofvertices+1,1);
     20md.smb.mass_balance=zeros(md.mesh.numberofvertices,1);
    1421%antarctica
    1522late=sum(md.mesh.lat(md.mesh.elements),2)/3;
    1623longe=sum(md.mesh.long(md.mesh.elements),2)/3;
    1724pos=find(late < -80);
    18 md.masstransport.spcthickness(pos)=-100;
     25md.masstransport.spcthickness(md.mesh.elements(pos,:))= md.masstransport.spcthickness(md.mesh.elements(pos,:))-100;
    1926%greenland
    2027pos=find(late>70 & late<80 & longe>-60 & longe<-30);
    21 md.masstransport.spcthickness(pos)=-100;
     28md.masstransport.spcthickness(md.mesh.elements(pos,:))= md.masstransport.spcthickness(md.mesh.elements(pos,:))-100;
    2229
    2330%elastic loading from love numbers:
     
    3542md.mask.ocean_levelset=-icemask;
    3643
    37 %make sure that the elements that have loads are fully grounded:
    38 pos=find(md.masstransport.spcthickness);
    39 md.mask.ocean_levelset(md.mesh.elements(pos,:))=1;
    4044
    4145%make sure wherever there is an ice load, that the mask is set to ice:
    42 pos=find(md.masstransport.spcthickness);
     46pos=find(md.masstransport.spcthickness(1:end-1));
    4347md.mask.ice_levelset(md.mesh.elements(pos,:))=-1;
    4448% }}}
    4549
    46 %Geometry for the bed, arbitrary:
    47 md.geometry.bed=-ones(md.mesh.numberofvertices,1);
    48 md.geometry.thickness=zeros(md.mesh.numberofvertices,1);
    49 md.geometry.surface=zeros(md.mesh.numberofvertices,1);
    50 md.geometry.base=zeros(md.mesh.numberofvertices,1);
     50%time stepping:
     51md.timestepping.start_time=0;
     52md.timestepping.time_step=1;
     53md.timestepping.final_time=1;
    5154
    5255
     
    5558md.initialization.vx=zeros(md.mesh.numberofvertices,1);
    5659md.initialization.vy=zeros(md.mesh.numberofvertices,1);
     60md.initialization.sealevel=zeros(md.mesh.numberofvertices,1);
     61md.initialization.bottompressure=zeros(md.mesh.numberofvertices,1);
     62md.initialization.dsl=zeros(md.mesh.numberofvertices,1);
     63md.initialization.str=0;
    5764
    5865%Materials:
     
    7683md.transient.isthermal=0;
    7784md.transient.ismasstransport=1;
     85md.transient.isoceantransport=1;
    7886md.transient.isslc=1;
     87md.solidearth.requested_outputs={'Sealevel'};
    7988
    8089
     
    100109md.solidearth.settings.elastic=1;
    101110md.solidearth.settings.rotation=0;
     111md.solidearth.requested_outputs={'Sealevel'};
    102112md=solve(md,'tr');
    103113Selastic=md.results.TransientSolution.Sealevel;
Note: See TracChangeset for help on using the changeset viewer.