mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -137,7 +137,7 @@ Foam::IOdictionary::IOdictionary(const IOobject& io)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Everyone check or just master
|
// Everyone check or just master
|
||||||
bool masterOnly =
|
bool masterOnly =
|
||||||
regIOobject::fileModificationChecking == timeStampMaster
|
regIOobject::fileModificationChecking == timeStampMaster
|
||||||
|| regIOobject::fileModificationChecking == inotifyMaster;
|
|| regIOobject::fileModificationChecking == inotifyMaster;
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Everyone check or just master
|
// Everyone check or just master
|
||||||
bool masterOnly =
|
bool masterOnly =
|
||||||
regIOobject::fileModificationChecking == timeStampMaster
|
regIOobject::fileModificationChecking == timeStampMaster
|
||||||
|| regIOobject::fileModificationChecking == inotifyMaster;
|
|| regIOobject::fileModificationChecking == inotifyMaster;
|
||||||
|
|
||||||
@ -239,6 +239,15 @@ Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::IOdictionary::IOdictionary(const IOobject& io, Istream& is)
|
||||||
|
:
|
||||||
|
regIOobject(io),
|
||||||
|
dictionary(is)
|
||||||
|
{
|
||||||
|
dictionary::name() = IOobject::objectPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::IOdictionary::~IOdictionary()
|
Foam::IOdictionary::~IOdictionary()
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -75,6 +75,9 @@ public:
|
|||||||
//- Construct given an IOobject and dictionary
|
//- Construct given an IOobject and dictionary
|
||||||
IOdictionary(const IOobject&, const dictionary&);
|
IOdictionary(const IOobject&, const dictionary&);
|
||||||
|
|
||||||
|
//- Construct given an IOobject and Istream
|
||||||
|
IOdictionary(const IOobject&, Istream&);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~IOdictionary();
|
virtual ~IOdictionary();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -95,17 +95,22 @@ Foam::tmp
|
|||||||
>
|
>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::readField(Istream& is)
|
Foam::GeometricField<Type, PatchField, GeoMesh>::readField(Istream& is)
|
||||||
{
|
{
|
||||||
if (is.version() < 2.0)
|
return readField
|
||||||
{
|
(
|
||||||
FatalIOErrorIn
|
IOdictionary
|
||||||
(
|
(
|
||||||
"GeometricField<Type, PatchField, GeoMesh>::readField(Istream&)",
|
IOobject
|
||||||
|
(
|
||||||
|
this->name(),
|
||||||
|
this->time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
is
|
is
|
||||||
) << "IO versions < 2.0 are not supported."
|
)
|
||||||
<< exit(FatalIOError);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
return readField(dictionary(is));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -384,45 +389,6 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
|
||||||
(
|
|
||||||
const IOobject& io,
|
|
||||||
const Mesh& mesh,
|
|
||||||
Istream& is
|
|
||||||
)
|
|
||||||
:
|
|
||||||
DimensionedField<Type, GeoMesh>(io, mesh, dimless, false),
|
|
||||||
timeIndex_(this->time().timeIndex()),
|
|
||||||
field0Ptr_(NULL),
|
|
||||||
fieldPrevIterPtr_(NULL),
|
|
||||||
boundaryField_(*this, readField(is))
|
|
||||||
{
|
|
||||||
// Check compatibility between field and mesh
|
|
||||||
|
|
||||||
if (this->size() != GeoMesh::size(this->mesh()))
|
|
||||||
{
|
|
||||||
FatalIOErrorIn
|
|
||||||
(
|
|
||||||
"GeometricField<Type, PatchField, GeoMesh>::GeometricField"
|
|
||||||
"(const IOobject&, const Mesh&, Istream&)",
|
|
||||||
is
|
|
||||||
) << " number of field elements = " << this->size()
|
|
||||||
<< " number of mesh elements = " << GeoMesh::size(this->mesh())
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
|
|
||||||
readOldTimeIfPresent();
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Info<< "Finishing read-construct of "
|
|
||||||
"GeometricField<Type, PatchField, GeoMesh>"
|
|
||||||
<< endl << this->info() << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -325,14 +325,6 @@ public:
|
|||||||
const Mesh&
|
const Mesh&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and read from given stream
|
|
||||||
GeometricField
|
|
||||||
(
|
|
||||||
const IOobject&,
|
|
||||||
const Mesh&,
|
|
||||||
Istream&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
GeometricField
|
GeometricField
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user