Changeset 3450
- Timestamp:
- 04/08/10 07:57:36 (15 years ago)
- Location:
- issm/trunk/src/c/ModelProcessorx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r3449 r3450 34 34 IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed"); 35 35 36 count=1; //matlab indexing 36 37 for (i=0;i<iomodel->numberofvertices;i++){ 37 38 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
r3446 r3450 10 10 #include "../IoModel.h" 11 11 12 13 12 void CreateConstraintsThermal(DataSet** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){ 14 13 15 16 14 int i; 17 int count ;15 int count=0; 18 16 19 17 DataSet* constraints = NULL; 20 18 Spc* spc = NULL; 21 19 22 /*spc intermediary data: */23 int spc_sid;24 int spc_node;25 int spc_dof;26 double spc_value;27 28 20 double* spctemperature=NULL; 29 21 … … 37 29 IoModelFetchData(&spctemperature,NULL,NULL,iomodel_handle,"spctemperature"); 38 30 39 count= 0;31 count=1; 40 32 41 33 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 42 34 for (i=0;i<iomodel->numberofvertices;i++){ 43 #ifdef _PARALLEL_ 44 /*keep only this partition's nodes:*/ 45 if((iomodel->my_vertices[i]==1)){ 46 #endif 35 /*keep only this partition's nodes:*/ 36 if((iomodel->my_vertices[i]==1)){ 47 37 48 if ((int)spctemperature[2*i]){ 49 50 /*This grid needs to be spc'd to vx_obs and vy_obs:*/ 38 if ((int)spctemperature[2*i]){ 51 39 52 spc_sid=count; 53 spc_node=i+1; 54 spc_dof=1; //we enforce first translation degree of freedom, for temperature 55 spc_value=spctemperature[2*i+1]; 40 constraints->AddObject(new Spc(count,i+1,1,spctemperature[2*i+1])); 41 count++; 56 42 57 spc = new Spc(spc_sid,spc_node,spc_dof,spc_value); 58 constraints->AddObject(spc); 59 count++; 43 } 60 44 61 } 62 63 #ifdef _PARALLEL_ 64 } //if((my_grids[i]==1)) 65 #endif 45 } //if((my_grids[i]==1)) 66 46 } 67 47 … … 70 50 constraints->Presort(); 71 51 72 73 52 cleanup_and_return: 74 53 /*Free data: */ -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r3449 r3450 32 32 IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature"); 33 33 34 count=1; //matlab indexing 34 35 for (i=0;i<iomodel->numberofvertices;i++){ 35 36 /*keep only this partition's nodes:*/
Note:
See TracChangeset
for help on using the changeset viewer.