Updates will be applied on October 27th between 12pm - 12:45pm EDT (UTC-0400). Gitlab may be slow during the maintenance window.

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

Merge topic 'update-catalyst'

fe0b71c3 ParaViewCatalyst: include catalyst_api.h for catalyst_status
da9b8cfb catalyst: update for the `catalyst_status` rename
78067b11 catalyst: place Windows implementations in the right directory
6132fc85

 catalyst: update
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !5212
parents 0b063cd0 fe0b71c3
Pipeline #247461 failed with stages
in 210 minutes and 35 seconds
......@@ -4,7 +4,7 @@ set(BUILD_SHARED_LIBS ON)
if (WIN32)
set(catalyst_library_destination
"${_vtk_build_RUNTIME_DESTINATION}")
"${_vtk_build_RUNTIME_DESTINATION}/catalyst")
else ()
set(catalyst_library_destination
"${_vtk_build_LIBRARY_DESTINATION}/catalyst")
......@@ -78,7 +78,6 @@ if (TARGET VTK::Python)
VTK::PythonUsed)
endif ()
# Clear the `-pvVERSION` suffix (if any).
set(_vtk_build_LIBRARY_NAME_SUFFIX "")
# Clear version information.
......
......@@ -14,6 +14,7 @@
=========================================================================*/
#include <catalyst.h>
#include <catalyst_api.h>
#include <catalyst_conduit.hpp>
#include <catalyst_conduit_blueprint.hpp>
#include <catalyst_stub.h>
......@@ -158,15 +159,15 @@ static bool convert_to_blueprint_mesh(
return true;
}
enum paraview_catalyst_error
enum paraview_catalyst_status
{
paraview_catalyst_error_invalid_node = 100,
paraview_catalyst_error_results = 101,
paraview_catalyst_status_invalid_node = 100,
paraview_catalyst_status_results = 101,
};
#define pvcatalyst_err(name) static_cast<enum catalyst_error>(paraview_catalyst_error_##name)
#define pvcatalyst_err(name) static_cast<enum catalyst_status>(paraview_catalyst_status_##name)
//-----------------------------------------------------------------------------
enum catalyst_error catalyst_initialize_paraview(const conduit_node* params)
enum catalyst_status catalyst_initialize_paraview(const conduit_node* params)
{
vtkLogger::Init();
vtkVLogScopeFunction(PARAVIEW_LOG_CATALYST_VERBOSITY());
......@@ -271,11 +272,11 @@ enum catalyst_error catalyst_initialize_paraview(const conduit_node* params)
"be executed.");
}
return catalyst_error_ok;
return catalyst_status_ok;
}
//-----------------------------------------------------------------------------
enum catalyst_error catalyst_execute_paraview(const conduit_node* params)
enum catalyst_status catalyst_execute_paraview(const conduit_node* params)
{
vtkVLogScopeFunction(PARAVIEW_LOG_CATALYST_VERBOSITY());
......@@ -428,11 +429,11 @@ enum catalyst_error catalyst_execute_paraview(const conduit_node* params)
}
vtkInSituInitializationHelper::ExecutePipelines(timestep, time, parameters);
return catalyst_error_ok;
return catalyst_status_ok;
}
//-----------------------------------------------------------------------------
enum catalyst_error catalyst_finalize_paraview(const conduit_node* params)
enum catalyst_status catalyst_finalize_paraview(const conduit_node* params)
{
vtkVLogScopeFunction(PARAVIEW_LOG_CATALYST_VERBOSITY());
......@@ -445,11 +446,11 @@ enum catalyst_error catalyst_finalize_paraview(const conduit_node* params)
vtkInSituInitializationHelper::Finalize();
return catalyst_error_ok;
return catalyst_status_ok;
}
//-----------------------------------------------------------------------------
enum catalyst_error catalyst_about_paraview(conduit_node* params)
enum catalyst_status catalyst_about_paraview(conduit_node* params)
{
catalyst_stub_about(params);
conduit_cpp::Node cpp_params = conduit_cpp::cpp_node(params);
......@@ -460,15 +461,15 @@ enum catalyst_error catalyst_about_paraview(conduit_node* params)
}
cpp_params["catalyst"]["implementation"] = "paraview";
return catalyst_error_ok;
return catalyst_status_ok;
}
//-----------------------------------------------------------------------------
enum catalyst_error catalyst_results_paraview(conduit_node* params)
enum catalyst_status catalyst_results_paraview(conduit_node* params)
{
auto stub_error_status = catalyst_stub_results(params);
if (stub_error_status != catalyst_error_ok)
if (stub_error_status != catalyst_status_ok)
{
return stub_error_status;
}
......@@ -484,5 +485,5 @@ enum catalyst_error catalyst_results_paraview(conduit_node* params)
is_success &= convert_to_blueprint_mesh(proxy.second, proxy.first, catalyst_node);
}
return is_success ? catalyst_error_ok : pvcatalyst_err(results);
return is_success ? catalyst_status_ok : pvcatalyst_err(results);
}
......@@ -22,9 +22,9 @@ void do_catalyst_initialization(int argc, char* argv[])
conduit_node_set_path_char8_str(catalyst_init_params, "catalyst_load/implementation", "paraview");
conduit_node_set_path_char8_str(
catalyst_init_params, "catalyst_load/search_paths/paraview", PARAVIEW_IMPL_DIR);
enum catalyst_error err = catalyst_initialize(catalyst_init_params);
enum catalyst_status err = catalyst_initialize(catalyst_init_params);
conduit_node_destroy(catalyst_init_params);
if (err != catalyst_error_ok)
if (err != catalyst_status_ok)
{
printf("Failed to initialize Catalyst: %d\n", err);
}
......@@ -114,8 +114,8 @@ void do_catalyt_execute(int cycle, double time, Grid* grid, Attributes* attribs)
conduit_node_destroy(info);
#endif
enum catalyst_error err = catalyst_execute(catalyst_exec_params);
if (err != catalyst_error_ok)
enum catalyst_status err = catalyst_execute(catalyst_exec_params);
if (err != catalyst_status_ok)
{
printf("Failed to execute Catalyst: %d\n", err);
}
......@@ -131,8 +131,8 @@ void do_catalyt_execute(int cycle, double time, Grid* grid, Attributes* attribs)
void do_catalyt_finalization()
{
conduit_node* catalyst_fini_params = conduit_node_create();
enum catalyst_error err = catalyst_finalize(catalyst_fini_params);
if (err != catalyst_error_ok)
enum catalyst_status err = catalyst_finalize(catalyst_fini_params);
if (err != catalyst_status_ok)
{
printf("Failed to execute Catalyst: %d\n", err);
}
......
......@@ -27,8 +27,8 @@ void Initialize(int argc, char* argv[])
}
node["catalyst_load/implementation"] = "paraview";
node["catalyst_load/search_paths/paraview"] = PARAVIEW_IMPL_DIR;
catalyst_error err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to initialize Catalyst: " << err << std::endl;
}
......@@ -92,8 +92,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
fields["pressure/volume_dependent"].set("false");
fields["pressure/values"].set_external(attribs.GetPressureArray(), grid.GetNumberOfCells());
catalyst_error err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to execute Catalyst: " << err << std::endl;
}
......@@ -102,8 +102,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
void Finalize()
{
conduit_cpp::Node node;
catalyst_error err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to finalize Catalyst: " << err << std::endl;
}
......
......@@ -56,8 +56,8 @@ void Initialize(int argc, char* argv[])
node["catalyst_load/implementation"].set_string("paraview");
node["catalyst_load/search_paths/paraview"] = PARAVIEW_IMPL_DIR;
catalyst_error err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "ERROR: Failed to initialize Catalyst: " << err << std::endl;
}
......@@ -135,8 +135,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
fields["pressure/volume_dependent"].set("false");
fields["pressure/values"].set_external(attribs.GetPressureArray(), grid.GetNumberOfLocalCells());
catalyst_error err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_status_ok)
{
std::cerr << "ERROR: Failed to execute Catalyst: " << err << std::endl;
}
......@@ -145,8 +145,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
void Finalize()
{
conduit_cpp::Node node;
catalyst_error err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "ERROR: Failed to finalize Catalyst: " << err << std::endl;
}
......
......@@ -29,8 +29,8 @@ void Initialize(int argc, char* argv[])
}
node["catalyst_load/implementation"] = "paraview";
node["catalyst_load/search_paths/paraview"] = PARAVIEW_IMPL_DIR;
catalyst_error err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to initialize Catalyst: " << err << std::endl;
}
......@@ -130,8 +130,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs, Particles&
mesh_particles["topologies/mesh/elements/connectivity"].set_external(
&connectivity[0], particles.GetNumberOfPoints());
catalyst_error err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to execute Catalyst: " << err << std::endl;
}
......@@ -140,8 +140,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs, Particles&
void Finalize()
{
conduit_cpp::Node node;
catalyst_error err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to finalize Catalyst: " << err << std::endl;
}
......
......@@ -29,8 +29,8 @@ void Initialize(int argc, char* argv[])
}
node["catalyst_load/implementation"] = "paraview";
node["catalyst_load/search_paths/paraview"] = PARAVIEW_IMPL_DIR;
catalyst_error err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to initialize Catalyst: " << err << std::endl;
}
......@@ -134,8 +134,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs, Particles&
subCollection.append().set_string("grid");
subCollection.append().set_string("particles");
catalyst_error err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to execute Catalyst: " << err << std::endl;
}
......@@ -144,8 +144,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs, Particles&
void Finalize()
{
conduit_cpp::Node node;
catalyst_error err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to finalize Catalyst: " << err << std::endl;
}
......
......@@ -27,8 +27,8 @@ void Initialize(int argc, char* argv[])
}
node["catalyst_load/implementation"] = "paraview";
node["catalyst_load/search_paths/paraview"] = PARAVIEW_IMPL_DIR;
catalyst_error err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to initialize Catalyst: " << err << std::endl;
}
......@@ -102,8 +102,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
fields["pressure/volume_dependent"].set("false");
fields["pressure/values"].set_external(attribs.GetPressureArray(), grid.GetNumberOfCells());
catalyst_error err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to execute Catalyst: " << err << std::endl;
}
......@@ -112,8 +112,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
void Finalize()
{
conduit_cpp::Node node;
catalyst_error err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to finalize Catalyst: " << err << std::endl;
}
......
......@@ -27,8 +27,8 @@ void Initialize(int argc, char* argv[])
}
node["catalyst_load/implementation"] = "paraview";
node["catalyst_load/search_paths/paraview"] = PARAVIEW_IMPL_DIR;
catalyst_error err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to initialize Catalyst: " << err << std::endl;
}
......@@ -111,8 +111,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
fields["pressure/volume_dependent"].set("false");
fields["pressure/values"].set_external(attribs.GetPressureArray(), grid.GetNumberOfCells());
catalyst_error err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to execute Catalyst: " << err << std::endl;
}
......@@ -121,8 +121,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
void Finalize()
{
conduit_cpp::Node node;
catalyst_error err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to finalize Catalyst: " << err << std::endl;
}
......
......@@ -50,8 +50,8 @@ void Initialize(int argc, char* argv[])
}
node["catalyst_load/implementation"] = "paraview";
node["catalyst_load/search_paths/paraview"] = PARAVIEW_IMPL_DIR;
catalyst_error err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_initialize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to initialize Catalyst: " << err << std::endl;
}
......@@ -146,8 +146,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
AddGridChannel(exec_params, grid, attribs);
AddSteerableChannel(exec_params);
catalyst_error err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_execute(conduit_cpp::c_node(&exec_params));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to execute Catalyst: " << err << std::endl;
}
......@@ -156,8 +156,8 @@ void Execute(int cycle, double time, Grid& grid, Attributes& attribs)
void Results(unsigned int timeStep)
{
conduit_cpp::Node results;
catalyst_error err = catalyst_results(conduit_cpp::c_node(&results));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_results(conduit_cpp::c_node(&results));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to execute Catalyst: " << err << std::endl;
}
......@@ -201,8 +201,8 @@ void Results(unsigned int timeStep)
void Finalize()
{
conduit_cpp::Node node;
catalyst_error err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_error_ok)
catalyst_status err = catalyst_finalize(conduit_cpp::c_node(&node));
if (err != catalyst_status_ok)
{
std::cerr << "Failed to finalize Catalyst: " << err << std::endl;
}
......
Subproject commit c931e05fd3c608cacfa5478ccd38599af4bd7d5b
Subproject commit a1a865659110efb2f899b9390f8a43628edcce9d
Markdown is supported
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