Skip to content

Commit

Permalink
removed function.
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinRayAngus committed Aug 25, 2024
1 parent 2f90fdf commit 4f3a47c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion Source/FieldSolver/ImplicitSolvers/WarpXSolverVec.H
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ private:

inline static bool m_warpx_ptr_defined = false;
inline static WarpX* m_WarpX = nullptr;
void SetWarpXPointer( WarpX* a_WarpX );

};

Expand Down
14 changes: 6 additions & 8 deletions Source/FieldSolver/ImplicitSolvers/WarpXSolverVec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ void WarpXSolverVec::Define ( WarpX* a_WarpX,
}

m_is_defined = true;
SetWarpXPointer(a_WarpX);

// Define static member pointer to WarpX
if (!m_warpx_ptr_defined) {
m_WarpX = a_WarpX;
m_warpx_ptr_defined = true;
}
}

void WarpXSolverVec::Copy ( FieldType a_array_type,
Expand Down Expand Up @@ -82,13 +87,6 @@ void WarpXSolverVec::Copy ( FieldType a_array_type,
}
}

void WarpXSolverVec::SetWarpXPointer( WarpX* a_WarpX )
{
if (m_warpx_ptr_defined) { return; }
m_WarpX = a_WarpX;
m_warpx_ptr_defined = true;
}

[[nodiscard]] amrex::Real WarpXSolverVec::dotProduct ( const WarpXSolverVec& a_X ) const
{
WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
Expand Down

0 comments on commit 4f3a47c

Please sign in to comment.