Changeset 3449
- Timestamp:
- 04/08/10 07:53:00 (15 years ago)
- Location:
- issm/trunk/src/c/ModelProcessorx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r3448 r3449 13 13 void CreateLoadsMelting(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ 14 14 15 int i ,j,counter;15 int i; 16 16 int element; 17 17 … … 35 35 36 36 for (i=0;i<iomodel->numberofvertices;i++){ 37 /*keep only this partition's nodes:*/38 if((iomodel->my_vertices[i]==1)){37 /*keep only this partition's nodes:*/ 38 if((iomodel->my_vertices[i]==1)){ 39 39 40 if (iomodel->gridonbed[i]){ 41 42 loads->AddObject( new Pengrid(count+1, i+1,iomodel->numberofelements+1, 1, 0, iomodel->penalty_offset, pengrid_thermal_steadystate, iomodel->stabilize_constraints)); 43 44 count++; 45 } 46 #ifdef _PARALLEL_ 47 } //if((iomodel->my_vertices[i]==1)) 48 #endif 40 if (iomodel->gridonbed[i]){ 41 42 loads->AddObject( new Pengrid(count+1, i+1,iomodel->numberofelements+1, 1, 0, iomodel->penalty_offset, pengrid_thermal_steadystate, iomodel->stabilize_constraints)); 43 44 count++; 45 } 46 } //if((iomodel->my_vertices[i]==1)) 49 47 } 50 48 xfree((void**)&iomodel->gridonbed); -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r3446 r3449 13 13 void CreateLoadsThermal(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ 14 14 15 int i,j,counter; 16 int element; 15 int i; 17 16 18 extern int my_rank;19 extern int num_procs;20 21 17 DataSet* loads = NULL; 22 18 Pengrid* pengrid = NULL; 23 19 24 int segment_width; 25 int i1,i2,i3,i4; 26 int i0,range; 27 int grid1,grid2; 20 /*pengrid intermediary data: */ 21 int pengrid_thermal_steadystate=1; 28 22 29 /*pengrid intermediary data: */ 30 int pengrid_id; 31 int pengrid_mparid; 32 int pengrid_node_id; 33 int pengrid_dof; 34 double pengrid_penalty_offset; 35 int pengrid_active=0; 36 int pengrid_thermal_steadystate=1; 37 int pengrid_stabilize_constraints=0; 23 int count=0; 38 24 39 int numberofsegs_diag_stokes;40 i nt count;25 /*return if 2d mesh*/ 26 if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return; 41 27 42 28 /*Create loads: */ 43 29 loads = new DataSet(LoadsEnum()); 44 count=0;45 46 /*return if 2d mesh*/47 if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;48 30 49 31 //create penalties for grids: no grid can have a temperature over the melting point … … 51 33 52 34 for (i=0;i<iomodel->numberofvertices;i++){ 53 #ifdef _PARALLEL_ 54 /*keep only this partition's nodes:*/ 55 if((iomodel->my_vertices[i]==1)){ 56 #endif 35 /*keep only this partition's nodes:*/ 36 if((iomodel->my_vertices[i]==1)){ 57 37 58 if (!iomodel->spctemperature[2*i]){ //No penalty applied on spc grids! 59 60 pengrid_id=count+1; //matlab indexing 61 pengrid_node_id=i+1; 62 pengrid_mparid=iomodel->numberofelements+1;//refers to the corresponding parmat property card 63 pengrid_dof=1; 64 pengrid_penalty_offset=iomodel->penalty_offset; 65 pengrid_active=0; 66 pengrid_stabilize_constraints=iomodel->stabilize_constraints; 67 68 pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_mparid,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate,pengrid_stabilize_constraints); 69 70 loads->AddObject(pengrid); 71 count++; 72 } 73 #ifdef _PARALLEL_ 74 } //if((iomodel->my_vertices[i]==1)) 75 #endif 38 if (!iomodel->spctemperature[2*i]){ //No penalty applied on spc grids! 39 40 loads->AddObject( new Pengrid(count+1, i+1,iomodel->numberofelements+1,1, 0, iomodel->penalty_offset,pengrid_thermal_steadystate,iomodel->stabilize_constraints)); 41 42 count++; 43 } 44 } //if((iomodel->my_vertices[i]==1)) 76 45 } 77 46 xfree((void**)&iomodel->spctemperature);
Note:
See TracChangeset
for help on using the changeset viewer.