CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   question about createMesh.H (https://www.cfd-online.com/Forums/openfoam/130170-question-about-createmesh-h.html)

doubtsincfd February 20, 2014 17:33

question about createMesh.H
 
In file createMesh.H, an instance 'mesh' of type 'fvMesh' is created
Code:

Foam::fvMesh mesh
    (
        Foam::IOobject
        (
            Foam::fvMesh::defaultRegion,
            runTime.timeName(),
            runTime,
            Foam::IOobject::MUST_READ
        )
    );

Question 1: Is the following constructor from fvMesh.H used in the above case?
Code:

explicit fvMesh(const IOobject& io);
Question 2: In the above code, what does defaultRegion indicate?

I found following information about 'defaultRegion' in polyMesh.H and polyMesh.C

Code:

    //- Return the default region name
    static word defaultRegion;

Code:

namespace Foam
{
defineTypeNameAndDebug(polyMesh, 0);

word polyMesh::defaultRegion = "region0";
word polyMesh::meshSubDir = "polyMesh";
}

Code:

const Foam::fileName& Foam::polyMesh::dbDir() const
{
    if (objectRegistry::dbDir() == defaultRegion)
    {
        return parent().dbDir();
    }
    else
    {
        return objectRegistry::dbDir();
    }
}

Question 2 continued: What is region0 and why is it equal to 'defaultRegion' ?

NightWing June 13, 2016 04:34

Sorry to write below this post
 
I too have the same doubt regarding createMesh.H

What does defaultRegion refer to?

Any suggestions?


All times are GMT -4. The time now is 23:32.