Using this command find $FOAM_TUTORIALS -type f -name fvSchemes|xargs grep -rh div\(phi,U\)|sort
, I get:
div(div(phi,U)) Gauss linear;
div(div(phi,U)) Gauss linear;
div(div(phi,U)) Gauss linear;
div(phi,U) bounded Gauss limitedLinear 0.2;
div(phi,U) bounded Gauss limitedLinear 0.2;
div(phi,U) bounded Gauss limitedLinear 0.2;
div(phi,U) bounded Gauss limitedLinearV 1;
div(phi,U) bounded Gauss limitedLinearV 1;
div(phi,U) bounded Gauss limitedLinearV 1;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linearUpwind grad;
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind unlimited;
div(phi,U) bounded Gauss linearUpwind unlimited;
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss localBlended linearUpwindV grad(U) linear;
div(phi,U) bounded Gauss LUST grad(U);
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) Gauss CoBlended
div(phi,U) Gauss cubic;
div(phi,U) Gauss cubic;
div(phi,U) Gauss DEShybrid
div(phi,U) Gauss DEShybrid
div(phi,U) Gauss limitedLinear 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
// div(phi,U) Gauss linear;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind limited;
div(phi,U) Gauss linearUpwind limited;
div(phi,U) Gauss linearUpwind limited;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
// div(phi,U) Gauss LUST grad(U);// linear;
div(phi,U) Gauss LUST unlimitedGrad(U);
div(phi,U) Gauss skewCorrected linear;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;//linearUpwind grad(U);
div(phi,U) Gauss vanLeerV;
I want the redundant lines to be shown only once, like this:
div(phi,U) bounded Gauss limitedLinear 0.2;
div(phi,U) bounded Gauss limitedLinearV 1;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linearUpwind grad;
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind unlimited;
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss localBlended linearUpwindV grad(U) linear;
div(phi,U) bounded Gauss LUST grad(U);
div(phi,U) bounded Gauss upwind;
div(phi,U) Gauss CoBlended 0.01 limitedLinearV 1 0.05 linearUpwind grad(U);
div(phi,U) Gauss cubic;
div(phi,U) Gauss DEShybrid linear linearUpwind grad(U) hmax 0.65 1 0.028 0 1 1;
div(phi,U) Gauss DEShybrid linear linearUpwind grad(U) hmax 0.65 1 1 0 1 1;
div(phi,U) Gauss limitedLinear 1;
"div\(phi.*,U.*\)" Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss linear;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind limited;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST unlimitedGrad(U);
div(phi,U) Gauss skewCorrected linear;
"div\(phi.*,U.*\)" Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss vanLeerV;
Let's suppose that your input is in a file named
inputfile.txt
.You can run:
sed -e 's/ \+/ /g' inputfile.txt | grep -v "\/\/" | sort -u
Explanation:
sed -e 's/ \+/ /g' inputfile.txt
replaces multiple occurrences of blank to one single blank. In this way it's more simple to perform the final sorting/comparisongrep -v "\/\/"
removes commented linessort -u
removes duplicated lines.This solution works well if you don't care about replacing multiple blank spaces with a single one.
These commands may be merged in your original command in this way:
find $FOAM_TUTORIALS -type f -name fvSchemes | xargs grep -rh div\(phi,U\) | sed -e 's/ \+/ /g' | grep -v "\/\/" | sort -u