source: issm/oecreview/Archive/16554-17801/ISSM-16912-16913.diff@ 17802

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

Added archives

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

     
    5050                ~Element();
    5151
    5252                /*Functions*/
    53                 void   AddInput(Input* input_in);
    54                 bool   AllActive(void);
    55                 bool   AnyActive(void);
    56                 void   DeleteMaterials(void);
    57                 void   FindParam(bool* pvalue,int paramenum);
    58                 void   FindParam(int* pvalue,int paramenum);
    59                 void   FindParam(IssmDouble* pvalue,int paramenum);
    60                 void   FindParam(int** pvalues,int* psize,int paramenum);
    61                 Input* GetInput(int inputenum);
     53                void       AddInput(Input* input_in);
     54                bool       AllActive(void);
     55                bool       AnyActive(void);
     56                void       DeleteMaterials(void);
     57                void       FindParam(bool* pvalue,int paramenum);
     58                void       FindParam(int* pvalue,int paramenum);
     59                void       FindParam(IssmDouble* pvalue,int paramenum);
     60                void       FindParam(int** pvalues,int* psize,int paramenum);
     61                Input*     GetInput(int inputenum);
     62                IssmDouble GetMaterialParameter(int enum_in);
     63                bool       IsFloating();
    6264
    6365                /*Virtual functions*/
    6466                virtual void       AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum)=0;
     
    6971                virtual void       SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters)=0;
    7072                virtual void       SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum)=0;
    7173                virtual ElementMatrix* CreateKMatrix(void)=0;
    72                 virtual void   CreateDVector(Vector<IssmDouble>* df)=0;
    7374                virtual ElementVector* CreatePVector(void)=0;
     75                virtual void   CreateDVector(Vector<IssmDouble>* df)=0;
    7476                virtual void   CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0;
    7577                virtual void   ElementSizes(IssmDouble* phx,IssmDouble* phy,IssmDouble* phz)=0;
    7678                virtual void   EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure)=0;
    7779                virtual IssmDouble EnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure)=0;
    7880                virtual IssmDouble EnthalpyDiffusionParameterVolume(int numvertices,IssmDouble* enthalpy,IssmDouble* pressure)=0;
    79 
    8081                virtual int    FiniteElement(void)=0;
    81                 virtual IssmDouble GetMaterialParameter(int enum_in)=0;
    8282                virtual IssmDouble MinEdgeLength(IssmDouble* xyz_list)=0;
    8383                virtual void   NodalFunctions(IssmDouble* basis,Gauss* gauss)=0;
    8484                virtual void   NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss)=0;
     
    121121                virtual void   GetNodesLidList(int* sidlist)=0;
    122122
    123123                virtual int    Sid()=0;
    124                 virtual bool   IsFloating()=0;
    125124                virtual bool   IsNodeOnShelfFromFlags(IssmDouble* flags)=0;
    126125                virtual bool   IsOnBed()=0;
    127126                virtual bool   IsOnSurface()=0;
  • ../trunk-jpl/src/c/classes/Elements/Tria.cpp

     
    11221122        return phi;
    11231123}
    11241124/*}}}*/
    1125 /*FUNCTION Tria::GetMaterialParameter{{{*/
    1126 IssmDouble Tria::GetMaterialParameter(int enum_in){
    1127 
    1128         _assert_(this->matpar);
    1129         switch(enum_in){ // FIXME: change this to material
    1130                 case MaterialsRheologyNEnum:
    1131                         return this->material->GetN();
    1132                 case MaterialsRheologyBEnum:
    1133                         return this->material->GetB();
    1134                 case MaterialsRheologyBbarEnum:
    1135                         return this->material->GetBbar();
    1136                 default:
    1137                         return this->matpar->GetMaterialParameter(enum_in);
    1138         }
    1139 }
    1140 /*}}}*/
    11411125/*FUNCTION Tria::GetVerticesCoordinates(IssmDouble** pxyz_list){{{*/
    11421126void Tria::GetVerticesCoordinates(IssmDouble** pxyz_list){
    11431127
     
    22102194        _error_("Could not find 2 vertices on surface");
    22112195}
    22122196/*}}}*/
    2213 /*FUNCTION Tria::IsFloating {{{*/
    2214 bool   Tria::IsFloating(){
    2215 
    2216         bool shelf;
    2217         int  migration_style;
    2218         parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
    2219 
    2220         if(migration_style==SubelementMigrationEnum || migration_style==SubelementMigration2Enum){ //Floating if all nodes are floating
    2221                 if(this->inputs->Max(MaskGroundediceLevelsetEnum) <= 0.) shelf=true;
    2222                 else shelf=false;
    2223         }
    2224         else if(migration_style==NoneEnum || migration_style==AgressiveMigrationEnum || migration_style==SoftMigrationEnum){ //Floating if all nodes are floating
    2225                 if(this->inputs->Min(MaskGroundediceLevelsetEnum) > 0.) shelf=false;
    2226                 else shelf=true;
    2227         }
    2228         else _error_("migration_style not implemented yet");
    2229 
    2230         return shelf;
    2231 }
    2232 /*}}}*/
    22332197/*FUNCTION Tria::IsNodeOnShelfFromFlags {{{*/
    22342198bool   Tria::IsNodeOnShelfFromFlags(IssmDouble* flags){
    22352199
  • ../trunk-jpl/src/c/classes/Elements/Tria.h

     
    9696                void        EdgeOnBedIndices(int* pindex1,int* pindex);
    9797                int         EdgeOnBedIndex();
    9898                int         EdgeOnSurfaceIndex();
    99                 bool        IsFloating();
    10099                bool        IsNodeOnShelfFromFlags(IssmDouble* flags);
    101100                int         NumberofNodesVelocity(void);
    102101                int         NumberofNodesPressure(void);
     
    255254                void           NormalSection(IssmDouble* normal,IssmDouble* xyz_list);
    256255                void           NormalTop(IssmDouble* normal,IssmDouble* xyz_list);
    257256                void           NormalBase(IssmDouble* normal,IssmDouble* xyz_list);
    258                 IssmDouble     GetMaterialParameter(int enum_in);
    259257                Input*         GetMaterialInput(int inputenum);
    260258                void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
    261259                void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
  • ../trunk-jpl/src/c/classes/Elements/Penta.cpp

     
    989989        *pdoflist=doflist;
    990990}
    991991/*}}}*/
    992 /*FUNCTION Penta::GetMaterialParameter{{{*/
    993 IssmDouble Penta::GetMaterialParameter(int enum_in){
    994 
    995         _assert_(this->matpar);
    996         switch(enum_in){ // FIXME: change this to material
    997                 case MaterialsRheologyNEnum:
    998                         return this->material->GetN();
    999                 case MaterialsRheologyBEnum:
    1000                         return this->material->GetB();
    1001                 default:
    1002                         return this->matpar->GetMaterialParameter(enum_in);
    1003         }
    1004 }
    1005 /*}}}*/
    1006992/*FUNCTION Penta::GetGroundedPart{{{*/
    1007993void Penta::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating){
    1008994        /*Computeportion of the element that is grounded*/
     
    23432329        else return false;
    23442330}
    23452331/*}}}*/
    2346 /*FUNCTION Penta::IsFloating{{{*/
    2347 bool   Penta::IsFloating(){
    2348 
    2349         bool shelf;
    2350         int  migration_style;
    2351         parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
    2352 
    2353         if(migration_style==SubelementMigrationEnum || migration_style==SubelementMigration2Enum){ //Floating if all nodes are floating
    2354                 if(this->inputs->Max(MaskGroundediceLevelsetEnum) <= 0.) shelf=true;
    2355                 else shelf=false;
    2356         }
    2357         else if(migration_style==NoneEnum || migration_style==AgressiveMigrationEnum || migration_style==SoftMigrationEnum){ //Floating if all nodes are floating
    2358                 if(this->inputs->Min(MaskGroundediceLevelsetEnum) > 0.) shelf=false;
    2359                 else shelf=true;
    2360         }
    2361         else _error_("migration_style not implemented yet");
    2362 
    2363         return shelf;
    2364 }
    2365 /*}}}*/
    23662332/*FUNCTION Penta::IsNodeOnShelfFromFlags {{{*/
    23672333bool   Penta::IsNodeOnShelfFromFlags(IssmDouble* flags){
    23682334
  • ../trunk-jpl/src/c/classes/Elements/Penta.h

     
    8787                int    GetNumberOfNodesPressure(void);
    8888                int    GetNumberOfNodesVelocity(void);
    8989                int    GetNumberOfVertices(void);
    90                 IssmDouble GetMaterialParameter(int enum_in);
    9190                void   GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type);
    9291                IssmDouble GetZcoord(Gauss* gauss);
    9392                IssmDouble GetYcoord(Gauss* gauss){_error_("Not implemented");};
     
    240239                bool             IsInput(int name);
    241240                bool             IsOnSurface(void);
    242241                bool             IsOnBed(void);
    243                 bool           IsFloating(void);
    244242                bool           IsNodeOnShelfFromFlags(IssmDouble* flags);
    245243                void           JacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,Gauss* gauss);
    246244                void           JacobianDeterminantLine(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss);
  • ../trunk-jpl/src/c/classes/Elements/Seg.cpp

     
    123123}
    124124/*}}}*/
    125125
    126 /*FUNCTION Seg::GetMaterialParameter{{{*/
    127 IssmDouble Seg::GetMaterialParameter(int enum_in){
    128 
    129         _assert_(this->matpar);
    130         return this->matpar->GetMaterialParameter(enum_in);
    131 }
    132 /*}}}*/
    133126/*FUNCTION Seg::GetSize{{{*/
    134127IssmDouble Seg::GetSize(void){
    135128
  • ../trunk-jpl/src/c/classes/Elements/Seg.h

     
    8585                void        GetDofListPressure(int** pdoflist,int setenum){_error_("not implemented yet");};
    8686                void        GetInputListOnNodes(IssmDouble* pvalue,int enumtype){_error_("not implemented yet");};
    8787                void        GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){_error_("not implemented yet");};
    88                 IssmDouble  GetMaterialParameter(int enum_in);
    8988                int         GetNodeIndex(Node* node){_error_("not implemented yet");};
    9089                void        GetNodesSidList(int* sidlist){_error_("not implemented yet");};
    9190                void        GetNodesLidList(int* lidlist){_error_("not implemented yet");};
     
    10099                void        InputChangeName(int input_enum, int enum_type_old){_error_("not implemented yet");};
    101100                bool        IsOnBed(){_error_("not implemented yet");};
    102101                bool        IsOnSurface(){_error_("not implemented yet");};
    103                 bool        IsFloating(){_error_("not implemented yet");};
    104102                bool        IsNodeOnShelfFromFlags(IssmDouble* flags){_error_("not implemented yet");};
    105103                void        JacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,Gauss* gauss);
    106104                void        JacobianDeterminantLine(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
  • ../trunk-jpl/src/c/classes/Elements/Element.cpp

     
    6767void Element::FindParam(int** pvalues,int* psize,int paramenum){/*{{{*/
    6868        this->parameters->FindParam(pvalues,psize,paramenum);
    6969}/*}}}*/
     70IssmDouble Element::GetMaterialParameter(int enum_in){/*{{{*/
     71
     72        _assert_(this->matpar);
     73        switch(enum_in){ // FIXME: change this to material
     74                case MaterialsRheologyNEnum:
     75                        return this->material->GetN();
     76                case MaterialsRheologyBEnum:
     77                        return this->material->GetB();
     78                case MaterialsRheologyBbarEnum:
     79                        return this->material->GetBbar();
     80                default:
     81                        return this->matpar->GetMaterialParameter(enum_in);
     82        }
     83}
     84/*}}}*/
    7085Input* Element::GetInput(int inputenum){/*{{{*/
    7186        return inputs->GetInput(inputenum);
    7287}/*}}}*/
     88bool Element::IsFloating(){/*{{{*/
     89
     90        bool shelf;
     91        int  migration_style;
     92        parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
     93
     94        if(migration_style==SubelementMigrationEnum || migration_style==SubelementMigration2Enum){ //Floating if all nodes are floating
     95                if(this->inputs->Max(MaskGroundediceLevelsetEnum) <= 0.) shelf=true;
     96                else shelf=false;
     97        }
     98        else if(migration_style==NoneEnum || migration_style==AgressiveMigrationEnum || migration_style==SoftMigrationEnum){ //Floating if all nodes are floating
     99                if(this->inputs->Min(MaskGroundediceLevelsetEnum) > 0.) shelf=false;
     100                else shelf=true;
     101        }
     102        else _error_("migration_style not implemented yet");
     103
     104        return shelf;
     105}/*}}}*/
Note: See TracBrowser for help on using the repository browser.