Skip to content

Commit

Permalink
Backout some expression changes that are causing some test suite fail…
Browse files Browse the repository at this point in the history
…ures. (#3914) (#3915)
  • Loading branch information
brugger1 authored Sep 17, 2019
1 parent 1aab755 commit 98a8907
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 361 deletions.
8 changes: 0 additions & 8 deletions src/avt/Expressions/Abstract/avtExpressionFilter.C
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,13 @@ using namespace std;
// Hank Childs, Thu Aug 26 16:36:30 PDT 2010
// Initialize calculateExtents.
//
// Eddie Rusu, Wed Sep 11 08:59:52 PDT 2019
// Initialize nProcessedArgs.
//
// ****************************************************************************

avtExpressionFilter::avtExpressionFilter()
{
outputVariableName = NULL;
currentTimeState = 0;
calculateExtents = false;
nProcessedArgs = 0;
}


Expand Down Expand Up @@ -137,9 +133,6 @@ avtExpressionFilter::~avtExpressionFilter()
// actually avtExprNodes. This can happen when processing macro
// expressions.
//
// Eddie Rusu, Wed Sep 11 08:59:52 PDT 2019
// Count the number of arguments that this filter processes here.
//
// ****************************************************************************

void
Expand All @@ -163,7 +156,6 @@ avtExpressionFilter::ProcessArguments(ArgsExpr *args, ExprPipelineState *state)
continue;
}
expr_node->CreateFilters(state);
nProcessedArgs++;
}
}

Expand Down
5 changes: 0 additions & 5 deletions src/avt/Expressions/Abstract/avtExpressionFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ class ExprNode;
// Kathleen Biagas, Thu Apr 5 10:07:43 PDT 2012
// Added CreateArrayFromMesh.
//
// Eddie Rusu, Wed Sep 11 08:59:52 PDT 2019
// Added nProcessedArgs to keep track of the number of arguments that this
// filter processes in ProcessArguments().
//
// ****************************************************************************

class EXPRESSION_API avtExpressionFilter : virtual public
Expand Down Expand Up @@ -159,7 +155,6 @@ class EXPRESSION_API avtExpressionFilter : virtual public
protected:
char *outputVariableName;
int currentTimeState;
int nProcessedArgs;
bool calculateExtents;

virtual bool IsPointVariable();
Expand Down
75 changes: 32 additions & 43 deletions src/avt/Expressions/Management/avtFunctionExpr_CreateMathFilters.C
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include <avtCosExpression.h>
#include <avtCoshExpression.h>
#include <avtDegreeToRadianExpression.h>
#include <avtBinaryDivideExpression.h>
#include <avtExpExpression.h>
#include <avtFloorExpression.h>
#include <avtModuloExpression.h>
Expand All @@ -63,8 +62,6 @@
#include <avtTanExpression.h>
#include <avtTanhExpression.h>

#include <DebugStream.h>

#include <string>

// ****************************************************************************
Expand All @@ -89,69 +86,61 @@
// Add log10withmin. This is possible with if, gt, and log, but more
// efficiently implemented in a single filter.
//
// Eddie Rusu, Wed Sep 11 08:59:52 PDT 2019
// Alphabetically ordered by functionName for easier reading.
// Added "divide" filter.
//
// ****************************************************************************

avtExpressionFilter *
avtFunctionExpr::CreateMathFilters(const std::string &functionName) const
{
debug5 << "Entering avtFunctionExpr::CreateMathFilters(const string&)" << std::endl;
avtExpressionFilter *f = 0;

if (functionName == "abs")
f = new avtAbsValExpression();
else if (functionName == "acos")
f = new avtArccosExpression();
else if (functionName == "asin")
f = new avtArcsinExpression();
else if (functionName == "atan")
f = new avtArctanExpression();
else if (functionName == "atan2")
f = new avtArctan2Expression();
else if (functionName == "ceil")
f = new avtCeilingExpression();
if (functionName == "sin")
f = new avtSinExpression();
else if (functionName == "sinh")
f = new avtSinhExpression();
else if (functionName == "cos")
f = new avtCosExpression();
else if (functionName == "cosh")
f = new avtCoshExpression();
else if (functionName == "tan")
f = new avtTanExpression();
else if (functionName == "tanh")
f = new avtTanhExpression();
else if (functionName == "atan")
f = new avtArctanExpression();
else if (functionName == "atan2")
f = new avtArctan2Expression();
else if (functionName == "asin")
f = new avtArcsinExpression();
else if (functionName == "acos")
f = new avtArccosExpression();
else if (functionName == "deg2rad")
f = new avtDegreeToRadianExpression();
else if (functionName == "divide")
f = new avtBinaryDivideExpression(true);
else if (functionName == "exp")
f = new avtExpExpression();
else if (functionName == "floor")
f = new avtFloorExpression();
else if (functionName == "rad2deg")
f = new avtRadianToDegreeExpression();
else if (functionName == "abs")
f = new avtAbsValExpression();
else if (functionName == "ln")
f = new avtNaturalLogExpression();
else if (functionName == "exp")
f = new avtExpExpression();
else if ((functionName == "log") || (functionName == "log10"))
f = new avtBase10LogExpression();
else if (functionName == "log10withmin")
f = new avtBase10LogWithMinExpression();
else if (functionName == "sqrt")
f = new avtSquareRootExpression();
else if ((functionName == "sq") || (functionName == "sqr"))
f = new avtSquareExpression();
else if (functionName == "mod" || functionName == "modulo")
f = new avtModuloExpression();
else if (functionName == "rad2deg")
f = new avtRadianToDegreeExpression();
else if ((functionName == "random") || (functionName == "rand"))
f = new avtRandomExpression();
else if (functionName == "ceil")
f = new avtCeilingExpression();
else if (functionName == "floor")
f = new avtFloorExpression();
else if (functionName == "round")
f = new avtRoundExpression();
else if (functionName == "sin")
f = new avtSinExpression();
else if (functionName == "sinh")
f = new avtSinhExpression();
else if ((functionName == "sq") || (functionName == "sqr"))
f = new avtSquareExpression();
else if (functionName == "sqrt")
f = new avtSquareRootExpression();
else if (functionName == "tan")
f = new avtTanExpression();
else if (functionName == "tanh")
f = new avtTanhExpression();
else if ((functionName == "random") || (functionName == "rand"))
f = new avtRandomExpression();

debug5 << "Exiting avtFunctionExpr::CreateMathFilters(const string&)" << std::endl;
return f;
}
Loading

0 comments on commit 98a8907

Please sign in to comment.