mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
Simplify checking of container (List/HashTable, strings) sizes
- can use 'XX.empty()' instead of 'XX.size() == 0', 'XX.size() < 1' or 'XX.size() <= 0' or for simpler coding. It also has the same number of characters as '!XX.size()' and /might/ be more readable - many size checking had 'XX.size() > 0', 'XX.size() != 0', or 'XX.size() >= 1' when a simple 'XX.size()' suffices
This commit is contained in:
@ -26,7 +26,7 @@ Application
|
||||
PDRFoam
|
||||
|
||||
Description
|
||||
Compressible premixed/partially-premixed combustion solver with turbulence
|
||||
Compressible premixed/partially-premixed combustion solver with turbulence
|
||||
modelling.
|
||||
|
||||
Combusting RANS code using the b-Xi two-equation model.
|
||||
@ -121,7 +121,8 @@ scalar StCoNum = 0.0;
|
||||
// Test : disable refinement for some cells
|
||||
PackedList<1>& protectedCell =
|
||||
refCast<dynamicRefineFvMesh>(mesh).protectedCell();
|
||||
if (protectedCell.size() == 0)
|
||||
|
||||
if (protectedCell.empty())
|
||||
{
|
||||
protectedCell.setSize(mesh.nCells());
|
||||
protectedCell = 0;
|
||||
@ -135,7 +136,7 @@ scalar StCoNum = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
//volScalarField pIndicator("pIndicator",
|
||||
//volScalarField pIndicator("pIndicator",
|
||||
// p*(fvc::laplacian(p))
|
||||
// / (
|
||||
// magSqr(fvc::grad(p))
|
||||
|
||||
Reference in New Issue
Block a user