Changeset 27474


Ignore:
Timestamp:
12/21/22 13:03:32 (2 years ago)
Author:
Mathieu Morlighem
Message:

CHG: fixing destructor crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Loads/Friction.cpp

    r27470 r27474  
    1919Friction::Friction(){/*{{{*/
    2020        this->element=NULL;
    21         this->law=0;
    22         this->linearize=false;
    23         this->apply_dim = 1.;
    24         this->domaintype=-1;
     21        this->law        = 0;
     22        this->linearize  = 0;
     23        this->apply_dim  = 1.;
     24        this->domaintype = -1;
    2525        this->vx_input=NULL;
    2626        this->vy_input=NULL;
     
    3333        /* Determine the dimension according to the domain type automatically.
    3434         * There are exceptions, e.g. HO, which needs the user to specify the dimension used in Friciton.*/
     35
    3536        this->element=element_in;
     37        this->linearize  = 0;
    3638
    3739        /* Load necessary parameters */
     
    6567                element_in->FindParam(&this->linearize,FrictionLinearizeEnum);
    6668                if(this->linearize){
    67                         this->linearize = false; /*Change to make sure we do the calculation once*/
     69                        this->linearize = 0; /*Change to make sure we do the calculation once*/
    6870                        int numvertices = this->element->GetNumberOfVertices();
    6971                        this->alpha2_list            = xNew<IssmDouble>(numvertices);
     
    7779                                this->GetAlphaComplement(&this->alpha2_complement_list[iv], gauss);
    7880                        }
    79                         this->linearize = true ; /*Change back, we are now all set!*/
     81                        this->linearize = 1; /*Change back, we are now all set!*/
    8082                }
    8183        }
     
    9294Friction::~Friction(){/*{{{*/
    9395        if(this->linearize){
     96                printf("linearize = %i\n",this->linearize);
    9497                xDelete<IssmDouble>(this->alpha2_list);
    9598                xDelete<IssmDouble>(this->alpha2_complement_list);
Note: See TracChangeset for help on using the changeset viewer.