Changeset 15038


Ignore:
Timestamp:
05/16/13 09:39:33 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: removing approximation from inputs

Location:
issm/trunk-jpl/src/c/classes
Files:
2 edited

Legend:

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

    r15037 r15038  
    1818/*FUNCTION Node::Node() default constructor {{{*/
    1919Node::Node(){
    20                  this->inputs=NULL;
    21                  this->hvertex=NULL;
    22                  return;
     20        this->approximation=0;
     21        this->inputs=NULL;
     22        this->hvertex=NULL;
    2323}
    2424/*}}}*/
     
    4949        /*Hooks*/
    5050        this->hvertex=new Hook(&vertex_id,1); //node id is the same as the vertex id, continuous galerkin!
     51
     52        if (analysis_type==DiagnosticHorizAnalysisEnum)
     53         this->approximation=reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[io_index]);
     54        else
     55         this->approximation=0;
    5156
    5257        //intialize inputs, and add as many inputs per element as requested:
     
    5762          this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,reCast<bool>(iomodel->Data(MaskVertexongroundediceEnum)[io_index])));
    5863        if (analysis_type==DiagnosticHorizAnalysisEnum)
    59          this->inputs->AddInput(new IntInput(ApproximationEnum,reCast<IssmInt>(iomodel->Data(FlowequationVertexEquationEnum)[io_index])));
     64         this->approximation=reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[io_index]);
    6065        /*set single point constraints: */
    6166
     
    525530/*FUNCTION Node::GetApproximation {{{*/
    526531int   Node::GetApproximation(){
    527 
    528         int approximation;
    529 
    530         /*recover parameters: */
    531         inputs->GetInputValue(&approximation,ApproximationEnum);
    532532
    533533        return approximation;
  • issm/trunk-jpl/src/c/classes/Node.h

    r15036 r15038  
    2424
    2525class Node: public Object ,public Update{
     26
     27        private:
     28                int approximation; //For ice flow models, we need to know what ice flow approximation is employed on this node
    2629
    2730        public:
Note: See TracChangeset for help on using the changeset viewer.