source: issm/oecreview/Archive/16554-17801/ISSM-17000-17001.diff

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

Added archives

File size: 10.7 KB
  • ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.h

     
    6161                void GetBHOFriction(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss);
    6262                void InputUpdateFromSolutionHO(IssmDouble* solution,Element* element);
    6363                /*FS*/
     64                ElementVector* CreateDVectorFS(Element* element);
    6465                ElementMatrix* CreateJacobianMatrixFS(Element* element);
    6566                ElementMatrix* CreateKMatrixFS(Element* element);
    6667                ElementMatrix* CreateKMatrixFSViscous(Element* element);
  • ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp

     
    812812
    813813/*Finite Element Analysis*/
    814814ElementVector* StressbalanceAnalysis::CreateDVector(Element* element){/*{{{*/
    815         /*Default, return NULL*/
     815
     816        int approximation;
     817        element->GetInputValue(&approximation,ApproximationEnum);
     818        switch(approximation){
     819                case FSApproximationEnum:
     820                        return CreateDVectorFS(element);
     821                default:
     822                        return NULL; //no need for doftypes outside of FS approximation
     823        }
    816824        return NULL;
     825
    817826}/*}}}*/
    818827ElementMatrix* StressbalanceAnalysis::CreateJacobianMatrix(Element* element){/*{{{*/
    819828
     
    23802389}/*}}}*/
    23812390
    23822391/*FS*/
     2392ElementVector* StressbalanceAnalysis::CreateDVectorFS(Element* element){/*{{{*/
     2393
     2394        int         meshtype,dim;
     2395
     2396        /*Get problem dimension*/
     2397        element->FindParam(&meshtype,MeshTypeEnum);
     2398        switch(meshtype){
     2399                case Mesh2DverticalEnum: dim = 2; break;
     2400                case Mesh3DEnum:         dim = 3; break;
     2401                default: _error_("mesh "<<EnumToStringx(meshtype)<<" not supported yet");
     2402        }
     2403
     2404        /*Fetch number of nodes and dof for this finite element*/
     2405        int vnumnodes = element->GetNumberOfNodesVelocity();
     2406        int pnumnodes = element->GetNumberOfNodesPressure();
     2407
     2408        /*Initialize output vector*/
     2409        ElementVector* de = element->NewElementVector(FSvelocityEnum);
     2410
     2411        for(int i=0;i<vnumnodes;i++){
     2412                for(int j=0;j<dim;j++) de->values[i*dim+j]=VelocityEnum;
     2413        }
     2414        for(int i=0;i<pnumnodes;i++){
     2415                de->values[vnumnodes*dim+i]=PressureEnum;
     2416        }
     2417
     2418        return de;
     2419
     2420}/*}}}*/
    23832421ElementMatrix* StressbalanceAnalysis::CreateJacobianMatrixFS(Element* element){/*{{{*/
    23842422
    23852423        /*Intermediaries */
  • ../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp

     
    101101        }
    102102
    103103        /*Create dof vector for stiffness matrix preconditioning*/
    104         for (i=0;i<femmodel->elements->Size();i++){
    105                 element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));
    106                 element->CreateDVector(df);
     104        if(pdf){
     105                for(i=0;i<femmodel->elements->Size();i++){
     106                        element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));
     107                        ElementVector* de=analysis->CreateDVector(element);
     108                        if(de) de->InsertIntoGlobal(df);
     109                        delete de;
     110                }
    107111        }
    108112
    109113        /*Assemble matrices and vector*/
  • ../trunk-jpl/src/c/classes/Elements/Element.h

     
    103103                virtual void       Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0;
    104104                virtual void       SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters)=0;
    105105                virtual void       SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum)=0;
    106                 virtual void   CreateDVector(Vector<IssmDouble>* df)=0;
    107106                virtual void   ElementSizes(IssmDouble* phx,IssmDouble* phy,IssmDouble* phz)=0;
    108107                virtual void   EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure)=0;
    109108                virtual IssmDouble EnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure)=0;
  • ../trunk-jpl/src/c/classes/Elements/Tria.cpp

     
    190190        return sqrt(2*this->GetArea());
    191191}
    192192/*}}}*/
    193 /*FUNCTION Tria::CreateDVector {{{*/
    194 void  Tria::CreateDVector(Vector<IssmDouble>* df){
    195 
    196         /*Nothing done yet*/
    197 }
    198 /*}}}*/
    199193/*FUNCTION Tria::ComputeBasalStress {{{*/
    200194void  Tria::ComputeBasalStress(Vector<IssmDouble>* eps){
    201195        _error_("Not Implemented yet");
  • ../trunk-jpl/src/c/classes/Elements/Tria.h

     
    6666                void        Configure(Elements* elements,Loads* loads,Nodes* nodesin,Vertices* verticesin,Materials* materials,Parameters* parameters);
    6767                void        SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters);
    6868                void        SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum);
    69                 void        CreateDVector(Vector<IssmDouble>* df);
    7069                void        Delta18oParameterization(void);
    7170                void        ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){_error_("not implemented yet");};
    7271                void        EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure){_error_("not implemented yet");};
  • ../trunk-jpl/src/c/classes/Elements/Penta.cpp

     
    378378        this->inputs->Configure(parameters);
    379379}
    380380/*}}}*/
    381 /*FUNCTION Penta::CreateDVector {{{*/
    382 void  Penta::CreateDVector(Vector<IssmDouble>* df){
    383 
    384         /*retrieve parameters: */
    385         ElementVector* De=NULL;
    386         int analysis_type;
    387         parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    388 
    389         /*Checks in debugging*/
    390         _assert_(this->nodes && this->material && this->matpar && this->verticalneighbors && this->parameters && this->inputs);
    391 
    392         switch(analysis_type){
    393                 #ifdef _HAVE_STRESSBALANCE_
    394                 case StressbalanceAnalysisEnum:
    395                         De=CreateDVectorStressbalanceHoriz();
    396                         break;
    397                 #endif
    398         }
    399 
    400         /*Add to global Vector*/
    401         if(De){
    402                 De->InsertIntoGlobal(df);
    403                 delete De;
    404         }
    405 }
    406 /*}}}*/
    407381/*FUNCTION Penta::DeepEcho{{{*/
    408382void Penta::DeepEcho(void){
    409383
     
    44754449/*}}}*/
    44764450#endif
    44774451
    4478 #ifdef _HAVE_STRESSBALANCE_
    4479 /*FUNCTION Penta::CreateDVectorStressbalanceHoriz {{{*/
    4480 ElementVector* Penta::CreateDVectorStressbalanceHoriz(void){
    4481 
    4482         int approximation;
    4483         inputs->GetInputValue(&approximation,ApproximationEnum);
    4484 
    4485         switch(approximation){
    4486                 case FSApproximationEnum:
    4487                         return CreateDVectorStressbalanceFS();
    4488                 default:
    4489                         return NULL; //no need for doftypes outside of FS approximation
    4490         }
    4491 }
    4492 /*}}}*/
    4493 /*FUNCTION Penta::CreateDVectorStressbalanceFS{{{*/
    4494 ElementVector* Penta::CreateDVectorStressbalanceFS(void){
    4495 
    4496         /*output: */
    4497         ElementVector* De=NULL;
    4498 
    4499         /*Initialize Element vector and return if necessary*/
    4500         int approximation;
    4501         inputs->GetInputValue(&approximation,ApproximationEnum);
    4502         if(approximation!=FSApproximationEnum) return NULL;
    4503 
    4504         /*Fetch number of nodes and dof for this finite element*/
    4505         int vnumnodes = this->NumberofNodesVelocity();
    4506         int pnumnodes = this->NumberofNodesPressure();
    4507 
    4508         De=new ElementVector(nodes,vnumnodes+pnumnodes,this->parameters,FSvelocityEnum);
    4509 
    4510         for(int i=0;i<vnumnodes;i++){
    4511                 De->values[i*3+0]=VelocityEnum;
    4512                 De->values[i*3+1]=VelocityEnum;
    4513                 De->values[i*3+2]=VelocityEnum;
    4514         }
    4515         for(int i=0;i<pnumnodes;i++){
    4516                 De->values[vnumnodes*3+i]=PressureEnum;
    4517         }
    4518 
    4519         return De;
    4520 }
    4521 /*}}}*/
    4522 #endif
    4523 
    45244452#ifdef _HAVE_HYDROLOGY_
    45254453/*FUNCTION Penta::CreateEPLDomainMassMatrix {{{*/
    45264454ElementMatrix* Penta::CreateEPLDomainMassMatrix(void){
  • ../trunk-jpl/src/c/classes/Elements/Penta.h

     
    7070                int    FiniteElement(void);
    7171                void   SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters);
    7272                void   SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum);
    73                 void   CreateDVector(Vector<IssmDouble>* df);
    7473                void   Delta18oParameterization(void);
    7574                void   EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure);
    7675                Element* GetBasalElement(void);
     
    251250                Tria*            SpawnTria(int location);
    252251                IssmDouble     StabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa);
    253252
    254                 #ifdef _HAVE_STRESSBALANCE_
    255                 ElementVector* CreateDVectorStressbalanceHoriz(void);
    256                 ElementVector* CreateDVectorStressbalanceFS(void);
    257                 #endif
    258 
    259253                #ifdef _HAVE_HYDROLOGY_
    260254                ElementMatrix* CreateEPLDomainMassMatrix(void);
    261255                void           GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode);
  • ../trunk-jpl/src/c/classes/Elements/Seg.h

     
    6868                void        Configure(Elements* elements,Loads* loads,Nodes* nodesin,Vertices* verticesin,Materials* materials,Parameters* parameters){_error_("not implemented yet");};
    6969                void        SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters){_error_("not implemented yet");};
    7070                void        SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){_error_("not implemented yet");};
    71                 void        CreateDVector(Vector<IssmDouble>* df){_error_("not implemented yet");};
    7271                void        Delta18oParameterization(void){_error_("not implemented yet");};
    7372                void        ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){_error_("not implemented yet");};
    7473                void        EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure){_error_("not implemented yet");};
Note: See TracBrowser for help on using the repository browser.