Changeset 4316
- Timestamp:
- 06/29/10 13:50:59 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/EnumAsString.cpp
r4297 r4316 237 237 case JEnum : return "J"; 238 238 case PatchEnum : return "Patch"; 239 case PatchVerticesEnum : return "PatchVertices"; 240 case PatchNodesEnum : return "PatchNodes"; 239 241 case TimeEnum : return "Time"; 240 242 case RelativeEnum : return "Relative"; -
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r4297 r4316 269 269 JEnum, 270 270 PatchEnum, 271 PatchVerticesEnum, 272 PatchNodesEnum, 271 273 TimeEnum, 272 274 /*}}}*/ -
issm/trunk/src/c/EnumDefinitions/StringAsEnum.cpp
r4297 r4316 235 235 else if (strcmp(name,"J")==0) return JEnum; 236 236 else if (strcmp(name,"Patch")==0) return PatchEnum; 237 else if (strcmp(name,"PatchVertices")==0) return PatchVerticesEnum; 238 else if (strcmp(name,"PatchNodes")==0) return PatchNodesEnum; 237 239 else if (strcmp(name,"Time")==0) return TimeEnum; 238 240 else if (strcmp(name,"Relative")==0) return RelativeEnum; -
issm/trunk/src/c/modules/OutputResultsx/ElementResultsToPatch.cpp
r4236 r4316 45 45 * For example, we could build the following patch table, for velocities: 46 46 * 47 * VxEnum 1 .5 1 P0 1 2 4.5 NaN NaN //on a Beam element, Vx, at step 1, time .5, element id 1, interpolation type P0 (constant value on a beam element), vertices ids 1 and 2, one constant value 4.5 48 * VzEnum 2 .8 2 P1 1 3 4 4.5 3.2 2.5 //on a Tria element, Vz, at step 2, time .8, element id 2, interpolation type P1 (linear values on a tria element), vertices ids 1 3 and 4, with values at 3 nodes 4.5, 3.2, 2.5 47 1. on a Beam element, Vx, at step 1, time .5, element id 1, interpolation type P0 (constant), vertices ids 1 and 2, one constant value 4.5 48 VxEnum 1 .5 1 P0 1 2 4.5 NaN NaN 49 2. on a Tria element, Vz, at step 2, time .8, element id 2, interpolation type P1 (linear), vertices ids 1 3 and 4, with values at 3 nodes 4.5, 3.2, 2.5 50 VzEnum 2 .8 2 P1 1 3 4 4.5 3.2 2.5 49 51 * ... etc ... 50 52 * … … 95 97 96 98 /*create result object and add to results dataset: */ 99 results->AddObject(new IntExternalResult(results->Size()+1,PatchVerticesEnum,patch->maxvertices,1,0)); 100 results->AddObject(new IntExternalResult(results->Size()+1,PatchNodesEnum, patch->maxnodes,1,0)); 97 101 results->AddObject(new DoubleMatExternalResult(results->Size()+1,PatchEnum,patch->values,patch->numrows,patch->numcols,1,0)); 98 102 -
issm/trunk/src/c/modules/OutputResultsx/FileWriteResults.cpp
r4167 r4316 13 13 #include "../../shared/shared.h" 14 14 #include "../../include/include.h" 15 16 15 17 16 void FileWriteResults(Parameters* parameters, DataSet* results){ … … 36 35 37 36 /*Close file: */ 38 if(my_rank==0) pfclose(fid,filename);37 if(my_rank==0) pfclose(fid,filename); 39 38 40 39 /*Free ressources:*/ -
issm/trunk/src/c/objects/Patch.cpp
r4312 r4316 164 164 } 165 165 /*}}}*/ 166 /*FUNCTION Patch::WriteToDisk(int solutiontype,char* filename);{{{1*/167 void Patch::WriteToDisk(int solutiontype,char* filename){168 169 extern int my_rank;170 FILE* fid=NULL;171 172 173 if(my_rank!=0)return; //do not output on other nodes!174 175 /* Open output file to write raw binary data: */176 fid=pfopen(filename,"wb");177 178 /*Now, write solutiontype: */179 fwrite(&solutiontype,sizeof(int),1,fid);180 181 /*Write dimensions of patch: */182 fwrite(&this->numrows,sizeof(int),1,fid);183 fwrite(&this->numcols,sizeof(int),1,fid);184 185 /*Write patch: */186 fwrite(this->values,this->numrows*this->numcols*sizeof(double),1,fid);187 188 /*Close file: */189 pfclose(fid,filename);190 191 }192 /*}}}*/ -
issm/trunk/src/c/objects/Patch.h
r4312 r4316 45 45 void fillresultinfo(int row,int enum_type,int step, double time, int interpolation, double* nodal_values, int num_nodes); 46 46 void MPI_Gather(void); 47 void WriteToDisk(int solutiontype,char* filename);48 47 49 48 };
Note:
See TracChangeset
for help on using the changeset viewer.