fvcAverage and fvcReconstruct: Return zero for 0-D cases

fvcAverage and fvcReconstruct both do divisions or inverses of surface
summed fields. A single-cell zero-dimension case, has no genuine faces
on which to sum, so surface sums are identically zero. This change
detects this situation and returns a zero value instead of failing due
to a divide by zero.

This allows the multiphase test cases to be reduced to just one cell.
This commit is contained in:
Will Bainbridge
2018-04-19 09:05:29 +01:00
parent 60b81b38da
commit a0a19c7f38
8 changed files with 24 additions and 10 deletions

View File

@ -30,7 +30,7 @@ vertices
blocks
(
hex (0 1 2 3 4 5 6 7) (1 2 1) simpleGrading (1 1 1)
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
);
edges

View File

@ -30,7 +30,7 @@ vertices
blocks
(
hex (0 1 2 3 4 5 6 7) (1 2 1) simpleGrading (1 1 1)
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
);
edges

View File

@ -30,7 +30,7 @@ vertices
blocks
(
hex (0 1 2 3 4 5 6 7) (1 2 1) simpleGrading (1 1 1)
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
);
edges

View File

@ -30,7 +30,7 @@ vertices
blocks
(
hex (0 1 2 3 4 5 6 7) (1 2 1) simpleGrading (1 1 1)
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
);
edges

View File

@ -30,7 +30,7 @@ vertices
blocks
(
hex (0 1 2 3 4 5 6 7) (1 2 1) simpleGrading (1 1 1)
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
);
edges

View File

@ -30,7 +30,7 @@ vertices
blocks
(
hex (0 1 2 3 4 5 6 7) (1 2 1) simpleGrading (1 1 1)
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
);
edges