Skip to content
Snippets Groups Projects
Commit f75a6fa5 authored by Henry's avatar Henry
Browse files

LeastSquaresGrad: Corrected handling of boundary values in flattening

parent 14ace465
No related merge requests found
......@@ -101,7 +101,11 @@ Foam::fv::LeastSquaresGrad<Type, Stencil>::calcGrad
forAll(vtf.boundaryField(), patchi)
{
const fvPatchField<Type>& ptf = vtf.boundaryField()[patchi];
label nCompact = ptf.patch().start();
label nCompact =
ptf.patch().start()
- mesh.nInternalFaces()
+ mesh.nCells();
forAll(ptf, i)
{
......
......@@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "LeastSquaresGrad.H"
//#include "centredCFCCellToCellStencilObject.H"
#include "centredCPCCellToCellStencilObject.H"
#include "centredCECCellToCellStencilObject.H"
......@@ -33,6 +34,12 @@ namespace Foam
{
namespace fv
{
// makeLeastSquaresGradScheme
// (
// faceCellsLeastSquares,
// centredCFCCellToCellStencilObject
// )
makeLeastSquaresGradScheme
(
pointCellsLeastSquares,
......
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