Changeset 17309


Ignore:
Timestamp:
02/19/14 20:23:58 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: preparing SSA 1d

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

Legend:

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

    r17303 r17309  
    11521152                        basalelement = element;
    11531153                        break;
    1154                 case Mesh3DEnum:
     1154                case Mesh3DEnum: case Mesh2DverticalEnum:
    11551155                        if(!element->IsOnBed()) return NULL;
    11561156                        basalelement = element->SpawnBasalElement();
     
    13531353                        basalelement = element;
    13541354                        break;
    1355                 case Mesh3DEnum:
     1355                case Mesh3DEnum: case Mesh2DverticalEnum:
    13561356                        if(!element->IsOnBed()) return NULL;
    13571357                        basalelement = element->SpawnBasalElement();
  • issm/trunk-jpl/src/c/classes/Elements/Element.cpp

    r17298 r17309  
    266266        return inputs->GetInput(inputenum);
    267267}/*}}}*/
     268void Element::GetInputListOnVertices(IssmDouble* pvalue,int enumtype){/*{{{*/
     269
     270        /*Recover input*/
     271        Input* input=this->GetInput(enumtype);
     272        if (!input) _error_("Input " << EnumToStringx(enumtype) << " not found in element");
     273
     274        /*Fetch number vertices for this element*/
     275        int numvertices = this->GetNumberOfVertices();
     276
     277        /*Checks in debugging mode*/
     278        _assert_(pvalue);
     279
     280        /* Start looping on the number of vertices: */
     281        Gauss*gauss=this->NewGauss();
     282        for(int iv=0;iv<numvertices;iv++){
     283                gauss->GaussVertex(iv);
     284                input->GetInputValue(&pvalue[iv],gauss);
     285        }
     286
     287        /*clean-up*/
     288        delete gauss;
     289}
     290/*}}}*/
     291void Element::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){/*{{{*/
     292
     293        /*Recover input*/
     294        Input* input=this->GetInput(enumtype);
     295
     296        /*Checks in debugging mode*/
     297        _assert_(pvalue);
     298
     299        /*Fetch number vertices for this element*/
     300        int numvertices = this->GetNumberOfVertices();
     301
     302        /* Start looping on the number of vertices: */
     303        if (input){
     304                Gauss* gauss=this->NewGauss();
     305                for (int iv=0;iv<numvertices;iv++){
     306                        gauss->GaussVertex(iv);
     307                        input->GetInputValue(&pvalue[iv],gauss);
     308                }
     309                delete gauss;
     310        }
     311        else{
     312                for(int iv=0;iv<numvertices;iv++) pvalue[iv]=defaultvalue;
     313        }
     314}
     315/*}}}*/
     316void Element::GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){/*{{{*/
     317
     318        _assert_(pvalue);
     319
     320        Input *input    = this->GetInput(enumtype);
     321        int    numnodes = this->GetNumberOfNodes();
     322
     323        /* Start looping on the number of vertices: */
     324        if(input){
     325                Gauss* gauss=this->NewGauss();
     326                for(int iv=0;iv<numnodes;iv++){
     327                        gauss->GaussNode(this->FiniteElement(),iv);
     328                        input->GetInputValue(&pvalue[iv],gauss);
     329                }
     330                delete gauss;
     331        }
     332        else{
     333                for(int iv=0;iv<numnodes;iv++) pvalue[iv]=defaultvalue;
     334        }
     335}
     336/*}}}*/
     337void Element::GetInputListOnNodes(IssmDouble* pvalue,int enumtype){/*{{{*/
     338
     339        _assert_(pvalue);
     340
     341        int    numnodes = this->GetNumberOfNodes();
     342        Input *input    = this->GetInput(enumtype);
     343        if(!input) _error_("Input " << EnumToStringx(enumtype) << " not found in element");
     344
     345        /* Start looping on the number of vertices: */
     346        Gauss* gauss=this->NewGauss();
     347        for(int iv=0;iv<numnodes;iv++){
     348                gauss->GaussNode(this->FiniteElement(),iv);
     349                input->GetInputValue(&pvalue[iv],gauss);
     350        }
     351        delete gauss;
     352}
     353/*}}}*/
    268354void Element::GetVerticesSidList(int* sidlist){/*{{{*/
    269355
  • issm/trunk-jpl/src/c/classes/Elements/Element.h

    r17296 r17309  
    6464                void         GetDofListPressure(int** pdoflist,int setenum);
    6565                Input*     GetInput(int inputenum);
     66                void       GetInputListOnNodes(IssmDouble* pvalue,int enumtype);
     67                void       GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
     68                void       GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
     69                void       GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
    6670                IssmDouble GetMaterialParameter(int enum_in);
    6771                void       GetPhi(IssmDouble* phi, IssmDouble*  epsilon, IssmDouble viscosity);
     
    162166                virtual void   GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating)=0;
    163167                virtual IssmDouble GetGroundedPortion(IssmDouble* xyz_list)=0;
    164                 virtual void   GetInputListOnNodes(IssmDouble* pvalue,int enumtype)=0;
    165                 virtual void   GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue)=0;
    166                 virtual void   GetInputListOnVertices(IssmDouble* pvalue,int enumtype)=0;
    167                 virtual void   GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue)=0;
    168168                virtual void   GetInputValue(IssmDouble* pvalue,Node* node,int enumtype)=0;
    169169                virtual void   GetInputValue(bool* pvalue,int enum_type)=0;
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r17296 r17309  
    892892        _assert_(node_number<this->NumberofNodes());
    893893        return this->nodes[node_number];
    894 }
    895 /*}}}*/
    896 /*FUNCTION Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype) {{{*/
    897 void Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype){
    898 
    899         /*Recover input*/
    900         Input* input=inputs->GetInput(enumtype);
    901         if (!input) _error_("Input " << EnumToStringx(enumtype) << " not found in element");
    902 
    903         /*Checks in debugging mode*/
    904         _assert_(pvalue);
    905 
    906         /* Start looping on the number of vertices: */
    907         GaussPenta *gauss=new GaussPenta();
    908         for (int iv=0;iv<NUMVERTICES;iv++){
    909                 gauss->GaussVertex(iv);
    910                 input->GetInputValue(&pvalue[iv],gauss);
    911         }
    912 
    913         /*clean-up*/
    914         delete gauss;
    915 }
    916 /*}}}*/
    917 /*FUNCTION Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue) {{{*/
    918 void Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){
    919 
    920         /*Recover input*/
    921         Input* input=inputs->GetInput(enumtype);
    922 
    923         /*Checks in debugging mode*/
    924         _assert_(pvalue);
    925 
    926         /* Start looping on the number of vertices: */
    927         if (input){
    928                 GaussPenta *gauss=new GaussPenta();
    929                 for (int iv=0;iv<NUMVERTICES;iv++){
    930                         gauss->GaussVertex(iv);
    931                         input->GetInputValue(&pvalue[iv],gauss);
    932                 }
    933                 delete gauss;
    934         }
    935         else{
    936                 for (int iv=0;iv<NUMVERTICES;iv++) pvalue[iv]=defaultvalue;
    937         }
    938 }
    939 /*}}}*/
    940 /*FUNCTION Penta::GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue) {{{*/
    941 void Penta::GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){
    942 
    943         _assert_(pvalue);
    944 
    945         Input *input    = inputs->GetInput(enumtype);
    946         int    numnodes = this->NumberofNodes();
    947 
    948         /* Start looping on the number of vertices: */
    949         if(input){
    950                 GaussPenta* gauss=new GaussPenta();
    951                 for(int iv=0;iv<this->NumberofNodes();iv++){
    952                         gauss->GaussNode(this->element_type,iv);
    953                         input->GetInputValue(&pvalue[iv],gauss);
    954                 }
    955                 delete gauss;
    956         }
    957         else{
    958                 for(int iv=0;iv<numnodes;iv++) pvalue[iv]=defaultvalue;
    959         }
    960 }
    961 /*}}}*/
    962 /*FUNCTION Penta::GetInputListOnNodes(IssmDouble* pvalue,int enumtype) {{{*/
    963 void Penta::GetInputListOnNodes(IssmDouble* pvalue,int enumtype){
    964 
    965         _assert_(pvalue);
    966 
    967         /*Recover input*/
    968         Input* input=inputs->GetInput(enumtype);
    969         if(!input) _error_("Input " << EnumToStringx(enumtype) << " not found in element");
    970 
    971         /* Start looping on the number of vertices: */
    972         GaussPenta* gauss=new GaussPenta();
    973         for(int iv=0;iv<this->NumberofNodes();iv++){
    974                 gauss->GaussNode(this->element_type,iv);
    975                 input->GetInputValue(&pvalue[iv],gauss);
    976         }
    977         delete gauss;
    978894}
    979895/*}}}*/
  • issm/trunk-jpl/src/c/classes/Elements/Penta.h

    r17296 r17309  
    202202                void             GetVertexPidList(int* doflist);
    203203                int            GetElementType(void);
    204                 void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
    205                 void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
    206                 void           GetInputListOnNodes(IssmDouble* pvalue,int enumtype);
    207                 void           GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
    208204                void           GetInputValue(IssmDouble* pvalue,Node* node,int enumtype);
    209205                void           GetInputValue(bool* pvalue,int enum_type);
  • issm/trunk-jpl/src/c/classes/Elements/Seg.cpp

    r17177 r17309  
    143143}
    144144/*}}}*/
     145/*FUNCTION Seg::GetNumberOfVertices;{{{*/
     146int Seg::GetNumberOfVertices(void){
     147        return NUMVERTICES;
     148}
     149/*}}}*/
    145150/*FUNCTION Seg::GetVerticesCoordinates(IssmDouble** pxyz_list){{{*/
    146151void Seg::GetVerticesCoordinates(IssmDouble** pxyz_list){
     
    152157        *pxyz_list = xyz_list;
    153158
     159}/*}}}*/
     160/*FUNCTION Seg::IsIceInElement {{{*/
     161bool   Seg::IsIceInElement(){
     162
     163        /*Get levelset*/
     164        IssmDouble ls[NUMVERTICES];
     165        GetInputListOnVertices(&ls[0],MaskIceLevelsetEnum);
     166
     167        /*If the level set on one of the nodes is <0, ice is present in this element*/
     168        if(ls[0]<0. || ls[1]<0.)
     169         return true;
     170        else
     171         return false;
     172}
     173/*}}}*/
     174bool Seg::IsIcefront(void){/*{{{*/
     175
     176        bool isicefront;
     177        int i,nrice;
     178        IssmDouble ls[NUMVERTICES];
     179
     180        /*Retrieve all inputs and parameters*/
     181        GetInputListOnVertices(&ls[0],MaskIceLevelsetEnum);
     182
     183        /* If only one vertex has ice, there is an ice front here */
     184        isicefront=false;
     185        if(IsIceInElement()){
     186                nrice=0;       
     187                for(i=0;i<NUMVERTICES;i++)
     188                 if(ls[i]<0.) nrice++;
     189                if(nrice==1) isicefront= true;
     190        }
     191        return isicefront;
    154192}/*}}}*/
    155193/*FUNCTION Seg::JacobianDeterminant{{{*/
     
    161199}
    162200/*}}}*/
     201/*FUNCTION Seg::NewGauss(){{{*/
     202Gauss* Seg::NewGauss(void){
     203        return new GaussSeg();
     204}
     205/*}}}*/
    163206/*FUNCTION Seg::NewGauss(int order){{{*/
    164207Gauss* Seg::NewGauss(int order){
  • issm/trunk-jpl/src/c/classes/Elements/Seg.h

    r17296 r17309  
    7979                Element*    GetSurfaceElement(void){_error_("not implemented yet");};
    8080                Element*    GetBasalElement(void){_error_("not implemented yet");};
    81                 void        GetInputListOnNodes(IssmDouble* pvalue,int enumtype){_error_("not implemented yet");};
    82                 void        GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){_error_("not implemented yet");};
    8381                int         GetNodeIndex(Node* node){_error_("not implemented yet");};
    8482                void        GetNodesSidList(int* sidlist){_error_("not implemented yet");};
     
    8785                int         GetNumberOfNodesVelocity(void){_error_("not implemented yet");};
    8886                int         GetNumberOfNodesPressure(void){_error_("not implemented yet");};
    89                 int         GetNumberOfVertices(void){_error_("not implemented yet");};
     87                int         GetNumberOfVertices(void);
    9088                void        GetVerticesCoordinates(IssmDouble** pxyz_list);
    9189                void        GetVerticesCoordinatesBase(IssmDouble** pxyz_list){_error_("not implemented yet");};
     
    110108                void        NodalFunctionsMINIDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
    111109                void        NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
    112                 bool        IsIceInElement(){_error_("not implemented yet");};
     110                bool        IsIceInElement();
    113111                void        NormalSection(IssmDouble* normal,IssmDouble* xyz_list){_error_("not implemented yet");};
    114112                void        NormalTop(IssmDouble* normal,IssmDouble* xyz_list){_error_("not implemented yet");};
     
    126124                void        GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating){_error_("not implemented yet");};
    127125                IssmDouble  GetGroundedPortion(IssmDouble* xyz_list){_error_("not implemented yet");};
    128                 void        GetInputListOnVertices(IssmDouble* pvalue,int enumtype){_error_("not implemented yet");};
    129                 void        GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){_error_("not implemented yet");};
    130126                void        GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){_error_("not implemented yet");};
    131127                void        GetInputValue(bool* pvalue,int enum_type){_error_("not implemented yet");};
     
    138134                IssmDouble  GetZcoord(Gauss* gauss){_error_("not implemented yet");};
    139135                int         GetElementType(void){_error_("not implemented yet");};
    140                 Gauss*      NewGauss(void){_error_("not implemented yet");};
     136                Gauss*      NewGauss(void);
    141137                Gauss*      NewGauss(int order);
    142138      Gauss*      NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){_error_("not implemented yet");};
     
    153149                void        ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){_error_("not implemented yet");};
    154150                bool        IsZeroLevelset(int levelset_enum){_error_("not implemented");};
    155                 bool            IsIcefront(void){_error_("not implemented yet");};
     151                bool               IsIcefront(void);
    156152                void        ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum){_error_("not implemented");};
    157                 void            GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){_error_("not implemented yet");};
     153                void               GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){_error_("not implemented");};
    158154                void        GetNormalFromLSF(IssmDouble *pnormal){_error_("not implemented yet");};
    159155
  • issm/trunk-jpl/src/c/classes/Elements/SegRef.cpp

    r17235 r17309  
    157157
    158158        switch(finiteelement){
     159                case P0Enum:
     160                        /*Nodal function 1*/
     161                        dbasis[0] = 0.;
     162                        break;
    159163                case P1Enum: case P1DGEnum:
    160164                        /*Nodal function 1*/
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r17296 r17309  
    165165                        this->inputs->AddInput(new TriaInput(input_enum,values,interpolation_enum));
    166166                        break;
     167                case Mesh2DverticalEnum:{
     168                        if(interpolation_enum==P1Enum){
     169                                IssmDouble values2[NUMVERTICES]={0.};
     170                                int        numindices;
     171                                int       *indices = NULL;
     172                                int        index = this->EdgeOnBedIndex();
     173                                NodeOnEdgeIndices(&numindices,&indices,index,this->FiniteElement());
     174                                for(int i=0;i<numindices;i++){
     175                                        values2[indices[i]] = values[i];
     176                                }
     177                                this->inputs->AddInput(new TriaInput(input_enum,values2,interpolation_enum));
     178                                xDelete<int>(indices);
     179                        }
     180                        else _error_("not implemented yet");
     181                        }
     182                        break;
    167183                default: _error_("mesh "<<EnumToStringx(meshtype)<<" not supported yet");
    168184        }
     
    936952int Tria::GetNumberOfVertices(void){
    937953        return NUMVERTICES;
    938 }
    939 /*}}}*/
    940 /*FUNCTION Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype) {{{*/
    941 void Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype){
    942 
    943         /*Recover input*/
    944         Input* input=inputs->GetInput(enumtype);
    945         if (!input) _error_("Input " << EnumToStringx(enumtype) << " not found in element");
    946 
    947         /*Checks in debugging mode*/
    948         _assert_(pvalue);
    949 
    950         /* Start looping on the number of vertices: */
    951         GaussTria* gauss=new GaussTria();
    952         for (int iv=0;iv<NUMVERTICES;iv++){
    953                 gauss->GaussVertex(iv);
    954                 input->GetInputValue(&pvalue[iv],gauss);
    955         }
    956 
    957         /*clean-up*/
    958         delete gauss;
    959 }
    960 /*}}}*/
    961 /*FUNCTION Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue) {{{*/
    962 void Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){
    963 
    964         Input     *input = inputs->GetInput(enumtype);
    965 
    966         /*Checks in debugging mode*/
    967         _assert_(pvalue);
    968 
    969         /* Start looping on the number of vertices: */
    970         if (input){
    971                 GaussTria* gauss=new GaussTria();
    972                 for (int iv=0;iv<NUMVERTICES;iv++){
    973                         gauss->GaussVertex(iv);
    974                         input->GetInputValue(&pvalue[iv],gauss);
    975                 }
    976                 delete gauss;
    977         }
    978         else{
    979                 for (int iv=0;iv<NUMVERTICES;iv++) pvalue[iv]=defaultvalue;
    980         }
    981 }
    982 /*}}}*/
    983 /*FUNCTION Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue,int index) TO BE REMOVED{{{*/
    984 void Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue,int index){
    985 
    986         Input     *input = inputs->GetInput(enumtype);
    987 
    988         /*Checks in debugging mode*/
    989         _assert_(pvalue);
    990 
    991         /* Start looping on the number of vertices: */
    992         if (input){
    993                 GaussTria* gauss=new GaussTria();
    994                 for (int iv=0;iv<NUMVERTICES;iv++){
    995                         gauss->GaussVertex(iv);
    996                         input->GetInputValue(&pvalue[iv],gauss,index);
    997                 }
    998                 delete gauss;
    999         }
    1000         else{
    1001                 for (int iv=0;iv<NUMVERTICES;iv++) pvalue[iv]=defaultvalue;
    1002         }
    1003 }
    1004 /*}}}*/
    1005 /*FUNCTION Tria::GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue) {{{*/
    1006 void Tria::GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){
    1007 
    1008         _assert_(pvalue);
    1009 
    1010         Input *input    = inputs->GetInput(enumtype);
    1011         int    numnodes = this->NumberofNodes();
    1012 
    1013         /* Start looping on the number of vertices: */
    1014         if(input){
    1015                 GaussTria* gauss=new GaussTria();
    1016                 for(int iv=0;iv<this->NumberofNodes();iv++){
    1017                         gauss->GaussNode(this->element_type,iv);
    1018                         input->GetInputValue(&pvalue[iv],gauss);
    1019                 }
    1020                 delete gauss;
    1021         }
    1022         else{
    1023                 for(int iv=0;iv<numnodes;iv++) pvalue[iv]=defaultvalue;
    1024         }
    1025 }
    1026 /*}}}*/
    1027 /*FUNCTION Tria::GetInputListOnNodes(IssmDouble* pvalue,int enumtype) {{{*/
    1028 void Tria::GetInputListOnNodes(IssmDouble* pvalue,int enumtype){
    1029 
    1030         _assert_(pvalue);
    1031 
    1032         /*Recover input*/
    1033         Input* input=inputs->GetInput(enumtype);
    1034         if(!input) _error_("Input " << EnumToStringx(enumtype) << " not found in element");
    1035 
    1036         /* Start looping on the number of vertices: */
    1037         GaussTria* gauss=new GaussTria();
    1038         for (int iv=0;iv<this->NumberofNodes();iv++){
    1039                 gauss->GaussNode(this->element_type,iv);
    1040                 input->GetInputValue(&pvalue[iv],gauss);
    1041         }
    1042         delete gauss;
    1043954}
    1044955/*}}}*/
     
    24692380        return isicefront;
    24702381}/*}}}*/
    2471 
    24722382/*FUNCTION Tria::AverageOntoPartition {{{*/
    24732383void  Tria::AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
     
    44294339}
    44304340/*}}}*/
    4431 
    44324341/*FUNCTION Tria::CreateHydrologyWaterVelocityInput {{{*/
    44334342void Tria::CreateHydrologyWaterVelocityInput(void){
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r17296 r17309  
    212212                void           NormalTop(IssmDouble* normal,IssmDouble* xyz_list);
    213213                void           NormalBase(IssmDouble* normal,IssmDouble* xyz_list);
    214                 void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
    215                 void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
    216                 void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue,int index); //TO BE REMOVED
    217                 void           GetInputListOnNodes(IssmDouble* pvalue,int enumtype);
    218                 void           GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
    219214                void           GetInputValue(IssmDouble* pvalue,Node* node,int enumtype);
    220215                void           GetInputValue(bool* pvalue,int enum_type);
  • issm/trunk-jpl/src/c/classes/Inputs/SegInput.cpp

    r16799 r17309  
    118118}
    119119/*}}}*/
     120/*FUNCTION SegInput::Min{{{*/
     121IssmDouble SegInput::Min(void){
     122
     123        const int  numnodes=this->NumberofNodes();
     124        IssmDouble min=values[0];
     125
     126        for(int i=1;i<numnodes;i++){
     127                if(values[i]<min) min=values[i];
     128        }
     129        return min;
     130}
     131/*}}}*/
  • issm/trunk-jpl/src/c/classes/Inputs/SegInput.h

    r17100 r17309  
    6666                IssmDouble Max(void){_error_("not implemented yet");};
    6767                IssmDouble MaxAbs(void){_error_("not implemented yet");};
    68                 IssmDouble Min(void){_error_("not implemented yet");};
     68                IssmDouble Min(void);
    6969                IssmDouble MinAbs(void){_error_("not implemented yet");};
    7070                void Extrude(void){_error_("not supported yet");};
  • issm/trunk-jpl/src/c/classes/gauss/GaussSeg.cpp

    r16892 r17309  
    1212
    1313/*GaussSeg constructors and destructors:*/
     14/*FUNCTION GaussSeg::GaussSeg() {{{*/
     15GaussSeg::GaussSeg(){
     16
     17        numgauss=-1;
     18
     19        weights=NULL;
     20        coords1=NULL;
     21
     22        weight=UNDEF;
     23        coord1=UNDEF;
     24}
     25/*}}}*/
    1426/*FUNCTION GaussSeg::GaussSeg(int order) {{{*/
    1527GaussSeg::GaussSeg(int order){
     
    89101void GaussSeg::GaussVertex(int iv){
    90102
    91         _error_("not supported");
     103        /*in debugging mode: check that the default constructor has been called*/
     104        _assert_(numgauss==-1);
     105
     106        /*update static arrays*/
     107        switch(iv){
     108                case 0: coord1=-1.; break;
     109                case 1: coord1=+1.; break;
     110                default: _error_("vertex index should be in [0 1]");
     111        }
    92112}
    93113/*}}}*/
  • issm/trunk-jpl/src/c/classes/gauss/GaussSeg.h

    r16892 r17309  
    2323
    2424                /*GaussSeg constructors, destructors*/
     25                GaussSeg();
    2526                GaussSeg(int order);
    2627                ~GaussSeg();
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp

    r17278 r17309  
    5555                        for (i=0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matice(i+1,i,iomodel));
    5656                        switch(iomodel->meshtype){
    57                                 case Mesh2DhorizontalEnum:
     57                                case Mesh2DhorizontalEnum: case Mesh2DverticalEnum:
    5858                                        elements->InputDuplicate(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum);
    5959                                        elements->InputDuplicate(DamageDEnum,DamageDbarEnum);
    6060                                        if(dakota_analysis) elements->InputDuplicate(MaterialsRheologyBbarEnum,QmuMaterialsRheologyBEnum);
    6161                                        break;
    62                                 case Mesh3DEnum: case Mesh2DverticalEnum:
     62                                case Mesh3DEnum:
    6363                                        if(dakota_analysis) elements->InputDuplicate(MaterialsRheologyBEnum,QmuMaterialsRheologyBEnum);
    6464                                        break;
Note: See TracChangeset for help on using the changeset viewer.