source:
issm/oecreview/Archive/24684-25833/ISSM-25506-25507.diff
Last change on this file was 25834, checked in by , 4 years ago | |
---|---|
File size: 144.9 KB |
-
../trunk-jpl/src/c/classes/Segment.h
64 64 /*}}}*/ 65 65 int Id(void){ return eid; }/*{{{*/ 66 66 /*}}}*/ 67 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/68 _error_("not implemented yet!");69 }70 /*}}}*/71 67 void Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 72 68 _error_("not implemented yet!"); 73 69 } -
../trunk-jpl/src/c/classes/Nodes.cpp
102 102 return output; 103 103 } 104 104 /*}}}*/ 105 void Nodes::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/106 107 int num_procs=IssmComm::GetSize();108 int test = num_procs;109 MARSHALLING_ENUM(NodesEnum);110 MARSHALLING(numberofnodes);111 MARSHALLING(numberofnodes_local);112 MARSHALLING(numberofmasters_local);113 114 MARSHALLING(test);115 if(test!=num_procs) _error_("number of cores is not the same as before");116 117 DataSet::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);118 119 if(marshall_direction == MARSHALLING_LOAD){120 this->common_recv_ids = xNew<int*>(num_procs);121 this->common_send_ids = xNew<int*>(num_procs);122 for(int i=0;i<num_procs;i++){123 this->common_recv_ids[i] = NULL;124 this->common_send_ids[i] = NULL;125 }126 }127 128 /*Stop here if no nodes*/129 if(this->Size()==0) return;130 131 MARSHALLING_DYNAMIC(this->common_recv,int,num_procs);132 MARSHALLING_DYNAMIC(this->common_send,int,num_procs);133 for(int i=0;i<num_procs;i++){134 if(this->common_recv[i]) MARSHALLING_DYNAMIC(this->common_recv_ids[i],int,this->common_recv[i]);135 if(this->common_send[i]) MARSHALLING_DYNAMIC(this->common_send_ids[i],int,this->common_send[i]);136 }137 }138 /*}}}*/139 105 void Nodes::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 140 106 141 107 int object_enum = NodesEnum; -
../trunk-jpl/src/c/classes/Cfdragcoeffabsgrad.cpp
72 72 return -1; 73 73 } 74 74 /*}}}*/ 75 void Cfdragcoeffabsgrad::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/76 _error_("not implemented yet!");77 }78 /*}}}*/79 75 void Cfdragcoeffabsgrad::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 80 76 _error_("not implemented yet!"); 81 77 } -
../trunk-jpl/src/c/classes/Vertex.cpp
113 113 /*}}}*/ 114 114 int Vertex::Id(void){ return id; }/*{{{*/ 115 115 /*}}}*/ 116 void Vertex::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/117 118 MARSHALLING_ENUM(VertexEnum);119 MARSHALLING(clone);120 MARSHALLING(domaintype);121 MARSHALLING(id);122 MARSHALLING(sid);123 MARSHALLING(pid);124 MARSHALLING(lid);125 MARSHALLING(x);126 MARSHALLING(y);127 MARSHALLING(z);128 MARSHALLING(sigma);129 MARSHALLING(connectivity);130 131 }132 /*}}}*/133 116 void Vertex::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 134 117 135 118 int object_enum = VertexEnum; -
../trunk-jpl/src/c/classes/Cfsurfacelogvel.h
33 33 void DeepEcho(void); 34 34 void Echo(void); 35 35 int Id(void); 36 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);37 36 void Marshall2(MarshallHandle* marshallhandle); 38 37 int ObjectEnum(void); 39 38 -
../trunk-jpl/src/c/classes/Profiler.cpp
63 63 return -1; 64 64 } 65 65 /*}}}*/ 66 void Profiler::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/67 68 IssmPDouble* pointer = NULL;69 bool* bpointer = NULL;70 71 MARSHALLING_ENUM(ProfilerEnum);72 pointer = &this->time[0];73 MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXPROFSIZE);74 pointer = &this->flops[0];75 MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXPROFSIZE);76 pointer = &this->memory[0];77 MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXPROFSIZE);78 bpointer = &this->running[0];79 MARSHALLING_DYNAMIC(bpointer,bool,MAXPROFSIZE);80 81 } /*}}}*/82 66 void Profiler::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 83 67 84 68 IssmPDouble* pointer = NULL; -
../trunk-jpl/src/c/classes/Constraints/SpcDynamic.h
33 33 void DeepEcho(); 34 34 void Echo(); 35 35 int Id(); 36 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);37 36 void Marshall2(MarshallHandle* marshallhandle); 38 37 int ObjectEnum(); 39 38 -
../trunk-jpl/src/c/classes/Constraints/SpcStatic.h
32 32 void DeepEcho(); 33 33 void Echo(); 34 34 int Id(); 35 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);36 35 void Marshall2(MarshallHandle* marshallhandle); 37 36 int ObjectEnum(); 38 37 /*}}}*/ -
../trunk-jpl/src/c/classes/Constraints/SpcTransient.h
34 34 void DeepEcho(); 35 35 void Echo(); 36 36 int Id(); 37 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);38 37 void Marshall2(MarshallHandle* marshallhandle); 39 38 int ObjectEnum(); 40 39 /*}}}*/ -
../trunk-jpl/src/c/classes/Constraints/SpcDynamic.cpp
70 70 /*}}}*/ 71 71 int SpcDynamic::Id(void){ return id; }/*{{{*/ 72 72 /*}}}*/ 73 void SpcDynamic::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/74 75 MARSHALLING_ENUM(SpcDynamicEnum);76 77 MARSHALLING(id);78 MARSHALLING(nodeid);79 MARSHALLING(dof);80 MARSHALLING(value);81 MARSHALLING(analysis_type);82 MARSHALLING(isset);83 MARSHALLING(penalty);84 85 }86 /*}}}*/87 73 void SpcDynamic::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 88 74 89 75 int object_enum = SpcDynamicEnum; -
../trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp
72 72 /*}}}*/ 73 73 int SpcStatic::Id(void){ return id; }/*{{{*/ 74 74 /*}}}*/ 75 void SpcStatic::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/76 77 MARSHALLING_ENUM(SpcStaticEnum);78 79 MARSHALLING(id);80 MARSHALLING(nodeid);81 MARSHALLING(dof);82 MARSHALLING(value);83 MARSHALLING(analysis_type);84 MARSHALLING(penalty);85 86 }87 /*}}}*/88 75 void SpcStatic::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 89 76 90 77 int object_enum = SpcStaticEnum; -
../trunk-jpl/src/c/classes/Constraints/SpcTransient.cpp
78 78 return id; 79 79 } 80 80 /*}}}*/ 81 void SpcTransient::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/82 83 MARSHALLING_ENUM(SpcTransientEnum);84 85 MARSHALLING(id);86 MARSHALLING(nodeid);87 MARSHALLING(dof);88 MARSHALLING(analysis_type);89 MARSHALLING(penalty);90 MARSHALLING(nsteps);91 if(nsteps){92 MARSHALLING_DYNAMIC(values,IssmDouble,nsteps);93 MARSHALLING_DYNAMIC(times,IssmDouble,nsteps);94 }95 else{96 values=NULL;97 times=NULL;98 }99 100 }101 /*}}}*/102 81 void SpcTransient::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 103 82 104 83 int object_enum = SpcTransientEnum; -
../trunk-jpl/src/c/classes/Regionaloutput.h
32 32 void DeepEcho(void); 33 33 void Echo(void); 34 34 int Id(void); 35 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);36 35 void Marshall2(MarshallHandle* marshallhandle); 37 36 int ObjectEnum(void); 38 37 -
../trunk-jpl/src/c/classes/Cfsurfacesquare.h
38 38 void DeepEcho(void); 39 39 void Echo(void); 40 40 int Id(void); 41 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);42 41 void Marshall2(MarshallHandle* marshallhandle); 43 42 int ObjectEnum(void); 44 43 -
../trunk-jpl/src/c/classes/FemModel.cpp
259 259 femmodel_buffer_ini=femmodel_buffer; 260 260 261 261 /*Marshall:*/ 262 //this->Marshall(&femmodel_buffer,NULL,MARSHALLING_WRITE);263 262 WriteCheckpointFunctor* marshallhandle = new WriteCheckpointFunctor(&femmodel_buffer); 264 263 this->Marshall2(marshallhandle); 265 264 delete marshallhandle; … … 484 483 /*Clean up*/ 485 484 delete iomodel; 486 485 }/*}}}*/ 487 void FemModel::Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction){ /*{{{*/488 489 int i;490 int analysis_type;491 492 if(marshall_direction==MARSHALLING_LOAD){493 delete this->materials;494 delete this->parameters;495 delete this->inputs;496 if(this->constraints_list && this->nummodels){497 for(i=0;i<this->nummodels;i++) delete this->constraints_list[i];498 xDelete<Constraints*>(constraints_list);499 }500 if(this->loads_list && this->nummodels){501 for(i=0;i<this->nummodels;i++) delete this->loads_list[i];502 xDelete<Loads*>(loads_list);503 }504 if(this->nodes_list && this->nummodels){505 for(i=0;i<this->nummodels;i++) delete this->nodes_list[i];506 xDelete<Nodes*>(nodes_list);507 }508 delete this->results;509 delete this->vertices;510 delete this->elements;511 xDelete<int>(this->analysis_type_list);512 513 this->materials = new Materials();514 this->parameters = new Parameters();515 this->inputs = new Inputs();516 this->results = new Results();517 this->nodes = new Nodes();518 this->vertices = new Vertices();519 this->elements = new Elements();520 }521 522 MARSHALLING_ENUM(FemModelEnum);523 524 MARSHALLING(solution_type);525 MARSHALLING(analysis_counter);526 MARSHALLING(nummodels);527 MARSHALLING_DYNAMIC(analysis_type_list,int,nummodels);528 529 this->materials->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);530 this->parameters->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);531 this->inputs->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);532 this->results->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);533 this->vertices->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);534 this->elements->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);535 536 if(marshall_direction==MARSHALLING_LOAD){537 this->constraints_list = xNew<Constraints*>(this->nummodels);538 for(i=0;i<nummodels;i++) this->constraints_list[i] = new Constraints();539 this->loads_list = xNew<Loads*>(this->nummodels);540 for(i=0;i<nummodels;i++) this->loads_list[i] = new Loads();541 this->nodes_list = xNew<Nodes*>(this->nummodels);542 for(i=0;i<nummodels;i++) this->nodes_list[i] = new Nodes();543 }544 545 for(i=0;i<nummodels;i++){546 this->constraints_list[i]->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);547 this->loads_list[i]->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);548 this->nodes_list[i]->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);549 }550 551 if(marshall_direction==MARSHALLING_LOAD){552 /*reset hooks for elements, loads and nodes:*/553 this->elements->ResetHooks();554 this->materials->ResetHooks();555 556 /*do the post-processing of the datasets to get an FemModel that can actually run analyses:*/557 for(i=0;i<nummodels;i++){558 this->loads_list[i]->ResetHooks();559 analysis_type=this->analysis_type_list[i];560 SetCurrentConfiguration(analysis_type);561 SpcNodesx(this->nodes_list[i],this->constraints_list[i],this->parameters);562 NodesDofx(this->nodes_list[i],this->parameters);563 ConfigureObjectsx(this->elements,this->loads_list[i],this->nodes_list[i],this->vertices,this->materials,this->parameters,this->inputs);564 }565 566 //Reset current configuration:567 analysis_type=this->analysis_type_list[analysis_counter];568 SetCurrentConfiguration(analysis_type);569 }570 }571 /*}}}*/572 486 void FemModel::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 573 487 574 488 /*Allocate new fields if necessary*/ … … 692 606 femmodel_buffer_ini=femmodel_buffer; //keep track of the initial position, so as to free later. 693 607 694 608 /*Create new FemModel by demarshalling the buffer: */ 695 //this->Marshall(&femmodel_buffer,NULL,MARSHALLING_LOAD);696 609 LoadCheckpointFunctor* marshallhandle = new LoadCheckpointFunctor(&femmodel_buffer); 697 610 this->Marshall2(marshallhandle); 698 611 delete marshallhandle; -
../trunk-jpl/src/c/classes/Vertices.h
30 30 31 31 /*Objects virtual functions*/ 32 32 Vertices* Copy(); 33 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);34 33 void Marshall2(MarshallHandle* marshallhandle); 35 34 36 35 /*numerics:*/ -
../trunk-jpl/src/c/classes/Node.h
75 75 void DeepEcho(); 76 76 void Echo(); 77 77 int Id(); 78 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);79 78 void Marshall2(MarshallHandle* marshallhandle); 80 79 int ObjectEnum(); 81 80 -
../trunk-jpl/src/c/classes/Elements/Penta.cpp
140 140 141 141 } 142 142 /*}}}*/ 143 void Penta::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/144 145 MARSHALLING_ENUM(PentaEnum);146 MARSHALLING(this->isonsurface);147 MARSHALLING(this->isonbase);148 149 /*Call parent classes: */150 ElementHook::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);151 Element::MarshallElement(pmarshalled_data,pmarshalled_data_size,marshall_direction,this->numanalyses);152 PentaRef::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);153 154 vertices = (Vertex**)this->hvertices->deliverp();155 material = (Material*)this->hmaterial->delivers();156 verticalneighbors = (Penta**)this->hneighbors->deliverp();157 158 }159 /*}}}*/160 143 void Penta::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 161 144 162 145 int object_enum = PentaEnum; -
../trunk-jpl/src/c/classes/Elements/PentaRef.h
28 28 void GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss); 29 29 void GetTriaJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss); 30 30 void VerticalSegmentIndicesBase(int** pindices,int* pnumseg,int finiteelement); 31 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*do nothing */};32 31 void Marshall2(MarshallHandle* marshallhandle){ /*do nothing */}; 33 32 int NumberofNodes(int finiteelement); 34 33 int PressureInterpolation(int fe_stokes); -
../trunk-jpl/src/c/classes/Elements/ElementHook.cpp
64 64 65 65 } 66 66 /*}}}*/ 67 void ElementHook::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/68 69 int i;70 bool* hnodesi_null=NULL; /*intermediary needed*/71 bool hnodes_null=true; /*this could be NULL on empty constructor*/72 bool hneighbors_null=true; /*don't deal with hneighbors, unless explicitely asked to*/73 74 _assert_(this);75 76 /*preliminary, before marshall starts: */77 if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){78 if(this->hneighbors)hneighbors_null=false;79 if(this->hnodes){80 hnodes_null=false;81 hnodesi_null=xNew<bool>(numanalyses);82 for(i=0;i<numanalyses;i++){83 if(this->hnodes[i])hnodesi_null[i]=false;84 else hnodesi_null[i]=true;85 }86 }87 }88 89 /*ok, marshall operations: */90 MARSHALLING_ENUM(ElementHookEnum);91 MARSHALLING(numanalyses);92 MARSHALLING(hneighbors_null);93 MARSHALLING(hnodes_null);94 MARSHALLING_DYNAMIC(hnodesi_null,bool,numanalyses);95 96 if(marshall_direction==MARSHALLING_LOAD){97 98 if (!hnodes_null)this->hnodes = new Hook*[numanalyses];99 else this->hnodes=NULL;100 this->hvertices = new Hook();101 this->hmaterial = new Hook();102 if(!hneighbors_null)this->hneighbors = new Hook();103 else this->hneighbors=NULL;104 105 /*Initialize hnodes: */106 if (this->hnodes){107 for(int i=0;i<this->numanalyses;i++){108 if(!hnodesi_null[i])this->hnodes[i]=new Hook();109 else this->hnodes[i]=NULL;110 }111 }112 }113 114 if (this->hnodes){115 for (i=0;i<numanalyses;i++) if(this->hnodes[i])this->hnodes[i]->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);116 }117 this->hvertices->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);118 this->hmaterial->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);119 if(this->hneighbors)this->hneighbors->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);120 121 /*Free ressources: */122 if(hnodesi_null) xDelete<bool>(hnodesi_null);123 124 }125 /*}}}*/126 67 void ElementHook::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 127 68 128 69 int i; -
../trunk-jpl/src/c/classes/Elements/Penta.h
39 39 /*}}}*/ 40 40 /*Object virtual functions definitions: {{{*/ 41 41 Object *copy(); 42 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);43 42 void Marshall2(MarshallHandle* marshallhandle); 44 43 int ObjectEnum(); 45 44 /*}}}*/ -
../trunk-jpl/src/c/classes/Elements/Seg.cpp
119 119 120 120 } 121 121 /*}}}*/ 122 void Seg::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/123 124 MARSHALLING_ENUM(SegEnum);125 MARSHALLING(this->iscollapsed);126 MARSHALLING(this->isonsurface);127 MARSHALLING(this->isonbase);128 MARSHALLING(this->collapsed_ids[0]);129 MARSHALLING(this->collapsed_ids[1]);130 131 /*Call parent classes: */132 ElementHook::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);133 Element::MarshallElement(pmarshalled_data,pmarshalled_data_size,marshall_direction,this->numanalyses);134 SegRef::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);135 136 vertices = (Vertex**)this->hvertices->deliverp();137 material = (Material*)this->hmaterial->delivers();138 139 }140 /*}}}*/141 122 void Seg::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 142 123 143 124 int object_enum = SegEnum; -
../trunk-jpl/src/c/classes/Elements/ElementHook.h
21 21 ElementHook(); 22 22 ElementHook(int in_numanalyses,int material_id,int numvertices,IoModel* iomodel); 23 23 ~ElementHook(); 24 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);25 24 void Marshall2(MarshallHandle* marshallhandle); 26 25 27 26 void DeepEcho(); -
../trunk-jpl/src/c/classes/Elements/Tetra.cpp
117 117 return tetra; 118 118 } 119 119 /*}}}*/ 120 void Tetra::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/121 122 MARSHALLING_ENUM(TetraEnum);123 MARSHALLING(this->isonsurface);124 MARSHALLING(this->isonbase);125 126 /*Call parent classes: */127 ElementHook::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);128 Element::MarshallElement(pmarshalled_data,pmarshalled_data_size,marshall_direction,this->numanalyses);129 TetraRef::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);130 131 vertices = (Vertex**)this->hvertices->deliverp();132 material = (Material*)this->hmaterial->delivers();133 134 }135 /*}}}*/136 120 void Tetra::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 137 121 138 122 int object_enum = TetraEnum; -
../trunk-jpl/src/c/classes/Elements/SegRef.h
23 23 void GetNodalFunctions(IssmDouble* basis,GaussSeg* gauss,int finiteelement); 24 24 void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussSeg* gauss,int finiteelement); 25 25 void GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussSeg* gauss,int finiteelement); 26 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*do nothing */};27 26 void Marshall2(MarshallHandle* marshallhandle){ /*do nothing */}; 28 27 int NumberofNodes(int finiteelement); 29 28 }; -
../trunk-jpl/src/c/classes/Elements/TetraRef.h
24 24 void GetNodalFunctions(IssmDouble* basis,Gauss* gauss_in,int finiteelement); 25 25 void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss,int finiteelement); 26 26 void GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss,int finiteelement); 27 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*do nothing */};28 27 void Marshall2(MarshallHandle* marshallhandle){ /*do nothing */}; 29 28 int NumberofNodes(int finiteelement); 30 29 int PressureInterpolation(int fe_stokes); -
../trunk-jpl/src/c/classes/Elements/Seg.h
37 37 /*}}}*/ 38 38 /*Object virtual functions definitions:{{{ */ 39 39 Object *copy(); 40 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);41 40 void Marshall2(MarshallHandle* marshallhandle); 42 41 int ObjectEnum(); 43 42 /*}}}*/ -
../trunk-jpl/src/c/classes/Elements/Tetra.h
35 35 /*}}}*/ 36 36 /*Object virtual functions definitions:{{{ */ 37 37 Object *copy(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);39 38 void Marshall2(MarshallHandle* marshallhandle); 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/Elements/Element.cpp
2239 2239 xDelete<IssmDouble>(values); 2240 2240 2241 2241 }/*}}}*/ 2242 void Element::MarshallElement(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction,int numanalyses){/*{{{*/2243 2244 _assert_(this);2245 if(marshall_direction==MARSHALLING_LOAD){2246 nodes = NULL;2247 }2248 2249 MARSHALLING_ENUM(ElementEnum);2250 2251 MARSHALLING(id);2252 MARSHALLING(sid);2253 MARSHALLING(lid);2254 MARSHALLING(element_type);2255 MARSHALLING_DYNAMIC(element_type_list,int,numanalyses);2256 }2257 /*}}}*/2258 2242 void Element::MarshallElement2(MarshallHandle* marshallhandle,int numanalyses){/*{{{*/ 2259 2243 2260 2244 _assert_(this); -
../trunk-jpl/src/c/classes/Elements/Element.h
146 146 void LinearFloatingiceMeltingRate(); 147 147 void SpatialLinearFloatingiceMeltingRate(); 148 148 void MantlePlumeGeothermalFlux(); 149 void MarshallElement(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction,int numanalyses);150 149 void MarshallElement2(MarshallHandle* marshallhandle,int numanalyses); 151 150 void MigrateGroundingLine(IssmDouble* sheet_ungrounding); 152 151 void MismipFloatingiceMeltingRate(); … … 290 289 virtual void JacobianDeterminantLine(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss)=0; 291 290 virtual void JacobianDeterminantSurface(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss)=0; 292 291 virtual void JacobianDeterminantTop(IssmDouble* Jdet,IssmDouble* xyz_list_base,Gauss* gauss)=0; 293 virtual void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction)=0;294 292 virtual void Marshall2(MarshallHandle* marshallhandle)=0; 295 293 virtual IssmDouble Masscon(IssmDouble* levelset)=0; 296 294 virtual IssmDouble MassFlux(IssmDouble* segment)=0; -
../trunk-jpl/src/c/classes/Elements/Tria.cpp
143 143 return tria; 144 144 } 145 145 /*}}}*/ 146 void Tria::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/147 148 MARSHALLING_ENUM(TriaEnum);149 MARSHALLING(this->iscollapsed);150 MARSHALLING(this->isonsurface);151 MARSHALLING(this->isonbase);152 153 /*Call parent classes: */154 ElementHook::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);155 Element::MarshallElement(pmarshalled_data,pmarshalled_data_size,marshall_direction,this->numanalyses);156 TriaRef::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);157 158 vertices = (Vertex**)this->hvertices->deliverp();159 material = (Material*)this->hmaterial->delivers();160 161 }162 /*}}}*/163 146 void Tria::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 164 147 165 148 int object_enum = TriaEnum; -
../trunk-jpl/src/c/classes/Elements/TriaRef.h
27 27 void GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss); 28 28 void GetSegmentNodalFunctions(IssmDouble* basis,Gauss* gauss, int index1,int index2,int finiteelement); 29 29 void GetSegmentNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list_tria,Gauss* gauss, int index1,int index2,int finiteelement); 30 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*do nothing */};31 30 void Marshall2(MarshallHandle* marshallhandle){ /*do nothing */}; 32 31 void NodeOnEdgeIndices(int* pnumindices,int** pindices,int index,int finiteelement); 33 32 int NumberofNodes(int finiteelement); -
../trunk-jpl/src/c/classes/Elements/Tria.h
38 38 /*}}}*/ 39 39 /*Object virtual functions definitions:{{{ */ 40 40 Object *copy(); 41 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);42 41 void Marshall2(MarshallHandle* marshallhandle); 43 42 int ObjectEnum(); 44 43 /*}}}*/ -
../trunk-jpl/src/c/classes/Radar.h
28 28 void DeepEcho(void); 29 29 void Echo(void); 30 30 int Id(void); 31 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);32 31 void Marshall2(MarshallHandle* marshallhandle); 33 32 int ObjectEnum(void); 34 33 -
../trunk-jpl/src/c/classes/Contour.h
78 78 return id; 79 79 } 80 80 /*}}}*/ 81 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/82 _error_("not implemented yet!");83 }84 /*}}}*/85 81 void Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 86 82 _error_("not implemented yet!"); 87 83 } -
../trunk-jpl/src/c/classes/Nodalvalue.h
33 33 void DeepEcho(void); 34 34 void Echo(void); 35 35 int Id(void); 36 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);37 36 void Marshall2(MarshallHandle* marshallhandle); 38 37 int ObjectEnum(void); 39 38 -
../trunk-jpl/src/c/classes/Materials/Matestar.cpp
100 100 /*}}}*/ 101 101 int Matestar::Id(void){ return mid; }/*{{{*/ 102 102 /*}}}*/ 103 void Matestar::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/104 105 if(marshall_direction==MARSHALLING_LOAD)helement=new Hook();106 107 MARSHALLING_ENUM(MatestarEnum);108 MARSHALLING(mid);109 this->helement->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);110 this->element=(Element*)this->helement->delivers();111 112 }113 /*}}}*/114 103 void Matestar::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 115 104 116 105 if(marshallhandle->OperationNumber()==MARSHALLING_LOAD)helement=new Hook(); -
../trunk-jpl/src/c/classes/Materials/Matlitho.cpp
144 144 /*}}}*/ 145 145 int Matlitho::Id(void){ return mid; }/*{{{*/ 146 146 /*}}}*/ 147 void Matlitho::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/148 149 MARSHALLING_ENUM(MatlithoEnum);150 151 MARSHALLING(numlayers);152 if(numlayers) {153 MARSHALLING_DYNAMIC(radius,IssmDouble,numlayers+1);154 MARSHALLING_DYNAMIC(viscosity,IssmDouble,numlayers);155 MARSHALLING_DYNAMIC(lame_lambda,IssmDouble,numlayers);156 MARSHALLING_DYNAMIC(lame_mu,IssmDouble,numlayers);157 MARSHALLING_DYNAMIC(burgers_viscosity,IssmDouble,numlayers);158 MARSHALLING_DYNAMIC(burgers_mu,IssmDouble,numlayers);159 MARSHALLING_DYNAMIC(density,IssmDouble,numlayers);160 MARSHALLING_DYNAMIC(isburgers,IssmDouble,numlayers);161 MARSHALLING_DYNAMIC(issolid,IssmDouble,numlayers);162 }163 else{164 radius=NULL;165 viscosity=NULL;166 lame_lambda=NULL;167 lame_mu=NULL;168 burgers_viscosity=NULL;169 burgers_mu=NULL;170 density=NULL;171 isburgers=NULL;172 issolid=NULL;173 }174 175 }176 /*}}}*/177 147 void Matlitho::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 178 148 179 149 int object_enum = MatlithoEnum; -
../trunk-jpl/src/c/classes/Materials/Matice.cpp
158 158 /*}}}*/ 159 159 int Matice::Id(void){ return mid; }/*{{{*/ 160 160 /*}}}*/ 161 void Matice::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/162 163 if(marshall_direction==MARSHALLING_LOAD)helement=new Hook();164 165 MARSHALLING_ENUM(MaticeEnum);166 MARSHALLING(mid);167 MARSHALLING(isdamaged);168 MARSHALLING(isenhanced);169 this->helement->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);170 this->element=(Element*)this->helement->delivers();171 172 }173 /*}}}*/174 161 void Matice::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 175 162 176 163 if(marshallhandle->OperationNumber()==MARSHALLING_LOAD)helement=new Hook(); -
../trunk-jpl/src/c/classes/Materials/Matestar.h
40 40 void DeepEcho(); 41 41 void Echo(); 42 42 int Id(); 43 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);44 43 void Marshall2(MarshallHandle* marshallhandle); 45 44 int ObjectEnum(); 46 45 /*}}}*/ -
../trunk-jpl/src/c/classes/Materials/Matlitho.h
36 36 void DeepEcho(); 37 37 void Echo(); 38 38 int Id(); 39 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);40 39 void Marshall2(MarshallHandle* marshallhandle); 41 40 int ObjectEnum(); 42 41 /*}}}*/ -
../trunk-jpl/src/c/classes/Materials/Matice.h
44 44 void DeepEcho(); 45 45 void Echo(); 46 46 int Id(); 47 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);48 47 void Marshall2(MarshallHandle* marshallhandle); 49 48 int ObjectEnum(); 50 49 /*}}}*/ -
../trunk-jpl/src/c/classes/Hook.cpp
119 119 } 120 120 } 121 121 /*}}}*/ 122 void Hook::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/123 124 if(marshall_direction==MARSHALLING_LOAD) reset();125 126 MARSHALLING_ENUM(HookEnum);127 MARSHALLING(num);128 if (num<=0){129 /*Empty hook*/130 this->ids = NULL;131 this->objects = NULL;132 this->offsets = NULL;133 this->num = 0;134 }135 else{136 MARSHALLING_DYNAMIC(ids,int,num);137 MARSHALLING_DYNAMIC(offsets,int,num);138 MARSHALLING_DYNAMIC(objects,Object*,num);139 }140 141 }142 /*}}}*/143 122 void Hook::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 144 123 145 124 if(marshallhandle->OperationNumber()==MARSHALLING_LOAD) reset(); -
../trunk-jpl/src/c/classes/Misfit.h
37 37 void DeepEcho(void); 38 38 void Echo(void); 39 39 int Id(void); 40 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);41 40 void Marshall2(MarshallHandle* marshallhandle); 42 41 int ObjectEnum(void); 43 42 -
../trunk-jpl/src/c/classes/Inputs/DatasetInput.h
33 33 void DeepEcho(); 34 34 void Echo(); 35 35 int Id(); 36 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);37 36 void Marshall2(MarshallHandle* marshallhandle); 38 37 int ObjectEnum(); 39 38 void SetTriaInput(int interp_in,int numinds,int* rows,IssmDouble* values_in); -
../trunk-jpl/src/c/classes/Inputs/IntInput.cpp
53 53 /*}}}*/ 54 54 int IntInput::Id(void){ return -1; }/*{{{*/ 55 55 /*}}}*/ 56 void IntInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/57 58 MARSHALLING_ENUM(IntInputEnum);59 60 MARSHALLING(this->size);61 if(this->size > 0){62 MARSHALLING_DYNAMIC(this->values,int,this->size)63 }64 else this->values = NULL;65 66 }67 /*}}}*/68 56 void IntInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 69 57 70 58 int object_enum = IntInputEnum; -
../trunk-jpl/src/c/classes/Inputs/BoolInput.cpp
54 54 /*}}}*/ 55 55 int BoolInput::Id(void){ return -1; }/*{{{*/ 56 56 /*}}}*/ 57 void BoolInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/58 59 MARSHALLING_ENUM(BoolInputEnum);60 MARSHALLING(this->size);61 if(this->size > 0){62 MARSHALLING_DYNAMIC(this->values,bool,this->size)63 }64 else this->values = NULL;65 66 }67 /*}}}*/68 57 void BoolInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 69 58 70 59 int object_enum = BoolInputEnum; -
../trunk-jpl/src/c/classes/Inputs/ElementInput.h
28 28 virtual void DeepEcho()=0; 29 29 virtual void Echo()=0; 30 30 virtual int Id()=0; 31 virtual void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction)=0;32 31 virtual void Marshall2(MarshallHandle* marshallhandle)=0; 33 32 virtual int ObjectEnum()=0; 34 33 /*Other*/ -
../trunk-jpl/src/c/classes/Inputs/TriaInput.cpp
111 111 int TriaInput::Id(void){/*{{{*/ 112 112 return -1; 113 113 }/*}}}*/ 114 void TriaInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/115 116 MARSHALLING_ENUM(TriaInputEnum);117 MARSHALLING(this->numberofelements_local);118 MARSHALLING(this->numberofvertices_local);119 MARSHALLING(this->interpolation);120 MARSHALLING(this->M);121 MARSHALLING(this->N);122 this->isserved = false;123 this->isserved_collapsed = 0;124 if(this->M*this->N){125 MARSHALLING_DYNAMIC(this->values,IssmDouble,this->M*this->N);126 }127 else this->values = NULL;128 129 if(marshall_direction == MARSHALLING_LOAD){130 this->element_values = xNewZeroInit<IssmDouble>(TriaRef::NumberofNodes(this->interpolation));131 }132 133 }134 /*}}}*/135 114 void TriaInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 136 115 137 116 int object_enum = TriaInputEnum; -
../trunk-jpl/src/c/classes/Inputs/IntInput.h
21 21 void DeepEcho(); 22 22 void Echo(); 23 23 int Id(); 24 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);25 24 void Marshall2(MarshallHandle* marshallhandle); 26 25 int ObjectEnum(); 27 26 /*}}}*/ -
../trunk-jpl/src/c/classes/Inputs/BoolInput.h
21 21 void DeepEcho(); 22 22 void Echo(); 23 23 int Id(); 24 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);25 24 void Marshall2(MarshallHandle* marshallhandle); 26 25 int ObjectEnum(); 27 26 /*}}}*/ -
../trunk-jpl/src/c/classes/Inputs/Inputs.cpp
78 78 return; 79 79 } 80 80 /*}}}*/ 81 void Inputs::Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction){/*{{{*/82 83 int obj_enum=-1;84 int num_inputs=0;85 int index;86 87 MARSHALLING_ENUM(InputsEnum);88 89 if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){90 91 /*Marshall num_inputs first*/92 for(int i=0;i<NUMINPUTS;i++){93 if(this->inputs[i]) num_inputs++;94 }95 MARSHALLING(num_inputs);96 97 /*Marshall Parameters one by one now*/98 for(int i=0;i<NUMINPUTS;i++){99 if(this->inputs[i]){100 obj_enum = this->inputs[i]->ObjectEnum();101 MARSHALLING(i);102 MARSHALLING(obj_enum);103 this->inputs[i]->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);104 }105 }106 }107 else{108 109 /*Get number of inputs marshalled*/110 MARSHALLING(num_inputs);111 112 /*Recover input2eters one by one*/113 for(int i=0;i<num_inputs;i++){114 115 /*Recover enum of object first: */116 MARSHALLING(index);117 MARSHALLING(obj_enum);118 119 if(obj_enum==BoolInputEnum){120 BoolInput* boolinput2=new BoolInput();121 boolinput2->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);122 this->inputs[index]=boolinput2;123 }124 else if(obj_enum==IntInputEnum){125 IntInput* intinput2=new IntInput();126 intinput2->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);127 this->inputs[index]=intinput2;128 }129 else if(obj_enum==TriaInputEnum){130 TriaInput* triainput2=new TriaInput();131 triainput2->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);132 this->inputs[index]=triainput2;133 }134 else if(obj_enum==PentaInputEnum){135 PentaInput* pentainput2=new PentaInput();136 pentainput2->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);137 this->inputs[index]=pentainput2;138 }139 else{140 _error_("input "<<EnumToStringx(obj_enum)<<" not supported");141 }142 }143 }144 }145 /*}}}*/146 81 void Inputs::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 147 82 148 83 int num_inputs=0; -
../trunk-jpl/src/c/classes/Inputs/TriaInput.h
21 21 void DeepEcho(); 22 22 void Echo(); 23 23 int Id(); 24 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);25 24 void Marshall2(MarshallHandle* marshallhandle); 26 25 int ObjectEnum(); 27 26 /*}}}*/ -
../trunk-jpl/src/c/classes/Inputs/TransientInput.cpp
116 116 /*}}}*/ 117 117 int TransientInput::Id(void){ return -1; }/*{{{*/ 118 118 /*}}}*/ 119 void TransientInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/120 121 if (marshall_direction == MARSHALLING_LOAD){122 _error_("not implmented");123 //inputs = new Inputs();124 }125 126 MARSHALLING_ENUM(TransientInputEnum);127 128 MARSHALLING(enum_type);129 MARSHALLING(numtimesteps);130 MARSHALLING_DYNAMIC(this->timesteps,IssmDouble,numtimesteps);131 //inputs->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);132 _error_("not implemented");133 }134 /*}}}*/135 119 void TransientInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 136 120 137 121 if (marshallhandle->OperationNumber() == MARSHALLING_LOAD){ -
../trunk-jpl/src/c/classes/Inputs/PentaInput.cpp
125 125 int PentaInput::Id(void){/*{{{*/ 126 126 return -1; 127 127 }/*}}}*/ 128 void PentaInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/129 130 MARSHALLING_ENUM(PentaInputEnum);131 MARSHALLING(this->numberofelements_local);132 MARSHALLING(this->numberofvertices_local);133 MARSHALLING(this->interpolation);134 MARSHALLING(this->M);135 MARSHALLING(this->N);136 this->isserved = false;137 this->isserved_collapsed = 0;138 if(this->M*this->N){139 MARSHALLING_DYNAMIC(this->values,IssmDouble,this->M*this->N);140 }141 else this->values = NULL;142 143 if(marshall_direction == MARSHALLING_LOAD){144 this->element_values = xNewZeroInit<IssmDouble>(PentaRef::NumberofNodes(this->interpolation));145 }146 }147 /*}}}*/148 128 void PentaInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 149 129 150 130 int object_enum = PentaInputEnum; -
../trunk-jpl/src/c/classes/Inputs/Inputs.h
62 62 ElementInput* GetControlInputData(int enum_type,const char* data); 63 63 DatasetInput* GetDatasetInput(int enum_type); 64 64 ControlInput* GetControlInput(int enum_type); 65 void Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction);66 65 void Marshall2(MarshallHandle* marshallhandle); 67 66 int GetInputObjectEnum(int enum_type); 68 67 void GetInputValue(bool* pvalue,int enum_in,int index); -
../trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp
53 53 /*}}}*/ 54 54 int DoubleInput::Id(void){ return -1; }/*{{{*/ 55 55 /*}}}*/ 56 void DoubleInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/57 58 MARSHALLING_ENUM(DoubleInputEnum);59 60 MARSHALLING(this->size);61 if(this->size > 0){62 MARSHALLING_DYNAMIC(this->values,IssmDouble,this->size)63 }64 else this->values = NULL;65 66 }67 /*}}}*/68 56 void DoubleInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 69 57 70 58 int object_enum = DoubleInputEnum; -
../trunk-jpl/src/c/classes/Inputs/TransientInput.h
42 42 void DeepEcho(); 43 43 void Echo(); 44 44 int Id(); 45 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);46 45 void Marshall2(MarshallHandle* marshallhandle); 47 46 int ObjectEnum(); 48 47 /*}}}*/ -
../trunk-jpl/src/c/classes/Inputs/PentaInput.h
20 20 void DeepEcho(); 21 21 void Echo(); 22 22 int Id(); 23 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);24 23 void Marshall2(MarshallHandle* marshallhandle); 25 24 int ObjectEnum(); 26 25 /*}}}*/ -
../trunk-jpl/src/c/classes/Inputs/ArrayInput.cpp
75 75 int ArrayInput::Id(void){/*{{{*/ 76 76 return -1; 77 77 }/*}}}*/ 78 void ArrayInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/79 80 MARSHALLING_ENUM(ArrayInputEnum);81 MARSHALLING(this->numberofelements_local);82 if(this->numberofelements_local){83 MARSHALLING_DYNAMIC(this->N,int,this->numberofelements_local);84 for(int i=0;i<this->numberofelements_local;i++){85 if(this->values[i]){86 MARSHALLING_DYNAMIC(this->values[i],IssmDouble,this->N[i]);87 }88 }89 }90 else{91 this->N = NULL;92 this->values = NULL;93 }94 95 }96 /*}}}*/97 78 void ArrayInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 98 79 99 80 int object_enum = ArrayInputEnum; -
../trunk-jpl/src/c/classes/Inputs/SegInput.cpp
107 107 int SegInput::Id(void){/*{{{*/ 108 108 return -1; 109 109 }/*}}}*/ 110 void SegInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/111 112 MARSHALLING_ENUM(SegInputEnum);113 MARSHALLING(this->numberofelements_local);114 MARSHALLING(this->numberofvertices_local);115 MARSHALLING(this->interpolation);116 MARSHALLING(this->M);117 MARSHALLING(this->N);118 this->isserved = false;119 if(this->M*this->N){120 MARSHALLING_DYNAMIC(this->values,IssmDouble,this->M*this->N);121 }122 else this->values = NULL;123 124 if(marshall_direction == MARSHALLING_LOAD){125 this->element_values = xNewZeroInit<IssmDouble>(SegRef::NumberofNodes(this->interpolation));126 }127 128 }129 /*}}}*/130 110 void SegInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 131 111 132 112 int object_enum = SegInputEnum; -
../trunk-jpl/src/c/classes/Inputs/DoubleInput.h
21 21 void DeepEcho(); 22 22 void Echo(); 23 23 int Id(); 24 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);25 24 void Marshall2(MarshallHandle* marshallhandle); 26 25 int ObjectEnum(); 27 26 /*}}}*/ -
../trunk-jpl/src/c/classes/Inputs/ControlInput.cpp
117 117 /*}}}*/ 118 118 int ControlInput::Id(void){ return -1; }/*{{{*/ 119 119 /*}}}*/ 120 void ControlInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/121 122 MARSHALLING_ENUM(ControlInputEnum);123 _error_("Not implemented");124 }125 /*}}}*/126 120 void ControlInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 127 121 128 122 int object_enum = ControlInputEnum; -
../trunk-jpl/src/c/classes/Inputs/ArrayInput.h
22 22 void DeepEcho(); 23 23 void Echo(); 24 24 int Id(); 25 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);26 25 void Marshall2(MarshallHandle* marshallhandle); 27 26 int ObjectEnum(); 28 27 /*}}}*/ -
../trunk-jpl/src/c/classes/Inputs/SegInput.h
18 18 void DeepEcho(); 19 19 void Echo(); 20 20 int Id(); 21 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);22 21 void Marshall2(MarshallHandle* marshallhandle); 23 22 int ObjectEnum(); 24 23 /*}}}*/ -
../trunk-jpl/src/c/classes/Inputs/Input.h
2 2 * \brief abstract class for Input object 3 3 */ 4 4 5 #ifndef _INPUT 2_H_6 #define _INPUT 2_H_5 #ifndef _INPUT_H_ 6 #define _INPUT_H_ 7 7 8 8 /*Headers:*/ 9 9 #include "../../shared/shared.h" -
../trunk-jpl/src/c/classes/Inputs/DatasetInput.cpp
80 80 /*}}}*/ 81 81 int DatasetInput::Id(void){ return -1; }/*{{{*/ 82 82 /*}}}*/ 83 void DatasetInput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/84 85 MARSHALLING_ENUM(DatasetInputEnum);86 87 MARSHALLING(numids);88 MARSHALLING(this->numberofelements_local);89 MARSHALLING(this->numberofvertices_local);90 MARSHALLING_DYNAMIC(ids,int,numids);91 //if (marshall_direction == MARSHALLING_LOAD) inputs = new Inputs();92 //inputs->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);93 _error_("not implemented");94 95 }96 /*}}}*/97 83 void DatasetInput::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 98 84 99 85 int object_enum = DatasetInputEnum; -
../trunk-jpl/src/c/classes/Inputs/ControlInput.h
35 35 void DeepEcho(); 36 36 void Echo(); 37 37 int Id(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);39 38 void Marshall2(MarshallHandle* marshallhandle); 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/DependentObject.h
33 33 void Echo(); 34 34 int Id(); 35 35 int ObjectEnum(); 36 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){_error_("not implemented yet!"); };37 36 void Marshall2(MarshallHandle* marshallhandle){_error_("not implemented yet!"); }; 38 37 39 38 /*DependentObject methods: */ -
../trunk-jpl/src/c/classes/Numberedcostfunction.h
31 31 void DeepEcho(void); 32 32 void Echo(void); 33 33 int Id(void); 34 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);35 34 void Marshall2(MarshallHandle* marshallhandle); 36 35 int ObjectEnum(void); 37 36 -
../trunk-jpl/src/c/classes/Masscon.h
72 72 return -1; 73 73 } 74 74 /*}}}*/ 75 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/76 _error_("not implemented yet!");77 }78 /*}}}*/79 75 void Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 80 76 _error_("not implemented yet!"); 81 77 } -
../trunk-jpl/src/c/classes/kriging/PowerVariogram.h
25 25 void DeepEcho(){_error_("Not implemented yet");}; 26 26 void Echo(); 27 27 int Id(){_error_("Not implemented yet");}; 28 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };29 28 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!"); }; 30 29 int ObjectEnum(){_error_("Not implemented yet");}; 31 30 -
../trunk-jpl/src/c/classes/kriging/Quadtree.h
29 29 void DeepEcho() {_error_("not implemented yet"); }; 30 30 void Echo(); 31 31 int Id() {_error_("not implemented yet"); }; 32 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};33 32 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 34 33 int ObjectEnum(){_error_("not implemented yet"); }; 35 34 -
../trunk-jpl/src/c/classes/kriging/GaussianVariogram.h
26 26 void DeepEcho(){_error_("Not implemented yet");}; 27 27 void Echo(); 28 28 int Id(){_error_("Not implemented yet");}; 29 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };30 29 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!"); }; 31 30 int ObjectEnum(){_error_("Not implemented yet");}; 32 31 -
../trunk-jpl/src/c/classes/kriging/SphericalVariogram.h
25 25 void DeepEcho(){_error_("Not implemented yet");}; 26 26 void Echo(); 27 27 int Id(){_error_("Not implemented yet");}; 28 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };29 28 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!"); }; 30 29 int ObjectEnum(){_error_("Not implemented yet");}; 31 30 -
../trunk-jpl/src/c/classes/kriging/Observation.h
30 30 void Echo(); 31 31 int Id() {_error_("Not implemented yet"); }; 32 32 void print() const; 33 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};34 33 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 35 34 int ObjectEnum(){_error_("Not implemented yet"); }; 36 35 -
../trunk-jpl/src/c/classes/kriging/ExponentialVariogram.h
25 25 void DeepEcho(){_error_("Not implemented yet");}; 26 26 void Echo(); 27 27 int Id(){_error_("Not implemented yet");}; 28 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };29 28 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!"); }; 30 29 int ObjectEnum(){_error_("Not implemented yet");}; 31 30 -
../trunk-jpl/src/c/classes/Options/Option.h
24 24 virtual void DeepEcho(char *indent)=0; 25 25 virtual void Echo()= 0; 26 26 int Id(){_error_("Not implemented yet"); }; 27 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };28 27 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!"); }; 29 28 int ObjectEnum(){return OptionEnum;}; 30 29 -
../trunk-jpl/src/c/classes/Cfsurfacelogvel.cpp
73 73 return -1; 74 74 } 75 75 /*}}}*/ 76 void Cfsurfacelogvel::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/77 _error_("not implemented yet!");78 }79 /*}}}*/80 76 void Cfsurfacelogvel::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 81 77 _error_("not implemented yet!"); 82 78 } -
../trunk-jpl/src/c/classes/Massconaxpby.h
83 83 return -1; 84 84 } 85 85 /*}}}*/ 86 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/87 _error_("not implemented yet!");88 }89 /*}}}*/90 86 void Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 91 87 _error_("not implemented yet!"); 92 88 } -
../trunk-jpl/src/c/classes/Nodes.h
35 35 36 36 /*Objects virtual functions*/ 37 37 Nodes* Copy(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);39 38 void Marshall2(MarshallHandle* marshallhandle); 40 39 41 40 /*numerics*/ -
../trunk-jpl/src/c/classes/Regionaloutput.cpp
62 62 return -1; 63 63 } 64 64 /*}}}*/ 65 void Regionaloutput::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/66 _error_("not implemented yet!");67 }68 /*}}}*/69 65 void Regionaloutput::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 70 66 _error_("not implemented yet!"); 71 67 } -
../trunk-jpl/src/c/classes/Loads/Riftfront.h
59 59 void DeepEcho(); 60 60 void Echo(); 61 61 int Id(); 62 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);63 62 void Marshall2(MarshallHandle* marshallhandle); 64 63 int ObjectEnum(); 65 64 /*}}}*/ -
../trunk-jpl/src/c/classes/Loads/Numericalflux.h
43 43 void DeepEcho(); 44 44 void Echo(); 45 45 int Id(); 46 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);47 46 void Marshall2(MarshallHandle* marshallhandle); 48 47 int ObjectEnum(); 49 48 /*}}}*/ -
../trunk-jpl/src/c/classes/Loads/Pengrid.cpp
118 118 /*}}}*/ 119 119 int Pengrid::Id(void){ return id; }/*{{{*/ 120 120 /*}}}*/ 121 void Pengrid::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/122 123 _assert_(this);124 125 /*ok, marshall operations: */126 MARSHALLING_ENUM(PengridEnum);127 MARSHALLING(id);128 129 if(marshall_direction==MARSHALLING_LOAD){130 this->hnode = new Hook();131 this->helement = new Hook();132 }133 134 this->hnode->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);135 this->helement->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);136 137 /*corresponding fields*/138 node =(Node*)this->hnode->delivers();139 element=(Element*)this->helement->delivers();140 141 MARSHALLING(active);142 MARSHALLING(zigzag_counter);143 144 }145 /*}}}*/146 121 void Pengrid::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 147 122 148 123 _assert_(this); -
../trunk-jpl/src/c/classes/Loads/Pengrid.h
50 50 void DeepEcho(); 51 51 void Echo(); 52 52 int Id(); 53 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);54 53 void Marshall2(MarshallHandle* marshallhandle); 55 54 int ObjectEnum(); 56 55 /*}}}*/ -
../trunk-jpl/src/c/classes/Loads/Penpair.cpp
83 83 /*}}}*/ 84 84 int Penpair::Id(void){ return id; }/*{{{*/ 85 85 /*}}}*/ 86 void Penpair::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/87 88 _assert_(this);89 90 /*ok, marshall operations: */91 MARSHALLING_ENUM(PenpairEnum);92 MARSHALLING(id);93 94 if(marshall_direction==MARSHALLING_LOAD){95 this->hnodes = new Hook();96 }97 this->hnodes->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);98 99 /*corresponding fields*/100 nodes = (Node**)this->hnodes->deliverp();101 102 }103 /*}}}*/104 86 void Penpair::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 105 87 106 88 _assert_(this); -
../trunk-jpl/src/c/classes/Loads/Neumannflux.cpp
124 124 return id; 125 125 } 126 126 /*}}}*/ 127 void Neumannflux::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/128 129 _assert_(this);130 131 /*ok, marshall operations: */132 MARSHALLING_ENUM(NeumannfluxEnum);133 MARSHALLING(id);134 135 if(marshall_direction==MARSHALLING_LOAD){136 this->hnodes = new Hook();137 this->hvertices = new Hook();138 this->helement = new Hook();139 }140 141 this->hnodes->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);142 this->helement->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);143 this->hvertices->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);144 145 /*corresponding fields*/146 nodes =(Node**)this->hnodes->deliverp();147 vertices =(Vertex**)this->hvertices->deliverp();148 element =(Element*)this->helement->delivers();149 150 }151 /*}}}*/152 127 void Neumannflux::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 153 128 154 129 _assert_(this); -
../trunk-jpl/src/c/classes/Loads/Loads.cpp
72 72 return output; 73 73 } 74 74 /*}}}*/ 75 void Loads::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/76 77 int num_procs=IssmComm::GetSize();78 int test = num_procs;79 MARSHALLING_ENUM(LoadsEnum);80 MARSHALLING(numrifts);81 MARSHALLING(numpenalties);82 83 DataSet::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);84 }85 /*}}}*/86 75 void Loads::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 87 76 88 77 int object_enum = LoadsEnum; -
../trunk-jpl/src/c/classes/Loads/Moulin.cpp
108 108 /*}}}*/ 109 109 int Moulin::Id(void){ return id; }/*{{{*/ 110 110 /*}}}*/ 111 void Moulin::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/112 113 _assert_(this);114 115 /*ok, marshall operations: */116 MARSHALLING_ENUM(MoulinEnum);117 MARSHALLING(id);118 119 if(marshall_direction==MARSHALLING_LOAD){120 this->hnode = new Hook();121 this->hvertex = new Hook();122 this->helement = new Hook();123 }124 125 this->hnode->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);126 this->hvertex->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);127 this->helement->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);128 129 /*corresponding fields*/130 node =(Node*)this->hnode->delivers();131 vertex =(Vertex*)this->hvertex->delivers();132 element=(Element*)this->helement->delivers();133 }134 /*}}}*/135 111 void Moulin::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 136 112 137 113 _assert_(this); -
../trunk-jpl/src/c/classes/Loads/Penpair.h
33 33 void DeepEcho(); 34 34 void Echo(); 35 35 int Id(); 36 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);37 36 void Marshall2(MarshallHandle* marshallhandle); 38 37 int ObjectEnum(); 39 38 /*}}}*/ -
../trunk-jpl/src/c/classes/Loads/Neumannflux.h
41 41 void DeepEcho(); 42 42 void Echo(); 43 43 int Id(); 44 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);45 44 void Marshall2(MarshallHandle* marshallhandle); 46 45 int ObjectEnum(); 47 46 /*}}}*/ -
../trunk-jpl/src/c/classes/Loads/Loads.h
26 26 27 27 /*Objects virtual functions*/ 28 28 Loads* Copy(); 29 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);30 29 void Marshall2(MarshallHandle* marshallhandle); 31 30 32 31 /*numerics*/ -
../trunk-jpl/src/c/classes/Loads/Channel.cpp
145 145 return id; 146 146 } 147 147 /*}}}*/ 148 void Channel::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/149 150 _assert_(this);151 152 /*ok, marshall operations: */153 MARSHALLING_ENUM(ChannelEnum);154 MARSHALLING(id);155 MARSHALLING(S);156 157 if(marshall_direction==MARSHALLING_LOAD){158 this->hnodes = new Hook();159 this->hvertices = new Hook();160 this->helement = new Hook();161 }162 163 this->hnodes->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);164 this->helement->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);165 this->hvertices->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);166 167 /*corresponding fields*/168 nodes =(Node**)this->hnodes->deliverp();169 vertices =(Vertex**)this->hvertices->deliverp();170 element =(Element*)this->helement->delivers();171 172 }173 /*}}}*/174 148 void Channel::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 175 149 176 150 _assert_(this); -
../trunk-jpl/src/c/classes/Loads/Moulin.h
48 48 void DeepEcho(); 49 49 void Echo(); 50 50 int Id(); 51 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);52 51 void Marshall2(MarshallHandle* marshallhandle); 53 52 int ObjectEnum(); 54 53 /*}}}*/ -
../trunk-jpl/src/c/classes/Loads/Riftfront.cpp
186 186 /*}}}*/ 187 187 int Riftfront::Id(void){ return id; }/*{{{*/ 188 188 /*}}}*/ 189 void Riftfront::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/190 191 _assert_(this);192 193 /*ok, marshall operations: */194 MARSHALLING_ENUM(RiftfrontEnum);195 MARSHALLING(id);196 MARSHALLING(type);197 MARSHALLING(fill);198 MARSHALLING(friction);199 MARSHALLING(fractionincrement);200 MARSHALLING(shelf);201 202 if(marshall_direction==MARSHALLING_LOAD){203 this->hnodes = new Hook();204 this->hvertices = new Hook();205 this->helements = new Hook();206 }207 208 this->hnodes->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);209 this->hvertices->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);210 this->helements->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);211 212 /*corresponding fields*/213 nodes =(Node**)this->hnodes->deliverp();214 vertices =(Vertex**)this->hvertices->deliverp();215 elements =(Element**)this->helements->deliverp();216 217 MARSHALLING(penalty_lock);218 MARSHALLING(active);219 MARSHALLING(frozen);220 MARSHALLING(state);221 MARSHALLING(counter);222 MARSHALLING(prestable);223 MARSHALLING(material_converged);224 MARSHALLING(normal[0]);225 MARSHALLING(normal[1]);226 MARSHALLING(length);227 MARSHALLING(fraction);228 229 }230 /*}}}*/231 189 void Riftfront::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 232 190 233 191 _assert_(this); -
../trunk-jpl/src/c/classes/Loads/Channel.h
48 48 void DeepEcho(); 49 49 void Echo(); 50 50 int Id(); 51 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);52 51 void Marshall2(MarshallHandle* marshallhandle); 53 52 int ObjectEnum(); 54 53 /*}}}*/ -
../trunk-jpl/src/c/classes/Loads/Numericalflux.cpp
200 200 return id; 201 201 } 202 202 /*}}}*/ 203 void Numericalflux::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/204 205 _assert_(this);206 207 /*ok, marshall operations: */208 MARSHALLING_ENUM(NumericalfluxEnum);209 MARSHALLING(id);210 MARSHALLING(flux_type);211 MARSHALLING(flux_degree);212 213 if(marshall_direction==MARSHALLING_LOAD){214 this->hnodes = new Hook();215 this->hvertices = new Hook();216 this->helement = new Hook();217 }218 219 this->hnodes->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);220 this->helement->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);221 this->hvertices->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);222 223 /*corresponding fields*/224 nodes =(Node**)this->hnodes->deliverp();225 vertices =(Vertex**)this->hvertices->deliverp();226 element =(Element*)this->helement->delivers();227 228 }229 /*}}}*/230 203 void Numericalflux::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 231 204 232 205 _assert_(this); -
../trunk-jpl/src/c/classes/Cfdragcoeffabsgrad.h
33 33 void DeepEcho(void); 34 34 void Echo(void); 35 35 int Id(void); 36 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);37 36 void Marshall2(MarshallHandle* marshallhandle); 38 37 int ObjectEnum(void); 39 38 -
../trunk-jpl/src/c/classes/Vertex.h
45 45 int Id(); 46 46 int ObjectEnum(); 47 47 Object* copy(); 48 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);49 48 void Marshall2(MarshallHandle* marshallhandle); 50 49 51 50 /*}}}*/ -
../trunk-jpl/src/c/classes/Cfsurfacesquare.cpp
81 81 return -1; 82 82 } 83 83 /*}}}*/ 84 void Cfsurfacesquare::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/85 _error_("not implemented yet!");86 }87 /*}}}*/88 84 void Cfsurfacesquare::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 89 85 _error_("not implemented yet!"); 90 86 } -
../trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h
52 52 fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid); 53 53 fwrite(&step,sizeof(int),1,fid); 54 54 } /*}}}*/ 55 void GenericMarshall( char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/55 void GenericMarshall(MarshallHandle* marshallhandle){/*{{{*/ 56 56 57 MARSHALLING_ENUM(this->ObjectEnum()); 58 MARSHALLING(id); 59 MARSHALLING(step); 60 MARSHALLING(time); 57 int object_enum = this->ObjectEnum(); 58 marshallhandle->call(object_enum); 59 marshallhandle->call(this->id); 60 marshallhandle->call(this->step); 61 marshallhandle->call(this->time); 61 62 62 63 /*Marshal result name*/ 63 64 int size = 0; 64 if(marshall _direction==MARSHALLING_WRITE || marshall_direction== MARSHALLING_SIZE) size=strlen(result_name)+1;65 MARSHALLING(size);66 MARSHALLING_DYNAMIC(result_name,char,size);65 if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber() == MARSHALLING_SIZE) size=strlen(result_name)+1; 66 marshallhandle->call(size); 67 marshallhandle->call(this->result_name,size); 67 68 68 69 /*Marshall value*/ 69 70 this->value=0; 70 71 bool isnull=true; 71 if(marshall _direction==MARSHALLING_WRITE || marshall_direction== MARSHALLING_SIZE){72 if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber() == MARSHALLING_SIZE){ 72 73 if(value) isnull=false; 73 74 } 74 MARSHALLING(isnull); 75 if(!isnull){MARSHALLING(value);} 75 marshallhandle->call(isnull); 76 if(!isnull){ 77 marshallhandle->call(this->value); 78 } 76 79 } /*}}}*/ 77 80 78 81 /*GenericExternalResult constructors and destructors*/ … … 166 169 int ObjectEnum(void){ /*{{{*/ 167 170 _error_("template ObjectEnum not implemented for this ResultType\n"); 168 171 } /*}}}*/ 169 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/170 _error_("not implemented yet!");171 }172 /*}}}*/173 172 void Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 174 173 _error_("not implemented yet!"); 175 174 } … … 238 237 template <> inline int GenericExternalResult<bool>::ObjectEnum(void){ /*{{{*/ 239 238 return BoolExternalResultEnum; 240 239 } /*}}}*/ 241 template <> inline void GenericExternalResult<bool>::Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/240 template <> inline void GenericExternalResult<bool>::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 242 241 243 this->GenericMarshall( pmarshalled_data,pmarshalled_data_size,marshall_direction);242 this->GenericMarshall(marshallhandle); 244 243 245 244 } /*}}}*/ 246 245 … … 255 254 template <> inline int GenericExternalResult<int>::ObjectEnum(void){ /*{{{*/ 256 255 return IntExternalResultEnum; 257 256 } /*}}}*/ 258 template <> inline void GenericExternalResult<int>::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/ 259 260 this->GenericMarshall(pmarshalled_data,pmarshalled_data_size,marshall_direction); 261 257 template <> inline void GenericExternalResult<int>::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 258 this->GenericMarshall(marshallhandle); 262 259 } /*}}}*/ 263 260 264 261 /*Specific instantiations for double: */ … … 275 272 template <> inline double GenericExternalResult<double>::GetValue(void){ /*{{{*/ 276 273 return value; 277 274 } /*}}}*/ 278 template <> inline void GenericExternalResult<double>::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/ 279 280 this->GenericMarshall(pmarshalled_data,pmarshalled_data_size,marshall_direction); 281 275 template <> inline void GenericExternalResult<double>::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 276 this->GenericMarshall(marshallhandle); 282 277 } /*}}}*/ 283 278 284 279 /*Specific instantiations for char*: */ … … 346 341 template <> inline int GenericExternalResult<char*>::ObjectEnum(void){ /*{{{*/ 347 342 return StringExternalResultEnum; 348 343 } /*}}}*/ 349 template <> inline void GenericExternalResult<char*>::Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/344 template <> inline void GenericExternalResult<char*>::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 350 345 351 346 int size = 0; 352 347 353 if(marshall _direction==MARSHALLING_WRITE || marshall_direction== MARSHALLING_SIZE)size=strlen(value)+1;348 if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber() == MARSHALLING_SIZE)size=strlen(value)+1; 354 349 355 MARSHALLING(id);356 MARSHALLING(result_name);357 MARSHALLING(size);358 MARSHALLING_DYNAMIC(value,char,size);359 MARSHALLING(step);360 MARSHALLING(time);350 marshallhandle->call(this->id); 351 marshallhandle->call(this->result_name); 352 marshallhandle->call(size); 353 marshallhandle->call(this->value,size); 354 marshallhandle->call(this->step); 355 marshallhandle->call(this->time); 361 356 362 357 } /*}}}*/ 363 358 … … 476 471 template <> inline int GenericExternalResult<int*>::ObjectEnum(void){ /*{{{*/ 477 472 return IntMatExternalResultEnum; 478 473 } /*}}}*/ 479 template <> inline void GenericExternalResult<int*>::Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/474 template <> inline void GenericExternalResult<int*>::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 480 475 481 MARSHALLING_ENUM(this->ObjectEnum()); 476 int object_enum = this->ObjectEnum(); 477 marshallhandle->call(object_enum); 482 478 483 MARSHALLING(id);484 MARSHALLING(result_name);485 MARSHALLING(M);486 MARSHALLING(N);487 MARSHALLING_DYNAMIC(value,int,M*N);488 MARSHALLING(step);489 MARSHALLING(time);479 marshallhandle->call(this->id); 480 marshallhandle->call(this->result_name); 481 marshallhandle->call(this->M); 482 marshallhandle->call(this->N); 483 marshallhandle->call(this->value,M*N); 484 marshallhandle->call(this->step); 485 marshallhandle->call(this->time); 490 486 491 487 } /*}}}*/ 492 488 … … 608 604 template <> inline double* GenericExternalResult<IssmPDouble*>::GetValues(void){ /*{{{*/ 609 605 return value; 610 606 } /*}}}*/ 611 template <> inline void GenericExternalResult<IssmPDouble*>::Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/607 template <> inline void GenericExternalResult<IssmPDouble*>::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 612 608 613 MARSHALLING_ENUM(this->ObjectEnum()); 609 int object_enum = this->ObjectEnum(); 610 marshallhandle->call(object_enum); 614 611 615 MARSHALLING(id);616 MARSHALLING(result_name);617 MARSHALLING(M);618 MARSHALLING(N);619 MARSHALLING_DYNAMIC(value,IssmPDouble,M*N);620 MARSHALLING(step);621 MARSHALLING(time);612 marshallhandle->call(this->id); 613 marshallhandle->call(this->result_name); 614 marshallhandle->call(this->M); 615 marshallhandle->call(this->N); 616 marshallhandle->call(this->value,M*N); 617 marshallhandle->call(this->step); 618 marshallhandle->call(this->time); 622 619 623 620 } /*}}}*/ 624 621 template <> inline void GenericExternalResult<IssmPDouble*>::Transpose(void){/*{{{*/ … … 830 827 xDelete<IssmDouble>(serialvalues); 831 828 } 832 829 /*}}}*/ 833 template <> inline void GenericExternalResult<Vector<IssmDouble>*>::Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/830 template <> inline void GenericExternalResult<Vector<IssmDouble>*>::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 834 831 835 832 _error_("GenericExternalResult instantiated for type Vector<IssmDouble>* called " << result_name << " not implemented yet"); 836 833 -
../trunk-jpl/src/c/classes/Vertices.cpp
109 109 return output; 110 110 } 111 111 /*}}}*/ 112 void Vertices::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/113 114 int num_procs=IssmComm::GetSize();115 int test = num_procs;116 MARSHALLING_ENUM(VerticesEnum);117 MARSHALLING(numberofvertices);118 MARSHALLING(numberofvertices_local);119 MARSHALLING(numberofmasters_local);120 MARSHALLING(test);121 if(test!=num_procs) _error_("number of cores is not the same as before");122 MARSHALLING_DYNAMIC(this->common_recv,int,num_procs);123 MARSHALLING_DYNAMIC(this->common_send,int,num_procs);124 if(marshall_direction == MARSHALLING_LOAD){125 this->common_recv_ids = xNew<int*>(num_procs);126 this->common_send_ids = xNew<int*>(num_procs);127 }128 for(int i=0;i<num_procs;i++){129 MARSHALLING_DYNAMIC(this->common_recv_ids[i],int,this->common_recv[i]);130 MARSHALLING_DYNAMIC(this->common_send_ids[i],int,this->common_send[i]);131 }132 DataSet::Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);133 }134 /*}}}*/135 112 void Vertices::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 136 113 137 114 int object_enum = VerticesEnum; -
../trunk-jpl/src/c/classes/Node.cpp
248 248 return (Object*)output; 249 249 } 250 250 /*}}}*/ 251 void Node::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/252 253 MARSHALLING_ENUM(NodeEnum);254 MARSHALLING(id);255 MARSHALLING(sid);256 MARSHALLING(lid);257 MARSHALLING(pid);258 MARSHALLING(indexingupdate);259 MARSHALLING(analysis_enum);260 261 for(int k=0;k<3;k++) for(int l=0;l<3;l++) MARSHALLING(coord_system[k][l]);262 263 MARSHALLING(gsize);264 MARSHALLING(fsize);265 MARSHALLING(ssize);266 MARSHALLING(clone);267 MARSHALLING(active);268 MARSHALLING(freeze);269 MARSHALLING_DYNAMIC(f_set,bool,gsize);270 MARSHALLING_DYNAMIC(s_set,bool,gsize);271 MARSHALLING_DYNAMIC(svalues,IssmDouble,gsize);272 MARSHALLING_DYNAMIC(doftype,int,gsize);273 MARSHALLING_DYNAMIC(gdoflist,int,gsize);274 MARSHALLING_DYNAMIC(fdoflist,int,fsize);275 MARSHALLING_DYNAMIC(sdoflist,int,ssize);276 MARSHALLING_DYNAMIC(gdoflist_local,int,gsize);277 MARSHALLING_DYNAMIC(fdoflist_local,int,fsize);278 MARSHALLING_DYNAMIC(sdoflist_local,int,ssize);279 } /*}}}*/280 251 void Node::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 281 252 282 253 int object_enum = NodeEnum; -
../trunk-jpl/src/c/classes/Profiler.h
51 51 void DeepEcho(); 52 52 void Echo(); 53 53 int Id(); 54 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);55 54 void Marshall2(MarshallHandle* marshallhandle); 56 55 int ObjectEnum(); 57 56 -
../trunk-jpl/src/c/classes/Radar.cpp
57 57 return -1; 58 58 } 59 59 /*}}}*/ 60 void Radar::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/61 _error_("not implemented yet!");62 }63 /*}}}*/64 60 void Radar::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 65 61 _error_("not implemented yet!"); 66 62 } -
../trunk-jpl/src/c/classes/Nodalvalue.cpp
62 62 return -1; 63 63 } 64 64 /*}}}*/ 65 void Nodalvalue::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/66 _error_("not implemented yet!");67 }68 /*}}}*/69 65 void Nodalvalue::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 70 66 _error_("not implemented yet!"); 71 67 } -
../trunk-jpl/src/c/classes/Misfit.cpp
88 88 return -1; 89 89 } 90 90 /*}}}*/ 91 void Misfit::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/92 _error_("not implemented yet!");93 }94 /*}}}*/95 91 void Misfit::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 96 92 _error_("not implemented yet!"); 97 93 } -
../trunk-jpl/src/c/classes/Massfluxatgate.h
122 122 return MassfluxatgateEnum; 123 123 } 124 124 /*}}}*/ 125 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/126 _error_("not implemented yet!");127 }128 /*}}}*/129 125 void Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 130 126 131 127 int object_enum = MassfluxatgateEnum; -
../trunk-jpl/src/c/classes/FemModel.h
80 80 int GetElementsWidth(){return 3;};//just tria elements in this first version 81 81 void InitFromFiles(char* rootpath, char* inputfilename, char* outputfilename, char* petscfilename, char* lockfilename, char* restartfilename, const int solution_type,bool trace,IssmPDouble* X=NULL); 82 82 void InitFromFids(char* rootpath, FILE* IOMODEL, FILE* toolkitsoptionsfid, int in_solution_type, bool trace, IssmPDouble* X=NULL); 83 void Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction);84 83 void Marshall2(MarshallHandle* marshallhandle); 85 84 void Restart(void); 86 85 void RestartAD(int step); -
../trunk-jpl/src/c/classes/Numberedcostfunction.cpp
85 85 return -1; 86 86 } 87 87 /*}}}*/ 88 void Numberedcostfunction::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/89 _error_("not implemented yet!");90 }91 /*}}}*/92 88 void Numberedcostfunction::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 93 89 _error_("not implemented yet!"); 94 90 } -
../trunk-jpl/src/c/classes/Params/Parameters.cpp
110 110 return; 111 111 } 112 112 /*}}}*/ 113 void Parameters::Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction){/*{{{*/114 115 int obj_enum=-1;116 int num_params=0;117 118 MARSHALLING_ENUM(ParametersEnum);119 120 if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){121 122 /*Marshall num_params first*/123 for(int i=0;i<NUMPARAMS;i++){124 if(this->params[i]) num_params++;125 }126 MARSHALLING(num_params);127 128 /*Marshall Parameters one by one now*/129 for(int i=0;i<NUMPARAMS;i++){130 if(this->params[i]){131 obj_enum = this->params[i]->ObjectEnum();132 MARSHALLING(obj_enum);133 this->params[i]->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);134 }135 }136 }137 else{138 139 /*Get number of params marshalled*/140 MARSHALLING(num_params);141 142 /*Recover parameters one by one*/143 for(int i=0;i<num_params;i++){144 145 /*Recover enum of object first: */146 MARSHALLING(obj_enum);147 148 if(obj_enum==DoubleParamEnum){149 DoubleParam* doubleparam=NULL;150 doubleparam=new DoubleParam();151 doubleparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);152 this->AddObject(doubleparam);153 }154 else if(obj_enum==IntParamEnum){155 IntParam* intparam=NULL;156 intparam=new IntParam();157 intparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);158 this->AddObject(intparam);159 }160 else if(obj_enum==IntMatParamEnum){161 IntMatParam* intmparam=NULL;162 intmparam=new IntMatParam();163 intmparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);164 this->AddObject(intmparam);165 }166 else if(obj_enum==IntVecParamEnum){167 IntVecParam* intvparam=NULL;168 intvparam=new IntVecParam();169 intvparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);170 this->AddObject(intvparam);171 }172 else if(obj_enum==BoolParamEnum){173 BoolParam* boolparam=NULL;174 boolparam=new BoolParam();175 boolparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);176 this->AddObject(boolparam);177 }178 else if(obj_enum==DataSetParamEnum){179 DataSetParam* dsparam=NULL;180 dsparam=new DataSetParam();181 dsparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);182 this->AddObject(dsparam);183 }184 else if(obj_enum==DoubleMatArrayParamEnum){185 DoubleMatArrayParam* dmaparam=NULL;186 dmaparam=new DoubleMatArrayParam();187 dmaparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);188 this->AddObject(dmaparam);189 }190 else if(obj_enum==DoubleMatParamEnum){191 DoubleMatParam* dmparam=NULL;192 dmparam=new DoubleMatParam();193 dmparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);194 this->AddObject(dmparam);195 }196 else if(obj_enum==DoubleVecParamEnum){197 DoubleVecParam* dvparam=NULL;198 dvparam=new DoubleVecParam();199 dvparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);200 this->AddObject(dvparam);201 }202 else if(obj_enum==FileParamEnum){203 FileParam* fileparam=NULL;204 fileparam=new FileParam();205 fileparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);206 delete fileparam;207 /* No need to add this object, the pointer is not valid208 The FemModel should reset all FileParams in the restart function */209 }210 else if(obj_enum==StringParamEnum){211 StringParam* sparam=NULL;212 sparam=new StringParam();213 sparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);214 this->AddObject(sparam);215 }216 else if(obj_enum==StringArrayParamEnum){217 StringArrayParam* saparam=NULL;218 saparam=new StringArrayParam();219 saparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);220 this->AddObject(saparam);221 }222 else if(obj_enum==TransientParamEnum){223 TransientParam* transparam=NULL;224 transparam=new TransientParam();225 transparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);226 this->AddObject(transparam);227 }228 else if(obj_enum==TransientArrayParamEnum){229 TransientArrayParam* transarrayparam=NULL;230 transarrayparam=new TransientArrayParam();231 transarrayparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);232 this->AddObject(transarrayparam);233 }234 else if(obj_enum==GenericParamEnum){235 /*Skip for now (we don't want to Marhsall Comms)*/236 }237 }238 }239 }240 /*}}}*/241 113 void Parameters::Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 242 114 243 115 int num_params=0; -
../trunk-jpl/src/c/classes/Params/FileParam.h
34 34 void DeepEcho(); 35 35 void Echo(); 36 36 int Id(); 37 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);38 37 void Marshall2(MarshallHandle* marshallhandle); 39 38 int ObjectEnum(); 40 39 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/Param.h
44 44 virtual void GetParameterValue(FILE** pfid)=0; 45 45 virtual void GetParameterValue(DataSet** pdataset)=0; 46 46 virtual int InstanceEnum()=0; 47 virtual void Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction)=0;48 47 virtual void Marshall2(MarshallHandle* marshallhandle)=0; 49 48 virtual int ObjectEnum()=0; 50 49 -
../trunk-jpl/src/c/classes/Params/DataSetParam.cpp
51 51 /*}}}*/ 52 52 int DataSetParam::Id(void){ return -1; }/*{{{*/ 53 53 /*}}}*/ 54 void DataSetParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/55 56 if(marshall_direction==MARSHALLING_LOAD)value=new DataSet();57 58 MARSHALLING_ENUM(DataSetParamEnum);59 MARSHALLING(enum_type);60 value->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);61 62 }63 /*}}}*/64 54 void DataSetParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 65 55 66 56 if(marshallhandle->OperationNumber()==MARSHALLING_LOAD)value=new DataSet(); -
../trunk-jpl/src/c/classes/Params/IntVecParam.cpp
69 69 /*}}}*/ 70 70 int IntVecParam::Id(void){ return -1; }/*{{{*/ 71 71 /*}}}*/ 72 void IntVecParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/73 74 MARSHALLING_ENUM(IntVecParamEnum);75 76 MARSHALLING(enum_type);77 MARSHALLING(M);78 if(M) {79 MARSHALLING_DYNAMIC(values,int,M);80 }81 else values=NULL;82 83 }84 /*}}}*/85 72 void IntVecParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 86 73 87 74 int object_enum = IntVecParamEnum; -
../trunk-jpl/src/c/classes/Params/IntParam.cpp
48 48 /*}}}*/ 49 49 int IntParam::Id(void){ return -1; }/*{{{*/ 50 50 /*}}}*/ 51 void IntParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/52 53 MARSHALLING_ENUM(IntParamEnum);54 55 MARSHALLING(enum_type);56 MARSHALLING(value);57 58 }59 /*}}}*/60 51 void IntParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 61 52 62 53 int object_enum = IntParamEnum; -
../trunk-jpl/src/c/classes/Params/BoolParam.cpp
47 47 /*}}}*/ 48 48 int BoolParam::Id(void){ return -1; }/*{{{*/ 49 49 /*}}}*/ 50 void BoolParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/51 52 MARSHALLING_ENUM(BoolParamEnum);53 54 MARSHALLING(enum_type);55 MARSHALLING(value);56 57 }58 /*}}}*/59 50 void BoolParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 60 51 61 52 int object_enum = BoolParamEnum; -
../trunk-jpl/src/c/classes/Params/IntMatParam.cpp
66 66 /*}}}*/ 67 67 int IntMatParam::Id(void){ return -1; }/*{{{*/ 68 68 /*}}}*/ 69 void IntMatParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/70 71 MARSHALLING_ENUM(IntMatParamEnum);72 73 MARSHALLING(enum_type);74 MARSHALLING(M);75 MARSHALLING(N);76 MARSHALLING_DYNAMIC(value,int,M*N);77 }78 /*}}}*/79 69 void IntMatParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 80 70 81 71 int object_enum = IntMatParamEnum; -
../trunk-jpl/src/c/classes/Params/StringArrayParam.cpp
72 72 /*}}}*/ 73 73 int StringArrayParam::Id(void){ return -1; }/*{{{*/ 74 74 /*}}}*/ 75 void StringArrayParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/76 77 int* sizes=NULL;78 79 if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){80 if(numstrings)sizes=xNew<int>(numstrings);81 for(int i=0;i<numstrings;i++)sizes[i]=strlen(value[i])+1;82 }83 84 MARSHALLING_ENUM(StringArrayParamEnum);85 86 MARSHALLING(enum_type);87 MARSHALLING(numstrings);88 89 if(numstrings){90 MARSHALLING_DYNAMIC(sizes,int,numstrings);91 if(marshall_direction==MARSHALLING_LOAD) value=xNew<char*>(numstrings);92 for(int i=0;i<numstrings;i++)MARSHALLING_DYNAMIC(value[i],char,sizes[i]);93 }94 else value=NULL;95 96 //cleanup sizes array97 if(sizes) xDelete<int>(sizes);98 99 }100 /*}}}*/101 75 void StringArrayParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 102 76 103 77 int* sizes=NULL; -
../trunk-jpl/src/c/classes/Params/StringParam.cpp
49 49 /*}}}*/ 50 50 int StringParam::Id(void){ return -1; }/*{{{*/ 51 51 /*}}}*/ 52 void StringParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/53 54 int size = 0;55 56 if(marshall_direction==MARSHALLING_WRITE || marshall_direction == MARSHALLING_SIZE)size=strlen(value)+1;57 58 MARSHALLING_ENUM(StringParamEnum);59 MARSHALLING(enum_type);60 MARSHALLING(size);61 MARSHALLING_DYNAMIC(value,char,size);62 63 }64 /*}}}*/65 52 void StringParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 66 53 67 54 int size = 0; -
../trunk-jpl/src/c/classes/Params/TransientParam.cpp
67 67 /*}}}*/ 68 68 int TransientParam::Id(void){ return -1; }/*{{{*/ 69 69 /*}}}*/ 70 void TransientParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/71 72 MARSHALLING_ENUM(TransientParamEnum);73 74 MARSHALLING(enum_type);75 MARSHALLING(interpolation);76 MARSHALLING(N);77 if(marshall_direction==MARSHALLING_LOAD){78 values=xNew<IssmDouble>(N);79 timesteps=xNew<IssmDouble>(N);80 }81 MARSHALLING_DYNAMIC(values,IssmDouble,N);82 MARSHALLING_DYNAMIC(timesteps,IssmDouble,N);83 84 }85 /*}}}*/86 70 void TransientParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 87 71 88 72 int object_enum = TransientParamEnum; -
../trunk-jpl/src/c/classes/Params/VectorParam.h
35 35 void DeepEcho(); 36 36 void Echo(); 37 37 int Id(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };39 38 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!"); }; 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/MatrixParam.h
35 35 void DeepEcho(); 36 36 void Echo(); 37 37 int Id(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };39 38 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!"); }; 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/TransientArrayParam.h
38 38 void DeepEcho(); 39 39 void Echo(); 40 40 int Id(); 41 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);42 41 void Marshall2(MarshallHandle* marshallhandle); 43 42 int ObjectEnum(); 44 43 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/DoubleVecParam.h
35 35 void DeepEcho(); 36 36 void Echo(); 37 37 int Id(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);39 38 void Marshall2(MarshallHandle* marshallhandle); 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/DoubleParam.h
35 35 void DeepEcho(); 36 36 void Echo(); 37 37 int Id(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);39 38 void Marshall2(MarshallHandle* marshallhandle); 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/FileParam.cpp
48 48 /*}}}*/ 49 49 int FileParam::Id(void){ return -1; }/*{{{*/ 50 50 /*}}}*/ 51 void FileParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/52 53 MARSHALLING_ENUM(FileParamEnum);54 MARSHALLING(enum_type);55 MARSHALLING(value);56 57 if(marshall_direction==MARSHALLING_LOAD) value=NULL; //meaningless file pointer!58 59 }60 /*}}}*/61 51 void FileParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 62 52 63 53 int object_enum = FileParamEnum; -
../trunk-jpl/src/c/classes/Params/DoubleMatArrayParam.h
37 37 void DeepEcho(); 38 38 void Echo(); 39 39 int Id(); 40 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);41 40 void Marshall2(MarshallHandle* marshallhandle); 42 41 int ObjectEnum(); 43 42 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/DoubleMatParam.h
37 37 int Id(); 38 38 int ObjectEnum(); 39 39 Param* copy(); 40 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);41 40 void Marshall2(MarshallHandle* marshallhandle); 42 41 /*}}}*/ 43 42 /*Param vritual function definitions: {{{*/ -
../trunk-jpl/src/c/classes/Params/GenericParam.h
51 51 // but I would prefer to drop this not to hide a "new" in here because 52 52 // it does not clarify ownership of the newed up instance... 53 53 // use the default copy constructor instead 54 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){55 _printf_(" WARNING: parameter "<<EnumToStringx(this->myEnumVal)<<" is a GenericParam and cannot be marshalled\n");56 /*Nothing for now*/57 }58 54 void Marshall2(MarshallHandle* marshallhandle){ 59 55 _printf_(" WARNING: parameter "<<EnumToStringx(this->myEnumVal)<<" is a GenericParam and cannot be marshalled\n"); 60 56 /*Nothing for now*/ -
../trunk-jpl/src/c/classes/Params/Parameters.h
34 34 void Echo(); 35 35 void Delete(int enum_type); 36 36 bool Exist(int enum_type); 37 void Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction);38 37 void Marshall2(MarshallHandle* marshallhandle); 39 38 40 39 void FindParam(bool* pinteger,int enum_type); -
../trunk-jpl/src/c/classes/Params/DataSetParam.h
35 35 void DeepEcho(); 36 36 void Echo(); 37 37 int Id(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);39 38 void Marshall2(MarshallHandle* marshallhandle); 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/IntVecParam.h
36 36 void DeepEcho(); 37 37 void Echo(); 38 38 int Id(); 39 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);40 39 void Marshall2(MarshallHandle* marshallhandle); 41 40 int ObjectEnum(); 42 41 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/IntParam.h
35 35 void DeepEcho(); 36 36 void Echo(); 37 37 int Id(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);39 38 void Marshall2(MarshallHandle* marshallhandle); 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/BoolParam.h
34 34 void DeepEcho(); 35 35 void Echo(); 36 36 int Id(); 37 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);38 37 void Marshall2(MarshallHandle* marshallhandle); 39 38 int ObjectEnum(); 40 39 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/IntMatParam.h
36 36 void DeepEcho(); 37 37 void Echo(); 38 38 int Id(); 39 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);40 39 void Marshall2(MarshallHandle* marshallhandle); 41 40 int ObjectEnum(); 42 41 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/TransientArrayParam.cpp
72 72 /*}}}*/ 73 73 int TransientArrayParam::Id(void){ return -1; }/*{{{*/ 74 74 /*}}}*/ 75 void TransientArrayParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/76 77 MARSHALLING_ENUM(TransientArrayParamEnum);78 79 MARSHALLING(enum_type);80 MARSHALLING(interpolation);81 MARSHALLING(M);82 MARSHALLING(N);83 if(marshall_direction==MARSHALLING_LOAD){84 values = xNew<IssmDouble>(M*N);85 timesteps = xNew<IssmDouble>(N);86 }87 MARSHALLING_DYNAMIC(values,IssmDouble,M*N);88 MARSHALLING_DYNAMIC(timesteps,IssmDouble,N);89 90 }/*}}}*/91 75 void TransientArrayParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 92 76 93 77 int object_enum = TransientArrayParamEnum; -
../trunk-jpl/src/c/classes/Params/DoubleVecParam.cpp
58 58 /*}}}*/ 59 59 int DoubleVecParam::Id(void){ return -1; }/*{{{*/ 60 60 /*}}}*/ 61 void DoubleVecParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/62 63 MARSHALLING_ENUM(DoubleVecParamEnum);64 65 MARSHALLING(enum_type);66 MARSHALLING(M);67 MARSHALLING_DYNAMIC(values,IssmDouble,M);68 69 }70 /*}}}*/71 61 void DoubleVecParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 72 62 73 63 int object_enum = DoubleVecParamEnum; -
../trunk-jpl/src/c/classes/Params/DoubleParam.cpp
45 45 /*}}}*/ 46 46 int DoubleParam::Id(void){ return -1; }/*{{{*/ 47 47 /*}}}*/ 48 void DoubleParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/49 50 MARSHALLING_ENUM(DoubleParamEnum);51 52 MARSHALLING(enum_type);53 MARSHALLING(value);54 55 }56 /*}}}*/57 48 void DoubleParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 58 49 59 50 int object_enum = DoubleParamEnum; -
../trunk-jpl/src/c/classes/Params/StringArrayParam.h
35 35 void DeepEcho(); 36 36 void Echo(); 37 37 int Id(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);39 38 void Marshall2(MarshallHandle* marshallhandle); 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/DoubleMatArrayParam.cpp
115 115 /*}}}*/ 116 116 int DoubleMatArrayParam::Id(void){ return -1; }/*{{{*/ 117 117 /*}}}*/ 118 void DoubleMatArrayParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/119 120 MARSHALLING_ENUM(DoubleMatArrayParamEnum);121 122 MARSHALLING(enum_type);123 MARSHALLING(M);124 if(M){125 MARSHALLING_DYNAMIC(mdim_array,int,M);126 MARSHALLING_DYNAMIC(ndim_array,int,M);127 if(marshall_direction==MARSHALLING_LOAD && M) array=xNew<IssmDouble*>(M);128 for(int i=0;i<M;i++){129 MARSHALLING_DYNAMIC(array[i],IssmDouble,mdim_array[i]*ndim_array[i]);130 }131 }132 else{133 array=NULL;134 mdim_array=NULL;135 ndim_array=NULL;136 }137 138 }139 /*}}}*/140 118 void DoubleMatArrayParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 141 119 142 120 int object_enum = DoubleMatArrayParamEnum; -
../trunk-jpl/src/c/classes/Params/StringParam.h
35 35 void DeepEcho(); 36 36 void Echo(); 37 37 int Id(); 38 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);39 38 void Marshall2(MarshallHandle* marshallhandle); 40 39 int ObjectEnum(); 41 40 /*}}}*/ -
../trunk-jpl/src/c/classes/Params/DoubleMatParam.cpp
72 72 73 73 } 74 74 /*}}}*/ 75 void DoubleMatParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/76 77 MARSHALLING_ENUM(DoubleMatParamEnum);78 79 MARSHALLING(enum_type);80 MARSHALLING(M);81 MARSHALLING(N);82 MARSHALLING_DYNAMIC(value,IssmDouble,M*N);83 }84 /*}}}*/85 75 void DoubleMatParam::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 86 76 87 77 int object_enum = DoubleMatParamEnum; -
../trunk-jpl/src/c/classes/Params/TransientParam.h
37 37 void DeepEcho(); 38 38 void Echo(); 39 39 int Id(); 40 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);41 40 void Marshall2(MarshallHandle* marshallhandle); 42 41 int ObjectEnum(); 43 42 /*}}}*/ -
../trunk-jpl/src/c/classes/Hook.h
33 33 Object* copy(void); 34 34 void DeepEcho(void); 35 35 void Echo(void); 36 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);37 36 void Marshall2(MarshallHandle* marshallhandle); 38 37 /*}}}*/ 39 38 /*Hook management: {{{*/ -
../trunk-jpl/src/c/datastructures/DataSet.h
33 33 DataSet(); 34 34 DataSet(int enum_type); 35 35 ~DataSet(); 36 void Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction);37 36 void Marshall2(MarshallHandle* marshallhandle); 38 37 39 38 /*management*/ -
../trunk-jpl/src/c/datastructures/Object.h
20 20 virtual int Id()=0; 21 21 virtual int ObjectEnum()=0; 22 22 virtual Object* copy()=0; 23 virtual void Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction)=0;24 23 virtual void Marshall2(MarshallHandle* marshallhandle)=0; 25 24 26 25 }; -
../trunk-jpl/src/c/datastructures/DataSet.cpp
90 90 /*}}}*/ 91 91 92 92 /*Specific methods*/ 93 void DataSet::Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction){ /*{{{*/94 95 vector<Object*>::iterator obj;96 int obj_size=0;97 int obj_enum=0;98 int i;99 100 if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){101 obj_size=objects.size();102 }103 else{104 clear();105 }106 107 MARSHALLING_ENUM(DataSetEnum);108 MARSHALLING(enum_type);109 MARSHALLING(sorted);110 MARSHALLING(presorted);111 MARSHALLING(numsorted);112 113 /*Now branch according to direction of marshalling: */114 if(marshall_direction==MARSHALLING_WRITE || marshall_direction==MARSHALLING_SIZE){115 if(!(this->sorted && numsorted>0 && this->id_offsets)){116 sorted_ids=NULL;117 id_offsets=NULL;118 }119 MARSHALLING_DYNAMIC(sorted_ids,int,numsorted);120 MARSHALLING_DYNAMIC(id_offsets,int,numsorted);121 MARSHALLING(obj_size);122 123 /*Go through our objects, and marshall them into the buffer: */124 for( obj=this->objects.begin() ; obj < this->objects.end(); obj++ ){125 obj_enum=(*obj)->ObjectEnum();126 MARSHALLING(obj_enum);127 (*obj)->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);128 }129 }130 else{131 132 MARSHALLING_DYNAMIC(sorted_ids,int,numsorted);133 MARSHALLING_DYNAMIC(id_offsets,int,numsorted);134 if (!(this->sorted && numsorted>0)){135 sorted_ids=NULL;136 id_offsets=NULL;137 }138 MARSHALLING(obj_size);139 140 /*This is the heart of the demashalling method. We have a buffer coming141 in, and we are supposed to create a dataset out of it. No such thing142 as class orientation for buffers, we need to key off the enum of each143 object stored in the buffer. */144 for(i=0;i<obj_size;i++){145 146 /*Recover enum of object first: */147 MARSHALLING(obj_enum);148 149 /*Giant case statement to spin-up the right object, and demarshall into it the information150 *stored in the buffer: */151 if(obj_enum==NodeEnum){152 Node* node=NULL;153 node=new Node();154 node->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);155 this->AddObject(node);156 }157 else if(obj_enum==VertexEnum){158 Vertex* vertex=NULL;159 vertex=new Vertex();160 vertex->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);161 this->AddObject(vertex);162 }163 else if(obj_enum==MaticeEnum){164 Matice* matice=NULL;165 matice=new Matice();166 matice->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);167 this->AddObject(matice);168 }169 else if(obj_enum==MatestarEnum){170 Matestar* matestar=NULL;171 matestar=new Matestar();172 matestar->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);173 this->AddObject(matestar);174 }175 else if(obj_enum==SpcStaticEnum){176 SpcStatic* spcstatic=NULL;177 spcstatic=new SpcStatic();178 spcstatic->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);179 this->AddObject(spcstatic);180 }181 else if(obj_enum==SpcDynamicEnum){182 SpcDynamic* spcdynamic=NULL;183 spcdynamic=new SpcDynamic();184 spcdynamic->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);185 this->AddObject(spcdynamic);186 }187 else if(obj_enum==SpcTransientEnum){188 SpcTransient* spctransient=NULL;189 spctransient=new SpcTransient();190 spctransient->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);191 this->AddObject(spctransient);192 }193 else if(obj_enum==TriaEnum){194 Tria* tria=NULL;195 tria=new Tria();196 tria->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);197 this->AddObject(tria);198 }199 else if(obj_enum==PentaEnum){200 Penta* penta=NULL;201 penta=new Penta();202 penta->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);203 this->AddObject(penta);204 }205 else if(obj_enum==TetraEnum){206 Tetra* tetra=NULL;207 tetra=new Tetra();208 tetra->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);209 this->AddObject(tetra);210 }211 else if(obj_enum==SegEnum){212 Seg* seg=NULL;213 seg=new Seg();214 seg->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);215 this->AddObject(seg);216 }217 else if(obj_enum==RiftfrontEnum){218 Riftfront* rift=NULL;219 rift=new Riftfront();220 rift->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);221 this->AddObject(rift);222 }223 else if(obj_enum==NumericalfluxEnum){224 Numericalflux* numflux=NULL;225 numflux=new Numericalflux();226 numflux->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);227 this->AddObject(numflux);228 }229 else if(obj_enum==PengridEnum){230 Pengrid* pengrid=NULL;231 pengrid=new Pengrid();232 pengrid->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);233 this->AddObject(pengrid);234 }235 else if(obj_enum==PenpairEnum){236 Penpair* penpair=NULL;237 penpair=new Penpair();238 penpair->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);239 this->AddObject(penpair);240 }241 else if(obj_enum==DoubleExternalResultEnum){242 GenericExternalResult<double>* result=new GenericExternalResult<double>();243 result->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);244 this->AddObject(result);245 }246 else _error_("could not recognize enum type: " << obj_enum << ": " << EnumToStringx(obj_enum) );247 }248 }249 }250 /*}}}*/251 93 void DataSet::Marshall2(MarshallHandle* marshallhandle){ /*{{{*/ 252 94 253 95 vector<Object*>::iterator obj; -
../trunk-jpl/src/c/kml/KML_Object.h
29 29 int Id(){_error_("Not implemented yet.");}; 30 30 int ObjectEnum(){_error_("Not implemented yet.");}; 31 31 Object* copy(){_error_("Not implemented yet.");}; 32 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};32 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 33 33 /*}}}*/ 34 34 35 35 /*virtual functions: */ -
../trunk-jpl/src/c/kml/KML_SubStyle.h
28 28 int Id(){_error_("Not implemented yet.");}; 29 29 int ObjectEnum(){_error_("Not implemented yet.");}; 30 30 Object* copy(){_error_("Not implemented yet.");}; 31 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};31 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 32 32 /*}}}*/ 33 33 34 34 }; -
../trunk-jpl/src/c/kml/KML_LineString.h
37 37 int Id(){_error_("Not implemented yet.");}; 38 38 int ObjectEnum(){_error_("Not implemented yet.");}; 39 39 Object* copy(){_error_("Not implemented yet.");}; 40 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};40 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 41 41 /*}}}*/ 42 42 43 43 }; -
../trunk-jpl/src/c/kml/KML_Overlay.h
35 35 int Id(){_error_("Not implemented yet.");}; 36 36 int ObjectEnum(){_error_("Not implemented yet.");}; 37 37 Object* copy(){_error_("Not implemented yet.");}; 38 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};38 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 39 39 /*}}}*/ 40 40 41 41 }; -
../trunk-jpl/src/c/kml/KML_Container.h
32 32 int Id(){_error_("Not implemented yet.");}; 33 33 int ObjectEnum(){_error_("Not implemented yet.");}; 34 34 Object* copy(){_error_("Not implemented yet.");}; 35 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};35 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 36 36 /*}}}*/ 37 37 38 38 }; -
../trunk-jpl/src/c/kml/KML_Polygon.h
39 39 int Id(){_error_("Not implemented yet.");}; 40 40 int ObjectEnum(){_error_("Not implemented yet.");}; 41 41 Object* copy(){_error_("Not implemented yet.");}; 42 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};42 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 43 43 /*}}}*/ 44 44 45 45 }; -
../trunk-jpl/src/c/kml/KML_Geometry.h
28 28 int Id(){_error_("Not implemented yet.");}; 29 29 int ObjectEnum(){_error_("Not implemented yet.");}; 30 30 Object* copy(){_error_("Not implemented yet.");}; 31 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};31 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 32 32 /*}}}*/ 33 33 34 34 }; -
../trunk-jpl/src/c/kml/KML_ColorStyle.h
35 35 void Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");}; 36 36 int ObjectEnum(){_error_("Not implemented yet.");}; 37 37 Object* copy(){_error_("Not implemented yet.");}; 38 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};38 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 39 39 /*}}}*/ 40 40 41 41 }; -
../trunk-jpl/src/c/kml/KML_Placemark.h
33 33 int Id(){_error_("Not implemented yet.");}; 34 34 int ObjectEnum(){_error_("Not implemented yet.");}; 35 35 Object* copy(){_error_("Not implemented yet.");}; 36 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};36 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 37 37 /*}}}*/ 38 38 39 39 }; -
../trunk-jpl/src/c/kml/KML_Unknown.h
31 31 int Id(){_error_("Not implemented yet.");}; 32 32 int ObjectEnum(){_error_("Not implemented yet.");}; 33 33 Object* copy(){_error_("Not implemented yet.");}; 34 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};34 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 35 35 /*}}}*/ 36 36 37 37 }; -
../trunk-jpl/src/c/kml/KML_GroundOverlay.h
35 35 int Id(){_error_("Not implemented yet.");}; 36 36 int ObjectEnum(){_error_("Not implemented yet.");}; 37 37 Object* copy(){_error_("Not implemented yet.");}; 38 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};38 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 39 39 /*}}}*/ 40 40 41 41 }; -
../trunk-jpl/src/c/kml/KML_Style.h
37 37 int Id(){_error_("Not implemented yet.");}; 38 38 int ObjectEnum(){_error_("Not implemented yet.");}; 39 39 Object* copy(){_error_("Not implemented yet.");}; 40 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};40 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 41 41 /*}}}*/ 42 42 43 43 }; -
../trunk-jpl/src/c/kml/KML_Comment.h
29 29 int Id(){_error_("Not implemented yet.");}; 30 30 int ObjectEnum(){_error_("Not implemented yet.");}; 31 31 Object* copy(){_error_("Not implemented yet.");}; 32 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};32 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 33 33 /*}}}*/ 34 34 35 35 /*virtual functions: */ -
../trunk-jpl/src/c/kml/KML_MultiGeometry.h
33 33 int Id(){_error_("Not implemented yet.");}; 34 34 int ObjectEnum(){_error_("Not implemented yet.");}; 35 35 Object* copy(){_error_("Not implemented yet.");}; 36 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};36 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 37 37 /*}}}*/ 38 38 39 39 }; -
../trunk-jpl/src/c/kml/KML_LineStyle.h
30 30 int Id(){_error_("Not implemented yet.");}; 31 31 int ObjectEnum(){_error_("Not implemented yet.");}; 32 32 Object* copy(){_error_("Not implemented yet.");}; 33 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};33 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 34 34 /*}}}*/ 35 35 36 36 }; -
../trunk-jpl/src/c/kml/KML_Folder.h
29 29 int Id(){_error_("Not implemented yet.");}; 30 30 int ObjectEnum(){_error_("Not implemented yet.");}; 31 31 Object* copy(){_error_("Not implemented yet.");}; 32 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};32 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 33 33 /*}}}*/ 34 34 35 35 }; -
../trunk-jpl/src/c/kml/KML_Document.h
29 29 int Id(){_error_("Not implemented yet.");}; 30 30 int ObjectEnum(){_error_("Not implemented yet.");}; 31 31 Object* copy(){_error_("Not implemented yet.");}; 32 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};32 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 33 33 /*}}}*/ 34 34 35 35 }; -
../trunk-jpl/src/c/kml/KML_File.h
31 31 int Id(){_error_("Not implemented yet.");}; 32 32 int ObjectEnum(){_error_("Not implemented yet.");}; 33 33 Object* copy(){_error_("Not implemented yet.");}; 34 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};34 void Marshall2(MarshallHandle* marshallhandle); 35 35 /*}}}*/ 36 36 37 37 }; -
../trunk-jpl/src/c/kml/KML_Icon.h
43 43 int Id(){_error_("Not implemented yet.");}; 44 44 int ObjectEnum(){_error_("Not implemented yet.");}; 45 45 Object* copy(){_error_("Not implemented yet.");}; 46 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};46 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 47 47 /*}}}*/ 48 48 49 49 }; -
../trunk-jpl/src/c/kml/KML_Point.h
35 35 int Id(){_error_("Not implemented yet.");}; 36 36 int ObjectEnum(){_error_("Not implemented yet.");}; 37 37 Object* copy(){_error_("Not implemented yet.");}; 38 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};38 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 39 39 /*}}}*/ 40 40 41 41 }; -
../trunk-jpl/src/c/kml/KML_LinearRing.h
37 37 int Id(){_error_("Not implemented yet.");}; 38 38 int ObjectEnum(){_error_("Not implemented yet.");}; 39 39 Object* copy(){_error_("Not implemented yet.");}; 40 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};40 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 41 41 /*}}}*/ 42 42 43 43 }; -
../trunk-jpl/src/c/kml/KML_Feature.h
43 43 int Id(){_error_("Not implemented yet.");}; 44 44 int ObjectEnum(){_error_("Not implemented yet.");}; 45 45 Object* copy(){_error_("Not implemented yet.");}; 46 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};46 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 47 47 /*}}}*/ 48 48 49 49 }; -
../trunk-jpl/src/c/kml/KML_StyleSelector.h
28 28 int Id(){_error_("Not implemented yet.");}; 29 29 int ObjectEnum(){_error_("Not implemented yet.");}; 30 30 Object* copy(){_error_("Not implemented yet.");}; 31 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};31 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 32 32 /*}}}*/ 33 33 34 34 }; -
../trunk-jpl/src/c/kml/KML_LatLonBox.h
34 34 int Id(){_error_("Not implemented yet.");}; 35 35 int ObjectEnum(){_error_("Not implemented yet.");}; 36 36 Object* copy(){_error_("Not implemented yet.");}; 37 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};37 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 38 38 /*}}}*/ 39 39 40 40 }; -
../trunk-jpl/src/c/kml/KML_Attribute.h
28 28 int Id(){_error_("Not implemented yet.");}; 29 29 int ObjectEnum(){_error_("Not implemented yet.");}; 30 30 Object* copy(){_error_("Not implemented yet.");}; 31 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};31 void Marshall2(MarshallHandle* marshallhandle); 32 32 /*}}}*/ 33 33 34 34 /*virtual functions: */ -
../trunk-jpl/src/c/kml/KML_PolyStyle.h
31 31 int Id(){_error_("Not implemented yet.");}; 32 32 int ObjectEnum(){_error_("Not implemented yet.");}; 33 33 Object* copy(){_error_("Not implemented yet.");}; 34 void Marshall (char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!");};34 void Marshall2(MarshallHandle* marshallhandle){ _error_("not implemented yet!");}; 35 35 /*}}}*/ 36 36 37 37 }; -
../trunk-jpl/src/c/shared/io/Marshalling/Marshalling.h
118 118 } 119 119 } 120 120 121 #define MARSHALLING_ENUM(EN)\122 int type_enum=EN;\123 if(marshall_direction==MARSHALLING_WRITE){\124 memcpy(*pmarshalled_data,&type_enum,sizeof(int));\125 *pmarshalled_data+=sizeof(int);\126 }\127 else if(marshall_direction==MARSHALLING_SIZE){\128 *pmarshalled_data_size+=sizeof(int);\129 }\130 else if(marshall_direction==MARSHALLING_LOAD){\131 *pmarshalled_data+=sizeof(int);\132 }\133 else _error_("Wrong direction during the Marshall process");\134 135 136 #define MARSHALLING(FIELD)\137 \138 if(marshall_direction==MARSHALLING_WRITE){\139 memcpy(*pmarshalled_data,&FIELD,sizeof(FIELD));\140 *pmarshalled_data+=sizeof(FIELD);\141 }\142 else if(marshall_direction==MARSHALLING_SIZE){\143 *pmarshalled_data_size+=sizeof(FIELD);\144 }\145 else if(marshall_direction==MARSHALLING_LOAD){\146 memcpy(&FIELD,*pmarshalled_data,sizeof(FIELD));\147 *pmarshalled_data+=sizeof(FIELD);\148 }\149 else _error_("Wrong direction during the Marshall process");150 151 152 #define MARSHALLING_DYNAMIC(FIELD,TYPE,SIZE) \153 \154 {\155 bool field_null=true;\156 if (FIELD)field_null=false;\157 MARSHALLING(field_null);\158 \159 if(!field_null){\160 if(marshall_direction==MARSHALLING_WRITE){\161 memcpy(*pmarshalled_data,FIELD,SIZE*sizeof(TYPE));\162 *pmarshalled_data+=SIZE*sizeof(TYPE);\163 }\164 else if(marshall_direction==MARSHALLING_SIZE){\165 *pmarshalled_data_size+=SIZE*sizeof(TYPE);\166 }\167 else if(marshall_direction==MARSHALLING_LOAD){\168 FIELD=xNew<TYPE>(SIZE);\169 memcpy(FIELD,*pmarshalled_data,SIZE*sizeof(TYPE));\170 *pmarshalled_data+=SIZE*sizeof(TYPE);\171 }\172 else _error_("Wrong direction during the Marshall process");\173 }\174 }175 176 121 #endif -
../trunk-jpl/src/c/toolkits/issm/Bucket.h
128 128 else if (this->type==VECTOR_BUCKET) return new Bucket(this->m,this->idxm,this->values,this->mode); 129 129 else _error_("No Copy of Bucket because its type is invalid."); }; 130 130 /*}}}*/ 131 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/132 _error_("not implemented yet!");133 }134 /*}}}*/135 131 void Marshall2(MarshallHandle* marshallhandle){/*{{{*/ 136 132 _error_("not implemented yet!"); 137 133 }
Note:
See TracBrowser
for help on using the repository browser.