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
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -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 * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::IOdictionary::~IOdictionary()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -75,6 +75,9 @@ public:
|
||||
//- Construct given an IOobject and dictionary
|
||||
IOdictionary(const IOobject&, const dictionary&);
|
||||
|
||||
//- Construct given an IOobject and Istream
|
||||
IOdictionary(const IOobject&, Istream&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOdictionary();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -95,17 +95,22 @@ Foam::tmp
|
||||
>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::readField(Istream& is)
|
||||
{
|
||||
if (is.version() < 2.0)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
return readField
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
"GeometricField<Type, PatchField, GeoMesh>::readField(Istream&)",
|
||||
IOobject
|
||||
(
|
||||
this->name(),
|
||||
this->time().timeName(),
|
||||
this->db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
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>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -325,14 +325,6 @@ public:
|
||||
const Mesh&
|
||||
);
|
||||
|
||||
//- Construct and read from given stream
|
||||
GeometricField
|
||||
(
|
||||
const IOobject&,
|
||||
const Mesh&,
|
||||
Istream&
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
GeometricField
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user