Changeset 318


Ignore:
Timestamp:
05/08/09 10:47:27 (16 years ago)
Author:
seroussi
Message:

fixed problem with matpar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp

    r313 r318  
    208208                                        beam_id=i+1;
    209209                                        beam_mid=i+1; //refers to the corresponding material property card
    210                                         beam_mparid=model->numberofnodes+1;//refers to the corresponding matpar property card
     210                                        beam_mparid=model->numberofnodes-model->numberofnodes2d+1;//refers to the corresponding matpar property card
    211211                                        beam_g[0]=i+1;
    212212                                        beam_g[1]=(int)model->uppernodes[i]; //grid that lays right on top
     
    262262
    263263        /*Add one constant material property to materials: */
    264         matpar_mid=model->numberofnodes+1; //put it at the end of the materials
     264        matpar_mid=model->numberofnodes-model->numberofnodes2d+1; //put it at the end of the materials
    265265        matpar_g=model->g;
    266266        matpar_rho_ice=model->rho_ice;
     
    274274        matpar_thermal_exchange_velocity=model->thermal_exchange_velocity;
    275275
     276        /*Create matpar object using its constructor: */
     277        matpar=new Matpar(matpar_mid,matpar_rho_ice,matpar_rho_water,matpar_heatcapacity,matpar_thermalconductivity,
     278                        matpar_latentheat,matpar_beta,matpar_meltingpoint,matpar_mixed_layer_capacity,
     279                        matpar_thermal_exchange_velocity,matpar_g);
     280               
     281        /*Add to materials datset: */
     282        materials->AddObject(matpar);
    276283       
    277284        /*Create nodes from x,y,z, as well as the spc values on those grids: */
Note: See TracChangeset for help on using the changeset viewer.