Skip to content

Commit

Permalink
Remove unused non-NGP code (#486)
Browse files Browse the repository at this point in the history
* Remove unused classes after transition to NGP

* Remove deprecated code used during NGP transition
  • Loading branch information
sayerhs authored Jan 13, 2020
1 parent 2191d04 commit 8960c45
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 1,026 deletions.
50 changes: 0 additions & 50 deletions include/AssembleMomentumEdgeOpenSolverAlgorithm.h

This file was deleted.

37 changes: 0 additions & 37 deletions include/ComputeGeometryBoundaryAlgorithm.h

This file was deleted.

43 changes: 0 additions & 43 deletions include/ComputeGeometryInteriorAlgorithm.h

This file was deleted.

54 changes: 0 additions & 54 deletions include/ngp_algorithms/NgpAlgDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,24 +118,6 @@ class NgpAlgDriver
}
}

template<
template <typename> class NGPAlg,
typename LegacyAlg,
class... Args>
void register_elem_algorithm(
AlgorithmType algType,
stk::mesh::Part* part,
const std::string& algSuffix,
Args&&... args)
{
if (!nalu_ngp::is_ngp_element(part->topology()))
register_legacy_algorithm<LegacyAlg>(
algType, part, algSuffix, std::forward<Args>(args)...);
else
register_elem_algorithm<NGPAlg>(
algType, part, algSuffix, std::forward<Args>(args)...);
}

/** Register an face algorithm
*
* @param algType Type of algorithm being registered (e.g., INLET, WALL, * OPEN)
Expand Down Expand Up @@ -192,42 +174,6 @@ class NgpAlgDriver
}
}

template<
template <typename> class NGPAlg,
typename LegacyAlg,
class... Args>
void register_face_algorithm(
AlgorithmType algType,
stk::mesh::Part* part,
const std::string& algSuffix,
Args&&... args)
{
if (!nalu_ngp::is_ngp_face(part->topology()))
register_legacy_algorithm<LegacyAlg>(
algType, part, algSuffix, std::forward<Args>(args)...);
else
register_face_algorithm<NGPAlg>(
algType, part, algSuffix, std::forward<Args>(args)...);
}

template<template <typename> class NgpAlg,
typename LegacyAlg,
class ... Args>
void register_face_elem_algorithm(
AlgorithmType algType,
stk::mesh::Part* part,
const stk::topology elemTopo,
const std::string& algSuffix,
Args&& ... args)
{
if (!nalu_ngp::is_ngp_face(part->topology()))
register_legacy_algorithm<LegacyAlg>(
algType, part, algSuffix, std::forward<Args>(args) ...);
else
register_face_elem_algorithm<NgpAlg>(
algType, part, elemTopo, algSuffix, std::forward<Args>(args) ... );
}

protected:
template <typename NaluAlg, class... Args>
void register_algorithm_impl(
Expand Down
41 changes: 6 additions & 35 deletions include/ngp_utils/NgpCreateElemInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,7 @@ inline bool is_ngp_element(const stk::topology topo)
{
if (topo.is_super_topology()) return false;

bool isNGP = false;
switch (topo.value()) {
case stk::topology::HEX_8:
case stk::topology::TET_4:
case stk::topology::PYRAMID_5:
case stk::topology::WEDGE_6:
case stk::topology::QUAD_4_2D:
case stk::topology::TRI_3_2D:
case stk::topology::HEX_27:
case stk::topology::QUAD_9_2D:
isNGP = true;
break;

default:
throw std::logic_error("Invalid element topology provided");
}

return isNGP;
return true;
}

/** Has the sideset MasterElement for the topolgy fully transitioned to NGP?
Expand All @@ -75,21 +58,7 @@ inline bool is_ngp_face(const stk::topology topo)
{
if (topo.is_super_topology()) return false;

bool isNGP = false;
switch (topo.value()) {
case stk::topology::QUAD_4:
case stk::topology::TRI_3:
case stk::topology::LINE_2:
case stk::topology::QUAD_9:
case stk::topology::LINE_3:
isNGP = true;
break;

default:
throw std::logic_error("Invalid face topology provided");
}

return isNGP;
return true;
}

/** Create an interior element algorithm for the given topology
Expand Down Expand Up @@ -117,7 +86,8 @@ BaseType* create_elem_algorithm(
case stk::topology::TRI_3_2D:
return new T<AlgTraitsTri3_2D>(std::forward<Args>(args)...);
default:
return nullptr;
throw std::runtime_error(
"NGP elem algorithm not implemented for " + topo.name());
}
}

Expand All @@ -140,7 +110,8 @@ BaseType* create_face_algorithm(
case stk::topology::LINE_3:
return new T<AlgTraitsEdge3_2D>(std::forward<Args>(args)...);
default:
return nullptr;
throw std::runtime_error(
"NGP face algorithm not implemented for " + topo.name());
}
}

Expand Down
Loading

0 comments on commit 8960c45

Please sign in to comment.