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

Panzer and NOX cleanup #12409

Merged
merged 3 commits into from
Oct 17, 2023
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
4 changes: 2 additions & 2 deletions packages/nox/test/epetra/MultiPhysics/Problem_Manager.C
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ Problem_Manager::computeBlockJacobian(int probId, int depId)
OffBlock_Manager::idToFind = depId;

std::vector<OffBlock_Manager *>::iterator iter =
find_if( managerVec.begin(), managerVec.end(), mem_fun( &OffBlock_Manager::isMember) );
find_if( managerVec.begin(), managerVec.end(), mem_fn( &OffBlock_Manager::isMember) );

if( managerVec.end() == iter )
{
Expand Down Expand Up @@ -1096,7 +1096,7 @@ Problem_Manager::getBlockJacobianMatrix(int probId, int depId)
OffBlock_Manager::idToFind = depId;

std::vector<OffBlock_Manager *>::iterator iter =
find_if( offVec.begin(), offVec.end(), mem_fun( &OffBlock_Manager::isMember) );
find_if( offVec.begin(), offVec.end(), mem_fn( &OffBlock_Manager::isMember) );

if( offVec.end() == iter )
{
Expand Down
7 changes: 7 additions & 0 deletions packages/panzer/adapters-stk/src/Panzer_STKConnManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ STKConnManager::addSubcellConnectivities(stk::mesh::Entity element,
LocalOrdinal numIds = 0;
stk::mesh::BulkData& bulkData = *stkMeshDB_->getBulkData();
const stk::mesh::EntityRank rank = static_cast<stk::mesh::EntityRank>(subcellRank);

#ifdef PANZER_DEBUG
TEUCHOS_TEST_FOR_EXCEPTION(maxIds > bulkData.num_connectivity(element, rank),
std::runtime_error,
"ERROR: The maxIds (num vertices from basis cell topology) is greater than the num vertices in the stk mesh topology!");
#endif

const size_t num_rels = (maxIds > 0) ? maxIds : bulkData.num_connectivity(element, rank);
stk::mesh::Entity const* relations = bulkData.begin(element, rank);
for(std::size_t sc=0; sc<num_rels; ++sc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class ResponseEvaluatorFactory_SolutionWriter : public panzer::ResponseEvaluator
void deleteRemovedFields(const std::vector<std::string> & removedFields,
std::vector<std::pair<std::string,Teuchos::RCP<const panzer::PureBasis> > > & fields) const;

struct RemovedFieldsSearchUnaryFunctor : public std::unary_function<std::pair<std::string,const panzer::PureBasis>,bool> {
struct RemovedFieldsSearchUnaryFunctor {
std::vector<std::string> removedFields_;
bool operator() (const std::pair<std::string,Teuchos::RCP<const panzer::PureBasis> > & field)
{ return std::find(removedFields_.begin(),removedFields_.end(),field.first)!=removedFields_.end(); }
Expand Down