Skip to content

Commit

Permalink
stk snapshot as of 10/27/2020
Browse files Browse the repository at this point in the history
  • Loading branch information
alanw0 committed Oct 28, 2020
1 parent 59c79de commit 1e9747d
Show file tree
Hide file tree
Showing 230 changed files with 11,774 additions and 5,291 deletions.
4 changes: 2 additions & 2 deletions packages/stk/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
SET(SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS
Math stk_math PT OPTIONAL
Util stk_util PT OPTIONAL
Math stk_math PT OPTIONAL
Simd stk_simd PT OPTIONAL
NGP_TEST stk_ngp_test PT OPTIONAL
Topology stk_topology PT OPTIONAL
Mesh stk_mesh PT OPTIONAL
IO stk_io PT OPTIONAL
NGP_TEST stk_ngp_test PT OPTIONAL
Unit_test_utils stk_unit_test_utils PT OPTIONAL
Search stk_search PT OPTIONAL
SearchUtil stk_search_util PT OPTIONAL
Expand Down
8 changes: 8 additions & 0 deletions packages/stk/cmake/STK_Trilinos_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,20 @@

/* Non-typical "not" macro for optional dependence on SEACASAprepro_lib (See
* STK #17354) */
#ifndef NOT_HAVE_STK_SEACASAPREPRO_LIB
#cmakedefine NOT_HAVE_STK_SEACASAPREPRO_LIB
#endif

#ifndef FORTRAN_NO_UNDERSCORE
#cmakedefine FORTRAN_NO_UNDERSCORE
#endif

#ifndef FORTRAN_ONE_UNDERSCORE
#cmakedefine FORTRAN_ONE_UNDERSCORE
#endif

#ifndef FORTRAN_TWO_UNDERSCORES
#cmakedefine FORTRAN_TWO_UNDERSCORES
#endif

#define SIERRA_MIGRATION
2 changes: 1 addition & 1 deletion packages/stk/stk_balance/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ lib stk_balance_lib
/sierra/stk_search//stk_search
/sierra/stk_tools//stk_tools_lib
/sierra/stk_util//stk_util_command_line
/sierra/stk_math//stk_math_headers
/sierra/stk_math//stk_math
:
<include>$(stk_balance-root-inc)/stk_balance
[ ifuserbuild <file>$(stk_balance-root)/lib/libstk_balance_lib.a
Expand Down
3 changes: 0 additions & 3 deletions packages/stk/stk_balance/stk_balance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,19 @@ TRIBITS_ADD_LIBRARY(
stk_balance_lib
NOINSTALLHEADERS ${HEADERS} ${HEADERS_INTERNAL} ${HEADERS_SETUP} ${HEADERS_SEARCH_TOLERANCE} ${HEADERS_SEARCH_TOLERANCE_ALGS}
SOURCES ${SOURCES} ${SOURCES_INTERNAL} ${SOURCES_SETUP} ${SOURCES_SEARCH_TOLERANCE_ALGS}
DEPLIBS
)

IF(TPL_ENABLE_Boost)

TRIBITS_ADD_EXECUTABLE(
stk_balance
SOURCES ${SOURCES_MAIN}
DEPLIBS
NOEXEPREFIX INSTALLABLE
)

TRIBITS_ADD_EXECUTABLE(
stk_balance_m2n
SOURCES ${SOURCES_M2N_MAIN}
DEPLIBS
NOEXEPREFIX INSTALLABLE
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <stk_mesh/base/EntityKey.hpp>
#include <stk_mesh/base/MetaData.hpp>
#include <stk_mesh/base/Selector.hpp>
#include <stk_mesh/base/GetEntities.hpp>
#include <stk_topology/topology.hpp>
#include <stk_util/environment/Env.hpp>
#include <stk_util/parallel/ParallelReduce.hpp>
Expand Down Expand Up @@ -86,7 +87,7 @@ NodeBalancer::getGlobalLoadImbalance(double &loadFactor, int& numLocallyOwnedNod
{
stk::mesh::Selector localSelector = m_metaData.locally_owned_part();
stk::mesh::EntityVector ownedNodes;
m_bulkData.get_entities(stk::topology::NODE_RANK, localSelector, ownedNodes);
stk::mesh::get_entities(m_bulkData, stk::topology::NODE_RANK, localSelector, ownedNodes);

numLocallyOwnedNodes = ownedNodes.size();
int maxLocallyOwned = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ int StkMeshZoltanAdapter::getDimension() const
void StkMeshZoltanAdapter::debuggingInfo(int proc_id, std::ofstream& out) const
{
int stride = 0;
const scalar_t** coords = new const scalar_t*[this->getDimension()]; // int *vect = new int[num];
const scalar_t** coords = new const scalar_t*[this->getDimension()];

for(int coordim = 0; coordim < this->getDimension(); ++coordim)
{
this->getCoordinatesViewOf(getPrimaryEntityType(), coords[coordim], stride, coordim);
}

// vertex weights
const scalar_t** weights = new const scalar_t*[getNumWeightsPerOf(getPrimaryEntityType())]; // int *vect = new int[num];
const scalar_t** weights = new const scalar_t*[getNumWeightsPerOf(getPrimaryEntityType())];
int weightstride = 0;
for(int weightdim = 0; weightdim < getNumWeightsPerOf(getPrimaryEntityType()); ++weightdim)
{
Expand Down Expand Up @@ -107,7 +107,6 @@ int StkMeshZoltanAdapter::getNumWeightsPerOf(Zoltan2::MeshEntityType etype) cons
{
numWeightsPerVertex = mGraph.get_num_field_criteria();
}
//std::cerr << "Num weights per = " << numWeightsPerVertex << std::endl;
return numWeightsPerVertex;
}

Expand All @@ -122,7 +121,6 @@ void StkMeshZoltanAdapter::getWeightsViewOf(Zoltan2::MeshEntityType etype, const
weights = mGraph.get_vertex_weights().data() + idx;
}
}
//std::cerr << "Weights = " << weights[0] << ", " << weights[1] << ", " << weights[2] << ", " << weights[3] << std::endl;
}

bool StkMeshZoltanAdapter::avail2ndAdjs(Zoltan2::MeshEntityType sourcetarget, Zoltan2::MeshEntityType through) const
Expand Down Expand Up @@ -165,7 +163,6 @@ int StkMeshZoltanAdapter::getNumWeightsPer2ndAdj(Zoltan2::MeshEntityType sourcet
if(sourcetarget == Zoltan2::MESH_REGION && through == Zoltan2::MESH_FACE)
{
numWeightsPerEdge = 1;
// numWeightsPerEdge = mEdgeWeights.size();
}
return numWeightsPerEdge;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <stk_balance/internal/StkGeometricMethodViaZoltan.hpp>
#include <stk_balance/internal/MxNutils.hpp>
#include <stk_balance/internal/StkBalanceUtils.hpp>
#include <stk_balance/internal/SideGeometry.hpp>

#include <stk_mesh/base/MetaData.hpp>
#include <stk_mesh/base/SkinMesh.hpp>
Expand All @@ -25,6 +24,7 @@
#include <stk_util/environment/WallTime.hpp>
#include <stk_util/environment/LogWithTimeAndMemory.hpp>
#include <stk_util/diag/StringUtil.hpp>
#include <stk_math/SideGeometry.hpp>
#include <zoltan.h>
#include <Zoltan2_Version.hpp>
#include <map>
Expand Down Expand Up @@ -306,7 +306,7 @@ struct SideInfo {
};

using SideInfoMap = std::map<stk::mesh::EntityId, std::vector<SideInfo>>;
using SideGeometryPtr = std::unique_ptr<SideGeometry>;
using SideGeometryPtr = std::unique_ptr<stk::math::SideGeometry>;

bool is_line_side(const stk::topology::topology_t & t)
{
Expand All @@ -321,22 +321,22 @@ bool is_point_side(const stk::topology::topology_t & t)
SideGeometryPtr makeSideGeometry(const SideInfo & sideInfo)
{
if (stk::is_quad_side(sideInfo.sideTopology)) {
return SideGeometryPtr(new QuadGeometry(sideInfo.nodeCoordinates[0],
sideInfo.nodeCoordinates[1],
sideInfo.nodeCoordinates[2],
sideInfo.nodeCoordinates[3]));
return SideGeometryPtr(new stk::math::QuadGeometry(sideInfo.nodeCoordinates[0],
sideInfo.nodeCoordinates[1],
sideInfo.nodeCoordinates[2],
sideInfo.nodeCoordinates[3]));
}
else if (stk::is_tri_side(sideInfo.sideTopology)) {
return SideGeometryPtr(new TriGeometry(sideInfo.nodeCoordinates[0],
sideInfo.nodeCoordinates[1],
sideInfo.nodeCoordinates[2]));
return SideGeometryPtr(new stk::math::TriGeometry(sideInfo.nodeCoordinates[0],
sideInfo.nodeCoordinates[1],
sideInfo.nodeCoordinates[2]));
}
else if (is_line_side(sideInfo.sideTopology)) {
return SideGeometryPtr(new LineGeometry(sideInfo.nodeCoordinates[0],
sideInfo.nodeCoordinates[1]));
return SideGeometryPtr(new stk::math::LineGeometry(sideInfo.nodeCoordinates[0],
sideInfo.nodeCoordinates[1]));
}
else if (is_point_side(sideInfo.sideTopology)) {
return SideGeometryPtr(new PointGeometry(sideInfo.nodeCoordinates[0]));
return SideGeometryPtr(new stk::math::PointGeometry(sideInfo.nodeCoordinates[0]));
}
else {
ThrowErrorMsg("Unsupported side topology: " << stk::topology(sideInfo.sideTopology).name());
Expand Down Expand Up @@ -780,7 +780,7 @@ void fill_decomp_using_geometric_method(const BalanceSettings& balanceSettings,
if (balanceSettings.isMultiCriteriaRebalance())
get_multicriteria_decomp_using_selectors_as_segregation(stkMeshBulkData, selectors, balanceSettings, numSubdomainsToCreate, decomp, localIds);
else
for(const stk::mesh::Selector selector : selectors)
for(const stk::mesh::Selector& selector : selectors)
get_multicriteria_decomp_using_selectors_as_segregation(stkMeshBulkData, std::vector<stk::mesh::Selector>{selector}, balanceSettings, numSubdomainsToCreate, decomp, localIds);

logMessage(stkMeshBulkData.parallel(), "Finished decomposition solve");
Expand Down Expand Up @@ -973,7 +973,7 @@ void pack_new_spider_entity_owners(const stk::mesh::BulkData & bulk,
stk::CommSparse & comm,
const stk::mesh::EntityProcMap & newSpiderEntityOwners)
{
for (const stk::mesh::EntityProc & entityNewOwner : newSpiderEntityOwners) {
for (const stk::mesh::EntityProcMap::value_type & entityNewOwner : newSpiderEntityOwners) {
const int currentOwner = bulk.parallel_owner_rank(entityNewOwner.first);
const stk::mesh::EntityKey entityKey = bulk.entity_key(entityNewOwner.first);
comm.send_buffer(currentOwner).pack<stk::mesh::EntityKey>(entityKey);
Expand Down
13 changes: 6 additions & 7 deletions packages/stk/stk_doc_tests/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
SET(LIB_REQUIRED_DEP_PACKAGES Gtest)
SET(LIB_OPTIONAL_DEP_PACKAGES STKTopology STKMath STKSimd STKUtil STKMesh STKIO)
SET(TEST_OPTIONAL_DEP_PACKAGES STKUnit_test_utils)
SET(TEST_REQUIRED_DEP_PACKAGES)
SET(LIB_REQUIRED_DEP_PACKAGES)
SET(LIB_OPTIONAL_DEP_PACKAGES)
SET(TEST_OPTIONAL_DEP_PACKAGES STKTopology STKMath STKSimd STKMesh STKIO)
SET(TEST_REQUIRED_DEP_PACKAGES Gtest STKUtil STKNGP_TEST STKUnit_test_utils)
SET(LIB_REQUIRED_DEP_TPLS)
SET(LIB_OPTIONAL_DEP_TPLS Boost)
SET(LIB_OPTIONAL_DEP_TPLS)
SET(TEST_REQUIRED_DEP_TPLS)
SET(TEST_OPTIONAL_DEP_TPLS)
SET(TEST_OPTIONAL_DEP_TPLS Boost)
SET(TEST_OPTIONAL_DEP_TPLS Boost MPI)
1 change: 0 additions & 1 deletion packages/stk/stk_doc_tests/stk_balance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ FILE(GLOB SOURCES *.cpp)
TRIBITS_ADD_EXECUTABLE_AND_TEST(
stk_balance_doc_tester
SOURCES ${SOURCES}
TESTONLYLIBS stk_unit_main
ARGS ""
COMM serial mpi
NUM_MPI_PROCS 1-4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ void put_elements_in_different_parts(stk::mesh::BulkData &bulk, stk::mesh::Part
void verify_mesh_balanced_wrt_selectors(const stk::mesh::BulkData& bulk, const std::vector<stk::mesh::Selector> &selectors)
{
std::vector<size_t> counts;
for(const stk::mesh::Selector sel : selectors)
for(const stk::mesh::Selector & sel : selectors)
{
stk::mesh::EntityVector elements;
size_t num_elements = stk::mesh::count_selected_entities(sel, bulk.buckets(stk::topology::ELEM_RANK));
Expand Down
2 changes: 1 addition & 1 deletion packages/stk/stk_doc_tests/stk_io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/RenamedInputFields.cpp")
TRIBITS_ADD_EXECUTABLE_AND_TEST(
stk_io_doc_tests
SOURCES ${SOURCES}
TESTONLYLIBS stk_unit_main
ARGS ""
COMM serial mpi
NUM_MPI_PROCS 1
NOEXEPREFIX
)

Loading

0 comments on commit 1e9747d

Please sign in to comment.