[cig-commits] r13747 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Wed Dec 17 02:32:58 PST 2008
Author: luis
Date: 2008-12-17 02:32:58 -0800 (Wed, 17 Dec 2008)
New Revision: 13747
Modified:
cs/cigma/trunk/src/core_compare_op.cpp
Log:
Automatically read points & cells from the same vtk file
Modified: cs/cigma/trunk/src/core_compare_op.cpp
===================================================================
--- cs/cigma/trunk/src/core_compare_op.cpp 2008-12-17 10:32:56 UTC (rev 13746)
+++ cs/cigma/trunk/src/core_compare_op.cpp 2008-12-17 10:32:58 UTC (rev 13747)
@@ -1,5 +1,6 @@
#include "core_compare_op.h"
-#include "tri_logger.hpp"
+#include "Common.h"
+#include "Filesystem.h"
#include "Numeric.h"
#include "fn_zero.h"
#include "fn_one.h"
@@ -25,13 +26,53 @@
{
}
+static bool is_vtk(const DataPath& dp)
+{
+ return is_vtk_extension(dp.extension().c_str());
+}
+
+static bool is_hdf5(const DataPath& dp)
+{
+ return is_hdf5_extension(dp.extension().c_str());
+}
+
+static bool is_text(const DataPath& dp)
+{
+ return is_text_extension(dp.extension().c_str());
+}
+
void CompareOp::configure()
{
TRI_LOG_STR("CompareOp::configure()");
+
+
+ //
+ // Preliminary processing
+ //
+
+ TRI_LOG_STR(">> Preparing info arguments");
+
+ if (is_vtk(first_info.field_info.p_field))
+ {
+ if (first_info.field_info.mesh_info.empty())
+ {
+ first_info.field_info.mesh_info.p_mesh = DataPath(first_info.field_info.p_field.filename());
+ }
+ }
+
+ if (is_vtk(second_info.field_info.p_field))
+ {
+ if (second_info.field_info.mesh_info.empty())
+ {
+ second_info.field_info.mesh_info.p_mesh = DataPath(second_info.field_info.p_field.filename());
+ }
+ }
+
TRI_LOG(first_info);
TRI_LOG(second_info);
TRI_LOG(domain_info);
+
// Read first function
if (!first)
{
More information about the CIG-COMMITS
mailing list