Changeset 1765


Ignore:
Timestamp:
08/18/09 15:56:41 (16 years ago)
Author:
seroussi
Message:

model processor thermal

Location:
issm/trunk/src/c/ModelProcessorx/Thermal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp

    r546 r1765  
    2929        double spc_value;
    3030       
    31         double* dirichletvalues_thermal=NULL;
    32         double* gridondirichlet_thermal=NULL;
     31        double* spctemperature=NULL;
    3332       
    3433        /*Create constraints: */
     
    3635
    3736        /*Fetch data: */
    38         ModelFetchData((void**)&gridondirichlet_thermal,NULL,NULL,model_handle,"gridondirichlet_thermal","Matrix","Mat");
    39         ModelFetchData((void**)&dirichletvalues_thermal,NULL,NULL,model_handle,"dirichletvalues_thermal","Matrix","Mat");
     37        ModelFetchData((void**)&spctemperature,NULL,NULL,model_handle,"spctemperature","Matrix","Mat");
    4038
    4139        count=0;
     
    4846        #endif
    4947
    50                 if ((int)gridondirichlet_thermal[i]){
     48                if ((int)spctemperature[2*i]){
    5149       
    5250                        /*This grid needs to be spc'd to vx_obs and vy_obs:*/
     
    5553                        spc_node=i+1;
    5654                        spc_dof=1; //we enforce first translation degree of freedom, for temperature
    57                         spc_value=dirichletvalues_thermal[i];
     55                        spc_value=spctemperature[2*i+1];
    5856
    5957                        spc = new Spc(spc_sid,spc_node,spc_dof,spc_value);
     
    7573        cleanup_and_return:
    7674        /*Free data: */
    77         xfree((void**)&gridondirichlet_thermal);
    78         xfree((void**)&dirichletvalues_thermal);
     75        xfree((void**)&spctemperature);
    7976       
    8077        /*Assign output pointer: */
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r575 r1765  
    4747
    4848        //create penalties for grids: no grid can have a temperature over the melting point
    49         ModelFetchData((void**)&model->gridondirichlet_thermal,NULL,NULL,model_handle,"gridondirichlet_thermal","Matrix","Mat");
     49        ModelFetchData((void**)&model->spctemperature,NULL,NULL,model_handle,"spctemperature","Matrix","Mat");
    5050
    5151        for (i=0;i<model->numberofnodes;i++){
     
    5555        #endif
    5656
    57                 if (!model->gridondirichlet_thermal[i]){ //No penalty applied on spc grids!
     57                if (!model->spctemperature[2*i]){ //No penalty applied on spc grids!
    5858               
    5959                        pengrid_id=count+1; //matlab indexing
     
    7373        #endif
    7474        }
    75         xfree((void**)&model->gridondirichlet_thermal);
     75        xfree((void**)&model->spctemperature);
    7676
    7777        /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these
Note: See TracChangeset for help on using the changeset viewer.