- Can now retrieve or set a column/row of a tensor.
Either compile-time or run-time checks.
Get
t.col<1>(); t.col(1);
t.row<1>(); t.row(1);
Set
t.col<1>(vec); t.col(1,vec);
t.row<1>(vec); t.row(1,vec);
The templated versions are compile-time checked
t.col<3>();
t.col<3>(vec);
The parameter versions are run-time checked
t.col(3);
t.col(3,vec);
ENH: provide named access to tensor/tensor inner product as inner()
Helper function to calculate the current face area vs the area returned
from the current point locations. Useful for ACMI-type baffles where we
scale the face areas without moving points.
- nBoundaryFaces() is often used and is identical to
(nFaces() - nInternalFaces()).
- forward the mesh nInternalFaces() and nBoundaryFaces() to
polyBoundaryMesh as nFaces() and start() respectively,
for use when operating on a polyBoundaryMesh.
STYLE:
- use identity() function with starting offset when creating boundary maps.
labelList map
(
identity(mesh.nBoundaryFaces(), mesh.nInternalFaces())
);
vs.
labelList map(mesh.nBoundaryFaces());
forAll(map, i)
{
map[i] = mesh.nInternalFaces() + i;
}
Previously had 3 possibilities for handling exposed internal faces
1. use default "oldInternalFaces"
2. specify -patch, to use the specified (existing) patch
3. specify -patches, to use the geometrically closest patches
Now relaxed the restriction on -patch to allow specification of a new
(not yet existing) patch name. This improves flexibility, but won't
catch typing mistakes.
Harmonize behaviour of -patches and -patch. When -patches is used to
specify a single, non-regex patch name, it now behaves identically to
-patch. Since the getList handling for options already allows special
treatment for single parameter lists, the following will work
identically:
subsetMesh -patch patch0
subsetMesh -patches patch0
subsetMesh -patches '( patch0 )'
In the future it might be reasonable to fully combine the behaviour of
'-patch' and '-patches' and treat them as aliases for each other.
ENH: support subsetMesh on a cellZone.
- when the '-zone' option is specified, the command argument is treated
as the name (or names) of cellZones to be selected instead of as the
name of the cellSet.
The command argument can be a single word, regex, or list of
word/regex.
Eg,
subsetMesh -zone -patch mypatch mixer
subsetMesh -zone -patch mypatch '(mixer "moving.*" )'
STYLE: simplify set handling and other code cleanup in subsetMesh
Using: OpenFOAM-plus (see www.OpenFOAM.com)
Build: plus-7ab57cc5d014 (OPENFOAM=1807)
Arch: LSB;label=32;scalar=64
- This can be useful for development versions, or when the version
at build time uses some other naming scheme (#1010)
- 'signed' input parameter only mandatory for distance > 0.
A distance <= 0 is always signed and the input parameter is ignored.
- Use normal distance when distance == 0. This has no effect when
the surface has no open edges, but improves on rounding issues
around the zero crossing when the surface has open edges.
This may still need future revisiting.
- avoid duplicate code by relocating cellZone selection and bounding box
sub-selection into cuttingPlane and cuttingSurfaceBaseSelection.
Allows reuse by inherited classes (sampledPlane, surfMeshSamplePlane).
- takes two general actions:
1. orient edge in canonical direction (positive gradient) and detect
any edge intersection.
2. edge intersection alpha (0-1)
- refactor into a cuttingSurfaceBase intermediate class with the
actions as templated parameters rather than function pointers. This
allows the use of lambda functions with captures from the caller.
- The test condition
[ -n "$cur" -a ... ]
fails if $cur starts with '-le', which bash interprets as a further
test op. Splitting the test condition solves the problem:
[ -n "$cur" ] && [ ... ]
- Since the local edges are oriented according to the gradient,
they can also be used to determine the correct face orientation.
This generalizes the algorithm for future reuse.