[cig-commits] r13781 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Wed Dec 17 02:34:07 PST 2008
Author: luis
Date: 2008-12-17 02:34:07 -0800 (Wed, 17 Dec 2008)
New Revision: 13781
Modified:
cs/cigma/trunk/src/AnnLocator.cpp
cs/cigma/trunk/src/cli_compare_cmd.cpp
cs/cigma/trunk/src/io_hdf5_reader.cpp
cs/cigma/trunk/src/io_vtk_reader.cpp
Log:
Turn on spatial indexing
Modified: cs/cigma/trunk/src/AnnLocator.cpp
===================================================================
--- cs/cigma/trunk/src/AnnLocator.cpp 2008-12-17 10:34:05 UTC (rev 13780)
+++ cs/cigma/trunk/src/AnnLocator.cpp 2008-12-17 10:34:07 UTC (rev 13781)
@@ -56,6 +56,7 @@
void AnnLocator::init(const MeshPart& mesh)
{
+ TRI_LOG_STR("AnnLocator::init()");
assert(nnk > 0);
npts = mesh.connect->n_cells();
Modified: cs/cigma/trunk/src/cli_compare_cmd.cpp
===================================================================
--- cs/cigma/trunk/src/cli_compare_cmd.cpp 2008-12-17 10:34:05 UTC (rev 13780)
+++ cs/cigma/trunk/src/cli_compare_cmd.cpp 2008-12-17 10:34:07 UTC (rev 13781)
@@ -117,6 +117,7 @@
op.first_info.field_info.mesh_info.p_nc = DataPath(nc1);
op.first_info.field_info.mesh_info.p_eb = DataPath(eb1);
op.first_info.field_info.mesh_info.cell_type_name = cell1;
+ op.first_info.field_info.mesh_info.use_locator = true;
op.first_info.field_info.fe_info.q_info.p_quadrature = DataPath(qr1);
op.first_info.field_info.fe_info.q_info.p_weights = DataPath(qw1);
op.first_info.field_info.fe_info.q_info.p_points = DataPath(qx1);
@@ -128,6 +129,7 @@
op.second_info.field_info.mesh_info.p_nc = DataPath(nc2);
op.second_info.field_info.mesh_info.p_eb = DataPath(eb2);
op.second_info.field_info.mesh_info.cell_type_name = cell2;
+ op.second_info.field_info.mesh_info.use_locator = true;
op.second_info.field_info.fe_info.q_info.p_quadrature = DataPath(qr2);
op.second_info.field_info.fe_info.q_info.p_weights = DataPath(qw2);
op.second_info.field_info.fe_info.q_info.p_points = DataPath(qx2);
Modified: cs/cigma/trunk/src/io_hdf5_reader.cpp
===================================================================
--- cs/cigma/trunk/src/io_hdf5_reader.cpp 2008-12-17 10:34:05 UTC (rev 13780)
+++ cs/cigma/trunk/src/io_hdf5_reader.cpp 2008-12-17 10:34:07 UTC (rev 13781)
@@ -7,6 +7,7 @@
#include "io_hdf5.h"
#include "nc_array.h"
#include "eb_array.h"
+#include "AnnLocator.h"
using namespace std;
using namespace boost;
@@ -221,6 +222,14 @@
mesh->coords = this->getNodeCoordinates(nc.c_str());
mesh->connect = this->getElementBlock(eb.c_str());
mesh->cell_type = this->getCellType(loc);
+
+ if (true)
+ {
+ // XXX: move this to a method in MeshPart
+ shared_ptr<AnnLocator> locator(new AnnLocator);
+ locator->init(*mesh);
+ mesh->setLocator(locator);
+ }
}
else
{
Modified: cs/cigma/trunk/src/io_vtk_reader.cpp
===================================================================
--- cs/cigma/trunk/src/io_vtk_reader.cpp 2008-12-17 10:34:05 UTC (rev 13780)
+++ cs/cigma/trunk/src/io_vtk_reader.cpp 2008-12-17 10:34:07 UTC (rev 13781)
@@ -12,6 +12,7 @@
#include "nc_array.h"
#include "eb_array.h"
#include "core_array.h"
+#include "AnnLocator.h"
#include "vtkUnstructuredGridReader.h"
#include "vtkStructuredGridReader.h"
@@ -282,6 +283,15 @@
mesh->coords = this->getNodeCoordinates(0);
mesh->connect = this->getElementBlock(0);
mesh->cell_type = this->getCellType(0);
+
+ if (true)
+ {
+ // XXX: move this to a method in MeshPart
+ shared_ptr<AnnLocator> locator(new AnnLocator);
+ locator->init(*mesh);
+ mesh->setLocator(locator);
+ }
+
return mesh;
}
More information about the CIG-COMMITS
mailing list