Changeset 27818


Ignore:
Timestamp:
06/30/23 18:10:25 (21 months ago)
Author:
seroussi
Message:

NEW: changing coupling scheme

Location:
issm/trunk-jpl/src/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/cores/transient_core.cpp

    r27817 r27818  
    199199                 * then receive ocean melt
    200200                 * then go back to the previous geometry to continue the transient with the melt received*/
    201                 InputUpdateFromConstantx(femmodel,0.,BasalforcingsFloatingiceMeltingRateEnum);
     201                InputUpdateFromConstantx(femmodel,0.,BasalforcingsFloatingiceMeltingRateEnum,P1Enum);
    202202                masstransport_core(femmodel);
    203203                OceanExchangeDatax(femmodel,false);
  • issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp

    r26468 r27818  
    2626                element->InputUpdateFromConstant(constant,name);
    2727        }
     28}
     29void InputUpdateFromConstantx(FemModel* femmodel,int constant, int name, int type){
     30
     31        if(type==P0Enum) InputUpdateFromConstantx(femmodel, constant,name);
     32        else if(type==P1Enum){
     33
     34                if(VerboseModule()) _printf0_("   Input updates from constant (P1 version)\n");
     35
     36                /*Elements and loads drive the update: */
     37                if(IsInputEnum(name)){
     38                        for(Object* & object : femmodel->elements->objects){
     39                                Element* element = xDynamicCast<Element*>(object);
     40                                element->InputUpdateFromConstant(constant,name,P1Enum);
     41                        }
     42                }
     43                else{
     44                        _error_("not supported yet");
     45                }
     46        }
     47        else _error_("InputUpdateFromConstantx error message: type not supported yet!");
     48
    2849}
    2950
  • issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h

    r26073 r27818  
    1212void InputUpdateFromConstantx(FemModel* femmodel,bool       constant,int name);
    1313void InputUpdateFromConstantx(FemModel* femmodel,int        constant,int name);
     14void InputUpdateFromConstantx(FemModel* femmodel,int        constant,int name, int type);
    1415void InputUpdateFromConstantx(FemModel* femmodel,IssmDouble constant,int name);
    1516#ifdef _HAVE_AD_
  • issm/trunk-jpl/src/c/modules/OceanExchangeDatax/OceanExchangeDatax.cpp

    r27816 r27818  
    130130                femmodel->parameters->FindParam(&yts,ConstantsYtsEnum);
    131131                if(my_rank==0){
     132                        ISSM_MPI_Send(icethickness_oceangrid,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm);
    132133                        ISSM_MPI_Send(&time,1,ISSM_MPI_DOUBLE,0,10001001,tomitgcmcomm);
    133134                        ISSM_MPI_Recv(&oceantime,1,ISSM_MPI_DOUBLE,0,10001002,tomitgcmcomm,&status);
    134135                        if((oceantime - time > 0.1*yts) & (oceantime - time < -0.1*yts)) _error_("Ocean and ice time are starting to diverge");
    135136                        oceanmelt = xNew<IssmDouble>(ngrids_ocean);
    136                         ISSM_MPI_Send(icethickness_oceangrid,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm);
    137137                        ISSM_MPI_Recv(oceanmelt,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001007,tomitgcmcomm,&status);
    138138                }
Note: See TracChangeset for help on using the changeset viewer.