Commit 742629f3 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'fix/SVVLaplacian3D' of /opt/gitlab/repositories/nektar

parents 5ad9fac1 648a3660
......@@ -1598,8 +1598,10 @@ namespace Nektar
break;
case StdRegions::eLaplacian:
{
if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed ||
mkey.GetNVarCoeff())
if (m_metricinfo->GetGtype() == SpatialDomains::eDeformed ||
mkey.GetNVarCoeff()||
mkey.ConstFactorExists(
StdRegions::eFactorSVVCutoffRatio))
{
NekDouble one = 1.0;
DNekMatSharedPtr mat = GenMatrix(mkey);
......
......@@ -1341,7 +1341,10 @@ namespace Nektar
case StdRegions::eLaplacian:
{
if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
if (m_metricinfo->GetGtype() == SpatialDomains::eDeformed ||
mkey.GetNVarCoeff() > 0 ||
mkey.ConstFactorExists(
StdRegions::eFactorSVVCutoffRatio))
{
NekDouble one = 1.0;
DNekMatSharedPtr mat = GenMatrix(mkey);
......
......@@ -451,7 +451,10 @@ namespace Nektar
break;
case StdRegions::eLaplacian:
{
if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
if (m_metricinfo->GetGtype() == SpatialDomains::eDeformed ||
mkey.GetNVarCoeff() > 0 ||
mkey.ConstFactorExists(
StdRegions::eFactorSVVCutoffRatio))
{
NekDouble one = 1.0;
DNekMatSharedPtr mat = GenMatrix(mkey);
......
......@@ -197,7 +197,8 @@ namespace Nektar
Array<OneD,NekDouble> &outarray,
const StdRegions::StdMatrixKey &mkey)
{
if(mkey.GetNVarCoeff() == 0)
if ( mkey.GetNVarCoeff() == 0 &&
!mkey.ConstFactorExists(eFactorSVVCutoffRatio))
{
// This implementation is only valid when there are no
// coefficients associated to the Laplacian operator
......
......@@ -1459,9 +1459,12 @@ namespace Nektar
{
if(j + k >= cutoff) //to filter out only the "high-modes"
{
orthocoeffs[cnt] *= (1.0+SvvDiffCoeff*exp(-(j-nmodes)*(j-nmodes)/((NekDouble)((j-cutoff+epsilon)*(j-cutoff+epsilon))))*exp(-(k-nmodes)*(k-nmodes)/((NekDouble)((k-cutoff+epsilon)*(k-cutoff+epsilon)))));
orthocoeffs[j*nmodes_b+k] *=
(1.0+SvvDiffCoeff*exp(-(j+k-nmodes)*(j+k-nmodes)/
((NekDouble)((j+k-cutoff+1)*
(j+k-cutoff+1)))));
}
cnt++;
cnt++;
}
}
......
......@@ -150,6 +150,11 @@ IF( NEKTAR_SOLVER_ADR )
ADD_NEKTAR_TEST(ImDiffusion_VarCoeff)
ADD_NEKTAR_TEST(ImDiffusion_Quad_Periodic_m7)
ADD_NEKTAR_TEST(ImDiffusion_Hex_Periodic_m5)
ADD_NEKTAR_TEST(SVV_Quad)
ADD_NEKTAR_TEST(SVV_Tri)
ADD_NEKTAR_TEST(SVV_Prism)
ADD_NEKTAR_TEST(SVV_Tet)
IF (NEKTAR_USE_FFTW)
ADD_NEKTAR_TEST(Helmholtz_3DHomo1D_FFT)
......
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>SVV Prism P=6</description>
<executable>ADRSolver</executable>
<parameters>SVV_Prism.xml</parameters>
<files>
<file description="Session File">SVV_Prism.xml</file>
</files>
<metrics>
<metric type="L2" id="0">
<value variable="u" tolerance="1e-05">2.15104</value>
</metric>
<metric type="Linf" id="1">
<value variable="u" tolerance="1e-05"> 8.90949</value>
</metric>
</metrics>
</test>
This diff is collapsed.
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>SVV Quad P=12</description>
<executable>ADRSolver</executable>
<parameters>SVV_Quad.xml</parameters>
<files>
<file description="Session File">SVV_Quad.xml</file>
</files>
<metrics>
<metric type="L2" id="0">
<value variable="u" tolerance="1e-05">0.0337347</value>
</metric>
<metric type="Linf" id="1">
<value variable="u" tolerance="1e-05"> 0.205011</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<NEKTAR>
<GEOMETRY DIM="2" SPACE="2">
<VERTEX>
<V ID="0">0.00000000e+00 2.00000000e+00 0.00000000e+00</V>
<V ID="1">0.00000000e+00 1.50000000e+00 0.00000000e+00</V>
<V ID="2">5.00000000e-01 1.50000000e+00 0.00000000e+00</V>
<V ID="3">5.00000000e-01 2.00000000e+00 0.00000000e+00</V>
<V ID="4">1.00000000e+00 1.50000000e+00 0.00000000e+00</V>
<V ID="5">1.00000000e+00 2.00000000e+00 0.00000000e+00</V>
<V ID="6">1.50000000e+00 1.50000000e+00 0.00000000e+00</V>
<V ID="7">1.50000000e+00 2.00000000e+00 0.00000000e+00</V>
<V ID="8">2.00000000e+00 1.50000000e+00 0.00000000e+00</V>
<V ID="9">2.00000000e+00 2.00000000e+00 0.00000000e+00</V>
<V ID="10">0.00000000e+00 1.00000000e+00 0.00000000e+00</V>
<V ID="11">5.00000000e-01 1.00000000e+00 0.00000000e+00</V>
<V ID="12">1.00000000e+00 1.00000000e+00 0.00000000e+00</V>
<V ID="13">1.50000000e+00 1.00000000e+00 0.00000000e+00</V>
<V ID="14">2.00000000e+00 1.00000000e+00 0.00000000e+00</V>
<V ID="15">0.00000000e+00 5.00000000e-01 0.00000000e+00</V>
<V ID="16">5.00000000e-01 5.00000000e-01 0.00000000e+00</V>
<V ID="17">1.00000000e+00 5.00000000e-01 0.00000000e+00</V>
<V ID="18">1.50000000e+00 5.00000000e-01 0.00000000e+00</V>
<V ID="19">2.00000000e+00 5.00000000e-01 0.00000000e+00</V>
<V ID="20">0.00000000e+00 0.00000000e+00 0.00000000e+00</V>
<V ID="21">5.00000000e-01 0.00000000e+00 0.00000000e+00</V>
<V ID="22">1.00000000e+00 0.00000000e+00 0.00000000e+00</V>
<V ID="23">1.50000000e+00 0.00000000e+00 0.00000000e+00</V>
<V ID="24">2.00000000e+00 0.00000000e+00 0.00000000e+00</V>
</VERTEX>
<EDGE>
<E ID="0"> 0 1 </E>
<E ID="1"> 1 2 </E>
<E ID="2"> 2 3 </E>
<E ID="3"> 3 0 </E>
<E ID="4"> 2 4 </E>
<E ID="5"> 4 5 </E>
<E ID="6"> 5 3 </E>
<E ID="7"> 4 6 </E>
<E ID="8"> 6 7 </E>
<E ID="9"> 7 5 </E>
<E ID="10"> 6 8 </E>
<E ID="11"> 8 9 </E>
<E ID="12"> 9 7 </E>
<E ID="13"> 1 10 </E>
<E ID="14"> 10 11 </E>
<E ID="15"> 11 2 </E>
<E ID="16"> 11 12 </E>
<E ID="17"> 12 4 </E>
<E ID="18"> 12 13 </E>
<E ID="19"> 13 6 </E>
<E ID="20"> 13 14 </E>
<E ID="21"> 14 8 </E>
<E ID="22"> 10 15 </E>
<E ID="23"> 15 16 </E>
<E ID="24"> 16 11 </E>
<E ID="25"> 16 17 </E>
<E ID="26"> 17 12 </E>
<E ID="27"> 17 18 </E>
<E ID="28"> 18 13 </E>
<E ID="29"> 18 19 </E>
<E ID="30"> 19 14 </E>
<E ID="31"> 15 20 </E>
<E ID="32"> 20 21 </E>
<E ID="33"> 21 16 </E>
<E ID="34"> 21 22 </E>
<E ID="35"> 22 17 </E>
<E ID="36"> 22 23 </E>
<E ID="37"> 23 18 </E>
<E ID="38"> 23 24 </E>
<E ID="39"> 24 19 </E>
</EDGE>
<ELEMENT>
<Q ID="0"> 0 1 2 3 </Q>
<Q ID="1"> 2 4 5 6 </Q>
<Q ID="2"> 5 7 8 9 </Q>
<Q ID="3"> 8 10 11 12 </Q>
<Q ID="4"> 13 14 15 1 </Q>
<Q ID="5"> 15 16 17 4 </Q>
<Q ID="6"> 17 18 19 7 </Q>
<Q ID="7"> 19 20 21 10 </Q>
<Q ID="8"> 22 23 24 14 </Q>
<Q ID="9"> 24 25 26 16 </Q>
<Q ID="10"> 26 27 28 18 </Q>
<Q ID="11"> 28 29 30 20 </Q>
<Q ID="12"> 31 32 33 23 </Q>
<Q ID="13"> 33 34 35 25 </Q>
<Q ID="14"> 35 36 37 27 </Q>
<Q ID="15"> 37 38 39 29 </Q>
</ELEMENT>
<COMPOSITE>
<C ID="1"> Q[0-15] </C>
<C ID="100"> E[32,34,36,38] </C>
<C ID="200"> E[11,21,30,39] </C>
<C ID="300"> E[3,6,9,12] </C>
<C ID="400"> E[0,13,22,31] </C>
</COMPOSITE>
<DOMAIN> C[1] </DOMAIN>
</GEOMETRY>
<EXPANSIONS>
<E COMPOSITE="C[1]" NUMMODES="16" TYPE="MODIFIED" FIELDS="u" />
</EXPANSIONS>
<CONDITIONS>
<PARAMETERS>
<P> FinTime = 1.0 </P>
<P> TimeStep = 0.001 </P>
<P> NumSteps = FinTime/TimeStep </P>
<P> IO_CheckSteps = 100 </P>
<P> IO_InfoSteps = 100 </P>
<P> epsilon = 1e-10 </P>
<P> wavefreq = 3.14159265359 </P>
<P> a = 0.01 </P>
<P> x0 = 0.65 </P>
<P> y0 = 0.70 </P>
<P> SVVCutoffRatio = 0.1 </P>
<P> SVVDiffCoeff = 0.3 </P>
</PARAMETERS>
<VARIABLES>
<V ID="0"> u </V>
</VARIABLES>
<BOUNDARYREGIONS>
<B ID="0"> C[100] </B> <!-- Bottom -->
<B ID="1"> C[200] </B> <!-- Out -->
<B ID="2"> C[400] </B> <!-- In -->
<B ID="3"> C[300] </B> <!-- Top -->
</BOUNDARYREGIONS>
<BOUNDARYCONDITIONS>
<REGION REF="0">
<P VAR="u" VALUE="[3]" />
</REGION>
<REGION REF="1">
<P VAR="u" VALUE="[2]" />
</REGION>
<REGION REF="2">
<P VAR="u" VALUE="[1]" />
</REGION>
<REGION REF="3">
<P VAR="u" VALUE="[0]" />
</REGION>
</BOUNDARYCONDITIONS>
<SOLVERINFO>
<I PROPERTY="EQTYPE" VALUE="UnsteadyDiffusion" />
<I PROPERTY="Projection" VALUE="Continuous" />
<I PROPERTY="DiffusionAdvancement" VALUE="Implicit" />
<I PROPERTY="TimeIntegrationMethod" VALUE="DIRKOrder3" />
<I PROPERTY="SpectralVanishingViscosity" VALUE="True" />
</SOLVERINFO>
<FUNCTION NAME="InitialConditions">
<E VAR="u" VALUE="sin(wavefreq*x)*sin(wavefreq*y)+5*exp(-((x-x0)*(x-x0)+(y-y0)*(y-y0))/(a*a))" />
</FUNCTION>
<FUNCTION NAME="ExactSolution">
<E VAR="u" VALUE="exp(-epsilon*FinTime)*sin(wavefreq*x)*sin(wavefreq*y)" />
</FUNCTION>
</CONDITIONS>
</NEKTAR>
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>SVV Tet P=6</description>
<executable>ADRSolver</executable>
<parameters>SVV_Tet.xml</parameters>
<files>
<file description="Session File">SVV_Tet.xml</file>
</files>
<metrics>
<metric type="L2" id="0">
<value variable="u" tolerance="1e-05">0.374261</value>
</metric>
<metric type="Linf" id="1">
<value variable="u" tolerance="1e-05"> 1.52563</value>
</metric>
</metrics>
</test>
This diff is collapsed.
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>SVV Tri P=12</description>
<executable>ADRSolver</executable>
<parameters>SVV_Tri.xml</parameters>
<files>
<file description="Session File">SVV_Tri.xml</file>
</files>
<metrics>
<metric type="L2" id="0">
<value variable="u" tolerance="1e-05">0.0116705</value>
</metric>
<metric type="Linf" id="1">
<value variable="u" tolerance="1e-05"> 0.177522</value>
</metric>
</metrics>
</test>
This diff is collapsed.
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