- Timestamp:
- 05/01/12 17:28:47 (13 years ago)
- Location:
- issm/branches/trunk-jpl-damage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-jpl-damage
- Property svn:ignore
-
old new 7 7 config.status 8 8 configure 9 doxygen10 9 ISSM.paf 11 10 ISSM.ppf 12 11 ISSM.ppf_cache 13 12 libtool 14 list15 13 Makefile 16 14 Makefile.in 17 15 stamp-h1 18 16 svn-commit* 19 nightlylog
-
- Property svn:mergeinfo changed
/issm/trunk merged: 11526,11533,11681-11682,11710,11778-11779,11995 /issm/trunk-jpl merged: 11992-11994,11996-12003,12005-12113,12115-12161,12163-12166
- Property svn:ignore
-
issm/branches/trunk-jpl-damage/src/c/objects/Loads/Pengrid.cpp
r11684 r12168 132 132 } 133 133 /*}}}1*/ 134 #ifdef _SERIAL_135 /*FUNCTION Pengrid::Marshall {{{1*/136 void Pengrid::Marshall(char** pmarshalled_dataset){137 138 char* marshalled_dataset=NULL;139 int enum_type=0;140 char* marshalled_inputs=NULL;141 int marshalled_inputs_size;142 143 /*recover marshalled_dataset: */144 marshalled_dataset=*pmarshalled_dataset;145 146 /*get enum type of Tria: */147 enum_type=PengridEnum;148 149 /*marshall enum: */150 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);151 152 /*marshall Tria data: */153 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);154 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);155 memcpy(marshalled_dataset,&active,sizeof(active));marshalled_dataset+=sizeof(active);156 memcpy(marshalled_dataset,&zigzag_counter,sizeof(zigzag_counter));marshalled_dataset+=sizeof(zigzag_counter);157 158 /*Marshall hooks: */159 hnode->Marshall(&marshalled_dataset);160 helement->Marshall(&marshalled_dataset);161 hmatpar->Marshall(&marshalled_dataset);162 163 /*Marshall inputs: */164 marshalled_inputs_size=inputs->MarshallSize();165 marshalled_inputs=inputs->Marshall();166 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));167 marshalled_dataset+=marshalled_inputs_size;168 169 /*parameters: don't do anything about it. parameters are marshalled somewhere else!*/170 171 xfree((void**)&marshalled_inputs);172 173 *pmarshalled_dataset=marshalled_dataset;174 return;175 }176 /*}}}*/177 /*FUNCTION Pengrid::MarshallSize {{{1*/178 int Pengrid::MarshallSize(){179 180 return sizeof(id)181 +sizeof(analysis_type)182 +sizeof(active)183 +sizeof(zigzag_counter)184 +hnode->MarshallSize()185 +helement->MarshallSize()186 +hmatpar->MarshallSize()187 +inputs->MarshallSize()188 +sizeof(int); //sizeof(int) for enum type189 }190 /*}}}*/191 /*FUNCTION Pengrid::Demarshall {{{1*/192 void Pengrid::Demarshall(char** pmarshalled_dataset){193 194 char* marshalled_dataset=NULL;195 int i;196 197 /*recover marshalled_dataset: */198 marshalled_dataset=*pmarshalled_dataset;199 200 /*this time, no need to get enum type, the pointer directly points to the beginning of the201 *object data (thanks to DataSet::Demarshall):*/202 203 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);204 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);205 memcpy(&active,marshalled_dataset,sizeof(active));marshalled_dataset+=sizeof(active);206 memcpy(&zigzag_counter,marshalled_dataset,sizeof(zigzag_counter));marshalled_dataset+=sizeof(zigzag_counter);207 208 /*demarshall hooks: */209 hnode=new Hook(); hnode->Demarshall(&marshalled_dataset);210 helement=new Hook(); helement->Demarshall(&marshalled_dataset);211 hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);212 213 /*demarshall inputs: */214 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);215 216 /*parameters: may not exist even yet, so let Configure handle it: */217 this->parameters=NULL;218 this->node=NULL;219 this->element=NULL;220 this->matpar=NULL;221 222 /*return: */223 *pmarshalled_dataset=marshalled_dataset;224 return;225 }226 /*}}}*/227 #endif228 134 /*FUNCTION Pengrid::ObjectEnum{{{1*/ 229 135 int Pengrid::ObjectEnum(void){
Note:
See TracChangeset
for help on using the changeset viewer.