Changeset 26533


Ignore:
Timestamp:
11/04/21 08:28:38 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: prevent CoDiPack from complaining about power of a negative number

File:
1 edited

Legend:

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

    r24933 r26533  
    236236        IssmDouble y2 = xyz_list[3*1+1];
    237237
    238         *Jdet = .5*sqrt(pow(x2-x1,2) + pow(y2-y1,2));
     238        *Jdet = .5*sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
    239239        if(*Jdet<0) _error_("negative jacobian determinant!");
    240240
Note: See TracChangeset for help on using the changeset viewer.