diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C index 43ca5335bd7baafa8b6f935f0853b296f83141c7..f1a70cb97b12a7559a1c3aed9be365080d28aa7f 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,13 +31,18 @@ License Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io) { - // do not register the dictionary + // Note: - do not register the dictionary since dynamicFvMeshes themselves + // do this. + // - defaultRegion (region0) gets loaded from constant, other ones + // get loaded from constant/<regionname>. Normally we'd use + // polyMesh::dbDir() but we haven't got a polyMesh yet ... IOdictionary dict ( IOobject ( "dynamicMeshDict", io.time().constant(), + (io.name() == polyMesh::defaultRegion ? "" : io.name()), io.db(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE,