Changeset 3448


Ignore:
Timestamp:
04/08/10 07:46:49 (15 years ago)
Author:
seroussi
Message:

added CreateLoads for Melting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r3446 r3448  
    2020       
    2121        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;
    2822
    2923        /*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;
    3624        int pengrid_thermal_steadystate=1;
    37         int pengrid_stabilize_constraints=0;
     25        int count=0;
    3826
    39         int count;
     27        /*if 2d: return*/
     28        if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
    4029
    4130        /*Create loads: */
    4231        loads   = new DataSet(LoadsEnum());
    43         count=0;
    44 
    45         /*if 2d: return*/
    46         if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
    4732
    4833        //create penalties for grids: no grid can have a temperature over the melting point
     
    5035
    5136        for (i=0;i<iomodel->numberofvertices;i++){
    52         #ifdef _PARALLEL_
    5337        /*keep only this partition's nodes:*/
    5438        if((iomodel->my_vertices[i]==1)){
    55         #endif
    5639
    5740                if (iomodel->gridonbed[i]){
    5841               
    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));
    6643                       
    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);
    7044                        count++;
    7145                }
Note: See TracChangeset for help on using the changeset viewer.