Skip to content
Snippets Groups Projects
Commit d8b9e252 authored by Edward Erasmie-Jones's avatar Edward Erasmie-Jones Committed by Jacques Xing
Browse files

Fixed discontinuities in the Modified Arnoldi driver

parent 93457d52
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@ v5.8.0
- Matrix free ops shape cleanup (!1735)
- Fix NodalTri processing and static condensation matrix release (!1989)
- Fix third-party Scotch patch (!1998)
- Fixed Modified Arnoldi driver to remove discontinuities from random vectors (!2002)
**CI**
- Fix CubeAllElements performance test tolerance (!1943)
......@@ -55,7 +56,7 @@ v5.7.0
- Fix variable p in tetrahedrons (!1881)
- Fix BwdTrans for Pyr with var P (!1886)
- Allow wrapper array around a existing raw pointer (!1848)
- Tweaked some long tests to make them faster (!!1918)
- Tweaked some long tests to make them faster (!1918)
**IncNavierStokesSolver**
- Fix initial and boundary conditions in the moving reference frame (!1692, !1820)
......
......@@ -35,6 +35,7 @@
#include <iomanip>
#include <MultiRegions/ContField.h>
#include <SolverUtils/DriverModifiedArnoldi.h>
using namespace std;
......@@ -92,8 +93,8 @@ void DriverModifiedArnoldi::v_Execute(ostream &out)
{
int i = 0;
int j = 0;
int nq = m_equ[0]->UpdateFields()[0]->GetNcoeffs();
int ntot = m_nfields * nq;
int nm = m_equ[0]->UpdateFields()[0]->GetNcoeffs();
int ntot = m_nfields * nm;
int converged = 0;
NekDouble resnorm = 0.0;
ofstream evlout;
......@@ -150,6 +151,20 @@ void DriverModifiedArnoldi::v_Execute(ostream &out)
NekDouble eps = 0.0001;
Vmath::FillWhiteNoise(ntot, eps, &Kseq[1][0], 1);
auto contfield = std::dynamic_pointer_cast<MultiRegions::ContField>(
m_equ[0]->UpdateFields()[0]);
if (contfield)
{
int nGlobal =
contfield->GetLocalToGlobalMap()->GetNumGlobalCoeffs();
Array<OneD, NekDouble> global(nGlobal), tmp;
for (int n = 0; n < m_nfields; ++n)
{
contfield->LocalToGlobal(Kseq[1] + n * nm, global);
contfield->GlobalToLocal(global, tmp = Kseq[1] + n * nm);
}
}
if (m_useMask)
{
Vmath::Vmul(ntot, Kseq[1], 1, m_maskCoeffs, 1, Kseq[1], 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment