Changeset 25497


Ignore:
Timestamp:
08/28/20 11:24:57 (5 years ago)
Author:
Mathieu Morlighem
Message:

CHG: renaming MARSHALL Enums

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Element.cpp

    r25486 r25497  
    22432243
    22442244        _assert_(this);
    2245         if(marshall_direction==MARSHALLING_BACKWARD){
     2245        if(marshall_direction==MARSHALLING_LOAD){
    22462246                nodes = NULL;
    22472247        }
  • issm/trunk-jpl/src/c/classes/Elements/ElementHook.cpp

    r23644 r25497  
    7575
    7676        /*preliminary, before marshall starts: */
    77         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction==MARSHALLING_SIZE){
     77        if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){
    7878                if(this->hneighbors)hneighbors_null=false;
    7979                if(this->hnodes){
     
    9494        MARSHALLING_DYNAMIC(hnodesi_null,bool,numanalyses);
    9595
    96         if(marshall_direction==MARSHALLING_BACKWARD){
     96        if(marshall_direction==MARSHALLING_LOAD){
    9797
    9898                if (!hnodes_null)this->hnodes = new Hook*[numanalyses];
  • issm/trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h

    r24053 r25497  
    6262                        /*Marshal result name*/
    6363                        int size = 0;
    64                         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction == MARSHALLING_SIZE) size=strlen(result_name)+1;
     64                        if(marshall_direction==MARSHALLING_WRITE || marshall_direction == MARSHALLING_SIZE) size=strlen(result_name)+1;
    6565                        MARSHALLING(size);
    6666                        MARSHALLING_DYNAMIC(result_name,char,size);
     
    6969                        this->value=0;
    7070                        bool isnull=true;
    71                         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction == MARSHALLING_SIZE){
     71                        if(marshall_direction==MARSHALLING_WRITE || marshall_direction == MARSHALLING_SIZE){
    7272                                if(value) isnull=false;
    7373                        }
     
    347347        int size = 0;
    348348
    349         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction == MARSHALLING_SIZE)size=strlen(value)+1;
     349        if(marshall_direction==MARSHALLING_WRITE || marshall_direction == MARSHALLING_SIZE)size=strlen(value)+1;
    350350
    351351        MARSHALLING(id);
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r25490 r25497  
    259259
    260260        /*Marshall:*/
    261         this->Marshall(&femmodel_buffer,NULL,MARSHALLING_FORWARD);
     261        this->Marshall(&femmodel_buffer,NULL,MARSHALLING_WRITE);
    262262
    263263        /*Reset position of buffer: */
     
    487487        int       analysis_type;
    488488
    489         if(marshall_direction==MARSHALLING_BACKWARD){
     489        if(marshall_direction==MARSHALLING_LOAD){
    490490                delete this->materials;
    491491                delete this->parameters;
     
    531531        this->elements->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
    532532
    533         if(marshall_direction==MARSHALLING_BACKWARD){
     533        if(marshall_direction==MARSHALLING_LOAD){
    534534                this->constraints_list = xNew<Constraints*>(this->nummodels);
    535535                for(i=0;i<nummodels;i++) this->constraints_list[i] = new Constraints();
     
    546546        }
    547547
    548         if(marshall_direction==MARSHALLING_BACKWARD){
     548        if(marshall_direction==MARSHALLING_LOAD){
    549549                /*reset hooks for elements, loads and nodes:*/
    550550                this->elements->ResetHooks();
     
    609609
    610610        /*Create new FemModel by demarshalling the buffer: */
    611         this->Marshall(&femmodel_buffer,NULL,MARSHALLING_BACKWARD);
     611        this->Marshall(&femmodel_buffer,NULL,MARSHALLING_LOAD);
    612612
    613613        /*Reset position of buffer: */
  • issm/trunk-jpl/src/c/classes/Hook.cpp

    r25363 r25497  
    122122void Hook::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
    123123
    124         if(marshall_direction==MARSHALLING_BACKWARD) reset();
     124        if(marshall_direction==MARSHALLING_LOAD) reset();
    125125
    126126        MARSHALLING_ENUM(HookEnum);
  • issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.cpp

    r25379 r25497  
    8989        MARSHALLING(this->numberofvertices_local);
    9090        MARSHALLING_DYNAMIC(ids,int,numids);
    91         //if (marshall_direction == MARSHALLING_BACKWARD) inputs = new Inputs();
     91        //if (marshall_direction == MARSHALLING_LOAD) inputs = new Inputs();
    9292        //inputs->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
    9393        _error_("not implemented");
  • issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp

    r25406 r25497  
    8787        MARSHALLING_ENUM(InputsEnum);
    8888
    89         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction==MARSHALLING_SIZE){
     89        if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){
    9090
    9191                /*Marshall num_inputs first*/
  • issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp

    r25379 r25497  
    141141        else this->values = NULL;
    142142
    143         if(marshall_direction == MARSHALLING_BACKWARD){
     143        if(marshall_direction == MARSHALLING_LOAD){
    144144                this->element_values = xNewZeroInit<IssmDouble>(PentaRef::NumberofNodes(this->interpolation));
    145145        }
  • issm/trunk-jpl/src/c/classes/Inputs/SegInput.cpp

    r25379 r25497  
    122122        else this->values = NULL;
    123123
    124         if(marshall_direction == MARSHALLING_BACKWARD){
     124        if(marshall_direction == MARSHALLING_LOAD){
    125125                this->element_values = xNewZeroInit<IssmDouble>(SegRef::NumberofNodes(this->interpolation));
    126126        }
  • issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp

    r25406 r25497  
    119119void TransientInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
    120120
    121         if (marshall_direction == MARSHALLING_BACKWARD){
     121        if (marshall_direction == MARSHALLING_LOAD){
    122122                _error_("not implmented");
    123123                //inputs = new Inputs();
  • issm/trunk-jpl/src/c/classes/Inputs/TriaInput.cpp

    r25379 r25497  
    127127        else this->values = NULL;
    128128
    129         if(marshall_direction == MARSHALLING_BACKWARD){
     129        if(marshall_direction == MARSHALLING_LOAD){
    130130                this->element_values = xNewZeroInit<IssmDouble>(TriaRef::NumberofNodes(this->interpolation));
    131131        }
  • issm/trunk-jpl/src/c/classes/Loads/Channel.cpp

    r25446 r25497  
    155155        MARSHALLING(S);
    156156
    157         if(marshall_direction==MARSHALLING_BACKWARD){
     157        if(marshall_direction==MARSHALLING_LOAD){
    158158                this->hnodes      = new Hook();
    159159                this->hvertices   = new Hook();
  • issm/trunk-jpl/src/c/classes/Loads/Moulin.cpp

    r25386 r25497  
    117117        MARSHALLING(id);
    118118
    119         if(marshall_direction==MARSHALLING_BACKWARD){
     119        if(marshall_direction==MARSHALLING_LOAD){
    120120                this->hnode      = new Hook();
    121121                this->hvertex      = new Hook();
  • issm/trunk-jpl/src/c/classes/Loads/Neumannflux.cpp

    r25446 r25497  
    133133        MARSHALLING(id);
    134134
    135         if(marshall_direction==MARSHALLING_BACKWARD){
     135        if(marshall_direction==MARSHALLING_LOAD){
    136136                this->hnodes      = new Hook();
    137137                this->hvertices   = new Hook();
  • issm/trunk-jpl/src/c/classes/Loads/Numericalflux.cpp

    r25446 r25497  
    211211        MARSHALLING(flux_degree);
    212212
    213         if(marshall_direction==MARSHALLING_BACKWARD){
     213        if(marshall_direction==MARSHALLING_LOAD){
    214214                this->hnodes      = new Hook();
    215215                this->hvertices   = new Hook();
  • issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp

    r25386 r25497  
    127127        MARSHALLING(id);
    128128
    129         if(marshall_direction==MARSHALLING_BACKWARD){
     129        if(marshall_direction==MARSHALLING_LOAD){
    130130                this->hnode      = new Hook();
    131131                this->helement   = new Hook();
  • issm/trunk-jpl/src/c/classes/Loads/Penpair.cpp

    r25386 r25497  
    9292        MARSHALLING(id);
    9393
    94         if(marshall_direction==MARSHALLING_BACKWARD){
     94        if(marshall_direction==MARSHALLING_LOAD){
    9595                this->hnodes = new Hook();
    9696        }
  • issm/trunk-jpl/src/c/classes/Loads/Riftfront.cpp

    r25386 r25497  
    200200        MARSHALLING(shelf);
    201201
    202         if(marshall_direction==MARSHALLING_BACKWARD){
     202        if(marshall_direction==MARSHALLING_LOAD){
    203203                this->hnodes      = new Hook();
    204204                this->hvertices      = new Hook();
  • issm/trunk-jpl/src/c/classes/Materials/Matestar.cpp

    r25379 r25497  
    103103void      Matestar::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
    104104
    105         if(marshall_direction==MARSHALLING_BACKWARD)helement=new Hook();
     105        if(marshall_direction==MARSHALLING_LOAD)helement=new Hook();
    106106
    107107        MARSHALLING_ENUM(MatestarEnum);
  • issm/trunk-jpl/src/c/classes/Materials/Matice.cpp

    r25379 r25497  
    161161void      Matice::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
    162162
    163         if(marshall_direction==MARSHALLING_BACKWARD)helement=new Hook();
     163        if(marshall_direction==MARSHALLING_LOAD)helement=new Hook();
    164164
    165165        MARSHALLING_ENUM(MaticeEnum);
  • issm/trunk-jpl/src/c/classes/Nodes.cpp

    r24681 r25497  
    117117        DataSet::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
    118118
    119         if(marshall_direction == MARSHALLING_BACKWARD){
     119        if(marshall_direction == MARSHALLING_LOAD){
    120120                this->common_recv_ids = xNew<int*>(num_procs);
    121121                this->common_send_ids = xNew<int*>(num_procs);
  • issm/trunk-jpl/src/c/classes/Params/DataSetParam.cpp

    r23066 r25497  
    5454void DataSetParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
    5555
    56         if(marshall_direction==MARSHALLING_BACKWARD)value=new DataSet();
     56        if(marshall_direction==MARSHALLING_LOAD)value=new DataSet();
    5757
    5858        MARSHALLING_ENUM(DataSetParamEnum);
  • issm/trunk-jpl/src/c/classes/Params/DoubleMatArrayParam.cpp

    r23066 r25497  
    125125                MARSHALLING_DYNAMIC(mdim_array,int,M);
    126126                MARSHALLING_DYNAMIC(ndim_array,int,M);
    127                 if(marshall_direction==MARSHALLING_BACKWARD && M) array=xNew<IssmDouble*>(M);
     127                if(marshall_direction==MARSHALLING_LOAD && M) array=xNew<IssmDouble*>(M);
    128128                for(int i=0;i<M;i++){
    129129                        MARSHALLING_DYNAMIC(array[i],IssmDouble,mdim_array[i]*ndim_array[i]);
  • issm/trunk-jpl/src/c/classes/Params/FileParam.cpp

    r20827 r25497  
    5555        MARSHALLING(value);
    5656
    57         if(marshall_direction==MARSHALLING_BACKWARD) value=NULL; //meaningless file pointer!
     57        if(marshall_direction==MARSHALLING_LOAD) value=NULL; //meaningless file pointer!
    5858
    5959}
  • issm/trunk-jpl/src/c/classes/Params/Parameters.cpp

    r25317 r25497  
    118118        MARSHALLING_ENUM(ParametersEnum);
    119119
    120         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction==MARSHALLING_SIZE){
     120        if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){
    121121
    122122                /*Marshall num_params first*/
  • issm/trunk-jpl/src/c/classes/Params/StringArrayParam.cpp

    r23066 r25497  
    7777        int* sizes=NULL;
    7878
    79         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction==MARSHALLING_SIZE){
     79        if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){
    8080                if(numstrings)sizes=xNew<int>(numstrings);
    8181                for(int i=0;i<numstrings;i++)sizes[i]=strlen(value[i])+1;
     
    8989        if(numstrings){
    9090                MARSHALLING_DYNAMIC(sizes,int,numstrings);
    91                 if(marshall_direction==MARSHALLING_BACKWARD) value=xNew<char*>(numstrings);
     91                if(marshall_direction==MARSHALLING_LOAD) value=xNew<char*>(numstrings);
    9292                for(int i=0;i<numstrings;i++)MARSHALLING_DYNAMIC(value[i],char,sizes[i]);
    9393        }
  • issm/trunk-jpl/src/c/classes/Params/StringParam.cpp

    r23066 r25497  
    5454        int size = 0;
    5555
    56         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction == MARSHALLING_SIZE)size=strlen(value)+1;
     56        if(marshall_direction==MARSHALLING_WRITE || marshall_direction == MARSHALLING_SIZE)size=strlen(value)+1;
    5757
    5858        MARSHALLING_ENUM(StringParamEnum);
  • issm/trunk-jpl/src/c/classes/Params/TransientArrayParam.cpp

    r25481 r25497  
    8181        MARSHALLING(M);
    8282        MARSHALLING(N);
    83         if(marshall_direction==MARSHALLING_BACKWARD){
     83        if(marshall_direction==MARSHALLING_LOAD){
    8484                values    = xNew<IssmDouble>(M*N);
    8585                timesteps = xNew<IssmDouble>(N);
  • issm/trunk-jpl/src/c/classes/Params/TransientParam.cpp

    r25481 r25497  
    7575        MARSHALLING(interpolation);
    7676        MARSHALLING(N);
    77         if(marshall_direction==MARSHALLING_BACKWARD){
     77        if(marshall_direction==MARSHALLING_LOAD){
    7878                values=xNew<IssmDouble>(N);
    7979                timesteps=xNew<IssmDouble>(N);
  • issm/trunk-jpl/src/c/classes/Vertices.cpp

    r24335 r25497  
    122122        MARSHALLING_DYNAMIC(this->common_recv,int,num_procs);
    123123        MARSHALLING_DYNAMIC(this->common_send,int,num_procs);
    124         if(marshall_direction == MARSHALLING_BACKWARD){
     124        if(marshall_direction == MARSHALLING_LOAD){
    125125                this->common_recv_ids = xNew<int*>(num_procs);
    126126                this->common_send_ids = xNew<int*>(num_procs);
  • issm/trunk-jpl/src/c/cores/transient_core.cpp

    r25476 r25497  
    5353        #if defined(_HAVE_BAMG_) && !defined(_HAVE_AD_)
    5454        if(amr_frequency){
    55           femmodel->parameters->FindParam(&amr_restart,AmrRestartEnum);
    56           if(amr_restart) femmodel->ReMesh();
    57   }
     55                femmodel->parameters->FindParam(&amr_restart,AmrRestartEnum);
     56                if(amr_restart) femmodel->ReMesh();
     57        }
    5858        #endif
    5959
     
    325325        double *Xb = xNewZeroInit<double>(Xsize);
    326326        double *Yb  = xNewZeroInit<double>(Ysize);
    327         double *Yin = xNewZeroInit<double>(Ysize);
     327        int    *Yin = xNewZeroInit<int>(Ysize);
    328328
    329329        /*Start tracing*/
     
    400400        xDelete<IssmDouble>(Y);
    401401        xDelete<double>(Yb);
    402         xDelete<double>(Yin);
     402        xDelete<int>(Yin);
    403403}/*}}}*/
    404404#endif
  • issm/trunk-jpl/src/c/datastructures/DataSet.cpp

    r24379 r25497  
    9898        int i;
    9999
    100         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction==MARSHALLING_SIZE){
     100        if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){
    101101                obj_size=objects.size();
    102102        }
     
    112112
    113113        /*Now branch according to direction of marshalling: */
    114         if(marshall_direction==MARSHALLING_FORWARD || marshall_direction==MARSHALLING_SIZE){
     114        if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){
    115115                if(!(this->sorted && numsorted>0 && this->id_offsets)){
    116116                        sorted_ids=NULL;
  • issm/trunk-jpl/src/c/shared/io/Marshalling/Marshalling.h

    r25481 r25497  
    77
    88enum marshall_directions{
    9         MARSHALLING_FORWARD,
    10         MARSHALLING_BACKWARD,
     9        MARSHALLING_WRITE,
     10        MARSHALLING_LOAD,
    1111        MARSHALLING_SIZE
    1212};
     
    1414#define MARSHALLING_ENUM(EN)\
    1515        int type_enum=EN;\
    16         if(marshall_direction==MARSHALLING_FORWARD){\
     16        if(marshall_direction==MARSHALLING_WRITE){\
    1717                memcpy(*pmarshalled_data,&type_enum,sizeof(int));\
    1818                *pmarshalled_data+=sizeof(int);\
     
    2121                *pmarshalled_data_size+=sizeof(int);\
    2222        }\
    23         else if(marshall_direction==MARSHALLING_BACKWARD){\
     23        else if(marshall_direction==MARSHALLING_LOAD){\
    2424                *pmarshalled_data+=sizeof(int);\
    2525        }\
     
    2929#define MARSHALLING(FIELD)\
    3030        \
    31         if(marshall_direction==MARSHALLING_FORWARD){\
     31        if(marshall_direction==MARSHALLING_WRITE){\
    3232                memcpy(*pmarshalled_data,&FIELD,sizeof(FIELD));\
    3333                *pmarshalled_data+=sizeof(FIELD);\
     
    3636                *pmarshalled_data_size+=sizeof(FIELD);\
    3737        }\
    38         else if(marshall_direction==MARSHALLING_BACKWARD){\
     38        else if(marshall_direction==MARSHALLING_LOAD){\
    3939                memcpy(&FIELD,*pmarshalled_data,sizeof(FIELD));\
    4040                *pmarshalled_data+=sizeof(FIELD);\
     
    5151                \
    5252                if(!field_null){\
    53                         if(marshall_direction==MARSHALLING_FORWARD){\
     53                        if(marshall_direction==MARSHALLING_WRITE){\
    5454                                        memcpy(*pmarshalled_data,FIELD,SIZE*sizeof(TYPE));\
    5555                                        *pmarshalled_data+=SIZE*sizeof(TYPE);\
     
    5858                                *pmarshalled_data_size+=SIZE*sizeof(TYPE);\
    5959                        }\
    60                         else if(marshall_direction==MARSHALLING_BACKWARD){\
     60                        else if(marshall_direction==MARSHALLING_LOAD){\
    6161                                FIELD=xNew<TYPE>(SIZE);\
    6262                                memcpy(FIELD,*pmarshalled_data,SIZE*sizeof(TYPE));\
Note: See TracChangeset for help on using the changeset viewer.