Changeset 24561


Ignore:
Timestamp:
02/07/20 21:10:21 (5 years ago)
Author:
Mathieu Morlighem
Message:

CHG: done for Josh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Element.cpp

    r24560 r24561  
    29282928                                                temp_input->SetInput(P1Enum,NUM_VERTICES,&vertexlids[0],temp_input->element_values);
    29292929                                                break;
     2930                                        case P1xP2Enum:
     2931                                        case P1xP3Enum:
     2932                                        case P1xP4Enum:
     2933                                                temp_input->element_values[3] = yearlytemperatures[3];
     2934                                                temp_input->element_values[4] = yearlytemperatures[4];
     2935                                                temp_input->element_values[5] = yearlytemperatures[5];
     2936                                                temp_input->SetInput(temp_input->GetInputInterpolationType(),this->lid,this->GetNumberOfNodes(temp_input->GetInputInterpolationType()),temp_input->element_values);
     2937                                                break;
    29302938                                        default:
    29312939                                                _error_("Interpolation "<<EnumToStringx(temp_input->GetInputInterpolationType())<<" not supported yet");
     
    29362944                                if(isenthalpy){
    29372945                                        /*Convert that to enthalpy for the enthalpy model*/
    2938                                         IssmDouble enthalpy[6];
    2939                                         GetInputListOnVertices(&enthalpy[0],EnthalpyEnum);
    2940                                         ThermalToEnthalpy(&enthalpy[3],yearlytemperatures[3],0.,0.);
    2941                                         ThermalToEnthalpy(&enthalpy[4],yearlytemperatures[4],0.,0.);
    2942                                         ThermalToEnthalpy(&enthalpy[5],yearlytemperatures[5],0.,0.);
    2943                                         this->AddInput2(EnthalpyEnum,&enthalpy[0],P1Enum);
     2946                                        PentaInput2* enth_input = xDynamicCast<PentaInput2*>(this->GetInput2(EnthalpyEnum)); _assert_(enth_input);
     2947                                        switch(enth_input->GetInputInterpolationType()){
     2948                                                case P1Enum:
     2949                                                        ThermalToEnthalpy(&enth_input->element_values[3],yearlytemperatures[3],0.,0.);
     2950                                                        ThermalToEnthalpy(&enth_input->element_values[4],yearlytemperatures[4],0.,0.);
     2951                                                        ThermalToEnthalpy(&enth_input->element_values[5],yearlytemperatures[5],0.,0.);
     2952                                                        enth_input->SetInput(P1Enum,NUM_VERTICES,&vertexlids[0],enth_input->element_values);
     2953                                                        break;
     2954                                                case P1xP2Enum:
     2955                                                case P1xP3Enum:
     2956                                                case P1xP4Enum:
     2957                                                        ThermalToEnthalpy(&enth_input->element_values[3],yearlytemperatures[3],0.,0.);
     2958                                                        ThermalToEnthalpy(&enth_input->element_values[4],yearlytemperatures[4],0.,0.);
     2959                                                        ThermalToEnthalpy(&enth_input->element_values[5],yearlytemperatures[5],0.,0.);
     2960                                                        enth_input->SetInput(enth_input->GetInputInterpolationType(),this->lid,this->GetNumberOfNodes(enth_input->GetInputInterpolationType()),enth_input->element_values);
     2961                                                        break;
     2962                                                default:
     2963                                                        _error_("Interpolation "<<EnumToStringx(temp_input->GetInputInterpolationType())<<" not supported yet");
     2964                                        }
    29442965                                }
    29452966                        }
     
    30753096                                         * the temperatures as they are for the base of the penta and
    30763097                                         * use yearlytemperatures for the top*/
     3098
     3099                                        /*FIXME: look at other function Element::PositiveDegreeDay and propagate change! Just assert for now*/
     3100                                        PentaInput2* temp_input = xDynamicCast<PentaInput2*>(this->GetInput2(TemperatureEnum)); _assert_(temp_input);
     3101                                        _assert_(temp_input->GetInputInterpolationType()==P1Enum);
     3102
    30773103                                        GetInputListOnVertices(&s[0],TemperatureEnum);
    30783104                                        yearlytemperatures[0] = s[0];
Note: See TracChangeset for help on using the changeset viewer.