Commit 33677192 authored by Alessandro Bolis's avatar Alessandro Bolis
Browse files

Fixed wave-space integration for IncNS-3DH1D


git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@4043 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent c049aa42
......@@ -392,7 +392,8 @@ namespace Nektar
}
else
{
fft_in = inarray;
Vmath::Vcopy(num_dfts_per_proc*m_homogeneousBasis->GetNumPoints(),inarray,1,fft_in,1);
//fft_in = inarray;
}
if(IsForwards)
......@@ -416,7 +417,8 @@ namespace Nektar
}
else
{
outarray = fft_out;
Vmath::Vcopy(num_dfts_per_proc*m_homogeneousBasis->GetNumPoints(),fft_out,1,outarray,1);
//outarray = fft_out;
}
}
else
......@@ -458,7 +460,8 @@ namespace Nektar
}
else
{
sortedinarray = inarray;
Vmath::Vcopy(ncols,inarray,1,sortedinarray,1);
//sortedinarray = inarray;
}
// Create NekVectors from the given data arrays
......@@ -474,7 +477,8 @@ namespace Nektar
}
else
{
outarray = sortedinarray;
Vmath::Vcopy(nrows,sortedinarray,1,outarray,1);
//outarray = sortedinarray;
}
}
......
......@@ -294,15 +294,10 @@ namespace Nektar
m_fields[i] = MemoryManager<MultiRegions::ContField3DHomogeneous1D>
::AllocateSharedPtr(m_session,BkeyZ,m_LhomZ,m_useFFT, m_dealiasing,
m_graph, m_session->GetVariable(i), m_checkIfSystemSingular[i]);
// necessary to perform to HomoBwdTrans for the fields
// (are complex differently from the base flow)
//m_fields[i]->SetWaveSpace(false);
}
}
// Half mode stability analysis
else if(m_HalfMode)
else if(m_HalfMode)
{
const LibUtilities::PointsKey PkeyZ(m_npointsZ, LibUtilities::eFourierSingleModeSpaced);
......@@ -321,10 +316,6 @@ namespace Nektar
m_fields[i] = MemoryManager<MultiRegions::ContField3DHomogeneous1D>
::AllocateSharedPtr(m_session, BkeyZR, m_LhomZ, m_useFFT, m_dealiasing,
m_graph, m_session->GetVariable(i), m_checkIfSystemSingular[i]);
// necessary to perform to HomoBwdTrans for the fields
// (are complex differently from the base flow)
//m_fields[i]->SetWaveSpace(false);
}
}
// Normal homogeneous 1D
......@@ -338,11 +329,6 @@ namespace Nektar
m_fields[i] = MemoryManager<MultiRegions::ContField3DHomogeneous1D>
::AllocateSharedPtr(m_session, BkeyZ, m_LhomZ, m_useFFT, m_dealiasing,
m_graph, m_session->GetVariable(i), m_checkIfSystemSingular[i]);
//if(m_MultipleModes)
//{
// m_fields[i]->SetWaveSpace(false);
//}
}
}
}
......@@ -379,12 +365,6 @@ namespace Nektar
}
case 3:
{
//if(m_HomogeneousType == eHomogeneous3D)
//{
// ASSERTL0(false,"3D fully periodic problems not implemented yet");
//}
//else
//{
i = 0;
MultiRegions::ContField3DSharedPtr firstfield =
MemoryManager<MultiRegions::ContField3D>
......
......@@ -103,8 +103,8 @@ namespace Nektar
bool m_dealiasing; ///< flag to determine if use dealising or not
bool m_UseContCoeff;
bool m_SingleMode; ///< Flag to determine if use single mode or not
bool m_HalfMode; ///< Flag to determine if use half mode or not
bool m_SingleMode; ///< Flag to determine if use single mode or not
bool m_HalfMode; ///< Flag to determine if use half mode or not
/// Type of projection, i.e. Galerkin or DG.
enum MultiRegions::ProjectionType m_projectionType;
......@@ -128,8 +128,7 @@ namespace Nektar
bool m_useFFTW;
/// Constructor
AdvectionTerm(
const LibUtilities::SessionReaderSharedPtr& pSession,
AdvectionTerm(const LibUtilities::SessionReaderSharedPtr& pSession,
const SpatialDomains::MeshGraphSharedPtr& pGraph);
virtual void v_InitObject();
......
......@@ -191,38 +191,7 @@ namespace Nektar
int phystot = m_fields[0]->GetTotPoints();
int n_fields = m_fields.num_elements();
static int nchk = 0;
//bool integrate_in_wave_space = false;
//SingleMode and HalfMode integration must be in wave space
//if(m_SingleMode || m_HalfMode)
//{
// integrate_in_wave_space = true;
//}
//else if(m_session->DefinesSolverInfo("INTEGRATIONSPACE"))
//{
// if(m_HomogeneousType == eNotHomogeneous)
// {
// ASSERTL0(false,"INTEGRATIONSPACE type is meant to be for homogeneous cases");
// }
// std::string IntegrationSpaceStr = m_session->GetSolverInfo("INTEGRATIONSPACE");
// if((IntegrationSpaceStr == "WaveSpace") || (IntegrationSpaceStr == "WAVESPACE"))
// {
// integrate_in_wave_space = true;
// }
// else if((IntegrationSpaceStr == "RealSpace") || (IntegrationSpaceStr == "REALSPACE"))
// {
// integrate_in_wave_space = false;
// }
// else
// {
// ASSERTL0(false,"INTEGRATIONSPACE type not allowed, try WaveSpace or RealSpace");
// }
//}
if(m_HomogeneousType == eHomogeneous1D)
{
for(i = 0; i < n_fields; ++i)
......@@ -413,10 +382,10 @@ namespace Nektar
if(m_HomogeneousType == eHomogeneous1D)
{
for(i = 0; i< n_fields; i++)
for(i = 0 ; i< n_fields ; i++)
{
m_fields[i]->SetWaveSpace(false);
m_fields[i]->BwdTrans(m_fields[i]->GetCoeffs(),m_fields[i]->UpdatePhys());
m_fields[i]->BwdTrans(m_fields[i]->GetCoeffs(),m_fields[i]->UpdatePhys());
m_fields[i]->SetPhysState(true);
}
}
......
......@@ -480,7 +480,7 @@ namespace Nektar
//add the force
if(m_session->DefinesFunction("BodyForce"))
{
if(m_SingleMode || m_HalfMode)
if(m_fields[0]->GetWaveSpace())
{
for(int i = 0; i < m_nConvectiveFields; ++i)
{
......@@ -814,32 +814,6 @@ namespace Nektar
StdRegions::StdExpansion1DSharedPtr Pbc;
//Array<OneD, Array< OneD, NekDouble> > velocity(m_nConvectiveFields);
//Array<OneD, Array< OneD, NekDouble> > advection(m_nConvectiveFields);
//int phystot = m_fields[0]->GetTotPoints();
//for(int n = 0; n < m_nConvectiveFields; ++n)
//{
// velocity[n] = Array<OneD, NekDouble> (phystot);
// advection[n] = Array<OneD, NekDouble> (phystot);
//}
//for(int i = 0; i < fields.num_elements(); i++)
//{
// if(m_pressure->GetWaveSpace())
// {
// velocity[i] = fields[i];
// advection[i] = N[i];
// }
// else
// {
// m_pressure->HomogeneousFwdTrans(fields[i],velocity[i]);
// m_pressure->HomogeneousFwdTrans(N[i],advection[i]);
// }
//}
for(int j = 0 ; j < m_HBCnumber ; j++)
{
m_elmt = m_fields[0]->GetExp(m_HBC[0][j]);
......
Supports Markdown
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