Commit 2b0fcde0 authored by bonnell's avatar bonnell

Add sinh, cosh, tanh expressions. Added new expressions to ultra wrapper....

Add sinh, cosh, tanh expressions. Added new expressions to ultra wrapper. Updated release notes and online-help

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7052 18c085ea-50e0-402c-830e-de6fd14e8384
parent f9b309a2
......@@ -241,6 +241,9 @@
# Cyrus Harrison, Thu Mar 26 16:29:52 PDT 2009
# Added Key Aggregator Expression.
#
# Kathleen Bonnell, Mon Apr 27 17:00:55 PDT 2009
# Added avtCoshExpression, avtSinhExpression, avtTanhExpression.
#
##############################################################################
@SET_MAKE@
......@@ -385,6 +388,7 @@ Math_src= \
Math/avtBinarySubtractExpression.C \
Math/avtCeilingExpression.C \
Math/avtCosExpression.C \
Math/avtCoshExpression.C \
Math/avtCylindricalCoordinatesExpression.C \
Math/avtCylindricalRadiusExpression.C \
Math/avtDegreeToRadianExpression.C \
......@@ -401,9 +405,11 @@ Math_src= \
Math/avtRadianToDegreeExpression.C \
Math/avtRoundExpression.C \
Math/avtSinExpression.C \
Math/avtSinhExpression.C \
Math/avtSquareExpression.C \
Math/avtSquareRootExpression.C \
Math/avtTanExpression.C \
Math/avtTanhExpression.C \
Math/avtTraceExpression.C \
Math/avtUnaryMinusExpression.C \
Math/avtVectorCrossProductExpression.C
......
......@@ -54,7 +54,9 @@
#include <avtModuloExpression.h>
#include <avtRoundExpression.h>
#include <avtSinExpression.h>
#include <avtSinhExpression.h>
#include <avtCosExpression.h>
#include <avtCoshExpression.h>
#include <avtExpExpression.h>
#include <avtDistanceToBestFitLineExpression.h>
#include <avtRandomExpression.h>
......@@ -103,6 +105,7 @@
#include <avtRevolvedSurfaceArea.h>
#include <avtSpecMFExpression.h>
#include <avtTanExpression.h>
#include <avtTanhExpression.h>
#include <avtAbsValExpression.h>
#include <avtNaturalLogExpression.h>
#include <avtBase10LogExpression.h>
......@@ -535,6 +538,9 @@ avtVectorExpr::CreateFilters(ExprPipelineState *state)
// Cyrus Harrison, Thu Mar 26 17:08:32 PDT 2009
// Added "key_aggregate" expression.
//
// Kathleen Bonnell, Mon Apr 27 15:47:49 PDT 2009
// Added sinh, cosh, tanh.
//
// ****************************************************************************
avtExpressionFilter *
......@@ -542,10 +548,16 @@ avtFunctionExpr::CreateFilters(string functionName)
{
if (functionName == "sin")
return new avtSinExpression();
if (functionName == "sinh")
return new avtSinhExpression();
if (functionName == "cos")
return new avtCosExpression();
if (functionName == "cosh")
return new avtCoshExpression();
if (functionName == "tan")
return new avtTanExpression();
if (functionName == "tanh")
return new avtTanhExpression();
if (functionName == "atan")
return new avtArctanExpression();
if (functionName == "atan2")
......
/*****************************************************************************
*
* 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.
*
*****************************************************************************/
// ************************************************************************* //
// avtCoshExpression.C //
// ************************************************************************* //
#include <avtCoshExpression.h>
#include <vtkDataArray.h>
#include <vtkDataSet.h>
// ****************************************************************************
// Method: avtCoshExpression constructor
//
// Purpose:
// Defines the constructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// ****************************************************************************
avtCoshExpression::avtCoshExpression()
{
;
}
// ****************************************************************************
// Method: avtCoshExpression destructor
//
// Purpose:
// Defines the destructor. Note: this should not be inlined in the header
// because it causes problems for certain compilers.
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// ****************************************************************************
avtCoshExpression::~avtCoshExpression()
{
;
}
// ****************************************************************************
// Method: avtCoshExpression::DoOperation
//
// Purpose:
// Performs the hyperbolic cosine to each component, tuple of a data array.
//
// Arguments:
// in The input data array.
// out The output data array.
// ncomponents The number of components ('1' for scalar, '2' or '3' for
// vectors, etc.)
// ntuples The number of tuples (ie 'npoints' or 'ncells')
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// Modifications:
//
// ****************************************************************************
void
avtCoshExpression::DoOperation(vtkDataArray *in, vtkDataArray *out,
int ncomponents, int ntuples)
{
for (int i = 0 ; i < ntuples ; i++)
{
for (int j = 0 ; j < ncomponents ; j++)
{
float val = in->GetComponent(i, j);
out->SetComponent(i, j, cosh(val));
}
}
}
/*****************************************************************************
*
* 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.
*
*****************************************************************************/
// ************************************************************************* //
// avtCoshExpression.h //
// ************************************************************************* //
#ifndef AVT_COSH_FILTER_H
#define AVT_COSH_FILTER_H
#include <avtUnaryMathExpression.h>
class vtkDataArray;
// ****************************************************************************
// Class: avtCoshExpression
//
// Purpose:
// A filter that calculates the hyperbolic cosine of its input.
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// Modifications:
//
// ****************************************************************************
class EXPRESSION_API avtCoshExpression : public avtUnaryMathExpression
{
public:
avtCoshExpression();
virtual ~avtCoshExpression();
virtual const char *GetType(void)
{ return "avtCoshExpression"; }
virtual const char *GetDescription(void)
{ return "Calculating hyperbolic cosine"; }
protected:
virtual void DoOperation(vtkDataArray *in, vtkDataArray *out,
int ncomponents, int ntuples);
};
#endif
/*****************************************************************************
*
* 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.
*
*****************************************************************************/
// ********************************************************************** //
// avtSinhExpression.C //
// ********************************************************************** //
#include <avtSinhExpression.h>
#include <vtkDataArray.h>
#include <vtkDataSet.h>
// ****************************************************************************
// Method: avtSinhExpression constructor
//
// Purpose:
// Defines the constructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// ****************************************************************************
avtSinhExpression::avtSinhExpression()
{
;
}
// ****************************************************************************
// Method: avtSinhExpression destructor
//
// Purpose:
// Defines the destructor. Note: this should not be inlined in the header
// because it causes problems for certain compilers.
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// ****************************************************************************
avtSinhExpression::~avtSinhExpression()
{
;
}
// ****************************************************************************
// Method: avtSinhExpression::DoOperation
//
// Purpose:
// Performs the hyperbolic sine to each component, tuple of a data array.
//
// Arguments:
// in The input data array.
// out The output data array.
// ncomponents The number of components ('1' for scalar, '2' or '3' for
// vectors, etc.)
// ntuples The number of tuples (ie 'npoints' or 'ncells')
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// Modifications:
//
// ****************************************************************************
void
avtSinhExpression::DoOperation(vtkDataArray *in, vtkDataArray *out,
int ncomponents, int ntuples)
{
for (int i = 0 ; i < ntuples ; i++)
{
for (int j = 0 ; j < ncomponents ; j++)
{
float val = in->GetComponent(i, j);
out->SetComponent(i, j, sinh(val));
}
}
}
/*****************************************************************************
*
* 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.
*
*****************************************************************************/
// ************************************************************************* //
// avtSinhExpression.h //
// ************************************************************************* //
#ifndef AVT_SINH_FILTER_H
#define AVT_SINH_FILTER_H
#include <avtUnaryMathExpression.h>
class vtkDataArray;
// ****************************************************************************
// Class: avtSinhExpression
//
// Purpose:
// A filter that calculates the hyperbolic sine of its input.
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// Modifications:
//
// ****************************************************************************
class EXPRESSION_API avtSinhExpression : public avtUnaryMathExpression
{
public:
avtSinhExpression();
virtual ~avtSinhExpression();
virtual const char *GetType(void)
{ return "avtSinhExpression"; }
virtual const char *GetDescription(void)
{ return "Calculating hyperbolic sine"; }
protected:
virtual void DoOperation(vtkDataArray *in, vtkDataArray *out,
int ncomponents, int ntuples);
};
#endif
/*****************************************************************************
*
* 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.
*
*****************************************************************************/
// ************************************************************************* //
// avtTanhExpression.C //
// ************************************************************************* //
#include <avtTanhExpression.h>
#include <vtkDataArray.h>
#include <vtkDataSet.h>
// ****************************************************************************
// Method: avtTanhExpression constructor
//
// Purpose:
// Defines the constructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// ****************************************************************************
avtTanhExpression::avtTanhExpression()
{
;
}
// ****************************************************************************
// Method: avtTanhExpression destructor
//
// Purpose:
// Defines the destructor. Note: this should not be inlined in the header
// because it causes problems for certain compilers.
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// ****************************************************************************
avtTanhExpression::~avtTanhExpression()
{
;
}
// ****************************************************************************
// Method: avtTanhExpression::DoOperation
//
// Purpose:
// Take the hyperbolic tangent of each component, tuple of a data array.
//
// Arguments:
// in The input data array.
// out The output data array.
// ncomponents The number of components ('1' for scalar, '2' or '3' for
// vectors, etc.)
// ntuples The number of tuples (ie 'npoints' or 'ncells')
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// Modifications:
//
// ****************************************************************************
void
avtTanhExpression::DoOperation(vtkDataArray *in, vtkDataArray *out,
int ncomponents, int ntuples)
{
for (int i = 0 ; i < ntuples ; i++)
{
for (int j = 0 ; j < ncomponents ; j++)
{
float val = in->GetComponent(i, j);
out->SetComponent(i, j, tanh(val));
}
}
}
/*****************************************************************************
*
* 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.
*
*****************************************************************************/
// ************************************************************************* //
// avtTanhExpression.h //
// ************************************************************************* //
#ifndef AVT_TANH_FILTER_H
#define AVT_TANH_FILTER_H
#include <avtUnaryMathExpression.h>
class vtkDataArray;
// ****************************************************************************
// Class: avtTanhExpression
//
// Purpose:
// A filter that calculates the hyperbolic tangent of its input.
//
// Programmer: Kathleen Bonnell
// Creation: April 27, 2009
//
// Modifications:
//
// ****************************************************************************
class EXPRESSION_API avtTanhExpression : public avtUnaryMathExpression
{
public:
avtTanhExpression();
virtual ~avtTanhExpression();
virtual const char *GetType(void)
{ return "avtTanhExpression"; }
virtual const char *GetDescription(void)
{ return "Calculating hyperbolic tangent"; }
protected:
virtual void DoOperation(vtkDataArray *in, vtkDataArray *out,
int ncomponents, int ntuples);
};
#endif
......@@ -152,6 +152,9 @@
// Jeremy Meredith, Mon Mar 16 14:40:13 EDT 2009
// Added timestep and cycle.
//
// Kathleen Bonnell, Mon Apr 27 17:35:25 PDT 2009
// Added sinh, cosh, tanh to expr_trig.
//
// ****************************************************************************
struct ExprNameList
......@@ -239,10 +242,13 @@ const char *expr_trig[] = {
"asin",
"atan",
"cos",
"cosh",
"deg2rad",
"rad2deg",
"sin",
"sinh",
"tan",
"tanh",
NULL
};
......
......@@ -268,6 +268,16 @@
</td>
</tr>
<tr>
<td width="20%"><p>cosh</p>
</td>
<td width="25%"><p>Hyperbolic Cosine</p>
</td>
<td width="54%"><p>cosh(expr)</p>
<p>Compute the hyperbolic cosine of an angle in radians. Expr can be an expression of database variables, constants, or other scalar expression that evaluate to an angle in radians. The cosh expression returns a scalar expression.</p>
<p>Example: x = radius * cosh(angle)</p>
</td>
</tr>
<tr>
<td width="20%"><p>cross</p>
</td>
<td width="25%"><p>Vector cross product</p>
......@@ -976,6 +986,16 @@
</td>
</tr>