Skip to content
Snippets Groups Projects
Commit d7166c3d authored by Jacques Xing's avatar Jacques Xing Committed by Mohsen Lahooti
Browse files

Use FwdTrans instead of `FwdTransLocalElmt` for Parareal iteration in time-integration

parent e0a681a4
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ v5.6.0
- Enable varcoeffs for Collections (!1701)
- Fix misplaced " in Nektar++Config.cmake (!1742)
- Further tidy-up in linear solver (!1761)
- Use FwdTrans in UnsteadySystem when using Parareal (!1785)
- Automate deployment of README.md to dockerhub (!1786)
**CompressibleFlowSolver**
......
......@@ -77,14 +77,6 @@ Driver::Driver(const LibUtilities::SessionReaderSharedPtr pSession,
{
}
/**
*
*/
Driver::~Driver()
{
}
/**
*
*/
......
......@@ -65,7 +65,7 @@ class Driver
{
public:
/// Destructor
virtual ~Driver();
virtual ~Driver() = default;
/// Initialise Object
SOLVER_UTILS_EXPORT inline void InitObject(std::ostream &out = std::cout);
......
......@@ -643,12 +643,6 @@ void DriverParallelInTime::Interpolate(
// If different polynomial orders, interpolate solution.
else
{
// Assign memory for coefficient space.
Array<OneD, NekDouble> incoeff(infield[n]->GetNcoeffs());
// Transform solution from physical to coefficient space.
infield[n]->FwdTransLocalElmt(inphys, incoeff);
for (size_t i = 0; i < infield[n]->GetExpSize(); ++i)
{
// Get the elements.
......@@ -656,11 +650,14 @@ void DriverParallelInTime::Interpolate(
auto outElmt = outfield[n]->GetExp(i);
// Get the offset of elements in the storage arrays.
size_t inoffset = infield[n]->GetCoeff_Offset(i);
size_t inoffset = infield[n]->GetPhys_Offset(i);
size_t outoffset = outfield[n]->GetPhys_Offset(i);
// Transform solution from physical to coefficient space.
Array<OneD, NekDouble> incoeff(inElmt->GetNcoeffs());
inElmt->FwdTrans(inphys + inoffset, incoeff);
// Interpolate elements.
Array<OneD, NekDouble> tmp;
StdRegions::StdExpansionSharedPtr expPtr;
if (inElmt->DetShapeType() == LibUtilities::Seg)
{
......@@ -758,7 +755,10 @@ void DriverParallelInTime::Interpolate(
inElmt->GetBasis(2)->GetNumModes(),
outElmt->GetBasis(2)->GetPointsKey()));
}
expPtr->BwdTrans(incoeff + inoffset, tmp = outphys + outoffset);
// Transform solution from coefficient to physical space.
Array<OneD, NekDouble> tmp = outphys + outoffset;
expPtr->BwdTrans(incoeff, tmp);
}
}
}
......
......@@ -384,9 +384,18 @@ void UnsteadySystem::v_DoSolve()
fields[i] = m_fields[m_intVariables[i]]->UpdatePhys();
if (v_RequireFwdTrans())
{
m_fields[m_intVariables[i]]->FwdTransLocalElmt(
m_fields[m_intVariables[i]]->GetPhys(),
m_fields[m_intVariables[i]]->UpdateCoeffs());
if (m_comm->IsParallelInTime())
{
m_fields[m_intVariables[i]]->FwdTrans(
m_fields[m_intVariables[i]]->GetPhys(),
m_fields[m_intVariables[i]]->UpdateCoeffs());
}
else
{
m_fields[m_intVariables[i]]->FwdTransLocalElmt(
m_fields[m_intVariables[i]]->GetPhys(),
m_fields[m_intVariables[i]]->UpdateCoeffs());
}
}
m_fields[m_intVariables[i]]->SetPhysState(false);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment