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:165
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:63
Foam::polyMesh::defaultRegion
static word defaultRegion
Definition: polyMesh.H:314
Foam::endl
Ostream & endl(Ostream &os)
Definition: Ostream.H:381
Foam::argList::readIfPresent
bool readIfPresent(const word &optName, T &val) const
Definition: argListI.H:316
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:73
Foam::Info
messageStream Info
Foam::nl
constexpr char nl
Definition: Ostream.H:424
args
Foam::argList args(argc, argv)
Foam::IOobject::MUST_READ
@ MUST_READ
Definition: IOobject.H:181