Changeset 14846


Ignore:
Timestamp:
05/02/13 08:04:05 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: cosmetics

Location:
issm/trunk-jpl/src/c/classes
Files:
2 edited

Legend:

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

    r13761 r14846  
    3737/*FUNCTION DofIndexing::DofIndexing(int gsize){{{*/
    3838DofIndexing::DofIndexing(int in_gsize){
     39
    3940        this->Init(in_gsize,NULL);
     41
    4042}
    4143/*}}}*/
     
    9395void DofIndexing::Init(int in_gsize,int* in_doftype){
    9496
    95         this->gsize=in_gsize;
    96         this->clone=false;
    97 
    98         /*allocate: */
     97        this->gsize = in_gsize;
     98
     99        /*At this point, assume this is not a clone (will be dealt with later)*/
     100        this->clone = false;
     101
     102        /*memory allocation */
    99103        if(this->gsize>0){
    100                 this->f_set=xNew<bool>(this->gsize);
    101                 this->s_set=xNew<bool>(this->gsize);
    102                 this->svalues=xNew<IssmDouble>(this->gsize);
    103                 if(in_doftype)this->doftype=xNew<int>(this->gsize);
    104                 this->gdoflist=xNew<int>(this->gsize);
    105         }
    106 
     104                this->f_set    = xNew<bool>(this->gsize);
     105                this->s_set    = xNew<bool>(this->gsize);
     106                this->svalues  = xNew<IssmDouble>(this->gsize);
     107                this->gdoflist = xNew<int>(this->gsize);
     108
     109                if(in_doftype)
     110                 this->doftype = xNew<int>(this->gsize);
     111        }
     112
     113        /*Assign values assuming no Dirichlet at this point*/
    107114        for(int i=0;i<this->gsize;i++){
    108                 /*assume dof is free, no constraints, no rigid body constraint: */
    109                 this->f_set[i]=true;
    110                 this->s_set[i]=false;
    111                 if(this->doftype)this->doftype[i]=in_doftype[i];
    112                 this->svalues[i]=0; //0 constraint is the default value
    113                 this->gdoflist[i]=UNDEF;
     115                this->f_set[i]    = true;
     116                this->s_set[i]    = false;
     117                this->svalues[i]  = 0.;      //0 constraint is the default value
     118                this->gdoflist[i] = UNDEF;
     119
     120                if(this->doftype)
     121                 this->doftype[i]=in_doftype[i];
    114122        }
    115123}
     
    128136                this->fsize=size;
    129137                xDelete<int>(this->fdoflist);
    130                 if(this->fsize)this->fdoflist=xNew<int>(size);
    131                 else this->fdoflist=NULL;
     138
     139                if(this->fsize)
     140                 this->fdoflist=xNew<int>(size);
     141                else
     142                 this->fdoflist=NULL;
    132143        }
    133144        else if(setenum==SsetEnum){
     
    136147                this->ssize=size;
    137148                xDelete<int>(this->sdoflist);
    138                 if(this->ssize)this->sdoflist=xNew<int>(size);
    139                 else this->sdoflist=NULL;
     149
     150                if(this->ssize)
     151                 this->sdoflist=xNew<int>(size);
     152                else
     153                 this->sdoflist=NULL;
    140154        }
    141155        else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
  • issm/trunk-jpl/src/c/classes/objects/Node.cpp

    r14763 r14846  
    4040
    4141        /*id: */
    42         this->id=node_id;
    43         this->sid=node_sid;
    44         this->analysis_type=analysis_type;
     42        this->id            = node_id;
     43        this->sid           = node_sid;
     44        this->analysis_type = analysis_type;
    4545
    4646        /*Initialize coord_system: Identity matrix by default*/
Note: See TracChangeset for help on using the changeset viewer.