Files
openfoam/src/OpenFOAM/include/createPolyMesh.H
Mark Olesen c410edf928 ENH: centralized handling of -allRegions, -regions, -region (#2072)
Step 1.
    include "addAllRegionOptions.H"

    Adds the -allRegions, -regions and -region options to argList.

Step 2.
    include "getAllRegionOptions.H"

    Processes the options with -allRegions selecting everything
    from the regionProperties.

    OR use -regions to specify multiple regions (from
       regionProperties), and can also contain regular expressions

    OR use the -region option

    Specifying a single -regions NAME (not a regular expresssion)
    is the same as -region NAME and doesn't use regionProperties

    Creates a `wordList regionNames`

Step 3.
    Do something with the region names.
    Either directly, or quite commonly with the following

    include "createNamedMeshes.H"

    Creates a `PtrList<fvMesh> meshes`

STYLE: add description to some central include files
2021-05-07 09:46:33 +02:00

43 lines
1.2 KiB
C

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
Description
Create a polyMesh (defaultRegion only)
Required Variables
- runTime [Time]
Provided Variables
- mesh [polyMesh]
\*---------------------------------------------------------------------------*/
Foam::Info
<< "Create polyMesh for time = "
<< runTime.timeName() << Foam::nl;
Foam::polyMesh mesh
(
Foam::IOobject
(
Foam::polyMesh::defaultRegion,
runTime.timeName(),
runTime,
Foam::IOobject::MUST_READ
)
);
Foam::Info << Foam::endl;
// ************************************************************************* //