Changeset 18653


Ignore:
Timestamp:
10/16/14 14:37:19 (10 years ago)
Author:
Mathieu Morlighem
Message:

CHG: check for penalty only once for small speed up

File:
1 edited

Legend:

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

    r18521 r18653  
    3131        Analysis* analysis = EnumToAnalysis(analysisenum);
    3232
     33        /*Check if there are penalties*/
     34        bool ispenalty = femmodel->loads->IsPenalty(configuration_type);
     35
    3336        /*First, we might need to do a dry run to get kmax if penalties are employed*/
    34         if(femmodel->loads->IsPenalty(configuration_type)){
     37        if(ispenalty){
    3538
    3639                /*Allocate Kff_temp*/
     
    9396
    9497        /*Now deal with penalties (only in loads)*/
    95         if(femmodel->loads->IsPenalty(configuration_type)){
     98        if(ispenalty){
    9699                for (i=0;i<femmodel->loads->Size();i++){
    97100                        load=xDynamicCast<Load*>(femmodel->loads->GetObjectByOffset(i));
Note: See TracChangeset for help on using the changeset viewer.