Commit 2abe1ca6 authored by Daniele de Grazia's avatar Daniele de Grazia Committed by Dave Moxey

Modification in BCs for CFS

(cherry picked from commit 29e72c99)
parent 48493f1d
......@@ -164,43 +164,53 @@ namespace Nektar
const int n,
const NekDouble time,
int &cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &inarray);
void WallBC(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void WallViscousBC(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void SymmetryBC(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void RiemannInvariantBC(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void PressureOutflowNonReflectiveBC(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void PressureOutflowBC(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void PressureOutflowFileBC(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void PressureInflowFileBC(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void ExtrapOrder0BC(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void GetVelocityVector(
const Array<OneD, Array<OneD, NekDouble> > &physfield,
......
......@@ -275,6 +275,15 @@ namespace Nektar
std::string varName;
int cnt = 0;
int nTracePts = GetTraceTotPoints();
Array<OneD, Array<OneD, NekDouble> > Fwd(nvariables);
for (int i = 0; i < nvariables; ++i)
{
Fwd[i] = Array<OneD, NekDouble>(nTracePts);
m_fields[i]->ExtractTracePhys(inarray[i], Fwd[i]);
}
// loop over Boundary Regions
for (int n = 0; n < m_fields[0]->GetBndConditions().num_elements(); ++n)
{
......@@ -289,12 +298,12 @@ namespace Nektar
}
else
{
SetCommonBC(type,n,time, cnt,inarray);
SetCommonBC(type, n, time, cnt, inarray);
}
// no User Defined conditions provided so skip cnt
// this line is left in case solver specific condition is added.
cnt += m_fields[0]->GetBndCondExpansions()[n]->GetExpSize();
// no User Defined conditions provided so skip cnt
// this line is left in case solver specific condition is added.
cnt += m_fields[0]->GetBndCondExpansions()[n]->GetExpSize();
}
}
}
......@@ -223,6 +223,14 @@ namespace Nektar
{
std::string varName;
int cnt = 0;
int nTracePts = GetTraceTotPoints();
Array<OneD, Array<OneD, NekDouble> > Fwd(nvariables);
for (int i = 0; i < nvariables; ++i)
{
Fwd[i] = Array<OneD, NekDouble>(nTracePts);
m_fields[i]->ExtractTracePhys(inarray[i], Fwd[i]);
}
std::string userDefStr;
int nreg = m_fields[0]->GetBndConditions().num_elements();
......@@ -249,7 +257,7 @@ namespace Nektar
else
{
// set up userdefined BC common to all solvers
SetCommonBC(userDefStr,n,time, cnt,inarray);
SetCommonBC(userDefStr, n, time, cnt, Fwd, inarray);
}
}
......
......@@ -251,12 +251,20 @@ namespace Nektar
{
std::string varName;
int cnt = 0;
int nTracePts = GetTraceTotPoints();
Array<OneD, Array<OneD, NekDouble> > Fwd(nvariables);
for (int i = 0; i < nvariables; ++i)
{
Fwd[i] = Array<OneD, NekDouble>(nTracePts);
m_fields[i]->ExtractTracePhys(inarray[i], Fwd[i]);
}
// loop over Boundary Regions
for (int n = 0; n < m_fields[0]->GetBndConditions().num_elements(); ++n)
{
std::string type = m_fields[0]->GetBndConditions()[n]->GetUserDefined();
SetCommonBC(type,n,time,cnt,inarray);
SetCommonBC(type, n, time, cnt, Fwd, inarray);
}
}
}
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