Changeset 3448
- Timestamp:
- 04/08/10 07:46:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r3446 r3448 20 20 21 21 DataSet* loads = NULL; 22 Pengrid* pengrid = NULL;23 24 int segment_width;25 int i1,i2,i3,i4;26 int i0,range;27 int grid1,grid2;28 22 29 23 /*pengrid intermediary data: */ 30 int pengrid_id;31 int pengrid_node_id;32 int pengrid_mparid;33 int pengrid_dof;34 double pengrid_penalty_offset;35 int pengrid_active=0;36 24 int pengrid_thermal_steadystate=1; 37 int pengrid_stabilize_constraints=0;25 int count=0; 38 26 39 int count; 27 /*if 2d: return*/ 28 if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return; 40 29 41 30 /*Create loads: */ 42 31 loads = new DataSet(LoadsEnum()); 43 count=0;44 45 /*if 2d: return*/46 if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;47 32 48 33 //create penalties for grids: no grid can have a temperature over the melting point … … 50 35 51 36 for (i=0;i<iomodel->numberofvertices;i++){ 52 #ifdef _PARALLEL_53 37 /*keep only this partition's nodes:*/ 54 38 if((iomodel->my_vertices[i]==1)){ 55 #endif56 39 57 40 if (iomodel->gridonbed[i]){ 58 41 59 pengrid_id=count+1; //matlab indexing 60 pengrid_node_id=i+1; 61 pengrid_dof=1; 62 pengrid_penalty_offset=iomodel->penalty_offset; 63 pengrid_active=0; 64 pengrid_mparid=iomodel->numberofelements+1;//refers to the corresponding parmat property card 65 pengrid_stabilize_constraints=iomodel->stabilize_constraints; 42 loads->AddObject( new Pengrid(count+1, i+1,iomodel->numberofelements+1, 1, 0, iomodel->penalty_offset, pengrid_thermal_steadystate, iomodel->stabilize_constraints)); 66 43 67 pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_mparid,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate,pengrid_stabilize_constraints);68 69 loads->AddObject(pengrid);70 44 count++; 71 45 }
Note:
See TracChangeset
for help on using the changeset viewer.