Changeset 26223


Ignore:
Timestamp:
04/29/21 13:31:33 (4 years ago)
Author:
Mathieu Morlighem
Message:

CHG: trying to fix Eric's commit

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

Legend:

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

    r26047 r26223  
    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
     
    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
  • issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.h

    r26047 r26223  
    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
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r26222 r26223  
    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
  • issm/trunk-jpl/src/c/classes/SealevelGeometry.cpp

    r26222 r26223  
    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                }
     
    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                }
  • issm/trunk-jpl/src/c/classes/SealevelGeometry.h

    r26222 r26223  
    1111#define SLGEOM_ICE 1
    1212#define SLGEOM_WATER 2
    13 #define MAXVERTICES 3
     13#define SLMAXVERTICES 3
    1414
    1515#include "../toolkits/toolkits.h"
     
    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];
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_fct.cpp

    r25554 r26223  
    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");
Note: See TracChangeset for help on using the changeset viewer.