[MOAB-dev] commit/MOAB: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Jul 11 19:07:30 CDT 2014
3 new commits in MOAB:
https://bitbucket.org/fathomteam/moab/commits/f6bf2e4501ce/
Changeset: f6bf2e4501ce
Branch: None
User: vijaysm
Date: 2014-07-12 02:05:35
Summary: Fix warnings shown by PGI compilers
Affected #: 5 files
diff --git a/src/FBEngine.cpp b/src/FBEngine.cpp
index b2f1d19..7f4a8a6 100644
--- a/src/FBEngine.cpp
+++ b/src/FBEngine.cpp
@@ -1979,7 +1979,6 @@ ErrorCode FBEngine::BreakTriangle2(EntityHandle tri, EntityHandle e1, EntityHand
_newTriangles.insert(newTriangle);
if (debug_splits)
print_debug_triangle(newTriangle);
- return MB_SUCCESS;
}
else if (MBVERTEX == et2)
{
@@ -2004,7 +2003,6 @@ ErrorCode FBEngine::BreakTriangle2(EntityHandle tri, EntityHandle e1, EntityHand
_newTriangles.insert(newTriangle);
if (debug_splits)
print_debug_triangle(newTriangle);
- return MB_SUCCESS;
}
else
{
@@ -2071,7 +2069,6 @@ ErrorCode FBEngine::BreakTriangle2(EntityHandle tri, EntityHandle e1, EntityHand
_newTriangles.insert(newTriangle);
if (debug_splits)
print_debug_triangle(newTriangle);
- return MB_SUCCESS;
}
return MB_SUCCESS;
@@ -2769,8 +2766,7 @@ ErrorCode FBEngine::split_boundary(EntityHandle face, EntityHandle atNode)
_mbImpl->id_from_handle(atNode) << "\n";
}
Range bound_edges;
- ErrorCode rval = getAdjacentEntities(face, 1, bound_edges);
- MBERRORR(rval, " can't get boundary edges");
+ ErrorCode rval = getAdjacentEntities(face, 1, bound_edges);MBERRORR(rval, " can't get boundary edges");
bool brokEdge = _brokenEdges.find(atNode)!=_brokenEdges.end();
for (Range::iterator it =bound_edges.begin(); it!=bound_edges.end(); it++ )
@@ -2779,8 +2775,7 @@ ErrorCode FBEngine::split_boundary(EntityHandle face, EntityHandle atNode)
// get all edges in range
Range mesh_edges;
rval = _mbImpl->get_entities_by_dimension(b_edge, 1,
- mesh_edges);
- MBERRORR(rval, " can't get mesh edges");
+ mesh_edges);MBERRORR(rval, " can't get mesh edges");
if (brokEdge)
{
EntityHandle brokenEdge = _brokenEdges[atNode];
@@ -2794,8 +2789,7 @@ ErrorCode FBEngine::split_boundary(EntityHandle face, EntityHandle atNode)
else
{
Range nodes;
- rval = _mbImpl->get_connectivity(mesh_edges, nodes);
- MBERRORR(rval, " can't get nodes from mesh edges");
+ rval = _mbImpl->get_connectivity(mesh_edges, nodes);MBERRORR(rval, " can't get nodes from mesh edges");
if (nodes.find(atNode)!=nodes.end())
{
@@ -2809,7 +2803,6 @@ ErrorCode FBEngine::split_boundary(EntityHandle face, EntityHandle atNode)
// if the node was not found in any "current" boundary, it broke an existing
// boundary edge
MBERRORR(MB_FAILURE, " we did not find an appropriate boundary edge"); ; //
- return MB_FAILURE; // needed to suppress compile warning
}
bool FBEngine::find_vertex_set_for_node(EntityHandle iNode, EntityHandle & oVertexSet)
diff --git a/src/Skinner.cpp b/src/Skinner.cpp
index 02acf2c..f9c092e 100644
--- a/src/Skinner.cpp
+++ b/src/Skinner.cpp
@@ -1228,7 +1228,7 @@ public:
default:
assert(false);
break;
- case 4: handles[2] = array[(idx+3)%CORNERS];
+ case 4: handles[2] = array[(idx+3)%CORNERS]; // TODO: This is a violation if CORNERS=3
case 3: handles[1] = array[(idx+2)%CORNERS];
case 2: handles[0] = array[(idx+1)%CORNERS];
}
@@ -1256,7 +1256,7 @@ public:
default:
assert(false);
break;
- case 4: handles[2] = array[indices[(idx+3)%CORNERS]];
+ case 4: handles[2] = array[indices[(idx+3)%CORNERS]]; // TODO: Violation for instantiation with CORNERS=3
case 3: handles[1] = array[indices[(idx+2)%CORNERS]];
case 2: handles[0] = array[indices[(idx+1)%CORNERS]];
}
@@ -1277,7 +1277,7 @@ public:
case 4:
return handles[0] == other.handles[0]
&& handles[1] == other.handles[1]
- && handles[2] == other.handles[2];
+ && handles[2] == other.handles[2]; // TODO: VSM: Again a violation for instantiation with CORNERS=3 -- Fix this bad code
case 3:
return handles[0] == other.handles[0]
&& handles[1] == other.handles[1];
diff --git a/src/io/NCHelper.cpp b/src/io/NCHelper.cpp
index 613ce13..8ff0aed 100644
--- a/src/io/NCHelper.cpp
+++ b/src/io/NCHelper.cpp
@@ -1084,7 +1084,6 @@ ErrorCode ScdNCHelper::read_scd_variables_to_nonset_allocate(std::vector<ReadNC:
case ReadNC::ENTLOCEWEDGE:
case ReadNC::ENTLOCEDGE:
ERRORR(MB_NOT_IMPLEMENTED, "Reading edge data not implemented yet.");
- break;
case ReadNC::ENTLOCFACE:
// Faces
vdatas[i].readStarts[2] = lCDims[1];
diff --git a/src/moab/BVHTree.hpp b/src/moab/BVHTree.hpp
index eb0e4e4..3eab2d8 100644
--- a/src/moab/BVHTree.hpp
+++ b/src/moab/BVHTree.hpp
@@ -193,7 +193,7 @@ namespace moab {
unsigned int dim, child;
double Lmax, Rmin;
BoundBox box;
- Node() : dim(-2), child(-1), Lmax(-DBL_MAX), Rmin(DBL_MAX) {}
+ Node() : dim(UINT_MAX), child(UINT_MAX), Lmax(-DBL_MAX), Rmin(DBL_MAX) {}
Node &operator=(const Node& f) {
dim = f.dim; child = f.child;
Lmax = f.Lmax; Rmin = f.Rmin;
diff --git a/test/io/read_cgm_group_test.cpp b/test/io/read_cgm_group_test.cpp
index 6fd2d3c..d040b89 100644
--- a/test/io/read_cgm_group_test.cpp
+++ b/test/io/read_cgm_group_test.cpp
@@ -40,7 +40,12 @@ void read_file( Interface* moab, const char* input_file );
int geom_id_by_handle( Interface* moab, const EntityHandle set );
//Function for checking retrieved group data
-void check_group_data( std::vector<int> & group_ids, std::vector<std::string> & group_names, std::vector<int> & group_ent_ids );
+void check_group_data( std::vector<int> & group_ids, std::vector<std::string> & group_names,
+#ifdef HAVE_OCC_STEP
+ std::vector<int> & );
+#else
+ std::vector<int> & group_ent_ids );
+#endif
//Function for loading all reference data
void load_group_references( std::vector<int>& ids, std::vector<std::string>& names, std::vector<int>& ent_ids);
@@ -129,15 +134,13 @@ void read_cylcube_groups_test()
check_group_data( g_ids, g_names, g_ent_ids );
}
-void check_group_data(std::vector<int> & group_ids, std::vector<std::string> & group_names, std::vector<int> &
+void check_group_data(std::vector<int>& group_ids, std::vector<std::string>& group_names,
#ifdef HAVE_OCC_STEP
- /* group_ent_ids */
+ std::vector<int>& /*group_ent_ids*/ )
#else
- group_ent_ids
+ std::vector<int>& group_ent_ids )
#endif
-)
{
-
// Step files do not contain group data, MOAB shouldn't return errors when trying to access
// this data but there shouldn't be any found.
#ifdef HAVE_OCC_STEP
https://bitbucket.org/fathomteam/moab/commits/cb158e3e6211/
Changeset: cb158e3e6211
Branch: None
User: vijaysm
Date: 2014-07-12 02:05:35
Summary: Fix some unused variable warnings in tests
Affected #: 2 files
diff --git a/test/mbcn_test.cc b/test/mbcn_test.cc
index 1ad8778..f57343a 100644
--- a/test/mbcn_test.cc
+++ b/test/mbcn_test.cc
@@ -142,7 +142,7 @@ const EntityType elem_types[] = { MBTRI,
MBPRISM,
MBHEX,
MBMAXTYPE };
-const int num_elem_types = sizeof(elem_types)/sizeof(elem_types[0]) - 1;
+// const int num_elem_types = sizeof(elem_types)/sizeof(elem_types[0]) - 1;
void test_dimension_pair()
{
diff --git a/test/parallel/scdtest.cpp b/test/parallel/scdtest.cpp
index 5338b81..dbcde62 100644
--- a/test/parallel/scdtest.cpp
+++ b/test/parallel/scdtest.cpp
@@ -13,17 +13,17 @@ using namespace std;
using namespace moab;
// Number of cells in each direction:
-const int NC = 2;
+// const int NC = 2;
const int NI = 2;
const int NJ = 2;
const int NK = 1;
// Number of processes:
-const int NPROCS = 4;
+// const int NPROCS = 4;
// Domain size:
-const double DSIZE = 10.0;
+// const double DSIZE = 10.0;
// MOAB objects:
Interface *mbint = NULL;
https://bitbucket.org/fathomteam/moab/commits/36bf22f841b9/
Changeset: 36bf22f841b9
Branch: vijaysm/fix-warnings
User: vijaysm
Date: 2014-07-12 02:05:36
Summary: Fixing warnings related to array subscript is above array bounds
Affected #: 1 file
diff --git a/src/moab/ScdInterface.hpp b/src/moab/ScdInterface.hpp
index 1f2a482..1635dc6 100644
--- a/src/moab/ScdInterface.hpp
+++ b/src/moab/ScdInterface.hpp
@@ -314,7 +314,7 @@ private:
* For description of arguments, see ScdInterface::compute_partition.
*/
inline static ErrorCode compute_partition_alljorkori(int np, int nr,
- const int * const gijk, const int * const gperiodic,
+ const int gijk[6], const int * const gperiodic,
int *lijk, int *lperiodic, int *pijk);
//! Compute a partition of structured parameter space
@@ -322,28 +322,28 @@ private:
* seeking square regions of jk space
* For description of arguments, see ScdInterface::compute_partition.
*/
- inline static ErrorCode compute_partition_alljkbal(int np, int nr, const int * const gijk, const int * const gperiodic,
+ inline static ErrorCode compute_partition_alljkbal(int np, int nr, const int gijk[6], const int * const gperiodic,
int *lijk, int *lperiodic, int *pijk);
//! Compute a partition of structured parameter space
/** Partitions the structured parametric space by seeking square ij partitions
* For description of arguments, see ScdInterface::compute_partition.
*/
- inline static ErrorCode compute_partition_sqij(int np, int nr, const int * const gijk, const int * const gperiodic,
+ inline static ErrorCode compute_partition_sqij(int np, int nr, const int gijk[6], const int * const gperiodic,
int *lijk, int *lperiodic, int *pijk);
//! Compute a partition of structured parameter space
/** Partitions the structured parametric space by seeking square jk partitions
* For description of arguments, see ScdInterface::compute_partition.
*/
- inline static ErrorCode compute_partition_sqjk(int np, int nr, const int * const gijk, const int * const gperiodic,
+ inline static ErrorCode compute_partition_sqjk(int np, int nr, const int gijk[6], const int * const gperiodic,
int *lijk, int *lperiodic, int *pijk);
//! Compute a partition of structured parameter space
/** Partitions the structured parametric space by seeking square ijk partitions
* For description of arguments, see ScdInterface::compute_partition.
*/
- inline static ErrorCode compute_partition_sqijk(int np, int nr, const int * const gijk, const int * const gperiodic,
+ inline static ErrorCode compute_partition_sqijk(int np, int nr, const int gijk[6], const int * const gperiodic,
int *lijk, int *lperiodic, int *pijk);
//! Get vertices shared with other processors
@@ -775,7 +775,7 @@ inline ErrorCode ScdInterface::compute_partition(int np, int nr, const ScdParDat
}
inline ErrorCode ScdInterface::compute_partition_alljorkori(int np, int nr,
- const int * const gijk, const int * const gperiodic,
+ const int gijk[6], const int * const gperiodic,
int *ldims, int *lperiodic, int *pijk)
{
// partition *the elements* over the parametric space; 1d partition for now, in the j, k, or i
@@ -858,7 +858,7 @@ inline ErrorCode ScdInterface::compute_partition_alljorkori(int np, int nr,
}
inline ErrorCode ScdInterface::compute_partition_alljkbal(int np, int nr,
- const int * const gijk, const int * const gperiodic,
+ const int gijk[6], const int * const gperiodic,
int *ldims, int *lperiodic, int *pijk)
{
int tmp_lp[3], tmp_pijk[3];
@@ -932,7 +932,7 @@ inline ErrorCode ScdInterface::compute_partition_alljkbal(int np, int nr,
}
inline ErrorCode ScdInterface::compute_partition_sqij(int np, int nr,
- const int * const gijk, const int * const gperiodic,
+ const int gijk[6], const int * const gperiodic,
int *ldims, int *lperiodic, int *pijk)
{
int tmp_lp[3], tmp_pijk[3];
@@ -1012,7 +1012,7 @@ inline ErrorCode ScdInterface::compute_partition_sqij(int np, int nr,
}
inline ErrorCode ScdInterface::compute_partition_sqjk(int np, int nr,
- const int * const gijk, const int * const gperiodic,
+ const int gijk[6], const int * const gperiodic,
int *ldims, int *lperiodic, int *pijk)
{
int tmp_lp[3], tmp_pijk[3];
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the moab-dev
mailing list