You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
double FVblending = _maxBlending; // todo use indicator
507
515
if (_OSmode == 2) {
508
-
FVblending = 1.0;
509
516
_boundary[0] = y[comp]; // copy inlet DOFs to ghost node
510
-
subcellFVintegral<StateType, ResidualType, ParamType>(FVblending, y + offsetC() + comp, res + offsetC() + comp, _strideNode, _strideNode);
517
+
if (FVblending > 0.0 && FVblending < 1.0) // only use lower order scheme for advection, treat dispersion with high order DG.
518
+
subcellFVconvectionIntegral<StateType, ResidualType, ParamType>(FVblending, y + offsetC() + comp, res + offsetC() + comp, _strideNode, _strideNode);
519
+
elseif (FVblending == 1.0) { // use lower order scheme for both, advection and dispersion. // TODO: either special mode where this is done or deprecated when troubled cell identification works
520
+
subcellFVintegral<StateType, ResidualType, ParamType>(FVblending, y + offsetC() + comp, res + offsetC() + comp, d_ax, _strideNode, _strideNode);
521
+
continue;
522
+
}
511
523
}
512
-
else
513
-
{
514
-
// ===================================//
515
-
// reset cache //
516
-
// ===================================//
517
524
518
-
_h.setZero();
519
-
_g.setZero();
520
-
_boundary[0] = y[comp]; // copy inlet DOFs to ghost node
525
+
double DGblending = 1.0 - FVblending;
521
526
522
-
//======================================//
523
-
//solve auxiliary system g = d c / d x //
524
-
//======================================//
527
+
// ===================================//
528
+
//reset cache //
529
+
// ===================================//
525
530
526
-
// DG volume integral in strong form
527
-
volumeIntegral<StateType, StateType>(_C, _g);
531
+
_h.setZero();
532
+
_g.setZero();
533
+
_boundary[0] = y[comp]; // copy inlet DOFs to ghost node
+ 0.5 * d_ax * (localC[0] + localC[1]) * (2 / (_invWeights[interface - 1] + _invWeights[interface]))); // central flux for diffusion with first order FD approximation of c_x
+ 0.5 * d_ax * (localC[0] + localC[1]) * (2 / (_invWeights[_polyDeg] + _invWeights[0]))); // central flux for diffusion with first order FD approximation of c_x
+ 0.5 * d_ax * (localC[0] + localC[1]) * (2 / (_invWeights[_polyDeg] + _invWeights[0]))); // central flux for diffusion with first order FD approximation of c_x
0 commit comments