Changeset 27071


Ignore:
Timestamp:
06/16/22 17:16:37 (3 years ago)
Author:
Eric.Larour
Message:

CHG: moved mme resolution in the precore where this is the only place where we can serve inputs
on elements. Before, the elements and vertices are not connected!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-larour-SLPS2022/src/c/analyses/SealevelchangeAnalysis.cpp

    r26800 r27071  
    4444
    4545        if(isexternal){
     46
    4647                iomodel->FetchDataToInput(inputs,elements,"md.solidearth.external.displacementeast",SolidearthExternalDisplacementEastRateEnum);
    4748                iomodel->FetchDataToInput(inputs,elements,"md.solidearth.external.displacementnorth",SolidearthExternalDisplacementNorthRateEnum);
    4849                iomodel->FetchDataToInput(inputs,elements,"md.solidearth.external.displacementup",SolidearthExternalDisplacementUpRateEnum);
    4950                iomodel->FetchDataToInput(inputs,elements,"md.solidearth.external.geoid",SolidearthExternalGeoidRateEnum);
    50 
    51                 /*Resolve Mmes using the modelid, if necessary:*/
    52                 if (inputs->GetInputObjectEnum(SolidearthExternalDisplacementEastRateEnum)==DatasetInputEnum){
    53                         int modelid;
    54 
    55                         /*retrieve model id: */
    56                         iomodel->FetchData(&modelid,"md.solidearth.external.modelid");
    57 
    58                         /*replace dataset of forcings with only one, the modelid'th:*/
    59                         MmeToInputFromIdx(inputs,elements,modelid,SolidearthExternalDisplacementNorthRateEnum, P1Enum);
    60                         MmeToInputFromIdx(inputs,elements,modelid,SolidearthExternalDisplacementEastRateEnum, P1Enum);
    61                         MmeToInputFromIdx(inputs,elements,modelid,SolidearthExternalDisplacementUpRateEnum, P1Enum);
    62                         MmeToInputFromIdx(inputs,elements,modelid,SolidearthExternalGeoidRateEnum, P1Enum);
    63                 }
    6451        }
    6552
     
    220207                iomodel->FetchData(&externalnature,"md.solidearth.external.nature");
    221208                if(externalnature>=3){
    222                         IssmDouble modelid;
     209                        int modelid;
    223210                        int nummodels;
    224211
     
    640627void           SealevelchangeAnalysis::PreCore(FemModel* femmodel){/*{{{*/
    641628
     629        int isuq=0;
     630        int modelid=0;
     631
     632        /*Resolve Mmes using the modelid, if necessary: meaning if we are running a transient model and that UQ computations have not been triggered:*/
     633        femmodel->parameters->FindParam(&isuq,QmuIsdakotaEnum);
     634        _printf_("hello0\n");
     635        if (!isuq && femmodel->inputs->GetInputObjectEnum(SolidearthExternalDisplacementEastRateEnum)==DatasetInputEnum){
     636                _printf_("hello1\n");
     637               
     638                femmodel->parameters->FindParam(&modelid,SolidearthExternalModelidEnum);
     639
     640                /*replace dataset of forcings with only one, the modelid'th:*/
     641                MmeToInputFromIdx(femmodel->inputs,femmodel->elements,modelid-1,SolidearthExternalDisplacementNorthRateEnum, P1Enum);
     642                MmeToInputFromIdx(femmodel->inputs,femmodel->elements,modelid-1,SolidearthExternalDisplacementEastRateEnum, P1Enum);
     643                MmeToInputFromIdx(femmodel->inputs,femmodel->elements,modelid-1,SolidearthExternalDisplacementUpRateEnum, P1Enum);
     644                MmeToInputFromIdx(femmodel->inputs,femmodel->elements,modelid-1,SolidearthExternalGeoidRateEnum, P1Enum);
     645
     646        }               
     647
    642648        /*run sea level change core geometry only once, after the Model Processor is done:*/
    643649        sealevelchange_initialgeometry(femmodel);
Note: See TracChangeset for help on using the changeset viewer.