Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
third-party
visit
Commits
cbe25da4
Commit
cbe25da4
authored
Apr 02, 2007
by
hrchilds
Browse files
Update from July 1, 2005
git-svn-id:
http://visit.ilight.com/svn/visit/trunk/src@493
18c085ea-50e0-402c-830e-de6fd14e8384
parent
675b5834
Changes
23
Hide whitespace changes
Inline
Side-by-side
clearcase_bin/regressiontest
View file @
cbe25da4
...
...
@@ -344,7 +344,6 @@ env CXXFLAGS="-O2" ./configure --enable-parallel 1>> buildlog 2>&1
rm
-f
plugins/
*
/
*
.so
(
cd
data
;
clearmake clean 1> /dev/null 2>&1
)
clearmake
-J
2 1>> buildlog 2>&1
error
=
$?
# make sure all needed data files exist
cd
data
...
...
@@ -353,7 +352,6 @@ make test 1> /dev/null 2>&1
cd
..
# run the test
error
=
0
cd test
if
test
"
$skipList
"
=
""
;
then
./runtest
-q
-p
-m
optimized
-d
"
$curdate
"
-notrackmem
-minor-error
8
-major-error
20
...
...
components/Expressions/General/avtExpressionComponentMacro.C
0 → 100644
View file @
cbe25da4
// ************************************************************************* //
// avtExpressionComponentMacro.h //
// ************************************************************************* //
#include
<avtExpressionComponentMacro.h>
#include
<stdio.h>
#include
<ImproperUseException.h>
// ****************************************************************************
// Method: avtExpressionComponentMacro constructor
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
avtExpressionComponentMacro
::
avtExpressionComponentMacro
()
{
expr
=
"<NotSet>"
;
}
// ****************************************************************************
// Method: avtExpressionComponentMacro destructor
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
avtExpressionComponentMacro
::~
avtExpressionComponentMacro
()
{
;
}
// ****************************************************************************
// Method: avtExpressionComponentMacro::SetMacro
//
// Purpose:
// Sets the arguments to use in the macro.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
void
avtExpressionComponentMacro
::
SetMacro
(
const
std
::
string
&
e
,
int
c
)
{
expr
=
e
;
comp
=
c
;
}
// ****************************************************************************
// Method: avtExpressionComponentMacro::GetMacro
//
// Purpose:
// Uses macros to apply an expression and then take a component of the
// result.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
void
avtExpressionComponentMacro
::
GetMacro
(
std
::
vector
<
std
::
string
>
&
args
,
std
::
string
&
ne
,
Expression
::
ExprType
&
type
)
{
if
(
expr
==
"<NotSet>"
)
EXCEPTION0
(
ImproperUseException
);
char
new_expr
[
1024
];
sprintf
(
new_expr
,
"%s(%s)[%d]"
,
expr
.
c_str
(),
args
[
0
].
c_str
(),
comp
);
ne
=
new_expr
;
type
=
Expression
::
ScalarMeshVar
;
}
components/Expressions/General/avtExpressionComponentMacro.h
0 → 100644
View file @
cbe25da4
// ************************************************************************* //
// avtExpressionComponentMacro.h //
// ************************************************************************* //
#ifndef AVT_EXPRESSION_COMPONENT_MACRO_H
#define AVT_EXPRESSION_COMPONENT_MACRO_H
#include
<avtMacroExpressionFilter.h>
// ****************************************************************************
// Class: avtExpressionComponentMacro
//
// Purpose:
// A macro that performs an expression an then takes a component.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
class
EXPRESSION_API
avtExpressionComponentMacro
:
public
avtMacroExpressionFilter
{
public:
avtExpressionComponentMacro
();
virtual
~
avtExpressionComponentMacro
();
virtual
const
char
*
GetType
(
void
)
{
return
"avtExpressionComponentMacro"
;
};
virtual
const
char
*
GetDescription
(
void
)
{
return
"Calculating macro"
;
};
void
SetMacro
(
const
std
::
string
&
,
int
);
protected:
std
::
string
expr
;
int
comp
;
virtual
int
GetVariableDimension
()
{
return
1
;
}
virtual
void
GetMacro
(
std
::
vector
<
std
::
string
>
&
,
std
::
string
&
ne
,
Expression
::
ExprType
&
type
);
};
#endif
components/Expressions/Makefile.in
View file @
cbe25da4
...
...
@@ -98,6 +98,10 @@
# Kathleen Bonnell, Thu Mar 3 11:13:22 PST 2005
# Added avtVariableSkewFilter.
#
# Hank Childs, Thu Jun 30 15:57:08 PDT 2005
# Added avtCylindricalFilter, avtExpressionComponentMacro, avtFloorFilter,
# avtCeilingFilter, avtModuloFilter, and avtRoundFilter.
#
##############################################################################
@SET_MAKE@
...
...
@@ -139,6 +143,7 @@ General_src= \
General/avtDataIdFilter.C
\
General/avtDegreeFilter.C
\
General/avtDivergenceFilter.C
\
General/avtExpressionComponentMacro.C
\
General/avtGradientFilter.C
\
General/avtLaplacianFilter.C
\
General/avtMIRvfFilter.C
\
...
...
@@ -176,16 +181,21 @@ Math_src= \
Math/avtBinaryMultiplyFilter.C
\
Math/avtBinaryPowerFilter.C
\
Math/avtBinarySubtractFilter.C
\
Math/avtCeilingFilter.C
\
Math/avtCosFilter.C
\
Math/avtCylindricalCoordinatesFilter.C
\
Math/avtDegreeToRadianFilter.C
\
Math/avtDeterminantFilter.C
\
Math/avtEigenvalueFilter.C
\
Math/avtEigenvectorFilter.C
\
Math/avtFloorFilter.C
\
Math/avtIdentityFilter.C
\
Math/avtModuloFilter.C
\
Math/avtInverseFilter.C
\
Math/avtNaturalLogFilter.C
\
Math/avtPolarCoordinatesFilter.C
\
Math/avtRadianToDegreeFilter.C
\
Math/avtRoundFilter.C
\
Math/avtSinFilter.C
\
Math/avtSquareFilter.C
\
Math/avtSquareRootFilter.C
\
...
...
components/Expressions/Management/avtExprNode.C
View file @
cbe25da4
...
...
@@ -8,6 +8,10 @@
#include
<avtBinaryMultiplyFilter.h>
#include
<avtBinaryDivideFilter.h>
#include
<avtBinaryPowerFilter.h>
#include
<avtCeilingFilter.h>
#include
<avtFloorFilter.h>
#include
<avtModuloFilter.h>
#include
<avtRoundFilter.h>
#include
<avtSinFilter.h>
#include
<avtCosFilter.h>
#include
<avtRandomFilter.h>
...
...
@@ -47,6 +51,7 @@
#include
<avtBase10LogFilter.h>
#include
<avtSquareRootFilter.h>
#include
<avtSquareFilter.h>
#include
<avtCylindricalCoordinatesFilter.h>
#include
<avtPolarCoordinatesFilter.h>
#include
<avtVariableSkewFilter.h>
#include
<avtVectorComposeFilter.h>
...
...
@@ -71,6 +76,7 @@
#include
<avtTestNotEqualToFilter.h>
#include
<avtNeighborEvaluatorFilter.h>
#include
<avtDataIdFilter.h>
#include
<avtExpressionComponentMacro.h>
#include
<stdio.h>
#include
<ExpressionException.h>
...
...
@@ -381,6 +387,10 @@ avtVectorExpr::CreateFilters(ExprPipelineState *state)
// Jeremy Meredith, Mon Jun 13 17:20:44 PDT 2005
// This class now holds its name directly. Use that instead.
//
// Hank Childs, Thu Jun 30 15:55:06 PDT 2005
// Added cylindrical, components of cylindrical and polar, mod, floor,
// round, and ceil.
//
// ****************************************************************************
void
avtFunctionExpr
::
CreateFilters
(
ExprPipelineState
*
state
)
...
...
@@ -415,6 +425,14 @@ avtFunctionExpr::CreateFilters(ExprPipelineState *state)
f
=
new
avtSquareRootFilter
();
else
if
((
functionName
==
"sq"
)
||
(
functionName
==
"sqr"
))
f
=
new
avtSquareFilter
();
else
if
(
functionName
==
"mod"
)
f
=
new
avtModuloFilter
();
else
if
(
functionName
==
"ceil"
)
f
=
new
avtCeilingFilter
();
else
if
(
functionName
==
"floor"
)
f
=
new
avtFloorFilter
();
else
if
(
functionName
==
"round"
)
f
=
new
avtRoundFilter
();
else
if
((
functionName
==
"random"
)
||
(
functionName
==
"rand"
))
f
=
new
avtRandomFilter
();
else
if
(
functionName
==
"cross"
)
...
...
@@ -453,6 +471,8 @@ avtFunctionExpr::CreateFilters(ExprPipelineState *state)
f
=
new
avtPrincipalDeviatoricTensorFilter
();
else
if
(
functionName
==
"degree"
)
f
=
new
avtDegreeFilter
();
else
if
(
functionName
==
"cylindrical"
)
f
=
new
avtCylindricalCoordinatesFilter
();
else
if
(
functionName
==
"polar"
)
f
=
new
avtPolarCoordinatesFilter
();
else
if
(
functionName
==
"coord"
||
functionName
==
"coords"
)
...
...
@@ -594,6 +614,36 @@ avtFunctionExpr::CreateFilters(ExprPipelineState *state)
ff
->
SetEvaluationType
(
avtNeighborEvaluatorFilter
::
AVERAGE_NEIGHBOR
);
f
=
ff
;
}
else
if
(
functionName
==
"cylindrical_radius"
)
{
avtExpressionComponentMacro
*
ecm
=
new
avtExpressionComponentMacro
;
ecm
->
SetMacro
(
"cylindrical"
,
0
);
f
=
ecm
;
}
else
if
(
functionName
==
"cylindrical_theta"
)
{
avtExpressionComponentMacro
*
ecm
=
new
avtExpressionComponentMacro
;
ecm
->
SetMacro
(
"cylindrical"
,
1
);
f
=
ecm
;
}
else
if
(
functionName
==
"polar_radius"
)
{
avtExpressionComponentMacro
*
ecm
=
new
avtExpressionComponentMacro
;
ecm
->
SetMacro
(
"polar"
,
0
);
f
=
ecm
;
}
else
if
(
functionName
==
"polar_theta"
)
{
avtExpressionComponentMacro
*
ecm
=
new
avtExpressionComponentMacro
;
ecm
->
SetMacro
(
"polar"
,
1
);
f
=
ecm
;
}
else
if
(
functionName
==
"polar_phi"
)
{
avtExpressionComponentMacro
*
ecm
=
new
avtExpressionComponentMacro
;
ecm
->
SetMacro
(
"polar"
,
2
);
f
=
ecm
;
}
else
{
string
error
=
...
...
components/Expressions/Math/avtCeilingFilter.C
0 → 100644
View file @
cbe25da4
// ************************************************************************* //
// avtCeilingFilter.C //
// ************************************************************************* //
#include
<avtCeilingFilter.h>
#include
<math.h>
#include
<vtkDataArray.h>
#include
<vtkDataSet.h>
// ****************************************************************************
// Method: avtCeilingFilter constructor
//
// Purpose:
// Defines the constructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
avtCeilingFilter
::
avtCeilingFilter
()
{
;
}
// ****************************************************************************
// Method: avtCeilingFilter destructor
//
// Purpose:
// Defines the destructor. Note: this should not be inlined in the header
// because it causes problems for certain compilers.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
avtCeilingFilter
::~
avtCeilingFilter
()
{
;
}
// ****************************************************************************
// Method: avtCeilingFilter::DoOperation
//
// Purpose:
// Takes the ceiling 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: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
void
avtCeilingFilter
::
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
,
ceil
(
val
));
}
}
}
components/Expressions/Math/avtCeilingFilter.h
0 → 100644
View file @
cbe25da4
// ************************************************************************* //
// avtCeilingFilter.h //
// ************************************************************************* //
#ifndef AVT_CEILING_FILTER_H
#define AVT_CEILING_FILTER_H
#include
<avtUnaryMathFilter.h>
class
vtkDataArray
;
// ****************************************************************************
// Class: avtCeilingFilter
//
// Purpose:
// A filter that calculates the ceiling of a floating point quantity.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
class
EXPRESSION_API
avtCeilingFilter
:
public
avtUnaryMathFilter
{
public:
avtCeilingFilter
();
virtual
~
avtCeilingFilter
();
virtual
const
char
*
GetType
(
void
)
{
return
"avtCeilingFilter"
;
};
virtual
const
char
*
GetDescription
(
void
)
{
return
"Calculating the ceiling"
;
};
protected:
virtual
void
DoOperation
(
vtkDataArray
*
in
,
vtkDataArray
*
out
,
int
ncomponents
,
int
ntuples
);
};
#endif
components/Expressions/Math/avtCylindricalCoordinatesFilter.C
0 → 100644
View file @
cbe25da4
// ************************************************************************* //
// avtCylindricalCoordinatesFilter.C //
// ************************************************************************* //
#include
<avtCylindricalCoordinatesFilter.h>
#include
<math.h>
#include
<vtkDataSet.h>
#include
<vtkFloatArray.h>
// ****************************************************************************
// Method: avtCylindricalCoordinatesFilter constructor
//
// Purpose:
// Defines the constructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
avtCylindricalCoordinatesFilter
::
avtCylindricalCoordinatesFilter
()
{
;
}
// ****************************************************************************
// Method: avtCylindricalCoordinatesFilter destructor
//
// Purpose:
// Defines the destructor. Note: this should not be inlined in the header
// because it causes problems for certain compilers.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
avtCylindricalCoordinatesFilter
::~
avtCylindricalCoordinatesFilter
()
{
;
}
// ****************************************************************************
// Method: avtCylindricalCoordinatesFilter::DeriveVariable
//
// Purpose:
// Derives a variable based on the input dataset. The variable is the
// cylindrical coordinates of the point list.
//
// Arguments:
// inDS The input dataset.
//
// Returns: The derived variable. The calling class must free this
// memory.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
vtkDataArray
*
avtCylindricalCoordinatesFilter
::
DeriveVariable
(
vtkDataSet
*
in_ds
)
{
int
npts
=
in_ds
->
GetNumberOfPoints
();
vtkFloatArray
*
rv
=
vtkFloatArray
::
New
();
rv
->
SetNumberOfComponents
(
3
);
rv
->
SetNumberOfTuples
(
npts
);
for
(
int
i
=
0
;
i
<
npts
;
i
++
)
{
float
pt
[
3
];
in_ds
->
GetPoint
(
i
,
pt
);
float
r
=
sqrt
(
pt
[
0
]
*
pt
[
0
]
+
pt
[
1
]
*
pt
[
1
]);
rv
->
SetComponent
(
i
,
0
,
r
);
float
theta
=
atan2
(
pt
[
1
],
pt
[
0
]);
rv
->
SetComponent
(
i
,
1
,
theta
);
rv
->
SetComponent
(
i
,
2
,
pt
[
2
]);
}
return
rv
;
}
components/Expressions/Math/avtCylindricalCoordinatesFilter.h
0 → 100644
View file @
cbe25da4
// ************************************************************************* //
// avtCylindricalCoordinatesFilter.h //
// ************************************************************************* //
#ifndef AVT_CYLINDRICAL_COORDINATES_FILTER_H
#define AVT_CYLINDRICAL_COORDINATES_FILTER_H
#include
<avtSingleInputExpressionFilter.h>
class
vtkCell
;
class
vtkCellDataToPointData
;
class
vtkDataArray
;
class
vtkDataSet
;
class
vtkIdList
;
class
vtkScalarData
;
// ****************************************************************************
// Class: avtCylindricalCoordinatesFilter
//
// Purpose:
// A filter that calculates the cylindrical coordinates for each point.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
class
EXPRESSION_API
avtCylindricalCoordinatesFilter
:
public
avtSingleInputExpressionFilter
{
public:
avtCylindricalCoordinatesFilter
();
virtual
~
avtCylindricalCoordinatesFilter
();
virtual
const
char
*
GetType
(
void
)
{
return
"avtCylindricalCoordinatesFilter"
;
};
virtual
const
char
*
GetDescription
(
void
)
{
return
"Calculating cylindrical coordinates."
;
};
protected:
virtual
vtkDataArray
*
DeriveVariable
(
vtkDataSet
*
);
virtual
bool
IsPointVariable
(
void
)
{
return
true
;
};
virtual
int
GetVariableDimension
()
{
return
3
;
}
};
#endif
components/Expressions/Math/avtFloorFilter.C
0 → 100644
View file @
cbe25da4
// ************************************************************************* //
// avtFloorFilter.C //
// ************************************************************************* //
#include
<avtFloorFilter.h>
#include
<math.h>
#include
<vtkDataArray.h>
#include
<vtkDataSet.h>
// ****************************************************************************
// Method: avtFloorFilter constructor
//
// Purpose:
// Defines the constructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
avtFloorFilter
::
avtFloorFilter
()
{
;
}
// ****************************************************************************
// Method: avtFloorFilter destructor
//
// Purpose:
// Defines the destructor. Note: this should not be inlined in the header
// because it causes problems for certain compilers.
//
// Programmer: Hank Childs
// Creation: June 30, 2005
//
// ****************************************************************************
avtFloorFilter
::~
avtFloorFilter
()
{
;
}
// ****************************************************************************
// Method: avtFloorFilter::DoOperation
//
// Purpose:
// Takes the floor of each component, tuple of a data array.
//
// Arguments: