Commit b3fff80a authored by whitlocb's avatar whitlocb

I merged the RC to the trunk.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7451 18c085ea-50e0-402c-830e-de6fd14e8384
parent 5c26d860
......@@ -244,6 +244,9 @@
# Kathleen Bonnell, Mon Apr 27 17:00:55 PDT 2009
# Added avtCoshExpression, avtSinhExpression, avtTanhExpression.
#
# Brad Whitlock, Tue Jun 2 10:14:37 PDT 2009
# I split up avtExprNode into several files to speed compilation on xlC.
#
##############################################################################
@SET_MAKE@
......@@ -370,6 +373,15 @@ Management_src= \
Management/avtConstantCreatorExpression.C \
Management/avtExprNode.C \
Management/avtExprNodeFactory.C \
Management/avtFunctionExpr_CreateCMFEFilters.C \
Management/avtFunctionExpr_CreateConditionalFilters.C \
Management/avtFunctionExpr_CreateImageProcessingFilters.C \
Management/avtFunctionExpr_CreateMaterialFilters.C \
Management/avtFunctionExpr_CreateMathFilters.C \
Management/avtFunctionExpr_CreateMeshFilters.C \
Management/avtFunctionExpr_CreateMeshQualityFilters.C \
Management/avtFunctionExpr_CreateTimeAndValueFilters.C \
Management/avtFunctionExpr_CreateVectorMatrixFilters.C \
Management/ExprPipelineState.C \
Management/avtTimeExpression.C
......
This diff is collapsed.
......@@ -147,6 +147,16 @@ class EXPRESSION_API avtFunctionExpr : public avtExprNode, public FunctionExpr
virtual void CreateFilters(ExprPipelineState *);
private:
avtExpressionFilter *CreateFilters(std::string);
avtExpressionFilter *CreateMeshQualityFilters(const std::string &) const;
avtExpressionFilter *CreateMeshFilters(const std::string &) const;
avtExpressionFilter *CreateImageProcessingFilters(const std::string &) const;
avtExpressionFilter *CreateMaterialFilters(const std::string &) const;
avtExpressionFilter *CreateCMFEFilters(const std::string &) const;
avtExpressionFilter *CreateConditionalFilters(const std::string &) const;
avtExpressionFilter *CreateMathFilters(const std::string &) const;
avtExpressionFilter *CreateVectorMatrixFilters(const std::string &) const;
avtExpressionFilter *CreateTimeAndValueFilters(const std::string &) const;
};
class EXPRESSION_API avtVarExpr : public avtExprNode, public VarExpr
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#include <avtExprNode.h>
#include <avtConnCMFEExpression.h>
#include <avtCurveCMFEExpression.h>
#include <avtEvalPlaneExpression.h>
#include <avtEvalPointExpression.h>
#include <avtEvalTransformExpression.h>
#include <avtPosCMFEExpression.h>
#include <avtSymmPlaneExpression.h>
#include <avtSymmPointExpression.h>
#include <avtSymmTransformExpression.h>
// ****************************************************************************
// Method: avtFunctionExpr::CreateCMFEFilters
//
// Purpose:
// Creates CMFE expression filters.
//
// Arguments:
// functionName : The name of the expression filter to create.
//
// Returns: An expression filter or 0 if one could not be created.
//
// Note:
//
// Programmer:
// Creation: Thu May 21 08:55:58 PDT 2009
//
// Modifications:
//
// ****************************************************************************
avtExpressionFilter *
avtFunctionExpr::CreateCMFEFilters(const string &functionName) const
{
avtExpressionFilter *f = 0;
if (functionName == "conn_cmfe")
f = new avtConnCMFEExpression;
else if (functionName == "curve_cmfe")
f = new avtCurveCMFEExpression;
else if (functionName == "pos_cmfe")
f = new avtPosCMFEExpression;
else if (functionName == "eval_transform")
f = new avtEvalTransformExpression;
else if (functionName == "symm_transform")
f = new avtSymmTransformExpression;
else if (functionName == "eval_plane")
f = new avtEvalPlaneExpression;
else if (functionName == "symm_plane")
f = new avtSymmPlaneExpression;
else if (functionName == "eval_point")
f = new avtEvalPointExpression;
else if (functionName == "symm_point")
f = new avtSymmPointExpression;
return f;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#include <avtExprNode.h>
#include <avtConditionalExpression.h>
#include <avtLogicalAndExpression.h>
#include <avtLogicalNegationExpression.h>
#include <avtLogicalOrExpression.h>
#include <avtTestEqualToExpression.h>
#include <avtTestGreaterThanExpression.h>
#include <avtTestGreaterThanOrEqualToExpression.h>
#include <avtTestLessThanExpression.h>
#include <avtTestLessThanOrEqualToExpression.h>
#include <avtTestNotEqualToExpression.h>
// ****************************************************************************
// Method: avtFunctionExpr::CreateConditionalFilters
//
// Purpose:
// Creates conditional and logic expression filters.
//
// Arguments:
// functionName : The name of the expression filter to create.
//
// Returns: An expression filter or 0 if one could not be created.
//
// Note:
//
// Programmer:
// Creation: Thu May 21 08:55:58 PDT 2009
//
// Modifications:
//
// ****************************************************************************
avtExpressionFilter *
avtFunctionExpr::CreateConditionalFilters(const string &functionName) const
{
avtExpressionFilter *f = 0;
if (functionName == "if")
f = new avtConditionalExpression();
else if (functionName == "and")
f = new avtLogicalAndExpression();
else if (functionName == "or")
f = new avtLogicalOrExpression();
else if (functionName == "not")
f = new avtLogicalNegationExpression();
else if (functionName == "le" || functionName == "lte")
f = new avtTestLessThanOrEqualToExpression();
else if (functionName == "ge" || functionName == "gte")
f = new avtTestGreaterThanOrEqualToExpression();
else if (functionName == "lt")
f = new avtTestLessThanExpression();
else if (functionName == "gt")
f = new avtTestGreaterThanExpression();
else if (functionName == "eq" || functionName == "equal" ||
functionName == "equals")
f = new avtTestEqualToExpression();
else if (functionName == "ne" || functionName == "neq" ||
functionName == "notequal" || functionName == "notequals")
f = new avtTestNotEqualToExpression();
return f;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#include <avtExprNode.h>
#include <avtAbelInversionExpression.h>
#include <avtConservativeSmoothingExpression.h>
#include <avtMeanFilterExpression.h>
#include <avtMedianFilterExpression.h>
// ****************************************************************************
// Method: avtFunctionExpr::CreateImageProcessingFilters
//
// Purpose:
// Creates image processing filters.
//
// Arguments:
// functionName : The name of the expression filter to create.
//
// Returns: An expression filter or 0 if one could not be created.
//
// Note:
//
// Programmer:
// Creation: Thu May 21 08:55:58 PDT 2009
//
// Modifications:
//
// ****************************************************************************
avtExpressionFilter *
avtFunctionExpr::CreateImageProcessingFilters(const string &functionName) const
{
avtExpressionFilter *f = 0;
if (functionName == "conservative_smoothing")
f = new avtConservativeSmoothingExpression;
else if (functionName == "mean_filter")
f = new avtMeanFilterExpression;
else if (functionName == "median_filter")
f = new avtMedianFilterExpression;
else if (functionName == "abel_inversion")
f = new avtAbelInversionExpression;
return f;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#include <avtExprNode.h>
#include <avtMIRvfExpression.h>
#include <avtMatErrorExpression.h>
#include <avtMatvfExpression.h>
#include <avtNMatsExpression.h>
#include <avtPerMaterialValueExpression.h>
#include <avtSpecMFExpression.h>
// ****************************************************************************
// Method: avtFunctionExpr::CreateMaterialFilters
//
// Purpose:
// Creates material filters.
//
// Arguments:
// functionName : The name of the expression filter to create.
//
// Returns: An expression filter or 0 if one could not be created.
//
// Note:
//
// Programmer:
// Creation: Thu May 21 08:55:58 PDT 2009
//
// Modifications:
//
// ****************************************************************************
avtExpressionFilter *
avtFunctionExpr::CreateMaterialFilters(const string &functionName) const
{
avtExpressionFilter *f = 0;
if (functionName == "matvf")
f = new avtMatvfExpression();
else if (functionName == "mirvf")
f = new avtMIRvfExpression();
else if (functionName == "materror")
f = new avtMatErrorExpression();
else if (functionName == "value_for_material")
f = new avtPerMaterialValueExpression();
else if (functionName == "val4mat")
f = new avtPerMaterialValueExpression();
else if (functionName == "specmf")
f = new avtSpecMFExpression();
else if (functionName == "nmats")
f = new avtNMatsExpression();
return f;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#include <avtExprNode.h>
#include <avtAbsValExpression.h>
#include <avtArccosExpression.h>
#include <avtArcsinExpression.h>
#include <avtArctan2Expression.h>
#include <avtArctanExpression.h>
#include <avtBase10LogExpression.h>
#include <avtCeilingExpression.h>
#include <avtCosExpression.h>
#include <avtCoshExpression.h>
#include <avtDegreeToRadianExpression.h>
#include <avtExpExpression.h>
#include <avtFloorExpression.h>
#include <avtModuloExpression.h>
#include <avtNaturalLogExpression.h>
#include <avtRadianToDegreeExpression.h>
#include <avtRandomExpression.h>
#include <avtRoundExpression.h>
#include <avtSinExpression.h>
#include <avtSinhExpression.h>
#include <avtSquareExpression.h>
#include <avtSquareRootExpression.h>
#include <avtTanExpression.h>
#include <avtTanhExpression.h>
// ****************************************************************************
// Method: avtFunctionExpr::CreateMathFilters
//
// Purpose:
// Creates math filters.
//
// Arguments:
// functionName : The name of the expression filter to create.
//
// Returns: An expression filter or 0 if one could not be created.
//
// Note:
//
// Programmer:
// Creation: Thu May 21 08:55:58 PDT 2009
//
// Modifications:
//
// ****************************************************************************
avtExpressionFilter *
avtFunctionExpr::CreateMathFilters(const string &functionName) const
{
avtExpressionFilter *f = 0;
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 == "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 == "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 == "ceil")
f = new avtCeilingExpression();
else if (functionName == "floor")
f = new avtFloorExpression();
else if (functionName == "round")
f = new avtRoundExpression();
else if ((functionName == "random") || (functionName == "rand"))
f = new avtRandomExpression();
return f;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#include <avtExprNode.h>
#include <avtCylindricalRadiusExpression.h>
#include <avtDataIdExpression.h>
#include <avtExpressionComponentMacro.h>
#include <avtNeighborEvaluatorExpression.h>
#include <avtSurfaceNormalExpression.h>
#include <avtZoneTypeExpression.h>
// ****************************************************************************
// Method: avtFunctionExpr::CreateMeshFilters
//
// Purpose:
// Creates mesh-related filters.
//
// Arguments:
// functionName : The name of the expression filter to create.
//
// Returns: An expression filter or 0 if one could not be created.
//
// Note:
//
// Programmer:
// Creation: Thu May 21 08:55:58 PDT 2009
//
// Modifications:
//
// ****************************************************************************
avtExpressionFilter *
avtFunctionExpr::CreateMeshFilters(const string &functionName) const
{
if (functionName == "surface_normal" ||
functionName == "point_surface_normal")
{
avtSurfaceNormalExpression *ff = new avtSurfaceNormalExpression;
ff->DoPointNormals(true);
return ff;
}
else if (functionName == "cell_surface_normal")
{
avtSurfaceNormalExpression *ff = new avtSurfaceNormalExpression;
ff->DoPointNormals(false);
return ff;
}
else if (functionName == "zoneid")
{
avtDataIdExpression *ff = new avtDataIdExpression;
ff->CreateZoneIds();
ff->CreateLocalNumbering();
return ff;
}
else if (functionName == "global_zoneid")
{
avtDataIdExpression *ff = new avtDataIdExpression;
ff->CreateZoneIds();
ff->CreateGlobalNumbering();
return ff;
}
else if (functionName == "nodeid")
{
avtDataIdExpression *ff = new avtDataIdExpression;
ff->CreateNodeIds();
ff->CreateLocalNumbering();
return ff;
}
else if (functionName == "global_nodeid")
{
avtDataIdExpression *ff = new avtDataIdExpression;
ff->CreateNodeIds();
ff->CreateGlobalNumbering();
return ff;
}
else if (functionName == "biggest_neighbor")
{
avtNeighborEvaluatorExpression *ff = new avtNeighborEvaluatorExpression;
ff->SetEvaluationType(avtNeighborEvaluatorExpression::BIGGEST_NEIGHBOR);
return ff;
}
else if (functionName == "smallest_neighbor")