Commit 94ff5684 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'fix/radiation-boundary' of localhost:nektar

parents de5861ae 78b402ad
......@@ -8,10 +8,10 @@
</files>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.000418001</value>
<value tolerance="1e-12">0.000416575</value>
</metric>
<metric type="Linf" id="2">
<value tolerance="1e-12">0.000874515</value>
<value tolerance="1e-12">0.000871589</value>
</metric>
</metrics>
</test>
......
......@@ -8,10 +8,10 @@
</files>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-8">0.000418001</value>
<value tolerance="1e-8">0.000416575</value>
</metric>
<metric type="Linf" id="2">
<value tolerance="1e-8">0.000874515</value>
<value tolerance="1e-8">0.000871589</value>
</metric>
</metrics>
</test>
......
......@@ -9,10 +9,10 @@
</files>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.000418001</value>
<value tolerance="1e-12">0.000416575</value>
</metric>
<metric type="Linf" id="2">
<value tolerance="1e-12">0.000874515</value>
<value tolerance="1e-12">0.000871589</value>
</metric>
</metrics>
</test>
......
......@@ -9,10 +9,10 @@
</files>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.000418001</value>
<value tolerance="1e-12">0.000416575</value>
</metric>
<metric type="Linf" id="2">
<value tolerance="1e-12">0.000874515</value>
<value tolerance="1e-12">0.000871589</value>
</metric>
</metrics>
</test>
......
......@@ -8,10 +8,10 @@
</files>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.00042687</value>
<value tolerance="1e-12">0.000417674</value>
</metric>
<metric type="Linf" id="2">
<value tolerance="1e-12">0.00170172</value>
<value tolerance="1e-12">0.00168661</value>
</metric>
</metrics>
</test>
......@@ -9,10 +9,10 @@
</files>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.00042687</value>
<value tolerance="1e-12">0.000417674</value>
</metric>
<metric type="Linf" id="2">
<value tolerance="1e-12">0.00170173</value>
<value tolerance="1e-06">0.00168661</value>
</metric>
</metrics>
</test>
......@@ -392,10 +392,10 @@
<N VAR="u" VALUE="-sin(PI/2*x)*cos(PI/2*y)*sin(PI/2*z)*PI/2" />
</REGION>
<REGION REF="2">
<R VAR="u" VALUE="cos(PI/2*x)*sin(PI/2*y)*sin(PI/2*z)*PI/2+sin(PI/2*x)*sin(PI/2*y)*sin(PI/2*z)" PRIMCOEFF="1" />
<R VAR="u" VALUE="cos(PI/2*x)*sin(PI/2*y)*sin(PI/2*z)*PI/2+2*sin(PI/2*x)*sin(PI/2*y)*sin(PI/2*z)" PRIMCOEFF="2" />
</REGION>
<REGION REF="3">
<R VAR="u" VALUE="sin(PI/2*x)*cos(PI/2*y)*sin(PI/2*z)*PI/2+sin(PI/2*x)*sin(PI/2*y)*sin(PI/2*z)" PRIMCOEFF="1" />
<R VAR="u" VALUE="sin(PI/2*x)*cos(PI/2*y)*sin(PI/2*z)*PI/2+3*sin(PI/2*x)*sin(PI/2*y)*sin(PI/2*z)" PRIMCOEFF="3" />
</REGION>
<REGION REF="4">
<D VAR="u" VALUE="sin(PI/2*x)*sin(PI/2*y)*sin(PI/2*z)" />
......
......@@ -106,8 +106,8 @@ namespace Nektar
CanGetRawPtr<NekMatrix<LhsDataType, MatrixType> >
>::type* p=0)
{
int m = lhs.GetRows();
int n = lhs.GetColumns();
int m = lhs.GetRows();
int n = lhs.GetColumns();
int kl = lhs.GetNumberOfSubDiagonals();
int ku = lhs.GetNumberOfSuperDiagonals();
double alpha = lhs.Scale();
......
......@@ -469,7 +469,7 @@ namespace Nektar
{
return NekMatrix<DataType, StandardMatrixTag>(rhs, eWrapper);
}
template<typename DataType>
boost::shared_ptr<NekMatrix<DataType, StandardMatrixTag> > NekMatrix<DataType, StandardMatrixTag>::CreateWrapper(const boost::shared_ptr<NekMatrix<DataType, StandardMatrixTag> >& rhs)
{
......
......@@ -1036,7 +1036,7 @@ namespace Nektar
Array<OneD,int> sign;
StdRegions::VarCoeffMap varcoeffs;
varcoeffs[StdRegions::eVarCoeffPrimative] = primCoeffs;
varcoeffs[StdRegions::eVarCoeffMass] = primCoeffs;
LocalRegions::MatrixKey mkey(StdRegions::eMass,StdRegions::eSegment, *edgeExp, StdRegions::NullConstFactorMap, varcoeffs);
DNekScalMat &edgemat = *edgeExp->GetLocMatrix(mkey);
......@@ -1158,7 +1158,7 @@ namespace Nektar
Array<OneD,int> sign;
StdRegions::VarCoeffMap varcoeffs;
varcoeffs[StdRegions::eVarCoeffPrimative] = primCoeffs;
varcoeffs[StdRegions::eVarCoeffMass] = primCoeffs;
LocalRegions::MatrixKey mkey(StdRegions::eMass,StdRegions::eSegment, *edgeExp, StdRegions::NullConstFactorMap, varcoeffs);
DNekScalMat &edgemat = *edgeExp->GetLocMatrix(mkey);
......
......@@ -978,7 +978,7 @@ namespace Nektar
Array<OneD, int> sign;
StdRegions::VarCoeffMap varcoeffs;
varcoeffs[StdRegions::eVarCoeffPrimative] = primCoeffs;
varcoeffs[StdRegions::eVarCoeffMass] = primCoeffs;
StdRegions::ExpansionType expType =
faceExp->DetExpansionType();
......
......@@ -1297,7 +1297,8 @@ cout<<"deps/dx ="<<inarray_d0[i]<<" deps/dy="<<inarray_d1[i]<<endl;
{
case StdRegions::eMass:
{
if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
if((m_metricinfo->GetGtype() == SpatialDomains::eDeformed)||
(mkey.GetNVarCoeff()))
{
fac = 1.0;
goto UseLocRegionsMatrix;
......@@ -1311,7 +1312,8 @@ cout<<"deps/dx ="<<inarray_d0[i]<<" deps/dy="<<inarray_d1[i]<<endl;
break;
case StdRegions::eInvMass:
{
if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
if((m_metricinfo->GetGtype() == SpatialDomains::eDeformed)||
(mkey.GetNVarCoeff()))
{
NekDouble one = 1.0;
StdRegions::StdMatrixKey masskey(StdRegions::eMass,DetExpansionType(),
......
......@@ -1680,6 +1680,7 @@ namespace Nektar
int nblks = 2;
returnval = MemoryManager<DNekScalBlkMat>::AllocateSharedPtr(nblks, nblks, exp_size, exp_size); //Really need a constructor which takes Arrays
NekDouble factor = 1.0;
MatrixStorage AMatStorage = eFULL;
switch(mkey.GetMatrixType())
{
......@@ -1726,7 +1727,7 @@ namespace Nektar
NekDouble invfactor = 1.0/factor;
NekDouble one = 1.0;
DNekScalMat &mat = *GetLocMatrix(mkey);
DNekMatSharedPtr A = MemoryManager<DNekMat>::AllocateSharedPtr(nbdry,nbdry);
DNekMatSharedPtr A = MemoryManager<DNekMat>::AllocateSharedPtr(nbdry,nbdry,AMatStorage);
DNekMatSharedPtr B = MemoryManager<DNekMat>::AllocateSharedPtr(nbdry,nint);
DNekMatSharedPtr C = MemoryManager<DNekMat>::AllocateSharedPtr(nint,nbdry);
DNekMatSharedPtr D = MemoryManager<DNekMat>::AllocateSharedPtr(nint,nint);
......
......@@ -1097,7 +1097,7 @@ namespace Nektar
}
/**
* @brief Set up a list of elemeent IDs and edge IDs that link to the
* @brief Set up a list of element IDs and edge IDs that link to the
* boundary conditions.
*/
void DisContField2D::v_GetBoundaryToElmtMap(
......@@ -1690,7 +1690,7 @@ namespace Nektar
std::vector<SpatialDomains::
FieldDefinitionsSharedPtr> FieldDef;
std::vector<std::vector<NekDouble> > FieldData;
std::vector<std::vector<NekDouble> > FieldData;
m_graph->Import(filebcs,FieldDef, FieldData);
......
......@@ -1396,12 +1396,21 @@ namespace Nektar
SpatialDomains::RobinBoundaryCondition
>(m_bndConditions[i])->m_robinFunction;
LibUtilities::Equation coeff =
boost::static_pointer_cast<
SpatialDomains::RobinBoundaryCondition
>(m_bndConditions[i])->m_robinPrimitiveCoeff;
condition.Evaluate(x0,x1,x2,time,locExpList->UpdatePhys());
locExpList->IProductWRTBase(locExpList->GetPhys(),
locExpList->UpdateCoeffs());
/// \todo RobinPrimitiveCoeff forgotten? - PB
// put primitive coefficient into the physical space
// storage
coeff.Evaluate(x0,x1,x2,time,
locExpList->UpdatePhys());
}
else
{
......
......@@ -297,14 +297,14 @@ namespace Nektar
}
}
/**
/**
* Fills the list of local expansions with the segments in one
* subdomain specified in an inputfile by \a domain. This
* CompositeMap contains a list of Composites which define the
* subdomains.
* subdomain specified in an inputfile by \a domain. This
* CompositeMap contains a list of Composites which define the
* subdomains.
* @param domain A domain, comprising of one or more composite
* regions.
* @param i Index of currently processed subdomain
* @param i Index of currently processed subdomain
* @param graph1D A mesh, containing information about the
* domain and the spectral/hp element expansion.
* @param DeclareCoeffPhysArrays If true, create general segment expansions
......
......@@ -170,8 +170,7 @@ namespace Nektar
* Given a block matrix, construct a global matrix system according to
* a local to global mapping. #m_linSys is constructed by
* AssembleFullMatrix().
* @param mkey Associated linear system key.
* @param Mat Block matrix.
* @param pkey Associated linear system key.
* @param locToGloMap Local to global mapping.
*/
GlobalLinSys::GlobalLinSys(const GlobalLinSysKey &pKey,
......
......@@ -867,9 +867,11 @@ namespace Nektar
else
{
// Do matrix multiply locally
NekVector<NekDouble> loc(nLocal, m_wsp, eWrapper);
m_locToGloMap->GlobalToLocalBnd(pInput, m_wsp);
NekVector<NekDouble> loc(nLocal, m_wsp, eWrapper);
loc = (*m_schurCompl)*loc;
m_locToGloMap->AssembleBnd(m_wsp, pOutput);
}
}
......
......@@ -71,6 +71,7 @@ namespace Nektar
eSymmetry,
eRinglebFlow,
eTimeDependent,
eRadiation,
eIsentropicVortex,
eCalcBC,
eQinflow,
......@@ -105,6 +106,7 @@ namespace Nektar
known_type["RinglebFlow"] = eRinglebFlow;
known_type["Symmetry"] = eSymmetry;
known_type["TimeDependent"] = eTimeDependent;
known_type["Radiation"] = eRadiation;
known_type["IsentropicVortex"] = eIsentropicVortex;
known_type["InflowCFE"] = eInflowCFE;
known_type["OutflowCFE"] = eOutflowCFE;
......
......@@ -1287,30 +1287,30 @@ namespace Nektar
switch(mtype)
{
case eMass:
{
Mat = StdExpansion::CreateGeneralMatrix(mkey);
// For Fourier basis set the imaginary component of mean mode
// to have a unit diagonal component in mass matrix
if(m_base[0]->GetBasisType() == LibUtilities::eFourier)
{
for(i = 0; i < order1; ++i)
{
(*Mat)(order0*i+1,i*order0+1) = 1.0;
}
}
if(m_base[1]->GetBasisType() == LibUtilities::eFourier)
{
for(i = 0; i < order0; ++i)
{
(*Mat)(order0+i ,order0+i) = 1.0;
}
}
}
break;
case eFwdTrans:
{
Mat = MemoryManager<DNekMat>::AllocateSharedPtr(m_ncoeffs,m_ncoeffs);
{
Mat = StdExpansion::CreateGeneralMatrix(mkey);
// For Fourier basis set the imaginary component of mean mode
// to have a unit diagonal component in mass matrix
if(m_base[0]->GetBasisType() == LibUtilities::eFourier)
{
for(i = 0; i < order1; ++i)
{
(*Mat)(order0*i+1,i*order0+1) = 1.0;
}
}
if(m_base[1]->GetBasisType() == LibUtilities::eFourier)
{
for(i = 0; i < order0; ++i)
{
(*Mat)(order0+i ,order0+i) = 1.0;
}
}
}
break;
case eFwdTrans:
{
Mat = MemoryManager<DNekMat>::AllocateSharedPtr(m_ncoeffs,m_ncoeffs);
StdMatrixKey iprodkey(eIProductWRTBase,DetExpansionType(),*this);
DNekMat &Iprod = *GetStdMatrix(iprodkey);
StdMatrixKey imasskey(eInvMass,DetExpansionType(),*this);
......@@ -1322,8 +1322,8 @@ namespace Nektar
default:
{
Mat = StdExpansion::CreateGeneralMatrix(mkey);
}
break;
}
break;
}
return Mat;
......
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