Skip to content

Commit

Permalink
fix typo in subtract word
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Apr 17, 2019
1 parent e8c6ab8 commit f262c88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions mdal/frmts/mdal_xdmf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ size_t MDAL::XdmfFunctionDataset::scalarData( size_t indexStart, size_t count, d
assert( group()->isScalar() ); //checked in C API interface
assert( mType != FunctionType::Join );

if ( mType == FunctionType::Substract )
return substractFunction( indexStart, count, buffer );
if ( mType == FunctionType::Subtract )
return subtractFunction( indexStart, count, buffer );

if ( mType == FunctionType::Flow )
return flowFunction( indexStart, count, buffer );
Expand All @@ -176,7 +176,7 @@ size_t MDAL::XdmfFunctionDataset::activeData( size_t indexStart, size_t count, i
return count;
}

size_t MDAL::XdmfFunctionDataset::substractFunction( size_t indexStart, size_t count, double *buffer )
size_t MDAL::XdmfFunctionDataset::subtractFunction( size_t indexStart, size_t count, double *buffer )
{
std::vector<double> buf( 2 * count, std::numeric_limits<double>::quiet_NaN() );
size_t copyVals = extractRawData( indexStart, count, 2, buf );
Expand Down Expand Up @@ -487,11 +487,11 @@ MDAL::DatasetGroups MDAL::DriverXdmf::parseXdmfXml( )
else if ( function == "$0-$1" )
{
reversed = true;
type = XdmfFunctionDataset::Substract;
type = XdmfFunctionDataset::Subtract;
}
else if ( function == "$1-$0" )
{
type = XdmfFunctionDataset::Substract;
type = XdmfFunctionDataset::Subtract;
}
else if ( ( function == "JOIN($0,$1,0*$1)" ) || ( function == "JOIN($0,$1,0)" ) )
{
Expand Down
6 changes: 3 additions & 3 deletions mdal/frmts/mdal_xdmf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace MDAL
* Currently we do not use any fancy bison/flex based
* expression parsing, just supporting few types of
* most common function types:
* - substraction (A-B)
* - subtraction (A-B)
* - join ( [A, B] vector)
* - magnitude
*
Expand All @@ -105,7 +105,7 @@ namespace MDAL
enum FunctionType
{
Join = 1, //!< vector: [$0, $1] from 2 scalars
Substract, //!< scalar: $1 - $0, e.g. calculate relative depth
Subtract, //!< scalar: $1 - $0, e.g. calculate relative depth
Flow, //!< scalar: flow velocity (abs) = sqrt($0/($2-$3)*$0/($2-$3) + $1/($2-$3)*$1/($2-$3))
};

Expand All @@ -126,7 +126,7 @@ namespace MDAL
size_t activeData( size_t indexStart, size_t count, int *buffer ) override;

private:
size_t substractFunction( size_t indexStart, size_t count, double *buffer );
size_t subtractFunction( size_t indexStart, size_t count, double *buffer );
size_t flowFunction( size_t indexStart, size_t count, double *buffer );
size_t joinFunction( size_t indexStart, size_t count, double *buffer );
size_t extractRawData( size_t indexStart, size_t count, size_t nDatasets, std::vector<double> &buf );
Expand Down

0 comments on commit f262c88

Please sign in to comment.