mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -98,6 +98,7 @@ int main(int argc, char *argv[])
|
|||||||
cci.write();
|
cci.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
volScalarField V
|
volScalarField V
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -110,10 +111,19 @@ int main(int argc, char *argv[])
|
|||||||
false
|
false
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
|
dimensionedScalar("V", mesh.V().dimensions(), 0.0),
|
||||||
|
calculatedFvPatchField<scalar>::typeName
|
||||||
);
|
);
|
||||||
mesh.V().setInstance(runTime.timeName());
|
V.dimensionedInternalField() = mesh.V();
|
||||||
mesh.V().write();
|
forAll(V.boundaryField(), patchI)
|
||||||
|
{
|
||||||
|
V.boundaryField()[patchI] =
|
||||||
|
V.boundaryField()[patchI].patch().magSf();
|
||||||
|
}
|
||||||
|
Info<< "Writing cellVolumes and patch faceAreas to " << V.name()
|
||||||
|
<< " in " << runTime.timeName() << endl;
|
||||||
|
V.write();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "\nEnd\n" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|||||||
@ -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) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -44,4 +44,104 @@ const Foam::objectRegistry& Foam::lduMesh::thisDb() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<lduMesh>& ip)
|
||||||
|
{
|
||||||
|
const lduMesh& ldum = ip.t_;
|
||||||
|
const lduAddressing& addr = ldum.lduAddr();
|
||||||
|
const lduInterfacePtrsList interfaces = ldum.interfaces();
|
||||||
|
|
||||||
|
os << "lduMesh :"
|
||||||
|
<< " size:" << addr.size()
|
||||||
|
<< " l:" << addr.lowerAddr().size()
|
||||||
|
<< " u:" << addr.upperAddr().size()
|
||||||
|
<< " interfaces:" << interfaces.size()
|
||||||
|
<< " comm:" << ldum.comm()
|
||||||
|
<< endl;
|
||||||
|
label nCouples = 0;
|
||||||
|
forAll(interfaces, i)
|
||||||
|
{
|
||||||
|
if (interfaces.set(i))
|
||||||
|
{
|
||||||
|
const labelUList& faceCells = addr.patchAddr(i);
|
||||||
|
nCouples += faceCells.size();
|
||||||
|
|
||||||
|
if (isA<processorLduInterface>(interfaces[i]))
|
||||||
|
{
|
||||||
|
const processorLduInterface& pi = refCast
|
||||||
|
<
|
||||||
|
const processorLduInterface
|
||||||
|
>(interfaces[i]);
|
||||||
|
|
||||||
|
os << " patch:" << i
|
||||||
|
<< " type:" << interfaces[i].type()
|
||||||
|
<< " size:" << faceCells.size()
|
||||||
|
<< " myProcNo:" << pi.myProcNo()
|
||||||
|
<< " neighbProcNo:" << pi.neighbProcNo()
|
||||||
|
<< " comm:" << pi.comm()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
os << " patch:" << i
|
||||||
|
<< " type:" << interfaces[i].type()
|
||||||
|
<< " size:" << faceCells.size()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
os << " Interface faces/cells:" << scalar(nCouples)/addr.size()
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
|
||||||
|
// Print actual contents
|
||||||
|
if (lduMesh::debug)
|
||||||
|
{
|
||||||
|
const labelList& l = addr.lowerAddr();
|
||||||
|
const labelList& u = addr.upperAddr();
|
||||||
|
forAll(l, faceI)
|
||||||
|
{
|
||||||
|
os << " face:" << faceI << " l:" << l[faceI]
|
||||||
|
<< " u:" << u[faceI] << endl;
|
||||||
|
}
|
||||||
|
forAll(interfaces, i)
|
||||||
|
{
|
||||||
|
if (interfaces.set(i))
|
||||||
|
{
|
||||||
|
const labelUList& faceCells = addr.patchAddr(i);
|
||||||
|
if (faceCells.size())
|
||||||
|
{
|
||||||
|
os << " patch:" << i
|
||||||
|
<< " type:" << interfaces[i].type() << endl;
|
||||||
|
|
||||||
|
if (isA<processorLduInterface>(interfaces[i]))
|
||||||
|
{
|
||||||
|
const processorLduInterface& pi = refCast
|
||||||
|
<
|
||||||
|
const processorLduInterface
|
||||||
|
>(interfaces[i]);
|
||||||
|
|
||||||
|
os << " myProcNo:" << pi.myProcNo()
|
||||||
|
<< " neighbProcNo:" << pi.neighbProcNo()
|
||||||
|
<< " comm:" << pi.comm()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
forAll(faceCells, i)
|
||||||
|
{
|
||||||
|
os << " " << i << " own:" << faceCells[i]
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
os.check("Ostream& operator<<(Ostream&, const lduMesh&");
|
||||||
|
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -36,6 +36,7 @@ Description
|
|||||||
#include "lduAddressing.H"
|
#include "lduAddressing.H"
|
||||||
#include "lduInterfacePtrsList.H"
|
#include "lduInterfacePtrsList.H"
|
||||||
#include "typeInfo.H"
|
#include "typeInfo.H"
|
||||||
|
#include "InfoProxy.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -77,6 +78,19 @@ public:
|
|||||||
//- Return a list of pointers for each patch
|
//- Return a list of pointers for each patch
|
||||||
// with only those pointing to interfaces being set
|
// with only those pointing to interfaces being set
|
||||||
virtual lduInterfacePtrsList interfaces() const = 0;
|
virtual lduInterfacePtrsList interfaces() const = 0;
|
||||||
|
|
||||||
|
// Info
|
||||||
|
|
||||||
|
//- Return info proxy.
|
||||||
|
// Used to print mesh information to a stream
|
||||||
|
InfoProxy<lduMesh> info() const
|
||||||
|
{
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ostream operator
|
||||||
|
|
||||||
|
friend Ostream& operator<<(Ostream&, const InfoProxy<lduMesh>&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -192,7 +192,7 @@ Foam::fvMesh::fvMesh(const IOobject& io)
|
|||||||
time().timeName(),
|
time().timeName(),
|
||||||
*this,
|
*this,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::AUTO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
*this
|
*this
|
||||||
@ -588,7 +588,7 @@ Foam::tmp<Foam::scalarField> Foam::fvMesh::movePoints(const pointField& p)
|
|||||||
this->time().timeName(),
|
this->time().timeName(),
|
||||||
*this,
|
*this,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
*this,
|
*this,
|
||||||
|
|||||||
Reference in New Issue
Block a user