Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percept: sync from sierra #6018

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/percept/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
LIB_REQUIRED_PACKAGES SEACASIoss STKUtil STKIO STKMesh STKExprEval STKSearch STKTransfer Intrepid
TEST_OPTIONAL_PACKAGES Gtest
LIB_REQUIRED_TPLS BoostLib
LIB_OPTIONAL_TPLS OpenNURBS
)
4 changes: 2 additions & 2 deletions packages/percept/src/adapt/AdaptedMeshVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,12 @@ namespace percept
std::string stol = eMesh.getProperty("AdaptedMeshVerifier::checkParentChildVol::edgeTol");
if (stol.length())
{
edgeTol = boost::lexical_cast<double>(stol);
edgeTol = std::stod(stol);
}
stol = eMesh.getProperty("AdaptedMeshVerifier::checkParentChildVol::volumeTol");
if (stol.length())
{
volumeTol = boost::lexical_cast<double>(stol);
volumeTol = std::stod(stol);
}
bool badVol = false;
bool badNode = false;
Expand Down
99 changes: 0 additions & 99 deletions packages/percept/src/adapt/Allocate.cpp

This file was deleted.

4 changes: 0 additions & 4 deletions packages/percept/src/adapt/Colorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,7 @@
double *fdata = stk::mesh::field_data( *static_cast<const percept::ScalarFieldType *>(element_color_field) , element );
fdata[0] = double(icolor);
}
#if STK_ADAPT_COLORER_SET_TYPE_USE_VECTOR
m_element_colors[icolor].push_back(element);
#else
m_element_colors[icolor].insert(element);
#endif
if (!m_noColoring)
{
all_elements.insert(elem_id);
Expand Down
27 changes: 3 additions & 24 deletions packages/percept/src/adapt/Colorer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,16 @@

#include <stk_util/parallel/Parallel.hpp>

#define STK_ADAPT_COLORER_STORED_ENTITYID 0

#define STK_ADAPT_COLORER_SET_TYPE_USE_VECTOR 1

/// define only one of these to be 1
#define STK_ADAPT_COLORER_SET_TYPE_BOOST 1

#if STK_ADAPT_COLORER_SET_TYPE_BOOST
#include <boost/unordered_set.hpp>
#endif

#include <unordered_set>

namespace percept {

#if STK_ADAPT_COLORER_STORED_ENTITYID
typedef stk::mesh::EntityId ColorerStoredEntity;
#else
typedef stk::mesh::Entity ColorerStoredEntity;
#endif

#if STK_ADAPT_COLORER_SET_TYPE_USE_VECTOR
typedef std::vector<ColorerStoredEntity> ColorerSetType;
#endif

#if STK_ADAPT_COLORER_SET_TYPE_BOOST
# if !STK_ADAPT_COLORER_SET_TYPE_USE_VECTOR
typedef boost::unordered_set<ColorerStoredEntity> ColorerSetType;
# endif
typedef boost::unordered_set<stk::mesh::EntityId> ColorerNodeSetType;
typedef boost::unordered_set<stk::mesh::EntityId> ColorerElementSetType;
#endif
typedef std::unordered_set<stk::mesh::EntityId> ColorerNodeSetType;
typedef std::unordered_set<stk::mesh::EntityId> ColorerElementSetType;

class Colorer
{
Expand Down
28 changes: 14 additions & 14 deletions packages/percept/src/adapt/DiscretizeHex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@

namespace percept {

typedef boost::array<unsigned, 4> hex_to_tet_tuple_type_local;
typedef boost::array<unsigned, 5> hex_to_pyr_tuple_type_local;
typedef boost::array<stk::mesh::EntityId, 4> hex_to_tet_tuple_type;
typedef boost::array<stk::mesh::EntityId, 5> hex_to_pyr_tuple_type;
typedef std::array<unsigned, 4> hex_to_tet_tuple_type_local;
typedef std::array<unsigned, 5> hex_to_pyr_tuple_type_local;
typedef std::array<stk::mesh::EntityId, 4> hex_to_tet_tuple_type;
typedef std::array<stk::mesh::EntityId, 5> hex_to_pyr_tuple_type;

typedef boost::array<unsigned, 8> hex_to_hex_tuple_type_local;
typedef boost::array<stk::mesh::EntityId, 8> hex_to_hex_tuple_type;
typedef std::array<unsigned, 8> hex_to_hex_tuple_type_local;
typedef std::array<stk::mesh::EntityId, 8> hex_to_hex_tuple_type;

/**
*
Expand Down Expand Up @@ -252,7 +252,7 @@ namespace percept {
if (elems_tri.size() == 0 && elems_quad.size() == 0)
{
VERIFY_OP_ON(num_quad_edge_marks, ==, 0, "hmm");
elems_quad.push_back(quad_to_quad_tuple_type_local(0,1,2,3));
elems_quad.push_back({0,1,2,3});
}
if (m_debug)
{
Expand All @@ -274,10 +274,10 @@ namespace percept {

hex_to_pyr_tuple_type_local hp;
// reverse order to get proper volume
hp[3] = elems_quad[iquad].get<0>();
hp[2] = elems_quad[iquad].get<1>();
hp[1] = elems_quad[iquad].get<2>();
hp[0] = elems_quad[iquad].get<3>();
hp[3] = elems_quad[iquad][0];
hp[2] = elems_quad[iquad][1];
hp[1] = elems_quad[iquad][2];
hp[0] = elems_quad[iquad][3];
for (unsigned ii=0; ii < 4; ++ii)
{
int hpii = quad_local_nodes[hp[ii]];
Expand All @@ -296,9 +296,9 @@ namespace percept {
}
hex_to_tet_tuple_type_local ht;
// reverse order to get proper volume
ht[2] = elems_tri[itri].get<0>();
ht[1] = elems_tri[itri].get<1>();
ht[0] = elems_tri[itri].get<2>();
ht[2] = elems_tri[itri][0];
ht[1] = elems_tri[itri][1];
ht[0] = elems_tri[itri][2];
for (unsigned ii=0; ii < 3; ++ii)
{
int htii = quad_local_nodes[ht[ii]];
Expand Down
32 changes: 16 additions & 16 deletions packages/percept/src/adapt/DiscretizePyr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

namespace percept {

typedef boost::array<unsigned, 4> pyr_to_tet_tuple_type_local;
typedef boost::array<unsigned, 5> pyr_to_pyr_tuple_type_local;
typedef boost::array<stk::mesh::EntityId, 4> pyr_to_tet_tuple_type;
typedef boost::array<stk::mesh::EntityId, 5> pyr_to_pyr_tuple_type;
typedef std::array<unsigned, 4> pyr_to_tet_tuple_type_local;
typedef std::array<unsigned, 5> pyr_to_pyr_tuple_type_local;
typedef std::array<stk::mesh::EntityId, 4> pyr_to_tet_tuple_type;
typedef std::array<stk::mesh::EntityId, 5> pyr_to_pyr_tuple_type;


/**
Expand Down Expand Up @@ -226,7 +226,7 @@ namespace percept {
if (elems_tri.size() == 0 && elems_quad.size() == 0)
{
VERIFY_OP_ON(num_quad_edge_marks, ==, 0, "hmm");
elems_quad.push_back(quad_to_quad_tuple_type_local(0,1,2,3));
elems_quad.push_back({0,1,2,3});
}
if (m_debug)
{
Expand All @@ -249,10 +249,10 @@ namespace percept {

pyr_to_pyr_tuple_type_local hp;
// reverse order to get proper volume
hp[3] = elems_quad[iquad].get<0>();
hp[2] = elems_quad[iquad].get<1>();
hp[1] = elems_quad[iquad].get<2>();
hp[0] = elems_quad[iquad].get<3>();
hp[3] = elems_quad[iquad][0];
hp[2] = elems_quad[iquad][1];
hp[1] = elems_quad[iquad][2];
hp[0] = elems_quad[iquad][3];
for (unsigned ii=0; ii < 4; ++ii)
{
int hpii = quad_local_nodes[hp[ii]];
Expand All @@ -271,9 +271,9 @@ namespace percept {
}
pyr_to_tet_tuple_type_local ht;
// reverse order to get proper volume
ht[2] = elems_tri[itri].get<0>();
ht[1] = elems_tri[itri].get<1>();
ht[0] = elems_tri[itri].get<2>();
ht[2] = elems_tri[itri][0];
ht[1] = elems_tri[itri][1];
ht[0] = elems_tri[itri][2];
for (unsigned ii=0; ii < 3; ++ii)
{
int htii = quad_local_nodes[ht[ii]];
Expand Down Expand Up @@ -319,7 +319,7 @@ namespace percept {
if (elems_tri.size() == 0)
{
VERIFY_OP_ON(num_tri_edge_marks, ==, 0, "hmm");
elems_tri.push_back(tri_tuple_type_local(0,1,2));
elems_tri.push_back({0,1,2});
}

if (m_debug)
Expand All @@ -339,9 +339,9 @@ namespace percept {
}
pyr_to_tet_tuple_type_local ht;
// reverse order to get proper volume
ht[2] = elems_tri[itri].get<0>();
ht[1] = elems_tri[itri].get<1>();
ht[0] = elems_tri[itri].get<2>();
ht[2] = elems_tri[itri][0];
ht[1] = elems_tri[itri][1];
ht[0] = elems_tri[itri][2];
for (unsigned ii=0; ii < 3; ++ii)
{
int htii = tri_local_nodes[ht[ii]];
Expand Down
Loading