Commit de3cdb57 authored by Douglas Serson's avatar Douglas Serson Committed by Chris Cantwell

Perform asserts as soon as possible

(cherry picked from commit 76af2e19)
parent 1903fd29
......@@ -71,13 +71,6 @@ namespace Nektar
m_comm->GetColumnComm()->GetColumnComm() :
m_comm->GetColumnComm();
m_transposition = MemoryManager<LibUtilities::Transposition>
::AllocateSharedPtr(HomoBasis, m_comm, m_StripZcomm);
m_planes = Array<OneD,ExpListSharedPtr>(
m_homogeneousBasis->GetNumPoints() /
m_StripZcomm->GetSize());
ASSERTL0( m_homogeneousBasis->GetNumPoints() %
m_StripZcomm->GetSize() == 0,
"HomModesZ should be a multiple of npz.");
......@@ -87,10 +80,19 @@ namespace Nektar
&& (m_homogeneousBasis->GetBasisType() !=
LibUtilities::eFourierHalfModeIm) )
{
ASSERTL0( m_planes.num_elements() % 2 == 0,
"HomModesZ/npz should be an even integer.");
ASSERTL0(
(m_homogeneousBasis->GetNumPoints() /
m_StripZcomm->GetSize()) % 2 == 0,
"HomModesZ/npz should be an even integer.");
}
m_transposition = MemoryManager<LibUtilities::Transposition>
::AllocateSharedPtr(HomoBasis, m_comm, m_StripZcomm);
m_planes = Array<OneD,ExpListSharedPtr>(
m_homogeneousBasis->GetNumPoints() /
m_StripZcomm->GetSize());
if(m_useFFT)
{
m_FFT = LibUtilities::GetNektarFFTFactory().CreateInstance(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment