createNamedPolyMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
13 
14 Description
15  Create a polyMesh for a specified region, or the defaultRegion
16 
17 Required Variables
18  - runTime [Time]
19 
20 Provided Variables
21  - regionName [word]
22  - mesh [polyMesh]
23 
24 \*---------------------------------------------------------------------------*/
25 
27 
28 {
29  if (args.readIfPresent("region", regionName))
30  {
31  Foam::Info << "Create polyMesh " << regionName;
32  }
33  else
34  {
35  Foam::Info << "Create polyMesh";
36  }
37  Foam::Info << " for time = " << runTime.timeName() << Foam::nl;
38 }
39 
40 
42 (
44  (
45  regionName,
46  runTime.timeName(),
47  runTime,
49  )
50 );
51 
53 
54 // ************************************************************************* //
mesh
Foam::polyMesh mesh(Foam::IOobject(regionName, runTime.timeName(), runTime, Foam::IOobject::MUST_READ))
runTime
engineTime & runTime
Definition: createEngineTime.H:13
regionName
Foam::word regionName(Foam::polyMesh::defaultRegion)
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::polyMesh::defaultRegion
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:318
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::argList::readIfPresent
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
Definition: argListI.H:323
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::nl
constexpr char nl
Definition: Ostream.H:404
args
Foam::argList args(argc, argv)
Foam::IOobject::MUST_READ
Definition: IOobject.H:185