Changeset 21897


Ignore:
Timestamp:
07/30/17 20:08:21 (8 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added Max function for Seg

Location:
issm/trunk-jpl/src/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Makefile.am

    r21860 r21897  
    501501
    502502#Wrapper sources
    503 #Bamg sources  {{{
    504 
    505 #}}}
    506503#Kml sources  {{{
    507504kml_sources = ./modules/Exp2Kmlx/Exp2Kmlx.cpp\
  • issm/trunk-jpl/src/c/classes/Inputs/SegInput.cpp

    r20827 r21897  
    114114}
    115115/*}}}*/
     116IssmDouble SegInput::Max(void){/*{{{*/
     117
     118        const int  numnodes=this->NumberofNodes(this->interpolation_type);
     119        IssmDouble max=values[0];
     120
     121        for(int i=1;i<numnodes;i++){
     122                if(values[i]>max) max=values[i];
     123        }
     124        return max;
     125}
     126/*}}}*/
    116127IssmDouble SegInput::Min(void){/*{{{*/
    117128
  • issm/trunk-jpl/src/c/classes/Inputs/SegInput.h

    r21872 r21897  
    6868                int  GetInputInterpolationType(){_error_("not implemented yet!");};
    6969                IssmDouble InfinityNorm(void){_error_("not implemented yet");};
    70                 IssmDouble Max(void){_error_("not implemented yet");};
     70                IssmDouble Max(void);
    7171                IssmDouble MaxAbs(void){_error_("not implemented yet");};
    7272                IssmDouble Min(void);
Note: See TracChangeset for help on using the changeset viewer.