source: issm/oecreview/Archive/16554-17801/ISSM-17670-17671.diff@ 17802

Last change on this file since 17802 was 17802, checked in by Mathieu Morlighem, 11 years ago

Added archives

File size: 9.6 KB
  • ../trunk-jpl/src/c/classes/Elements/Element.h

     
    8585                void       GetNodesSidList(int* sidlist);
    8686                void       GetNodesLidList(int* lidlist);
    8787                void       GetPhi(IssmDouble* phi, IssmDouble*  epsilon, IssmDouble viscosity);
     88                void       GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum);
     89                void         GetVertexPidList(int* pidlist);
    8890                void       GetVerticesCoordinates(IssmDouble** xyz_list);
    8991                void       GetVerticesSidList(int* sidlist);
    9092                void       GetVerticesConnectivityList(int* connectivitylist);
     
    219221                virtual Gauss* NewGaussTop(int order)=0;
    220222
    221223                virtual void   InputScale(int enum_type,IssmDouble scale_factor)=0;
    222                 virtual void   GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum)=0;
    223224                virtual IssmDouble TimeAdapt()=0;
    224225                virtual void   PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm)=0;
    225226                virtual void   Delta18oParameterization(void)=0;
  • ../trunk-jpl/src/c/classes/Elements/Tria.cpp

     
    833833        return this->nodes[node_number];
    834834
    835835}/*}}}*/
    836 /*FUNCTION Tria::GetVertexPidList {{{*/
    837 void  Tria::GetVertexPidList(int* doflist){
    838 
    839         for(int i=0;i<3;i++) doflist[i]=vertices[i]->Pid();
    840 
    841 }
    842 /*}}}*/
    843 /*FUNCTION Tria::GetVectorFromInputs{{{*/
    844 void  Tria::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){
    845 
    846         int vertexpidlist[NUMVERTICES];
    847 
    848         /*Get out if this is not an element input*/
    849         if(!IsInput(input_enum)) return;
    850 
    851         /*Prepare index list*/
    852         this->GetVertexPidList(&vertexpidlist[0]);
    853 
    854         /*Get input (either in element or material)*/
    855         Input* input=inputs->GetInput(input_enum);
    856         if(!input) _error_("Input " << EnumToStringx(input_enum) << " not found in element");
    857 
    858         /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
    859         input->GetVectorFromInputs(vector,&vertexpidlist[0]);
    860 }
    861 /*}}}*/
    862836/*FUNCTION Tria::GetXcoord {{{*/
    863837IssmDouble Tria::GetXcoord(Gauss* gauss){
    864838
  • ../trunk-jpl/src/c/classes/Elements/Tria.h

     
    8181                int         NumberofNodesVelocity(void);
    8282                int         NumberofNodesPressure(void);
    8383                void        GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type);
    84                 void        GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum);
    8584                void        GetVerticesCoordinatesBase(IssmDouble** pxyz_list);
    8685                void        GetVerticesCoordinatesTop(IssmDouble** pxyz_list);
    8786                void        InputDepthAverageAtBase(int enum_type,int average_enum_type);
     
    179178                IssmDouble     GetArea(void);
    180179                void           GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints);
    181180                int            GetElementType(void);
    182 
    183                 void             GetVertexPidList(int* doflist);
    184181                IssmDouble     GetXcoord(Gauss* gauss);
    185182                IssmDouble     GetYcoord(Gauss* gauss);
    186183                IssmDouble     GetZcoord(Gauss* gauss){_error_("not implemented");};
  • ../trunk-jpl/src/c/classes/Elements/Penta.cpp

     
    824824        return phi;
    825825}
    826826/*}}}*/
    827 /*FUNCTION Penta::GetVertexPidList {{{*/
    828 void  Penta::GetVertexPidList(int* doflist){
    829 
    830         for(int i=0;i<6;i++) doflist[i]=vertices[i]->Pid();
    831 
    832 }
    833 /*}}}*/
    834827/*FUNCTION Penta::GetElementType {{{*/
    835828int Penta::GetElementType(){
    836829
     
    967960        return tau_parameter;
    968961}
    969962/*}}}*/
    970 /*FUNCTION Penta::GetVectorFromInputs{{{*/
    971 void  Penta::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){
    972 
    973         int vertexpidlist[NUMVERTICES];
    974 
    975         /*Get out if this is not an element input*/
    976         if (!IsInput(input_enum)) return;
    977 
    978         /*Prepare index list*/
    979         this->GetVertexPidList(&vertexpidlist[0]);
    980 
    981         /*Get input (either in element or material)*/
    982         Input* input=inputs->GetInput(input_enum);
    983         if(!input) _error_("Input " << EnumToStringx(input_enum) << " not found in element");
    984 
    985         /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
    986         input->GetVectorFromInputs(vector,&vertexpidlist[0]);
    987 }
    988 /*}}}*/
    989963/*FUNCTION Penta::GetXcoord {{{*/
    990964IssmDouble Penta::GetXcoord(Gauss* gauss){
    991965
  • ../trunk-jpl/src/c/classes/Elements/Penta.h

     
    7979                IssmDouble GetXcoord(Gauss* gauss);
    8080                IssmDouble GetYcoord(Gauss* gauss);
    8181                IssmDouble GetZcoord(Gauss* gauss);
    82                 void   GetVectorFromInputs(Vector<IssmDouble>* vector,int name_enum);
    8382                void   GetVerticesCoordinatesBase(IssmDouble** pxyz_list);
    8483                void   GetVerticesCoordinatesTop(IssmDouble** pxyz_list);
    8584
     
    177176                void             NormalTop(IssmDouble* bed_normal, IssmDouble* xyz_list);
    178177                ElementMatrix* CreateBasalMassMatrix(void);
    179178                void           GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints);
    180 
    181                 void             GetVertexPidList(int* doflist);
    182179                int            GetElementType(void);
    183180                void           GetInputValue(IssmDouble* pvalue,Node* node,int enumtype);
    184181                Node*          GetNode(int node_number);
  • ../trunk-jpl/src/c/classes/Elements/Tetra.cpp

     
    843843                        tetra_node_ids[7]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofelements+iomodel->elements[4*index+2];
    844844                        tetra_node_ids[8]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofelements+iomodel->elements[4*index+3];
    845845                        break;
     846                case TaylorHoodEnum:
    846847                        numnodes        = 14;
    847                         tetra_node_ids   = xNew<int>(numnodes);
     848                        tetra_node_ids  = xNew<int>(numnodes);
    848849                        tetra_node_ids[0]=iomodel->nodecounter+iomodel->elements[4*index+0];
    849850                        tetra_node_ids[1]=iomodel->nodecounter+iomodel->elements[4*index+1];
    850851                        tetra_node_ids[2]=iomodel->nodecounter+iomodel->elements[4*index+2];
  • ../trunk-jpl/src/c/classes/Elements/Seg.h

     
    127127                void        GetNormalFromLSF(IssmDouble *pnormal){_error_("not implemented yet");};
    128128
    129129                void        GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");};
    130                 void        GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum){_error_("not implemented yet");};
    131130                void        InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");};
    132131                void        InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");};
    133132                void        InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");};
  • ../trunk-jpl/src/c/classes/Elements/Tetra.h

     
    132132                void        GetNormalFromLSF(IssmDouble *pnormal){_error_("not implemented yet");};
    133133
    134134                void        GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");};
    135                 void        GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum){_error_("not implemented yet");};
    136135                void        InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");};
    137136                void        InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");};
    138137                void        InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");};
  • ../trunk-jpl/src/c/classes/Elements/Element.cpp

     
    527527        }
    528528}
    529529/*}}}*/
     530void  Element::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){/*{{{*/
     531
     532        /*Fetch number vertices for this element and allocate arrays*/
     533        int numvertices = this->GetNumberOfVertices();
     534        int*        vertexpidlist = xNew<int>(numvertices);
     535        IssmDouble* values        = xNew<IssmDouble>(numvertices);
     536
     537        /*Fill in values*/
     538        this->GetVertexPidList(vertexpidlist);
     539        this->GetInputListOnNodesVelocity(values,input_enum);
     540        vector->SetValues(numvertices,vertexpidlist,values,INS_VAL);
     541
     542        /*Clean up*/
     543        xDelete<int>(vertexpidlist);
     544        xDelete<IssmDouble>(values);
     545
     546}
     547/*}}}*/
     548void  Element::GetVertexPidList(int* pidlist){/*{{{*/
     549
     550        int numvertices = this->GetNumberOfVertices();
     551        for(int i=0;i<numvertices;i++) pidlist[i]=vertices[i]->Pid();
     552
     553}
     554/*}}}*/
    530555void Element::GetVerticesCoordinates(IssmDouble** pxyz_list){/*{{{*/
    531556
    532557        int         numvertices = this->GetNumberOfVertices();
Note: See TracBrowser for help on using the repository browser.