Skip to content

Commit

Permalink
properly link con2prim (no idea how that was working before) and also…
Browse files Browse the repository at this point in the history
… switch test to explicitly use analytic minkowski
  • Loading branch information
jonahm-LANL committed Mar 12, 2024
1 parent 2614f78 commit 3e5190b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 26 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ set (SRC_LIST
fluid/con2prim_statistics.hpp
fluid/fluid.cpp
fluid/fluid.hpp
fluid/prim2con.hpp
fluid/riemann.hpp
fluid/tmunu.cpp
fluid/tmunu.hpp
Expand Down
9 changes: 9 additions & 0 deletions src/fluid/fluid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,15 @@ TaskStatus ConservedToPrimitiveRegion(T *rc, const IndexRange &ib, const IndexRa
auto c2p = pkg->Param<c2p_type<T>>("c2p_func");
return c2p(rc, ib, jb, kb);
}
// JMM: Must specialize function for both potential use cases so we
// can keep it in this file.
template TaskStatus ConservedToPrimitiveRegion<MeshData<Real>>(MeshData<Real> *rc,
const IndexRange &ib,
const IndexRange &jb,
const IndexRange &kb);
template TaskStatus ConservedToPrimitiveRegion<MeshBlockData<Real>>(
MeshBlockData<Real> *rc, const IndexRange &ib, const IndexRange &jb,
const IndexRange &kb);

template <typename T>
TaskStatus ConservedToPrimitive(T *rc) {
Expand Down
10 changes: 10 additions & 0 deletions src/fluid/fluid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,19 @@ std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin);
TaskStatus PrimitiveToConserved(MeshBlockData<Real> *rc);
TaskStatus PrimitiveToConservedRegion(MeshBlockData<Real> *rc, const IndexRange &ib,
const IndexRange &jb, const IndexRange &kb);
// JMM: Not sure how the templated value here worked in the first
// place. But proper solution is need to tell the linker it's
// available elsewhere.
template <typename T>
TaskStatus ConservedToPrimitiveRegion(T *rc, const IndexRange &ib, const IndexRange &jb,
const IndexRange &kb);
extern template TaskStatus
ConservedToPrimitiveRegion<MeshData<Real>>(MeshData<Real> *rc, const IndexRange &ib,
const IndexRange &jb, const IndexRange &kb);
extern template TaskStatus ConservedToPrimitiveRegion<MeshBlockData<Real>>(
MeshBlockData<Real> *rc, const IndexRange &ib, const IndexRange &jb,
const IndexRange &kb);

template <typename T>
TaskStatus ConservedToPrimitive(T *rc);
template <typename T>
Expand Down
25 changes: 0 additions & 25 deletions tst/unit/phoebus_utils/compile_constants.hpp

This file was deleted.

3 changes: 2 additions & 1 deletion tst/unit/phoebus_utils/test_relativity_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ TEST_CASE("RELATIVITY", "[relativity_utils]") {
GIVEN("A three-velocity and a coordinate system") {
auto mb = GetDummyMeshBlock();
auto rc = GetDummyMeshBlockData(mb);
auto system = GetCoordinateSystem(rc.get());
auto indexer = GetIndexer(rc.get());
auto system = MinkowskiMeshBlock(indexer);
// Dummy grid position
const CellLocation loc = CellLocation::Cent;
const int k = 0;
Expand Down

0 comments on commit 3e5190b

Please sign in to comment.