Changeset 19198


Ignore:
Timestamp:
03/16/15 16:19:22 (10 years ago)
Author:
Eric.Larour
Message:

CHG: re-introducing Marshalling routines in support of check pointing. Implemented
the dataset backbone, and the FemModel backbone. Now we have to bring back the low
level drivers for the classes.

Location:
issm/trunk-jpl/src
Files:
4 added
73 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/bamg/BamgQuadtree.h

    r16233 r19198  
    3535                                        int     ObjectEnum() {_error_("not implemented yet"); };
    3636                                        Object *copy()       {_error_("not implemented yet"); };
     37                                        void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3738                        };
    3839
  • issm/trunk-jpl/src/c/classes/Constraints/SpcDynamic.h

    r18931 r19198  
    3535                int     Id();
    3636                int     ObjectEnum();
     37                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3738
    3839                /*Constraint virtual functions definitions*/
  • issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.h

    r18388 r19198  
    3434                int   ObjectEnum();
    3535                Object* copy();
     36                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3637                /*}}}*/
    3738                /*Constraint virtual functions definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Constraints/SpcTransient.h

    r18931 r19198  
    3636                int     Id();
    3737                int     ObjectEnum();
     38                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3839                /*}}}*/
    3940                /*Constraint virtual functions definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Contour.h

    r18237 r19198  
    8383                }
    8484                /*}}}*/
     85                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/
     86                        _error_("not implemented yet!");
     87                }
     88                /*}}}*/
     89
    8590};
    8691
  • issm/trunk-jpl/src/c/classes/DependentObject.h

    r16400 r19198  
    3232                int   ObjectEnum();
    3333                Object* copy(void);
     34                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/
     35                        _error_("not implemented yet!");
     36                }
     37                /*}}}*/
    3438                /*}}}*/
    3539
  • issm/trunk-jpl/src/c/classes/Elements/Element.h

    r19172 r19198  
    6767                void               DeleteMaterials(void);
    6868                IssmDouble         Divergence(void);
     69                void               Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};
    6970                void               dViscositydBFS(IssmDouble* pdmudB,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input);
    7071                void               dViscositydBHO(IssmDouble* pdmudB,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input);
  • issm/trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h

    r18886 r19198  
    126126                        return new GenericExternalResult<ResultType>(this->id,this->result_name,this->value,this->step,this->time);
    127127                } /*}}}*/
     128                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/
     129                        _error_("not implemented yet!");
     130                }
     131                /*}}}*/
     132
     133
    128134
    129135                /*GenericExternalResult management: */
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r19191 r19198  
    609609        FILE* restartfid=NULL;
    610610        char* restartfilename = NULL;
     611        int   femmodel_size;
     612        char* femmodel_buffer=NULL;
    611613
    612614        /*First, recover the name of the restart file: */
     
    616618        restartfid=pfopen(restartfilename,"wb");
    617619
     620        /*Create buffer to hold marshalled femmodel: */
     621        this->Marshall(NULL,&femmodel_size,MARSHALLING_FORWARD);
     622        femmodel_buffer=xNew<char>(femmodel_size);
     623
     624        /*Marshall:*/
     625        this->Marshall(&femmodel_buffer,&femmodel_size,MARSHALLING_FORWARD);
     626
     627        /*write buffer: */
     628        fwrite(femmodel_buffer,femmodel_size,sizeof(IssmPDouble),restartfid);
     629
    618630        /*Done, close file :*/
    619631        pfclose(restartfid,restartfilename);
    620632
    621633        /*Free ressources: */
     634        xDelete<char>(femmodel_buffer);
    622635        xDelete<char>(restartfilename);
    623636
     
    625638/*}}}*/
    626639void FemModel::Restart(void){/*{{{*/
     640}
     641/*}}}*/
     642void FemModel::Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
     643
     644        MARSHALLING_ENUM(FemModelEnum);
     645
     646        MARSHALLING(solution_type);
     647        MARSHALLING(analysis_counter);
     648        MARSHALLING_DYNAMIC(analysis_type_list,int,analysis_counter);
     649
     650        if(marshall_direction==MARSHALLING_BACKWARDS){
     651                profiler=new Profiler;
     652                elements=new Elements();
     653                nodes=new Nodes();
     654                vertices=new Vertices();
     655                constraints=new Constraints();
     656                loads=new Loads();
     657                materials=new Materials();
     658                parameters=new Parameters();
     659                results=new Results();
     660        }
     661       
     662        profiler->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     663        elements->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     664        nodes->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     665        vertices->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     666        constraints->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     667        loads->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     668        materials->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     669        parameters->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     670        results->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     671
     672        MARSHALLING(comm);
    627673}
    628674/*}}}*/
  • issm/trunk-jpl/src/c/classes/FemModel.h

    r19191 r19198  
    6161                void SetCurrentConfiguration(int configuration_type,int analysis_type);
    6262                void CheckPoint(void);
     63                void Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction);
    6364                void Restart(void);
    6465
  • issm/trunk-jpl/src/c/classes/IndependentObject.h

    r18889 r19198  
    3131                int   ObjectEnum();
    3232                Object* copy(void);
     33                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};
    3334                /*}}}*/
    3435                /*IndependentObject methods: {{{*/
  • issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h

    r18450 r19198  
    2727                int     ObjectEnum();
    2828                Object *copy();
     29                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    2930                /*}}}*/
    3031                /*BoolInput management: {{{*/
  • issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h

    r18450 r19198  
    3535                int   ObjectEnum();
    3636                Object* copy();
     37                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3738                /*}}}*/
    3839                /*ControlInput management: {{{*/
  • issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h

    r18450 r19198  
    3232                int   ObjectEnum();
    3333                Object* copy();
     34                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3435                /*}}}*/
    3536                /*DatasetInput management: {{{*/
  • issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h

    r18450 r19198  
    3030                int   ObjectEnum();
    3131                Object* copy();
     32                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3233                /*}}}*/
    3334                /*DoubleInput management: {{{*/
  • issm/trunk-jpl/src/c/classes/Inputs/IntInput.h

    r18450 r19198  
    3131                int   ObjectEnum();
    3232                Object* copy();
     33                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3334                /*}}}*/
    3435                /*IntInput management: {{{*/
  • issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h

    r18450 r19198  
    3232                int     ObjectEnum();
    3333                Object *copy();
     34                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3435
    3536                /*PentaInput management*/
  • issm/trunk-jpl/src/c/classes/Inputs/SegInput.h

    r18450 r19198  
    3232                int     ObjectEnum();
    3333                Object *copy();
     34                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3435
    3536                /*SegInput management:*/
  • issm/trunk-jpl/src/c/classes/Inputs/TetraInput.h

    r18450 r19198  
    3232                int     ObjectEnum();
    3333                Object *copy();
     34                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3435
    3536                /*TetraInput management:*/
  • issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h

    r19027 r19198  
    3737                int   ObjectEnum();
    3838                Object* copy();
     39                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3940                /*}}}*/
    4041                /*TransientInput management: {{{*/
  • issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h

    r19002 r19198  
    3232                int     ObjectEnum();
    3333                Object *copy();
     34                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3435
    3536                /*TriaInput management:*/
  • issm/trunk-jpl/src/c/classes/Loads/Loads.cpp

    r18926 r19198  
    1515#include <algorithm>
    1616
     17#include "../../shared/io/Comm/IssmComm.h"
    1718#include "./Loads.h"
    1819#include "./Load.h"
    19 #include "../../shared/shared.h"
    2020
    2121using namespace std;
  • issm/trunk-jpl/src/c/classes/Loads/Numericalflux.h

    r18926 r19198  
    4545                int     Id();
    4646                int     ObjectEnum();
     47                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    4748                /*}}}*/
    4849                /*Update virtual functions resolution: {{{*/
  • issm/trunk-jpl/src/c/classes/Loads/Pengrid.h

    r18237 r19198  
    5555                int   ObjectEnum();
    5656                Object* copy();
     57                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    5758                /*}}}*/
    5859                /*Update virtual functions resolution: {{{*/
  • issm/trunk-jpl/src/c/classes/Loads/Penpair.h

    r18926 r19198  
    3636                int      Id();
    3737                int      ObjectEnum();
     38                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3839                /*}}}*/
    3940                /*Update virtual functions resolution: {{{*/
  • issm/trunk-jpl/src/c/classes/Loads/Riftfront.h

    r18926 r19198  
    6262                int      Id();
    6363                int      ObjectEnum();
     64                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    6465                /*}}}*/
    6566                /*Update virtual functions resolution: {{{*/
  • issm/trunk-jpl/src/c/classes/Masscon.h

    r18885 r19198  
    7777                }
    7878                /*}}}*/
     79                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/
     80                        _error_("not implemented yet!");
     81                }
     82                /*}}}*/
    7983                /*Definition virtual function resolutoin: */
    8084                char* Name(){/*{{{*/
  • issm/trunk-jpl/src/c/classes/Massconaxpby.h

    r18885 r19198  
    8888                }
    8989                /*}}}*/
     90                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/
     91                        _error_("not implemented yet!");
     92                }
     93                /*}}}*/
    9094                /*Definition virtual function resolutoin: */
    9195                char* Name(){/*{{{*/
  • issm/trunk-jpl/src/c/classes/Massfluxatgate.h

    r18885 r19198  
    121121                }
    122122                /*}}}*/
     123                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/
     124                        _error_("not implemented yet!");
     125                }
     126                /*}}}*/
    123127                /*Definition virtual function resolutoin: */
    124128                char* Name(){/*{{{*/
  • issm/trunk-jpl/src/c/classes/Materials/Matice.h

    r18237 r19198  
    4040                int   ObjectEnum();
    4141                Object* copy();
     42                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    4243                /*}}}*/
    4344                /*Update virtual funictions definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.h

    r19172 r19198  
    7979                int     ObjectEnum();
    8080                Object *copy();
     81                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    8182                /*}}}*/
    8283                /*Update virtual functions resolution: {{{*/
  • issm/trunk-jpl/src/c/classes/Misfit.h

    r19063 r19198  
    104104                }
    105105                /*}}}*/
     106                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/
     107                        _error_("not implemented yet!");
     108                }
     109                /*}}}*/
    106110                /*Definition virtual function resolutoin: */
    107111                char* Name(){/*{{{*/
  • issm/trunk-jpl/src/c/classes/Node.h

    r18237 r19198  
    5050                int     ObjectEnum();
    5151                Object *copy();
     52                void    Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    5253
    5354                /*Node numerical routines*/
  • issm/trunk-jpl/src/c/classes/Nodes.cpp

    r18521 r19198  
    1111#endif
    1212
     13#include "../shared/io/Comm/IssmComm.h"
    1314#include "./Nodes.h"
    14 #include "../shared/shared.h"
    1515#include "./Node.h"
    1616
  • issm/trunk-jpl/src/c/classes/Options/Option.h

    r15067 r19198  
    2626                int           ObjectEnum(){return OptionEnum;              };
    2727                Object       *copy(){_error_("Not implemented yet"); };
     28                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
     29
    2830
    2931                /*virtual functions: */
  • issm/trunk-jpl/src/c/classes/Params/BoolParam.h

    r16233 r19198  
    3636                int   ObjectEnum();
    3737                Object* copy();
     38                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3839                /*}}}*/
    3940                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/DataSetParam.h

    r16792 r19198  
    3737                int   ObjectEnum();
    3838                Object* copy();
     39                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3940                /*}}}*/
    4041                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/DoubleMatArrayParam.h

    r16233 r19198  
    3939                int   ObjectEnum();
    4040                Object* copy();
     41                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    4142                /*}}}*/
    4243                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/DoubleMatParam.h

    r16233 r19198  
    3838                int   ObjectEnum();
    3939                Object* copy();
     40                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    4041                /*}}}*/
    4142                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/DoubleParam.h

    r16233 r19198  
    3737                int   ObjectEnum();
    3838                Object* copy();
     39                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3940                /*}}}*/
    4041                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/DoubleVecParam.h

    r16233 r19198  
    3737                int   ObjectEnum();
    3838                Object* copy();
     39                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3940                /*}}}*/
    4041                /*Param virtual functions definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/FileParam.h

    r16233 r19198  
    3636                int   ObjectEnum();
    3737                Object* copy();
     38                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3839                /*}}}*/
    3940                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/GenericParam.h

    r16233 r19198  
    5252                // use the default copy constructor instead
    5353                Object* copy() { return new GenericParam<P>(*this); };
     54                                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    5455                /*}}}*/
    5556                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/IntMatParam.h

    r16233 r19198  
    3838                int   ObjectEnum();
    3939                Object* copy();
     40                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    4041                /*}}}*/
    4142                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/IntParam.h

    r16233 r19198  
    3737                int   ObjectEnum();
    3838                Object* copy();
     39                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3940                /*}}}*/
    4041                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/IntVecParam.h

    r16233 r19198  
    3838                int   ObjectEnum();
    3939                Object* copy();
     40                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    4041                /*}}}*/
    4142                /*Param virtual functions definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/MatrixParam.h

    r16233 r19198  
    3737                int   ObjectEnum();
    3838                Object* copy();
     39                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3940                /*}}}*/
    4041                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/StringArrayParam.h

    r16233 r19198  
    3838                int   ObjectEnum();
    3939                Object* copy();
     40                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    4041                /*}}}*/
    4142                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/StringParam.h

    r16233 r19198  
    3737                int   ObjectEnum();
    3838                Object* copy();
     39                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3940                /*}}}*/
    4041                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/TransientParam.h

    r16233 r19198  
    3838                int   ObjectEnum();
    3939                Object* copy();
     40                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    4041                /*}}}*/
    4142                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Params/VectorParam.h

    r16233 r19198  
    3737                int   ObjectEnum();
    3838                Object* copy();
     39                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3940                /*}}}*/
    4041                /*Param vritual function definitions: {{{*/
  • issm/trunk-jpl/src/c/classes/Profiler.h

    r18237 r19198  
    4343                int     ObjectEnum();
    4444                Object *copy();
     45                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    4546                /*}}}*/
    4647                /*Profiler routines {{{*/
  • issm/trunk-jpl/src/c/classes/Segment.h

    r18063 r19198  
    7171                }
    7272                /*}}}*/
     73                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/
     74                        _error_("not implemented yet!");
     75                }
     76                /*}}}*/
    7377
    7478};
  • issm/trunk-jpl/src/c/classes/Vertex.h

    r17686 r19198  
    4242                int   ObjectEnum();
    4343                Object* copy();
     44                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
     45
    4446                /*}}}*/
    4547                /*Vertex management:*/
  • issm/trunk-jpl/src/c/classes/kriging/ExponentialVariogram.h

    r18237 r19198  
    2727                int   ObjectEnum(){_error_("Not implemented yet");};
    2828                Object* copy();
     29                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
     30
    2931
    3032                /*Variogram functions*/
  • issm/trunk-jpl/src/c/classes/kriging/GaussianVariogram.h

    r18237 r19198  
    2828                int   ObjectEnum(){_error_("Not implemented yet");};
    2929                Object* copy();
     30                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3031
    3132                /*Variogram functions*/
  • issm/trunk-jpl/src/c/classes/kriging/Observation.h

    r18914 r19198  
    3333                bool operator==(const Observation& ob) const;
    3434                Object *copy();
     35                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};
     36
    3537
    3638                /*Management*/
  • issm/trunk-jpl/src/c/classes/kriging/PowerVariogram.h

    r18237 r19198  
    2727                int   ObjectEnum(){_error_("Not implemented yet");};
    2828                Object* copy();
     29                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
     30
    2931
    3032                /*Variogram functions*/
  • issm/trunk-jpl/src/c/classes/kriging/Quadtree.h

    r18237 r19198  
    3131                                int     ObjectEnum(){_error_("not implemented yet"); };
    3232                                Object *copy();
     33                                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};
     34
    3335
    3436                                /*Methods*/
  • issm/trunk-jpl/src/c/classes/kriging/SphericalVariogram.h

    r18237 r19198  
    2727                int   ObjectEnum(){_error_("Not implemented yet");};
    2828                Object* copy();
     29                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
     30
    2931
    3032                /*Variogram functions*/
  • issm/trunk-jpl/src/c/datastructures/DataSet.cpp

    r18237 r19198  
    1919#include "../datastructures/datastructures.h"
    2020#include "../shared/shared.h"
     21#include "../classes/classes.h"
    2122
    2223using namespace std;
     
    8687
    8788/*Specific methods*/
     89void DataSet::Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
     90       
     91        vector<Object*>::iterator obj;
     92        int obj_enum;
     93        int i;
     94       
     95        if(marshall_direction==MARSHALLING_FORWARD){
     96                numsorted=objects.size();
     97        }
     98
     99        MARSHALLING_ENUM(DataSetEnum);
     100        MARSHALLING(enum_type);
     101        MARSHALLING(sorted);
     102        MARSHALLING(presorted);
     103        MARSHALLING(numsorted);
     104        MARSHALLING_DYNAMIC(sorted_ids,int,numsorted);
     105        MARSHALLING_DYNAMIC(id_offsets,int,numsorted);
     106
     107        /*Now branch according to direction of marshalling: */
     108        if(marshall_direction==MARSHALLING_FORWARD){
     109                /*Go through our objects, and marshall them into the buffer: */
     110                for ( obj=this->objects.begin() ; obj < this->objects.end(); obj++ ){
     111                        (*obj)->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     112                }
     113        }
     114        else{
     115                /*This is the heart of the demashalling method. We have a buffer coming
     116                 in, and we are supposed to create a dataset out of it. No such thing
     117                 as class orientation for buffers, we need to key off the enum of each
     118                 object stored in the buffer. */
     119                for(i=0;i<this->numsorted;i++){
     120
     121                        /*Recover enum of object first: */
     122                        MARSHALLING_ENUM(obj_enum);
     123
     124                        /*Reset the file pointer to point again to the beginning of the object: */
     125                        *pmarshalled_data-=sizeof(int);
     126
     127                        /*Giant case statement to spin-up the right object, and demarshall into it the information
     128                         *stored in the buffer: */
     129                        switch(enum_type){
     130                                case NodeEnum:{
     131                                        Node* node=NULL;
     132                                        node=new Node();
     133                                        node->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     134                                        this->AddObject(node);}
     135                                        break;
     136                                case VertexEnum:{
     137                                        Vertex* vertex=NULL;
     138                                        vertex=new Vertex();
     139                                        vertex->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
     140                                        this->AddObject(vertex);}
     141                                        break;
     142                                default:
     143                                        _error_("could not recognize enum type: " << EnumToStringx(enum_type));
     144                        }
     145                }
     146        }
     147}
     148/*}}}*/
    88149int   DataSet::AddObject(Object* object){/*{{{*/
    89150
  • issm/trunk-jpl/src/c/datastructures/DataSet.h

    r18237 r19198  
    3333                DataSet(int enum_type);
    3434                ~DataSet();
     35                void  Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction);
    3536
    3637                /*management*/
  • issm/trunk-jpl/src/c/datastructures/Object.h

    r15335 r19198  
    2121                virtual int   ObjectEnum()=0;
    2222                virtual Object* copy()=0;
     23                virtual void Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction)=0;
    2324
    2425};
  • issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp

    r18788 r19198  
    252252                               
    253253                                /*ok, segments[0] is common to one of our vertices: */
    254                                 //if (el==318 && contouri==9){ _printf_("ok1" << "\n"); }
    255254                                coord1=0;
    256255                                if(edge1==IntersectEnum){coord2=alpha1;}
  • issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

    r19191 r19198  
    88
    99enum definitions{
     10        /*General: {{{*/
     11        FemModelEnum,
     12        /*}}}*/
    1013        /*Model fields {{{*/
    1114        AutodiffIsautodiffEnum,
     
    455458        /*}}}*/
    456459        /*Datasets {{{*/
     460        DataSetEnum,
    457461        ConstraintsEnum,
    458462        LoadsEnum,
  • issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp

    r19191 r19198  
    1717        switch(en){
    1818
     19                case FemModelEnum : return "FemModel";
    1920                case AutodiffIsautodiffEnum : return "AutodiffIsautodiff";
    2021                case AutodiffNumDependentsEnum : return "AutodiffNumDependents";
     
    454455                case FSvelocityEnum : return "FSvelocity";
    455456                case FSpressureEnum : return "FSpressure";
     457                case DataSetEnum : return "DataSet";
    456458                case ConstraintsEnum : return "Constraints";
    457459                case LoadsEnum : return "Loads";
  • issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp

    r19191 r19198  
    1717
    1818   if(stage==1){
    19               if (strcmp(name,"AutodiffIsautodiff")==0) return AutodiffIsautodiffEnum;
     19              if (strcmp(name,"FemModel")==0) return FemModelEnum;
     20              else if (strcmp(name,"AutodiffIsautodiff")==0) return AutodiffIsautodiffEnum;
    2021              else if (strcmp(name,"AutodiffNumDependents")==0) return AutodiffNumDependentsEnum;
    2122              else if (strcmp(name,"AutodiffNumDependentObjects")==0) return AutodiffNumDependentObjectsEnum;
     
    136137              else if (strcmp(name,"HydrologydcEplPorosity")==0) return HydrologydcEplPorosityEnum;
    137138              else if (strcmp(name,"HydrologydcEplInitialThickness")==0) return HydrologydcEplInitialThicknessEnum;
    138               else if (strcmp(name,"HydrologydcEplColapseThickness")==0) return HydrologydcEplColapseThicknessEnum;
    139139         else stage=2;
    140140   }
    141141   if(stage==2){
    142               if (strcmp(name,"HydrologydcEplMaxThickness")==0) return HydrologydcEplMaxThicknessEnum;
     142              if (strcmp(name,"HydrologydcEplColapseThickness")==0) return HydrologydcEplColapseThicknessEnum;
     143              else if (strcmp(name,"HydrologydcEplMaxThickness")==0) return HydrologydcEplMaxThicknessEnum;
    143144              else if (strcmp(name,"HydrologydcEplThickness")==0) return HydrologydcEplThicknessEnum;
    144145              else if (strcmp(name,"HydrologydcEplThicknessOld")==0) return HydrologydcEplThicknessOldEnum;
     
    259260              else if (strcmp(name,"MeshLowerelements")==0) return MeshLowerelementsEnum;
    260261              else if (strcmp(name,"MeshNumberofelements2d")==0) return MeshNumberofelements2dEnum;
    261               else if (strcmp(name,"MeshNumberofelements")==0) return MeshNumberofelementsEnum;
    262262         else stage=3;
    263263   }
    264264   if(stage==3){
    265               if (strcmp(name,"MeshNumberoflayers")==0) return MeshNumberoflayersEnum;
     265              if (strcmp(name,"MeshNumberofelements")==0) return MeshNumberofelementsEnum;
     266              else if (strcmp(name,"MeshNumberoflayers")==0) return MeshNumberoflayersEnum;
    266267              else if (strcmp(name,"MeshNumberofvertices2d")==0) return MeshNumberofvertices2dEnum;
    267268              else if (strcmp(name,"MeshNumberofvertices")==0) return MeshNumberofverticesEnum;
     
    382383              else if (strcmp(name,"SurfaceforcingsBPos")==0) return SurfaceforcingsBPosEnum;
    383384              else if (strcmp(name,"SurfaceforcingsBNeg")==0) return SurfaceforcingsBNegEnum;
    384               else if (strcmp(name,"SMBhenning")==0) return SMBhenningEnum;
    385385         else stage=4;
    386386   }
    387387   if(stage==4){
    388               if (strcmp(name,"SMBcomponents")==0) return SMBcomponentsEnum;
     388              if (strcmp(name,"SMBhenning")==0) return SMBhenningEnum;
     389              else if (strcmp(name,"SMBcomponents")==0) return SMBcomponentsEnum;
    389390              else if (strcmp(name,"SurfaceforcingsAccumulation")==0) return SurfaceforcingsAccumulationEnum;
    390391              else if (strcmp(name,"SurfaceforcingsEvaporation")==0) return SurfaceforcingsEvaporationEnum;
     
    463464              else if (strcmp(name,"FSvelocity")==0) return FSvelocityEnum;
    464465              else if (strcmp(name,"FSpressure")==0) return FSpressureEnum;
     466              else if (strcmp(name,"DataSet")==0) return DataSetEnum;
    465467              else if (strcmp(name,"Constraints")==0) return ConstraintsEnum;
    466468              else if (strcmp(name,"Loads")==0) return LoadsEnum;
     
    504506              else if (strcmp(name,"NumericalfluxType")==0) return NumericalfluxTypeEnum;
    505507              else if (strcmp(name,"Param")==0) return ParamEnum;
    506               else if (strcmp(name,"Pengrid")==0) return PengridEnum;
    507               else if (strcmp(name,"Penpair")==0) return PenpairEnum;
    508508         else stage=5;
    509509   }
    510510   if(stage==5){
    511               if (strcmp(name,"Profiler")==0) return ProfilerEnum;
     511              if (strcmp(name,"Pengrid")==0) return PengridEnum;
     512              else if (strcmp(name,"Penpair")==0) return PenpairEnum;
     513              else if (strcmp(name,"Profiler")==0) return ProfilerEnum;
    512514              else if (strcmp(name,"MatrixParam")==0) return MatrixParamEnum;
    513515              else if (strcmp(name,"Masscon")==0) return MassconEnum;
     
    627629              else if (strcmp(name,"StressTensorzz")==0) return StressTensorzzEnum;
    628630              else if (strcmp(name,"StressMaxPrincipal")==0) return StressMaxPrincipalEnum;
    629               else if (strcmp(name,"DeviatoricStress")==0) return DeviatoricStressEnum;
    630               else if (strcmp(name,"DeviatoricStressxx")==0) return DeviatoricStressxxEnum;
    631631         else stage=6;
    632632   }
    633633   if(stage==6){
    634               if (strcmp(name,"DeviatoricStressxy")==0) return DeviatoricStressxyEnum;
     634              if (strcmp(name,"DeviatoricStress")==0) return DeviatoricStressEnum;
     635              else if (strcmp(name,"DeviatoricStressxx")==0) return DeviatoricStressxxEnum;
     636              else if (strcmp(name,"DeviatoricStressxy")==0) return DeviatoricStressxyEnum;
    635637              else if (strcmp(name,"DeviatoricStressxz")==0) return DeviatoricStressxzEnum;
    636638              else if (strcmp(name,"DeviatoricStressyy")==0) return DeviatoricStressyyEnum;
     
    750752              else if (strcmp(name,"Outputdefinition67")==0) return Outputdefinition67Enum;
    751753              else if (strcmp(name,"Outputdefinition68")==0) return Outputdefinition68Enum;
    752               else if (strcmp(name,"Outputdefinition69")==0) return Outputdefinition69Enum;
    753               else if (strcmp(name,"Outputdefinition70")==0) return Outputdefinition70Enum;
    754754         else stage=7;
    755755   }
    756756   if(stage==7){
    757               if (strcmp(name,"Outputdefinition71")==0) return Outputdefinition71Enum;
     757              if (strcmp(name,"Outputdefinition69")==0) return Outputdefinition69Enum;
     758              else if (strcmp(name,"Outputdefinition70")==0) return Outputdefinition70Enum;
     759              else if (strcmp(name,"Outputdefinition71")==0) return Outputdefinition71Enum;
    758760              else if (strcmp(name,"Outputdefinition72")==0) return Outputdefinition72Enum;
    759761              else if (strcmp(name,"Outputdefinition73")==0) return Outputdefinition73Enum;
     
    873875              else if (strcmp(name,"Verbose")==0) return VerboseEnum;
    874876              else if (strcmp(name,"TriangleInterp")==0) return TriangleInterpEnum;
    875               else if (strcmp(name,"BilinearInterp")==0) return BilinearInterpEnum;
    876               else if (strcmp(name,"NearestInterp")==0) return NearestInterpEnum;
    877877         else stage=8;
    878878   }
    879879   if(stage==8){
    880               if (strcmp(name,"XY")==0) return XYEnum;
     880              if (strcmp(name,"BilinearInterp")==0) return BilinearInterpEnum;
     881              else if (strcmp(name,"NearestInterp")==0) return NearestInterpEnum;
     882              else if (strcmp(name,"XY")==0) return XYEnum;
    881883              else if (strcmp(name,"XYZ")==0) return XYZEnum;
    882884              else if (strcmp(name,"Dense")==0) return DenseEnum;
  • issm/trunk-jpl/src/c/shared/io/io.h

    r15839 r19198  
    1212#endif
    1313
     14#include "./Comm/IssmComm.h"
    1415#include "./Disk/diskio.h"
    1516#include "./Print/Print.h"
    16 #include "./Comm/IssmComm.h"
     17#include "./Marshalling/Marshalling.h"
    1718
    1819#endif  /* _IO_H_ */
  • issm/trunk-jpl/src/c/toolkits/issm/Bucket.h

    r18237 r19198  
    99/*{{{*/
    1010#include "../../datastructures/datastructures.h"
    11 #include "../../shared/shared.h"
     11#include "../../shared/io/Comm/IssmComm.h"
    1212#include "../toolkitsenums.h"
    1313/*}}}*/
     
    129129                        else _error_("No Copy of Bucket because its type is invalid."); };
    130130                /*}}}*/
     131                void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/
     132                        _error_("not implemented yet!");
     133                }
     134                /*}}}*/
    131135
    132136                /*specific routines of Bucket: */
  • issm/trunk-jpl/src/m/dev/devpath.m

    r16119 r19198  
    1818%ISSM path
    1919addpath([ISSM_DIR '/src/m/os/']); %load recursivepath
    20 addpath([ISSM_DIR '/lib']);       %load mex
     20addpath([ISSM_DIR '/build-fw/lib']);       %load mex
    2121addpath(recursivepath([ISSM_DIR '/src/m']));
    2222addpath(recursivepath([ISSM_DIR '/externalpackages/scotch']));
  • issm/trunk-jpl/src/m/dev/devpath.py

    r19157 r19198  
    2222                                        sys.path.append(root)
    2323                               
    24 sys.path.append(ISSM_DIR + '/lib')
     24sys.path.append(ISSM_DIR + '/build-fw/lib')
    2525sys.path.append(ISSM_DIR + '/src/wrappers/python/.libs')
    2626# If using clusters, we need to have the path to the cluster settings directory
  • issm/trunk-jpl/src/m/enum/EnumDefinitions.py

    r19191 r19198  
    99"""
    1010
     11def FemModelEnum(): return StringToEnum("FemModel")[0]
    1112def AutodiffIsautodiffEnum(): return StringToEnum("AutodiffIsautodiff")[0]
    1213def AutodiffNumDependentsEnum(): return StringToEnum("AutodiffNumDependents")[0]
     
    446447def FSvelocityEnum(): return StringToEnum("FSvelocity")[0]
    447448def FSpressureEnum(): return StringToEnum("FSpressure")[0]
     449def DataSetEnum(): return StringToEnum("DataSet")[0]
    448450def ConstraintsEnum(): return StringToEnum("Constraints")[0]
    449451def LoadsEnum(): return StringToEnum("Loads")[0]
  • issm/trunk-jpl/src/m/mesh/bamg.m

    r19077 r19198  
    235235                if all(ischar(track)),
    236236                        A=expread(track);
    237                         track=[A.x A.y];
     237                        track=[];
     238                        for i=1:length(A),
     239                                track=[track; [A(i).x A(i).y]];
     240                        end
    238241                else
    239242                        track=double(track); %for some reason, it is of class "single"
Note: See TracChangeset for help on using the changeset viewer.