Commit 8d439657 authored by Gianmarco Mengaldo's avatar Gianmarco Mengaldo

Bug fixed in stop criteria for exact Riemann solver. Some documentation added.

parent fbba8bbe
......@@ -85,17 +85,26 @@ namespace Nektar
}
}
/**
* @brief Destructor for EulerCFE class.
*/
EulerCFE::~EulerCFE()
{
}
/**
* @brief Print out a summary with some relevant information.
*/
void EulerCFE::v_PrintSummary(std::ostream &out)
{
CompressibleFlowSystem::v_PrintSummary(out);
out << "\tProblem Type : " << ProblemTypeMap[m_problemType] << endl;
}
/**
* @brief Set the initial conditions.
*/
void EulerCFE::v_SetInitialConditions(
NekDouble initialtime,
bool dumpInitialConditions)
......@@ -122,6 +131,9 @@ namespace Nektar
}
}
/**
* @brief Compute the right-hand side.
*/
void EulerCFE::DoOdeRhs(
const Array<OneD, const Array<OneD, NekDouble> > &inarray,
Array<OneD, Array<OneD, NekDouble> > &outarray,
......@@ -141,6 +153,10 @@ namespace Nektar
}
}
/**
* @brief Compute the projection and call the method for imposing the
* boundary conditions in case of discontinuous projection.
*/
void EulerCFE::DoOdeProjection(
const Array<OneD, const Array<OneD, NekDouble> > &inarray,
Array<OneD, Array<OneD, NekDouble> > &outarray,
......@@ -444,12 +460,11 @@ namespace Nektar
NekDouble u0 = 1.0;
NekDouble v0 = 0.0;
NekDouble gamma = m_gamma;
//NekDouble time = m_time;
NekDouble r;
for(int i = 0; i < npoints; i++)
{
int kk = id2+i;
int kk = id2 + i;
r = sqrt((x[i] - u0 * time - x0) *
(x[i] - u0 * time - x0) +
(y[i] - v0 * time - y0) *
......@@ -680,7 +695,6 @@ namespace Nektar
// Loop on all the points of that edge
for (int j = 0; j < npoints; j++)
{
while ((abs(errV) > toll) || (abs(errTheta) > toll))
{
......
......@@ -249,9 +249,9 @@ namespace Nektar
u_int = u_int - ((p_intL - p_intR) /
(derp_intL - derp_intR));
++iter;
ASSERTL1(iter == max_iter,
ASSERTL0(iter != max_iter,
"Exact Riemann solver exceeds maximum numer of "
"iterations (1000) in pattern 1 (RCS)")
"iterations (10000000000) in pattern 1 (RCS)")
}
p_int = (p_intL + p_intR) / 2.0;
......@@ -349,9 +349,9 @@ namespace Nektar
(derp_intL - derp_intR));
++iter;
ASSERTL1(iter == max_iter,
ASSERTL0(iter != max_iter,
"Exact Riemann solver exceeds maximum numer of "
"iterations (1000) in pattern 2 (SCR)")
"iterations (10000000000) in pattern 2 (SCR)")
}
p_int = (p_intL + p_intR) / 2.0;
......@@ -434,15 +434,18 @@ namespace Nektar
sqrt(1.0 + (f4 * ((u_int - uL) / cL)) *
(f4 * ((u_int - uL) / cL)));
p_intL = pL + (aL*wL2*(u_int-uL));
derp_intL = (2.0*aL*pow(wL2,3.0))/(1.0+(wL2*wL2));
wR2 = f4*((u_int-uR)/cR)+sqrt(1.0+(f4*((u_int-uR)/cR))*(f4*((u_int-uR)/cR)));
p_intR = pR+(aR*wR2*(u_int-uR));
derp_intR = (2.0*aR*pow(wR2,3.0))/(1.0+(wR2*wR2));
u_int = u_int-((p_intL-p_intR)/(derp_intL-derp_intR));
p_intL = pL + (aL * wL2 * (u_int - uL));
derp_intL = (2.0 * aL * pow(wL2, 3.0)) / (1.0 + (wL2 * wL2));
wR2 = f4 * ((u_int - uR) / cR) +
sqrt(1.0 + (f4 * ((u_int - uR) / cR)) *
(f4 * ((u_int - uR) / cR)));
p_intR = pR + (aR * wR2 * (u_int - uR));
derp_intR = (2.0 * aR * pow(wR2, 3.0)) / (1.0 + (wR2 * wR2));
u_int = u_int - ((p_intL - p_intR) /
(derp_intL - derp_intR));
++iter;
ASSERTL1(iter == max_iter,
ASSERTL0(iter != max_iter,
"Exact Riemann solver exceeds maximum numer of "
"iterations (1000) in pattern 3 (SCS)")
}
......@@ -528,10 +531,11 @@ namespace Nektar
(derp_intL - derp_intR));
++iter;
ASSERTL1(iter == max_iter,
ASSERTL0(iter != max_iter,
"Exact Riemann solver exceeds maximum numer of "
"iterations (1000) in pattern 4 (RCR)")
}
p_int = (p_intL + p_intR) / 2.0;
c_intL = cL - ((u_int - uL) / f2);
c_intR = cR + ((u_int - uR) / f2);
......
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