mappedPatchBase: Add "samePatch" option

This option means that a one field can be mapped to another within the
same patch without specifying the patch name. E.g.:

    walls
    {
        type            mappedValue;

        //neighbourPatch  walls; // <-- Previously required. Still supported.

        samePatch       yes;     // <-- New alternative specification

        field           T.liquid;
        value           $internalField;
    }

This is useful when the boundary condition is specified using a regular
expression for the patch name.

    "wall_.*"
    {
        type            mappedValue;

        //neighbourPatch  ???;   // <-- No unique name can be given

        samePatch       yes;     // <-- Still works

        field           T.liquid;
        value           $internalField;
    }
This commit is contained in:
Will Bainbridge
2023-01-13 09:19:08 +00:00
parent 35256e5280
commit 320e70af1d
2 changed files with 28 additions and 18 deletions

View File

@ -35,7 +35,7 @@ boundaryField
walls
{
type mappedValue;
neighbourPatch walls;
samePatch yes;
field T.liquid;
value $internalField;
}