Changeset 3443
- Timestamp:
- 04/07/10 17:05:10 (15 years ago)
- Location:
- issm/trunk/src/c/ModelProcessorx/DiagnosticVert
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp
r3439 r3443 2 2 * CreateConstraintsDiagnosticHoriz.c: 3 3 */ 4 5 4 6 5 #include "../../DataSet/DataSet.h" … … 11 10 #include "../IoModel.h" 12 11 13 14 12 void CreateConstraintsDiagnosticVert(DataSet** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){ 15 13 16 14 int i; 17 int count;18 19 15 DataSet* constraints = NULL; 20 Spc* spc = NULL;21 22 /*spc intermediary data: */23 int spc_sid;24 int spc_node;25 int spc_dof;26 double spc_value;27 28 double* spcvelocity=NULL;29 16 30 17 /*Create constraints: */ … … 35 22 36 23 /*Fetch data: */ 37 IoModelFetchData(&spcvelocity,NULL,NULL,iomodel_handle,"spcvelocity"); 38 39 count=0; 24 IoModelFetchData(&iomodel->spcvelocity,NULL,NULL,iomodel_handle,"spcvelocity"); 40 25 41 26 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 42 27 for (i=0;i<iomodel->numberofvertices;i++){ 43 #ifdef _PARALLEL_ 28 44 29 /*keep only this partition's nodes:*/ 45 if((iomodel->my_grids[i]==1)){ 46 #endif 30 if(iomodel->my_vertices[i]){ 47 31 48 32 if ((int)spcvelocity[6*i+2]){ 49 50 /*This grid needs to be spc'd to vx_obs and vy_obs:*/ 51 52 spc_sid=count; 53 spc_node=i+1; 54 spc_dof=1; //we enforce first translation degree of freedom, for velocity 55 spc_value=spcvelocity[6*i+5]; 56 57 spc = new Spc(spc_sid,spc_node,spc_dof,spc_value); 58 constraints->AddObject(spc); 59 count++; 33 constraints->AddObject(new Spc(count,i+1,1,*(iomodel->spcvelocity+6*i+5)/iomodel->yts)); //add count'th spc, on node i+1, setting dof 1 to vx. 60 34 61 35 } 62 63 #ifdef _PARALLEL_64 36 } //if((my_grids[i]==1)) 65 #endif66 37 } 67 38 … … 70 41 constraints->Presort(); 71 42 72 cleanup_and_return:73 74 43 /*Free data: */ 75 xfree((void**)& spcvelocity);44 xfree((void**)&iomodel->spcvelocity); 76 45 77 46 /*Assign output pointer: */ -
issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp
r3332 r3443 1 1 /*! \file CreateLoadsDiagnosticVert.c: 2 2 */ 3 4 3 5 4 #include "../../DataSet/DataSet.h" … … 11 10 #include "../IoModel.h" 12 11 13 14 12 void CreateLoadsDiagnosticVert(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ 15 13 … … 19 17 loads = new DataSet(LoadsEnum()); 20 18 21 /*Now, is the iomodel running in 3d? : */22 if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;23 24 cleanup_and_return:25 26 19 /*Assign output pointer: */ 27 20 *ploads=loads; 28 21 29 22 } 30 31
Note:
See TracChangeset
for help on using the changeset viewer.