- 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/Constraints/SpcTransient.cpp
r9883 r12168 87 87 } 88 88 /*}}}1*/ 89 #ifdef _SERIAL_90 /*FUNCTION SpcTransient::Marshall {{{1*/91 void SpcTransient::Marshall(char** pmarshalled_dataset){92 93 char* marshalled_dataset=NULL;94 int enum_type=0;95 96 /*recover marshalled_dataset: */97 marshalled_dataset=*pmarshalled_dataset;98 99 /*get enum type of SpcTransient: */100 enum_type=SpcTransientEnum;101 102 /*marshall enum: */103 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);104 105 /*marshall SpcTransient data: */106 memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);107 memcpy(marshalled_dataset,&nodeid,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);108 memcpy(marshalled_dataset,&dof,sizeof(dof));marshalled_dataset+=sizeof(dof);109 memcpy(marshalled_dataset,&nsteps,sizeof(nsteps));marshalled_dataset+=sizeof(nsteps);110 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);111 if(nsteps){112 memcpy(marshalled_dataset,values,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);113 memcpy(marshalled_dataset,times,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);114 }115 116 *pmarshalled_dataset=marshalled_dataset;117 return;118 }119 /*}}}1*/120 /*FUNCTION SpcTransient::MarshallSize {{{1*/121 int SpcTransient::MarshallSize(){122 123 return sizeof(sid)124 +sizeof(nodeid)125 +sizeof(dof)126 +sizeof(nsteps)127 +nsteps*2*sizeof(double)128 +sizeof(analysis_type)129 +sizeof(int); //sizeof(int) for enum type130 }131 /*}}}1*/132 /*FUNCTION SpcTransient::Demarshall {{{1*/133 void SpcTransient::Demarshall(char** pmarshalled_dataset){134 135 char* marshalled_dataset=NULL;136 137 /*recover marshalled_dataset: */138 marshalled_dataset=*pmarshalled_dataset;139 140 /*this time, no need to get enum type, the pointer directly points to the beginning of the141 *object data (thanks to DataSet::Demarshall):*/142 143 memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);144 memcpy(&nodeid,marshalled_dataset,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);145 memcpy(&dof,marshalled_dataset,sizeof(dof));marshalled_dataset+=sizeof(dof);146 memcpy(&nsteps,marshalled_dataset,sizeof(nsteps));marshalled_dataset+=sizeof(nsteps);147 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);148 if(nsteps){149 values=(double*)xmalloc(nsteps*sizeof(double));150 times=(double*)xmalloc(nsteps*sizeof(double));151 memcpy(values,marshalled_dataset,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);152 memcpy(times,marshalled_dataset,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);153 }154 155 /*return: */156 *pmarshalled_dataset=marshalled_dataset;157 return;158 }159 /*}}}1*/160 #endif161 89 /*FUNCTION SpcTransient::ObjectEnum{{{1*/ 162 90 int SpcTransient::ObjectEnum(void){
Note:
See TracChangeset
for help on using the changeset viewer.