Commit 6cc99507 authored by Kitware Robot's avatar Kitware Robot Committed by Ben Boeckel
Browse files

clang-format: reformat the entire tree using clang-format-9

parent 44dc0625
......@@ -28,58 +28,59 @@
// mangled function names.
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
void VTKPVADAPTORSCTH_EXPORT handler(int sig);
void VTKPVADAPTORSCTH_EXPORT handler(int sig);
/**
* CTH INTERFACE.
* C functions prototyped in pvspy_public.h.
* called from within spy_fortran.c in cth
*
* @warning This function currently does not perform anything.
*/
void VTKPVADAPTORSCTH_EXPORT pvspy_qa(char* qadate, char* qatime, char* qajobn);
/**
* CTH INTERFACE.
* C functions prototyped in pvspy_public.h.
* called from within spy_fortran.c in cth
*
* @warning This function currently does not perform anything.
*/
void VTKPVADAPTORSCTH_EXPORT pvspy_qa(char* qadate, char* qatime, char* qajobn);
void VTKPVADAPTORSCTH_EXPORT pvspy_fil(char* filename, int len, char* runid, int* error);
void VTKPVADAPTORSCTH_EXPORT pvspy_fil(char* filename, int len, char* runid, int* error);
int VTKPVADAPTORSCTH_EXPORT pvspy_vizcheck(int cycle, double ptime);
int VTKPVADAPTORSCTH_EXPORT pvspy_vizcheck(int cycle, double ptime);
void VTKPVADAPTORSCTH_EXPORT pvspy_viz(int cycle, double ptime, double pdt, int, int);
void VTKPVADAPTORSCTH_EXPORT pvspy_viz(int cycle, double ptime, double pdt, int, int);
void VTKPVADAPTORSCTH_EXPORT pvspy_fin();
void VTKPVADAPTORSCTH_EXPORT pvspy_fin();
void VTKPVADAPTORSCTH_EXPORT pvspy_stm(int igm, int n_blocks, int nmat, int max_mat,
int NCFieldNames, int NMFieldNames, double* x0, double* x1, int max_level);
void VTKPVADAPTORSCTH_EXPORT pvspy_stm(int igm, int n_blocks, int nmat, int max_mat,
int NCFieldNames, int NMFieldNames, double* x0, double* x1, int max_level);
void VTKPVADAPTORSCTH_EXPORT pvspy_scf(int field_id, char* field_name, char* comment, int matid);
void VTKPVADAPTORSCTH_EXPORT pvspy_scf(int field_id, char* field_name, char* comment, int matid);
void VTKPVADAPTORSCTH_EXPORT pvspy_smf(int field_id, char* field_name, char* comment);
void VTKPVADAPTORSCTH_EXPORT pvspy_smf(int field_id, char* field_name, char* comment);
void VTKPVADAPTORSCTH_EXPORT pvspy_scx(int block_id, int field_id, int k, int j, double* istrip);
void VTKPVADAPTORSCTH_EXPORT pvspy_scx(int block_id, int field_id, int k, int j, double* istrip);
void VTKPVADAPTORSCTH_EXPORT pvspy_smx(
int block_id, int field_id, int mat, int k, int j, double* istrip);
void VTKPVADAPTORSCTH_EXPORT pvspy_smx(
int block_id, int field_id, int mat, int k, int j, double* istrip);
void VTKPVADAPTORSCTH_EXPORT pvspy_stb(int block_id, int Nx, int Ny, int Nz, double* x, double* y,
double* z, int allocated, int active, int level);
void VTKPVADAPTORSCTH_EXPORT pvspy_stb(int block_id, int Nx, int Ny, int Nz, double* x, double* y,
double* z, int allocated, int active, int level);
void VTKPVADAPTORSCTH_EXPORT pvspy_sta(int block_id, int allocated, int active, int level,
int max_level, int bxbot, int bxtop, int bybot, int bytop, int bzbot, int bztop, int npxma11,
int npxma21, int npxma12, int npxma22, int npyma11, int npyma21, int npyma12, int npyma22,
int npzma11, int npzma21, int npzma12, int npzma22, int npxpa11, int npxpa21, int npxpa12,
int npxpa22, int npypa11, int npypa21, int npypa12, int npypa22, int npzpa11, int npzpa21,
int npzpa12, int npzpa22, int nbxma11, int nbxma21, int nbxma12, int nbxma22, int nbyma11,
int nbyma21, int nbyma12, int nbyma22, int nbzma11, int nbzma21, int nbzma12, int nbzma22,
int nbxpa11, int nbxpa21, int nbxpa12, int nbxpa22, int nbypa11, int nbypa21, int nbypa12,
int nbypa22, int nbzpa11, int nbzpa21, int nbzpa12, int nbzpa22);
void VTKPVADAPTORSCTH_EXPORT pvspy_sta(int block_id, int allocated, int active, int level,
int max_level, int bxbot, int bxtop, int bybot, int bytop, int bzbot, int bztop, int npxma11,
int npxma21, int npxma12, int npxma22, int npyma11, int npyma21, int npyma12, int npyma22,
int npzma11, int npzma21, int npzma12, int npzma22, int npxpa11, int npxpa21, int npxpa12,
int npxpa22, int npypa11, int npypa21, int npypa12, int npypa22, int npzpa11, int npzpa21,
int npzpa12, int npzpa22, int nbxma11, int nbxma21, int nbxma12, int nbxma22, int nbyma11,
int nbyma21, int nbyma12, int nbyma22, int nbzma11, int nbzma21, int nbzma12, int nbzma22,
int nbxpa11, int nbxpa21, int nbxpa12, int nbxpa22, int nbypa11, int nbypa21, int nbypa12,
int nbypa22, int nbzpa11, int nbzpa21, int nbzpa12, int nbzpa22);
/**
* @warning This function does not do anything
*/
void pvspy_trc(
int num, double* xt, double* yt, double* zt, int* id, int* lt, int* it, int* jt, int* kt);
/**
* @warning This function does not do anything
*/
void pvspy_trc(
int num, double* xt, double* yt, double* zt, int* id, int* lt, int* it, int* jt, int* kt);
#ifdef __cplusplus
}
......
......@@ -76,7 +76,8 @@ public:
vtkIdType LookupValue(vtkVariant value) override;
void LookupValue(vtkVariant value, vtkIdList* ids) override;
void SetVariantValue(vtkIdType vtkNotUsed(index), vtkVariant vtkNotUsed(value)) override
{ /* TODO */}
{ /* TODO */
}
// Description:
// Get the address of a particular data index. Performs no checks
......
......@@ -69,7 +69,7 @@ protected:
vtkBoundingBox Bounds;
std::vector<std::string> CFieldNames;
std::vector<std::vector<std::string> > MFieldNames;
std::vector<std::vector<std::string>> MFieldNames;
vtkIntArray* NeighborArray;
......@@ -87,9 +87,9 @@ protected:
int top[3];
int neighbor_proc[24];
int neighbor_block[24];
std::vector<vtkSmartPointer<vtkCTHDataArray> > CFieldData;
std::vector<vtkSmartPointer<vtkCTHDataArray>> CFieldData;
int actualMaterials;
std::vector<std::vector<vtkSmartPointer<vtkCTHDataArray> > > MFieldData;
std::vector<std::vector<vtkSmartPointer<vtkCTHDataArray>>> MFieldData;
vtkUniformGrid* ug;
vtkAMRBox* box;
};
......
......@@ -117,7 +117,7 @@ private:
/// Returns (lonIndex, latIndex) for FV dynamic core (regular grid) or
/// (s, t, face) for SE dynamic core (cube sphere grid).
void GetValueIndex(double lonRad, double latRad, std::vector<std::vector<int> >& index) const;
void GetValueIndex(double lonRad, double latRad, std::vector<std::vector<int>>& index) const;
/// Points for a 2D cell surrounding value at index for 2D or (index, level) for 3D.
void GetCellPoints(const int index[3], double cellPoints[4][3]) const;
......@@ -135,7 +135,7 @@ private:
/// index is between (0,0,0) - (NLon-1, NLon-1, NLon-1). Returns the
/// index in the vector that has the minimum face.
size_t CubeToIndex(double side, const std::vector<double>& cubeCoordinates, double v[3],
std::vector<std::vector<int> >& index) const;
std::vector<std::vector<int>>& index) const;
/// converts from (s, t, face) to cartesian coordinates on the cube
/// the index is double[3] because we can get indexes in between integer positions.
......
......@@ -188,7 +188,12 @@ void rayBoxIntersection(double r, double v[3])
{
// The face order is X, -X, Y, -Y, Z, -Z
double faceNormal[NFACES][3] = {
{ 1, 0, 0 }, { -1, 0, 0 }, { 0, 1, 0 }, { 0, -1, 0 }, { 0, 0, 1 }, { 0, 0, -1 },
{ 1, 0, 0 },
{ -1, 0, 0 },
{ 0, 1, 0 },
{ 0, -1, 0 },
{ 0, 0, 1 },
{ 0, 0, -1 },
};
double side = r * 2 / sqrt3;
double minT = std::numeric_limits<double>::max();
......@@ -319,7 +324,7 @@ void Grid<gridType>::AddPointsAndCells(double lonRad, double latRad)
// for points shared between 2 or 3 faces we still need a different index
// for each shared face, because we need to create a different cell for
// each face. For FV grid the vector always has one element.
std::vector<std::vector<int> > indexArray;
std::vector<std::vector<int>> indexArray;
this->GetValueIndex(lonRad, latRad, indexArray);
// ostr << "AddPointsAndCells: " << vtkMath::DegreesFromRadians(lonRad)
// << ", " << vtkMath::DegreesFromRadians(latRad) << " indexArraySize: "
......@@ -429,7 +434,7 @@ void Grid<gridType>::SetAttributeValue(int chunkSize, double* lonRad, double* la
{
double lonDeg = vtkMath::DegreesFromRadians(lonRad[c]);
double latDeg = vtkMath::DegreesFromRadians(latRad[c]);
std::vector<std::vector<int> > indexArray;
std::vector<std::vector<int>> indexArray;
this->GetValueIndex(lonRad[c], latRad[c], indexArray);
for (size_t i = 0; i < indexArray.size(); ++i)
{
......@@ -853,7 +858,7 @@ void Grid<gridType>::MinFaceIndex(int side, int index[3]) const
// std::ostringstream ostr;
// ostr << "MinFaceIndex index: "
// << index[0] << ", " << index[1] << ", " << index[2];
std::vector<std::vector<int> > allIndexes;
std::vector<std::vector<int>> allIndexes;
size_t mfi = this->CubeToIndex(sideD, cubeCoordinates, v, allIndexes);
std::copy(allIndexes[mfi].begin(), allIndexes[mfi].end(), index);
// ostr << " result: "
......@@ -865,7 +870,7 @@ void Grid<gridType>::MinFaceIndex(int side, int index[3]) const
//------------------------------------------------------------------------------
template <GridType gridType>
void Grid<gridType>::GetValueIndex(
double lonRad, double latRad, std::vector<std::vector<int> >& index) const
double lonRad, double latRad, std::vector<std::vector<int>>& index) const
{
Internals* impl = this->Impl;
if (gridType == CUBE_SPHERE)
......@@ -963,7 +968,7 @@ void Grid<gridType>::SetCubeGridPoints(
//------------------------------------------------------------------------------
template <GridType gridType>
size_t Grid<gridType>::CubeToIndex(double side, const std::vector<double>& cubeCoordinates,
double v[3], std::vector<std::vector<int> >& index) const
double v[3], std::vector<std::vector<int>>& index) const
{
FuzzyEQ eq(MAX_DIFF);
// The face order is X, -X, Y, -Y, Z, -Z
......@@ -1014,12 +1019,20 @@ void Grid<gridType>::IndexToCube(
// 2: where does face value go, 0,1: where do lon,lat go.
int position[NFACES][3] = {
{ 1, 2, 0 }, { 1, 2, 0 }, { 2, 0, 1 }, { 2, 0, 1 }, { 0, 1, 2 }, { 0, 1, 2 },
{ 1, 2, 0 },
{ 1, 2, 0 },
{ 2, 0, 1 },
{ 2, 0, 1 },
{ 0, 1, 2 },
{ 0, 1, 2 },
};
double faceValue[NFACES] = {
cubeCoordinates[cubeCoordinates.size() - 1], cubeCoordinates[0],
cubeCoordinates[cubeCoordinates.size() - 1], cubeCoordinates[0],
cubeCoordinates[cubeCoordinates.size() - 1], cubeCoordinates[0],
cubeCoordinates[cubeCoordinates.size() - 1],
cubeCoordinates[0],
cubeCoordinates[cubeCoordinates.size() - 1],
cubeCoordinates[0],
cubeCoordinates[cubeCoordinates.size() - 1],
cubeCoordinates[0],
};
int face = index[2];
v[position[face][2]] = faceValue[face];
......
......@@ -28,49 +28,50 @@
// mangled function names.
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
/**
* Initializes the Catalyst Coprocessor.
* @warning Make sure you pass a zero terminated string
*/
void VTKPVADAPTORSCAM_EXPORT fv_coprocessorinitializewithpython_(const char* pythonScriptName);
/**
* Creates the Grids for 2D, 3D rectilinear and 2D, 3D spherical
*/
void VTKPVADAPTORSCAM_EXPORT fv_create_grid_(int* dim, double* lonCoord, double* latCoord,
double* levCoord, int* nCells2d, int* maxNcols, int* myRank);
/**
* for timestep 0: creates the points and cells for the grids.
* for all timesteps: copies data from the simulation to Catalyst.
*/
void VTKPVADAPTORSCAM_EXPORT fv_add_chunk_(int* nstep, int* chunkSize, double* lonRad,
double* latRad, double* psScalar, double* tScalar, double* uScalar, double* vScalar);
void VTKPVADAPTORSCAM_EXPORT fv_catalyst_finalize_();
/**
* Checks if Catalyst needs to coprocess data
*/
int VTKPVADAPTORSCAM_EXPORT fv_requestdatadescription_(int* timeStep, double* time);
/**
* Checks if Catalyst needs to coprocess data
*/
int VTKPVADAPTORSCAM_EXPORT fv_requestdatadescription_(int* timeStep, double* time);
/**
* Checks if the grids need to be created
*/
int VTKPVADAPTORSCAM_EXPORT fv_needtocreategrid_();
/**
* Calls the coprocessor
*/
void VTKPVADAPTORSCAM_EXPORT fv_coprocess_();
/**
* Initializes the Catalyst Coprocessor.
* @warning Make sure you pass a zero terminated string
*/
void VTKPVADAPTORSCAM_EXPORT fv_coprocessorinitializewithpython_(const char* pythonScriptName);
/**
* Creates the Grids for 2D, 3D rectilinear and 2D, 3D spherical
*/
void VTKPVADAPTORSCAM_EXPORT fv_create_grid_(int* dim, double* lonCoord, double* latCoord,
double* levCoord, int* nCells2d, int* maxNcols, int* myRank);
/**
* for timestep 0: creates the points and cells for the grids.
* for all timesteps: copies data from the simulation to Catalyst.
*/
void VTKPVADAPTORSCAM_EXPORT fv_add_chunk_(int* nstep, int* chunkSize, double* lonRad,
double* latRad, double* psScalar, double* tScalar, double* uScalar, double* vScalar);
void VTKPVADAPTORSCAM_EXPORT fv_catalyst_finalize_();
/**
* Checks if Catalyst needs to coprocess data
*/
int VTKPVADAPTORSCAM_EXPORT fv_requestdatadescription_(int* timeStep, double* time);
/**
* Checks if Catalyst needs to coprocess data
*/
int VTKPVADAPTORSCAM_EXPORT fv_requestdatadescription_(int* timeStep, double* time);
/**
* Checks if the grids need to be created
*/
int VTKPVADAPTORSCAM_EXPORT fv_needtocreategrid_();
/**
* Calls the coprocessor
*/
void VTKPVADAPTORSCAM_EXPORT fv_coprocess_();
#ifdef __cplusplus
}
......
......@@ -28,44 +28,45 @@
// mangled function names.
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
/**
* Initializes the Catalyst Coprocessor
* @warning Make sure you pass a zero terminated string
*/
void VTKPVADAPTORSCAM_EXPORT se_coprocessorinitializewithpython_(const char* pythonScriptName);
/**
* Creates grids for 2d and 3d cubed-spheres
*/
void VTKPVADAPTORSCAM_EXPORT se_create_grid_(int* ne, int* np, int* nlon, double* lonRad, int* nlat,
double* latRad, int* nlev, double* lev, int* nCells2d, int* maxNcols, int* mpiRank);
/**
* for timestep 0: creates the points and cells for the grids.
* for all timesteps: copies data from the simulation to Catalyst.
*/
void VTKPVADAPTORSCAM_EXPORT se_add_chunk_(int* nstep, int* chunkSize, double* lonRad,
double* latRad, double* psScalar, double* tScalar, double* uScalar, double* vScalar);
/**
* Checks if Catalyst needs to coprocess data
*/
int VTKPVADAPTORSCAM_EXPORT se_requestdatadescription_(int* timeStep, double* time);
/**
* Checks if the grids need to be created
*/
int VTKPVADAPTORSCAM_EXPORT se_needtocreategrid_();
/**
* calls the coprocessor
*/
void VTKPVADAPTORSCAM_EXPORT se_coprocess_();
void VTKPVADAPTORSCAM_EXPORT se_catalyst_finalize_();
/**
* Initializes the Catalyst Coprocessor
* @warning Make sure you pass a zero terminated string
*/
void VTKPVADAPTORSCAM_EXPORT se_coprocessorinitializewithpython_(const char* pythonScriptName);
/**
* Creates grids for 2d and 3d cubed-spheres
*/
void VTKPVADAPTORSCAM_EXPORT se_create_grid_(int* ne, int* np, int* nlon, double* lonRad,
int* nlat, double* latRad, int* nlev, double* lev, int* nCells2d, int* maxNcols, int* mpiRank);
/**
* for timestep 0: creates the points and cells for the grids.
* for all timesteps: copies data from the simulation to Catalyst.
*/
void VTKPVADAPTORSCAM_EXPORT se_add_chunk_(int* nstep, int* chunkSize, double* lonRad,
double* latRad, double* psScalar, double* tScalar, double* uScalar, double* vScalar);
/**
* Checks if Catalyst needs to coprocess data
*/
int VTKPVADAPTORSCAM_EXPORT se_requestdatadescription_(int* timeStep, double* time);
/**
* Checks if the grids need to be created
*/
int VTKPVADAPTORSCAM_EXPORT se_needtocreategrid_();
/**
* calls the coprocessor
*/
void VTKPVADAPTORSCAM_EXPORT se_coprocess_();
void VTKPVADAPTORSCAM_EXPORT se_catalyst_finalize_();
#ifdef __cplusplus
}
......
......@@ -19,7 +19,7 @@
* Abstract class for specifying fields over grids for a test driver.
* May want to remove GetHighestFieldOrder as it is just a place holder
* for now.
*/
*/
#ifndef vtkCPBaseFieldBuilder_h
#define vtkCPBaseFieldBuilder_h
......
......@@ -17,7 +17,7 @@
* @brief Abstract class for creating grids.
*
* Abstract class for creating grids for a test driver.
*/
*/
#ifndef vtkCPBaseGridBuilder_h
#define vtkCPBaseGridBuilder_h
......
......@@ -17,7 +17,7 @@
* @brief Class for specifying cell fields over grids.
*
* Class for specifying cell data fields over grids for a test driver.
*/
*/
#ifndef vtkCPCellFieldBuilder_h
#define vtkCPCellFieldBuilder_h
......
......@@ -17,7 +17,7 @@
* @brief Class for specifying constant scalars at points.
*
* Class for specifying a constant scalar field.
*/
*/
#ifndef vtkCPConstantScalarFieldFunction_h
#define vtkCPConstantScalarFieldFunction_h
......
......@@ -17,7 +17,7 @@
* @brief Abstract class for specifying fields over grids.
*
* Abstract class for specifying fields over grids for a test driver.
*/
*/
#ifndef vtkCPFieldBuilder_h
#define vtkCPFieldBuilder_h
......
......@@ -17,7 +17,7 @@
* @brief Class for creating grids from a VTK file.
*
* Class for creating grids from a VTK file.
*/
*/
#ifndef vtkCPFileGridBuilder_h
#define vtkCPFileGridBuilder_h
......
......@@ -17,7 +17,7 @@
* @brief Abstract class for creating grids.
*
* Abstract class for creating grids for a test driver.
*/
*/
#ifndef vtkCPGridBuilder_h
#define vtkCPGridBuilder_h
......
......@@ -18,7 +18,7 @@
*
* Class for specifying a scalar field that is linear with respect to the
* coordinate components as well as time.
*/
*/
#ifndef vtkCPLinearScalarFieldFunction_h
#define vtkCPLinearScalarFieldFunction_h
......
......@@ -27,7 +27,7 @@ vtkCxxSetObjectMacro(vtkCPMultiBlockGridBuilder, Grid, vtkMultiBlockDataSet);
struct vtkCPMultiBlockGridBuilderInternals
{
typedef std::vector<vtkSmartPointer<vtkCPGridBuilder> > GridBuilderContainer;
typedef std::vector<vtkSmartPointer<vtkCPGridBuilder>> GridBuilderContainer;
typedef GridBuilderContainer::iterator GridBuilderIterator;
GridBuilderContainer GridBuilders;
};
......
......@@ -17,7 +17,7 @@
* @brief Class for creating multiblock grids.
*
* Class for creating vtkMultiBlockDataSet grids for a test driver.
*/
*/
#ifndef vtkCPMultiBlockGridBuilder_h
#define vtkCPMultiBlockGridBuilder_h
......
......@@ -17,7 +17,7 @@
* @brief Class for specifying nodal fields over grids.
*
* Class for specifying nodal fields over grids for a test driver.
*/
*/
#ifndef vtkCPNodalFieldBuilder_h
#define vtkCPNodalFieldBuilder_h
......
......@@ -17,7 +17,7 @@
* @brief Abstract class for specifying scalars at points.
*
* Abstract class for specifying scalars at specified points.
*/
*/
#ifndef vtkCPScalarFieldFunction_h
#define vtkCPScalarFieldFunction_h
......
......@@ -17,7 +17,7 @@
* @brief Abstract class for specifying tensor fields at points.
*
* Abstract class for specifying tensor fields at specified points.
*/
*/
#ifndef vtkCPTensorFieldFunction_h
#define vtkCPTensorFieldFunction_h
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment