Changeset 5782


Ignore:
Timestamp:
09/13/10 15:22:01 (15 years ago)
Author:
Eric.Larour
Message:

Fixed bug with kmax that could be undefined. Other bug where pg could be NULL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp

    r5772 r5782  
    4242        fsize=nodes->NumberOfDofs(configuration_type,FsetEnum);
    4343        ssize=nodes->NumberOfDofs(configuration_type,SsetEnum);
     44
    4445        numberofdofspernode=nodes->MaxNumDofs(configuration_type,GsetEnum);
    4546
    4647        /*Checks in debugging mode {{{1*/
    47         ISSMASSERT(*pKgg==NULL);
    48         ISSMASSERT(*ppg==NULL);
    4948        if(penalty_kflag)ISSMASSERT(kflag);
    5049        if(penalty_pflag)ISSMASSERT(pflag);
     
    9089        if(pflag){
    9190
    92                 pg=NewVec(gsize);
     91                if(!buildkff)pg=NewVec(gsize);
     92                else         pf=NewVec(fsize);
    9393
    9494                /*Fill right hand side vector, from elements: */
     
    114114        }
    115115
    116        
     116        /*Now, figure out maximum value of K_gg, so that we can penalize it correctly: */
     117        if(!buildkff)MatNorm(Kgg,NORM_INFINITY,&kmax);
     118        else MatNorm(Kff,NORM_INFINITY,&kmax);
     119
    117120        /*Now, deal with penalties*/
    118121        if(penalty_kflag){
    119 
    120                 /*Now, figure out maximum value of K_gg, so that we can penalize it correctly: */
    121                 if(!buildkff)MatNorm(Kgg,NORM_INFINITY,&kmax);
    122                 else MatNorm(Kff,NORM_INFINITY,&kmax);
    123122
    124123                /*Fill stiffness matrix from loads: */
Note: See TracChangeset for help on using the changeset viewer.