source: issm/oecreview/Archive/25834-26739/ISSM-26222-26223.diff@ 28275

Last change on this file since 28275 was 26740, checked in by Mathieu Morlighem, 3 years ago

CHG: added 25834-26739

File size: 4.8 KB
  • ../trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp

     
    808808        delete gauss;
    809809        return Me;
    810810}/*}}}*/
     811ElementVector* DamageEvolutionAnalysis::CreateFctPVector(Element* element){/*{{{*/
     812
     813        return this->CreatePVector(element);
     814
     815}/*}}}*/
    811816void           DamageEvolutionAnalysis::FctKMatrix(Matrix<IssmDouble>** pKff,Matrix<IssmDouble>** pKfs,FemModel* femmodel){/*{{{*/
    812817
    813818        /*Output*/
     
    836841                delete Kfs;
    837842        }
    838843}/*}}}*/
     844void           DamageEvolutionAnalysis::FctPVector(Vector<IssmDouble>** ppf,FemModel* femmodel){/*{{{*/
     845
     846        /*Output*/
     847        Vector<IssmDouble>* pf = NULL;
     848
     849        /*Initialize P vector*/
     850        AllocateSystemMatricesx(NULL,NULL,NULL,&pf,femmodel);
     851
     852        /*Create and assemble matrix*/
     853        for(Object* & object : femmodel->elements->objects){
     854                Element*       element = xDynamicCast<Element*>(object);
     855                ElementVector* pe      = this->CreateFctPVector(element);
     856                if(pe) pe->AddToGlobal(pf);
     857                delete pe;
     858        }
     859        pf->Assemble();
     860
     861        /*Assign output pointer*/
     862        *ppf=pf;
     863}/*}}}*/
    839864void           DamageEvolutionAnalysis::MassMatrix(Matrix<IssmDouble>** pMff,FemModel* femmodel){/*{{{*/
    840865
    841866        /*Initialize Mass matrix*/
  • ../trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.h

     
    3838                /*FCT*/
    3939                ElementMatrix* CreateFctKMatrix(Element* element);
    4040                ElementMatrix* CreateMassMatrix(Element* element);
     41                ElementVector* CreateFctPVector(Element* element);
    4142                void           FctKMatrix(Matrix<IssmDouble>** pKff,Matrix<IssmDouble>** pKfs,FemModel* femmodel);
    4243                void           MassMatrix(Matrix<IssmDouble>** pMff,FemModel* femmodel);
     44                void                            FctPVector(Vector<IssmDouble>** ppf,FemModel* femmodel);
    4345};
    4446#endif
  • ../trunk-jpl/src/c/solutionsequences/solutionsequence_fct.cpp

     
    417417                        danalysis = new DamageEvolutionAnalysis();
    418418                        danalysis->MassMatrix(&Mc,femmodel);
    419419                        danalysis->FctKMatrix(&K,NULL,femmodel);
     420                        danalysis->FctPVector(&p,femmodel);
    420421                        break;
    421422                default: _error_("analysis type " << EnumToStringx(analysis_type) << " not supported for FCT\n");
    422423        }
  • ../trunk-jpl/src/c/classes/Elements/Tria.cpp

     
    18151815                total_weight+=gauss->weight;
    18161816        }
    18171817        //normalize to phi.
    1818         if(total_weight)for(int i=0;i<NUMVERTICES;i++)weights[i]/=total_weight/phi;
     1818        if(total_weight>0.) for(int i=0;i<NUMVERTICES;i++)weights[i]/=total_weight/phi;
    18191819        else for(int i=0;i<NUMVERTICES;i++)weights[i]=0;
    18201820
    18211821        /*free ressources:*/
  • ../trunk-jpl/src/c/classes/SealevelGeometry.cpp

     
    1919SealevelGeometry::SealevelGeometry(int localnelin){ /*{{{*/
    2020        localnel=localnelin;
    2121        for(int i=0;i<SLGEOM_NUMLOADS;i++){
    22                 for (int j=0;j<MAXVERTICES;j++){
     22                for (int j=0;j<SLMAXVERTICES;j++){
    2323                        LoadWeigths[i][j]=xNewZeroInit<IssmDouble>(localnel);
    2424                }
    2525                vlatbarycentre[i]=NULL; //we don't know yet
     
    4242}; /*}}}*/
    4343SealevelGeometry::~SealevelGeometry(){ /*{{{*/
    4444        for(int i=0;i<SLGEOM_NUMLOADS;i++){
    45                 for (int j=0;j<MAXVERTICES;j++){
     45                for (int j=0;j<SLMAXVERTICES;j++){
    4646                        xDelete<IssmDouble>(LoadWeigths[i][j]);
    4747                }
    4848                xDelete<IssmDouble>(LoadArea[i]);
  • ../trunk-jpl/src/c/classes/SealevelGeometry.h

     
    1010#define SLGEOM_OCEAN 0
    1111#define SLGEOM_ICE 1
    1212#define SLGEOM_WATER 2
    13 #define MAXVERTICES 3
     13#define SLMAXVERTICES 3
    1414
    1515#include "../toolkits/toolkits.h"
    1616
     
    1919        public:
    2020
    2121                int         localnel;
    22                 IssmDouble* LoadWeigths[SLGEOM_NUMLOADS][MAXVERTICES];
     22                IssmDouble* LoadWeigths[SLGEOM_NUMLOADS][SLMAXVERTICES];
    2323                IssmDouble* LoadArea[SLGEOM_NUMLOADS];
    2424                Vector<IssmDouble>* vlatbarycentre[SLGEOM_NUMLOADS];
    2525                Vector<IssmDouble>* vlongbarycentre[SLGEOM_NUMLOADS];
Note: See TracBrowser for help on using the repository browser.