Changeset 16272


Ignore:
Timestamp:
09/30/13 09:25:47 (11 years ago)
Author:
jbondzio
Message:

CHG: changed Penta::UpdateThermalBasalConstraints to Penta::UpdateBasalConstraintsEnthalpy and added ThermalIsdynamicbasalspcEnum

Location:
issm/trunk-jpl/src/c
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/thermal_core.cpp

    r16219 r16272  
    3434
    3535        if(VerboseSolution()) _printf0_("   setting basal Dirichlet boundary conditions\n");
    36         femmodel->UpdateThermalBasalConstraintsx();
     36        femmodel->UpdateBasalConstraintsEnthalpyx();
    3737
    3838        if(VerboseSolution()) _printf0_("   computing temperatures\n");
  • issm/trunk-jpl/src/c/classes/Elements/Element.h

    r16238 r16272  
    126126
    127127                #ifdef _HAVE_THERMAL_
    128                 virtual void UpdateThermalBasalConstraints(void)=0;
     128                virtual void UpdateBasalConstraintsEnthalpy(void)=0;
    129129                virtual void ComputeBasalMeltingrate(void)=0;
    130130        virtual void DrainWaterfraction(void)=0;
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r16238 r16272  
    45774577                        }
    45784578                        else{
    4579                                 // only base temperate, set Dirichlet BCs in Penta::UpdateThermalBasalConstraints()
     4579                                // only base temperate, set Dirichlet BCs in Penta::UpdateBasalConstraintsEnthalpy()
    45804580                        }
    45814581                }
     
    49924992}
    49934993/*}}}*/
    4994 /*FUNCTION Penta::UpdateThermalBasalConstraints{{{*/
    4995 void  Penta::UpdateThermalBasalConstraints(void){
     4994/*FUNCTION Penta::UpdateBasalConstraintsEnthalpy{{{*/
     4995void  Penta::UpdateBasalConstraintsEnthalpy(void){
    49964996
    49974997        /*Intermediary*/
     
    50085008        parameters->FindParam(&isenthalpy,ThermalIsenthalpyEnum);
    50095009        if(!isenthalpy) return;
    5010         //parameters->FindParam(&isdynamicbasalspc,ThermalIsdynamicbasalspcEnum);
    5011         isdynamicbasalspc = true;
     5010        parameters->FindParam(&isdynamicbasalspc,ThermalIsdynamicbasalspcEnum);
     5011        isdynamicbasalspc = true; // TODO: remove before release
    50125012        if(!isdynamicbasalspc) return;
    50135013
     
    50265026        for(int i=0;i<numindices;i++){
    50275027                gauss->GaussNode(this->element_type,indices[i]);
    5028         gaussup->GaussNode(this->element_type,indicesup[i]); // TODO: check: are the nodes corresponding?
    5029 
    5030                 /*Check wether there is a temperate layer at the base or not -> TODO: Johannes:) */
    5031         /*check if node is temperate, if not, return*/
     5028        gaussup->GaussNode(this->element_type,indicesup[i]);
     5029
     5030                /*Check wether there is a temperate layer at the base or not */
     5031        /*check if node is temperate, if not, continue*/
    50325032        enthalpy_input->GetInputValue(&enthalpy, gauss);
    50335033                pressure_input->GetInputValue(&pressure, gauss);
    50345034        if (enthalpy<matpar->PureIceEnthalpy(pressure)){
    5035           // TODO: reset, if necessary, all spcs to non-valid
    50365035          continue;
    50375036        }
    5038         /*check if upper node is temperate. if yes, then we have a temperate layer of positive thickness. if not, continue.*/
     5037        /*check if upper node is temperate.
     5038          if yes, then we have a temperate layer of positive thickness and
     5039          reset the spc.
     5040          if not, apply dirichlet BC.*/
    50395041        enthalpy_input->GetInputValue(&enthalpyup, gaussup);
    50405042                pressure_input->GetInputValue(&pressureup, gaussup);   
     
    50475049                        /*Calculate enthalpy at pressure melting point */
    50485050                        h_pmp=matpar->PureIceEnthalpy(pressure);
    5049 
    50505051                        /*Apply Dirichlet condition (dof = 0 here, since there is only one degree of freedom per node)*/
    50515052                        nodes[indices[i]]->ApplyConstraint(1,h_pmp);
  • issm/trunk-jpl/src/c/classes/Elements/Penta.h

    r16238 r16272  
    347347                void           InputUpdateFromSolutionThermal(IssmDouble* solutiong);
    348348                void           InputUpdateFromSolutionEnthalpy(IssmDouble* solutiong);
    349                 void           UpdateThermalBasalConstraints(void);
     349                void           UpdateBasalConstraintsEnthalpy(void);
    350350                void           ComputeBasalMeltingrate(void);
    351351                void           DrainWaterfraction(void);
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r16255 r16272  
    250250
    251251                #ifdef _HAVE_THERMAL_
    252                 void UpdateThermalBasalConstraints(void){_error_("not implemented yet");};
     252                void UpdateBasalConstraintsEnthalpy(void){_error_("not implemented yet");};
    253253                void ComputeBasalMeltingrate(void){_error_("not implemented yet");};
    254254                void DrainWaterfraction(void){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r16192 r16272  
    12421242#endif
    12431243#ifdef _HAVE_THERMAL_
    1244 void FemModel::UpdateThermalBasalConstraintsx(void){ /*{{{*/
     1244void FemModel::UpdateBasalConstraintsEnthalpyx(void){ /*{{{*/
    12451245
    12461246        for(int i=0;i<elements->Size();i++){
    12471247                Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i));
    1248                 element->UpdateThermalBasalConstraints();
     1248                element->UpdateBasalConstraintsEnthalpy();
    12491249        }
    12501250
  • issm/trunk-jpl/src/c/classes/FemModel.h

    r16126 r16272  
    100100                #endif
    101101                #ifdef _HAVE_THERMAL_
    102                 void UpdateThermalBasalConstraintsx(void);
     102                void UpdateBasalConstraintsEnthalpyx(void);
    103103                #endif
    104104};
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r16240 r16272  
    8484        parameters->AddObject(iomodel->CopyConstantObject(TransientIsgiaEnum));
    8585        parameters->AddObject(iomodel->CopyConstantObject(ThermalIsenthalpyEnum));
     86        parameters->AddObject(iomodel->CopyConstantObject(ThermalIsdynamicbasalspcEnum));
    8687        parameters->AddObject(iomodel->CopyConstantObject(MaterialsRheologyLawEnum));
    8788        parameters->AddObject(iomodel->CopyConstantObject(AutodiffIsautodiffEnum));
  • issm/trunk-jpl/src/c/modules/PostprocessingEnthalpyx/PostprocessingEnthalpyx.cpp

    r16032 r16272  
    1212        Element* element=NULL;
    1313
    14         /*drain excess water fraction: */
    15         for (i=0;i<femmodel->elements->Size();i++){
    16                 element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));
    17                 element->DrainWaterfraction();
    18         }
    19 
     14       
    2015        /*Compute basal melting rates: */
    2116        for (i=0;i<femmodel->elements->Size();i++){
     
    2419        }
    2520
     21    /*drain excess water fraction: */
     22    /*  for (i=0;i<femmodel->elements->Size();i++){
     23                element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));
     24                element->DrainWaterfraction();
     25        }
     26*/
     27
    2628        /*Update basal dirichlet BCs for enthalpy: */
    2729        for (i=0;i<femmodel->elements->Size();i++){
    2830                element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));
    29                 element->UpdateThermalBasalConstraints();
     31                element->UpdateBasalConstraintsEnthalpy();
    3032        }
    3133}
Note: See TracChangeset for help on using the changeset viewer.