mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
inspired by MeshObject - added coordinateSystems::New selector
This commit is contained in:
@ -72,7 +72,7 @@ Foam::porousZone::porousZone
|
|||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
cellZoneID_(mesh_.cellZones().findZoneID(name)),
|
cellZoneID_(mesh_.cellZones().findZoneID(name)),
|
||||||
coordSys_(dict),
|
coordSys_(dict, mesh),
|
||||||
porosity_(1),
|
porosity_(1),
|
||||||
C0_(0),
|
C0_(0),
|
||||||
C1_(0),
|
C1_(0),
|
||||||
@ -372,25 +372,21 @@ void Foam::porousZone::writeDict(Ostream& os, bool subDict) const
|
|||||||
|
|
||||||
if (dict_.found("porosity"))
|
if (dict_.found("porosity"))
|
||||||
{
|
{
|
||||||
os.writeKeyword("porosity")
|
os.writeKeyword("porosity") << porosity() << token::END_STATEMENT << nl;
|
||||||
<< porosity()
|
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict_.found("powerLaw"))
|
// powerLaw coefficients
|
||||||
|
if (const dictionary* dictPtr = dict_.subDictPtr("powerLaw"))
|
||||||
{
|
{
|
||||||
const dictionary& subDict = dict_.subDict("powerLaw");
|
|
||||||
|
|
||||||
os << indent << "powerLaw";
|
os << indent << "powerLaw";
|
||||||
subDict.write(os);
|
dictPtr->write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict_.found("Darcy"))
|
// Darcy-Forchheimer coefficients
|
||||||
|
if (const dictionary* dictPtr = dict_.subDictPtr("Darcy"))
|
||||||
{
|
{
|
||||||
const dictionary& subDict = dict_.subDict("Darcy");
|
|
||||||
|
|
||||||
os << indent << "Darcy";
|
os << indent << "Darcy";
|
||||||
subDict.write(os);
|
dictPtr->write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
os << decrIndent << indent << token::END_BLOCK << endl;
|
||||||
|
|||||||
@ -104,7 +104,7 @@ class porousZone
|
|||||||
//- Cell zone ID
|
//- Cell zone ID
|
||||||
label cellZoneID_;
|
label cellZoneID_;
|
||||||
|
|
||||||
//- Coordinate system (Cartesian)
|
//- Coordinate system used for the zone (Cartesian)
|
||||||
coordinateSystem coordSys_;
|
coordinateSystem coordSys_;
|
||||||
|
|
||||||
//- porosity of the zone (0 < porosity <= 1)
|
//- porosity of the zone (0 < porosity <= 1)
|
||||||
@ -189,7 +189,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
porousZone(const word&, const fvMesh&, const dictionary&);
|
porousZone(const word& name, const fvMesh&, const dictionary&);
|
||||||
|
|
||||||
//- Return clone
|
//- Return clone
|
||||||
autoPtr<porousZone> clone() const
|
autoPtr<porousZone> clone() const
|
||||||
@ -199,12 +199,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Return a pointer to a new porousZone created on freestore
|
//- Return pointer to new porousZone created on freestore from Istream
|
||||||
// from Istream
|
|
||||||
// Has the ability to rewrite coordinate systems as required
|
|
||||||
class iNew
|
class iNew
|
||||||
:
|
|
||||||
public coordinateSystems
|
|
||||||
{
|
{
|
||||||
//- Reference to the finite volume mesh this zone is part of
|
//- Reference to the finite volume mesh this zone is part of
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
@ -213,13 +209,6 @@ public:
|
|||||||
|
|
||||||
iNew(const fvMesh& mesh)
|
iNew(const fvMesh& mesh)
|
||||||
:
|
:
|
||||||
coordinateSystems(),
|
|
||||||
mesh_(mesh)
|
|
||||||
{}
|
|
||||||
|
|
||||||
iNew(const fvMesh& mesh, const coordinateSystems& cs)
|
|
||||||
:
|
|
||||||
coordinateSystems(cs),
|
|
||||||
mesh_(mesh)
|
mesh_(mesh)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -227,7 +216,6 @@ public:
|
|||||||
{
|
{
|
||||||
word name(is);
|
word name(is);
|
||||||
dictionary dict(is);
|
dictionary dict(is);
|
||||||
rewriteDict(dict, true);
|
|
||||||
|
|
||||||
return autoPtr<porousZone>(new porousZone(name, mesh_, dict));
|
return autoPtr<porousZone>(new porousZone(name, mesh_, dict));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,35 +35,8 @@ namespace Foam
|
|||||||
defineTemplateTypeNameAndDebug(IOPtrList<porousZone>, 0);
|
defineTemplateTypeNameAndDebug(IOPtrList<porousZone>, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @cond localscope
|
|
||||||
const Foam::word typeName("porousZones");
|
|
||||||
//! @endcond localscope
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::porousZones::porousZones
|
|
||||||
(
|
|
||||||
const fvMesh& mesh,
|
|
||||||
const coordinateSystems& cs
|
|
||||||
)
|
|
||||||
:
|
|
||||||
IOPtrList<porousZone>
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
typeName,
|
|
||||||
mesh.time().constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::READ_IF_PRESENT,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
porousZone::iNew(mesh)
|
|
||||||
),
|
|
||||||
mesh_(mesh),
|
|
||||||
csList_(cs)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::porousZones::porousZones
|
Foam::porousZones::porousZones
|
||||||
(
|
(
|
||||||
const fvMesh& mesh
|
const fvMesh& mesh
|
||||||
@ -73,35 +46,17 @@ Foam::porousZones::porousZones
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
typeName,
|
"porousZones",
|
||||||
mesh.time().constant(),
|
mesh.time().constant(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
porousZone::iNew(mesh)
|
porousZone::iNew(mesh)
|
||||||
),
|
),
|
||||||
mesh_(mesh),
|
mesh_(mesh)
|
||||||
csList_(mesh)
|
{}
|
||||||
{
|
|
||||||
clear();
|
|
||||||
|
|
||||||
IOPtrList<porousZone> newList
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"porousZones",
|
|
||||||
mesh_.time().constant(),
|
|
||||||
mesh_,
|
|
||||||
IOobject::READ_IF_PRESENT,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false // Don't register new zones with objectRegistry
|
|
||||||
),
|
|
||||||
porousZone::iNew(mesh_, csList_)
|
|
||||||
);
|
|
||||||
|
|
||||||
transfer(newList);
|
|
||||||
}
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -138,21 +93,21 @@ bool Foam::porousZones::readData(Istream& is)
|
|||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
IOPtrList<porousZone> newList
|
IOPtrList<porousZone> newLst
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
typeName,
|
"porousZones",
|
||||||
mesh_.time().constant(),
|
mesh_.time().constant(),
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false // Don't register new zones with objectRegistry
|
false // Don't re-register new zones with objectRegistry
|
||||||
),
|
),
|
||||||
porousZone::iNew(mesh_, csList_)
|
porousZone::iNew(mesh_)
|
||||||
);
|
);
|
||||||
|
|
||||||
transfer(newList);
|
transfer(newLst);
|
||||||
|
|
||||||
return is.good();
|
return is.good();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,9 +84,6 @@ class porousZones
|
|||||||
//- Reference to the finite volume mesh this zone is part of
|
//- Reference to the finite volume mesh this zone is part of
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
//- Reference to constant coordinate systems
|
|
||||||
coordinateSystems csList_;
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
@ -104,12 +101,9 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from fvMesh and coordinate systems list
|
|
||||||
porousZones(const fvMesh& mesh, const coordinateSystems& cs);
|
|
||||||
|
|
||||||
//- Construct from fvMesh
|
//- Construct from fvMesh
|
||||||
// with automatically constructed coordinate systems list
|
// with automatically constructed coordinate systems list
|
||||||
porousZones(const fvMesh& mesh);
|
porousZones(const fvMesh&);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -78,11 +78,11 @@ public:
|
|||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const point& origin,
|
const point& origin,
|
||||||
const coordinateRotation& cr
|
const coordinateRotation&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
cartesianCS(const word& name, const dictionary& dict);
|
cartesianCS(const word& name, const dictionary&);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@ License
|
|||||||
|
|
||||||
#include "IOstream.H"
|
#include "IOstream.H"
|
||||||
#include "coordinateSystem.H"
|
#include "coordinateSystem.H"
|
||||||
|
#include "coordinateSystems.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -81,6 +82,22 @@ Foam::coordinateSystem::coordinateSystem
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::coordinateSystem::coordinateSystem
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
name_(name),
|
||||||
|
note_(),
|
||||||
|
origin_(point::zero),
|
||||||
|
R_(),
|
||||||
|
Rtr_(sphericalTensor::I)
|
||||||
|
{
|
||||||
|
operator=(dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::coordinateSystem::coordinateSystem
|
Foam::coordinateSystem::coordinateSystem
|
||||||
(
|
(
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
@ -98,18 +115,56 @@ Foam::coordinateSystem::coordinateSystem
|
|||||||
|
|
||||||
Foam::coordinateSystem::coordinateSystem
|
Foam::coordinateSystem::coordinateSystem
|
||||||
(
|
(
|
||||||
const word& name,
|
const dictionary& dict,
|
||||||
const dictionary& dict
|
const objectRegistry& obr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
name_(name),
|
name_(type()),
|
||||||
note_(),
|
note_(),
|
||||||
origin_(point::zero),
|
origin_(point::zero),
|
||||||
R_(),
|
R_(),
|
||||||
Rtr_(sphericalTensor::I)
|
Rtr_(sphericalTensor::I)
|
||||||
|
{
|
||||||
|
const entry* entryPtr = dict.lookupEntryPtr(typeName_(), false, false);
|
||||||
|
|
||||||
|
// a simple entry is a lookup into global coordinateSystems
|
||||||
|
if (entryPtr && !entryPtr->isDict())
|
||||||
|
{
|
||||||
|
word csName;
|
||||||
|
entryPtr->stream() >> csName;
|
||||||
|
|
||||||
|
const coordinateSystems& csLst = coordinateSystems::New(obr);
|
||||||
|
|
||||||
|
label csId = csLst.find(csName);
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<< "coordinateSystem::coordinateSystem"
|
||||||
|
"(const dictionary&, const objectRegistry&):"
|
||||||
|
<< nl << "using global coordinate system: "
|
||||||
|
<< csName << "=" << csId << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (csId < 0)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"coordinateSystem::coordinateSystem"
|
||||||
|
"(const dictionary&, const objectRegistry&)"
|
||||||
|
) << "could not find coordinate system: " << csName << nl
|
||||||
|
<< "available coordinate systems: " << csLst.toc() << nl << nl
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
// copy coordinateSystem, but assign the name as the typeName
|
||||||
|
// to avoid strange things in writeDict()
|
||||||
|
operator=(csLst[csId]);
|
||||||
|
name_ = typeName_();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
operator=(dict);
|
operator=(dict);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::coordinateSystem::coordinateSystem(Istream& is)
|
Foam::coordinateSystem::coordinateSystem(Istream& is)
|
||||||
@ -125,7 +180,6 @@ Foam::coordinateSystem::coordinateSystem(Istream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::coordinateSystem::~coordinateSystem()
|
Foam::coordinateSystem::~coordinateSystem()
|
||||||
@ -231,8 +285,7 @@ Foam::tmp<Foam::vectorField> Foam::coordinateSystem::globalToLocal
|
|||||||
void Foam::coordinateSystem::write(Ostream& os) const
|
void Foam::coordinateSystem::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << type()
|
os << type()
|
||||||
<< " origin: " << origin()
|
<< " origin: " << origin() << " e1: " << e1() << " e3: " << e3();
|
||||||
<< " e1: " << e1() << " e3: " << e3();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -292,7 +345,7 @@ void Foam::coordinateSystem::operator=(const dictionary& rhs)
|
|||||||
note_.clear();
|
note_.clear();
|
||||||
rhs.readIfPresent("note", note_);
|
rhs.readIfPresent("note", note_);
|
||||||
|
|
||||||
// specify via coordinateRotation
|
// specify via coordinateRotation sub-dictionary
|
||||||
if (dict.found("coordinateRotation"))
|
if (dict.found("coordinateRotation"))
|
||||||
{
|
{
|
||||||
autoPtr<coordinateRotation> cr =
|
autoPtr<coordinateRotation> cr =
|
||||||
@ -302,7 +355,7 @@ void Foam::coordinateSystem::operator=(const dictionary& rhs)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no sub-dictionary - specify via axes
|
// let coordinateRotation constructor extract the axes specification
|
||||||
R_ = coordinateRotation(dict);
|
R_ = coordinateRotation(dict);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,19 +367,12 @@ void Foam::coordinateSystem::operator=(const dictionary& rhs)
|
|||||||
|
|
||||||
bool Foam::operator!=(const coordinateSystem& a, const coordinateSystem& b)
|
bool Foam::operator!=(const coordinateSystem& a, const coordinateSystem& b)
|
||||||
{
|
{
|
||||||
if (a.origin() != b.origin() || a.R() != b.R() || a.type() != b.type())
|
return (a.origin() != b.origin() || a.R() != b.R() || a.type() != b.type());
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const coordinateSystem& cs)
|
Foam::Ostream& Foam::operator<<(Ostream& os, const coordinateSystem& cs)
|
||||||
{
|
{
|
||||||
cs.write(os);
|
cs.write(os);
|
||||||
|
|||||||
@ -26,8 +26,8 @@ Class
|
|||||||
Foam::coordinateSystem
|
Foam::coordinateSystem
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A cartesian coordinate system and the base class for
|
A cartesian coordinate system and the base class for other coordinate
|
||||||
other coordinate system specifications
|
system specifications
|
||||||
|
|
||||||
All systems are defined by an origin point and a coordinateRotation.
|
All systems are defined by an origin point and a coordinateRotation.
|
||||||
For convenience, the dictionary constructor forms allow a few shortcuts:
|
For convenience, the dictionary constructor forms allow a few shortcuts:
|
||||||
@ -99,6 +99,29 @@ Description
|
|||||||
)
|
)
|
||||||
@endverbatim
|
@endverbatim
|
||||||
|
|
||||||
|
- additionally, if the coordinateSystem points to a plain entry,
|
||||||
|
it can be used to reference one of the global coordinateSystems
|
||||||
|
@verbatim
|
||||||
|
1
|
||||||
|
(
|
||||||
|
cat1
|
||||||
|
{
|
||||||
|
coordinateSystem system_10;
|
||||||
|
porosity 0.781;
|
||||||
|
Darcy
|
||||||
|
{
|
||||||
|
d d [0 -2 0 0 0] (-1000 -1000 0.50753e+08);
|
||||||
|
f f [0 -1 0 0 0] (-1000 -1000 12.83);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@endverbatim
|
||||||
|
For this to work correctly, the coordinateSystem constructor must be
|
||||||
|
supplied with both a dictionary and an objectRegistry.
|
||||||
|
|
||||||
|
See Also
|
||||||
|
coordinateSystems and coordinateSystems::New
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
coordinateSystem.C
|
coordinateSystem.C
|
||||||
newCoordinateSystem.C
|
newCoordinateSystem.C
|
||||||
@ -180,7 +203,7 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Construct null. This is equivalent to an identity coordinateSystem
|
||||||
coordinateSystem();
|
coordinateSystem();
|
||||||
|
|
||||||
//- Construct from origin and 2 axes
|
//- Construct from origin and 2 axes
|
||||||
@ -200,11 +223,15 @@ public:
|
|||||||
const coordinateRotation&
|
const coordinateRotation&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Construct from dictionary with a given name
|
||||||
|
coordinateSystem(const word& name, const dictionary&);
|
||||||
|
|
||||||
//- Construct from dictionary with default name
|
//- Construct from dictionary with default name
|
||||||
coordinateSystem(const dictionary&);
|
coordinateSystem(const dictionary&);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary (default name)
|
||||||
coordinateSystem(const word& name, const dictionary&);
|
// With the ability to reference global coordinateSystems
|
||||||
|
coordinateSystem(const dictionary&, const objectRegistry&);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
// The Istream contains a word followed by a dictionary
|
// The Istream contains a word followed by a dictionary
|
||||||
@ -284,14 +311,14 @@ public:
|
|||||||
const word& coordType,
|
const word& coordType,
|
||||||
const word& name,
|
const word& name,
|
||||||
const point& origin,
|
const point& origin,
|
||||||
const coordinateRotation& cr
|
const coordinateRotation&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Select constructed from dictionary
|
//- Select constructed from dictionary
|
||||||
static autoPtr<coordinateSystem> New
|
static autoPtr<coordinateSystem> New
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dictionary& dict
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Select constructed from Istream
|
//- Select constructed from Istream
|
||||||
@ -324,7 +351,6 @@ public:
|
|||||||
return note_;
|
return note_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Return origin
|
//- Return origin
|
||||||
const point& origin() const
|
const point& origin() const
|
||||||
{
|
{
|
||||||
@ -462,7 +488,11 @@ public:
|
|||||||
|
|
||||||
// friend Operators
|
// friend Operators
|
||||||
|
|
||||||
friend bool operator!=(const coordinateSystem&, const coordinateSystem&);
|
friend bool operator!=
|
||||||
|
(
|
||||||
|
const coordinateSystem&,
|
||||||
|
const coordinateSystem&
|
||||||
|
);
|
||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
|
|||||||
@ -26,61 +26,78 @@ License
|
|||||||
|
|
||||||
#include "coordinateSystems.H"
|
#include "coordinateSystems.H"
|
||||||
#include "IOPtrList.H"
|
#include "IOPtrList.H"
|
||||||
|
#include "Time.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
defineTypeNameAndDebug(coordinateSystems, 0);
|
||||||
defineTemplateTypeNameAndDebug(IOPtrList<coordinateSystem>, 0);
|
defineTemplateTypeNameAndDebug(IOPtrList<coordinateSystem>, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @cond localscope
|
|
||||||
const Foam::word typeName("coordinateSystems");
|
|
||||||
const Foam::word dataType("coordinateSystem");
|
|
||||||
//! @endcond localscope
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::coordinateSystems::coordinateSystems()
|
Foam::coordinateSystems::coordinateSystems(const IOobject& io)
|
||||||
|
:
|
||||||
|
IOPtrList<coordinateSystem>(io)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::coordinateSystems::coordinateSystems
|
Foam::coordinateSystems::coordinateSystems
|
||||||
(
|
(
|
||||||
const IOobject& io
|
const IOobject& io,
|
||||||
|
const PtrList<coordinateSystem>& lst
|
||||||
)
|
)
|
||||||
{
|
:
|
||||||
IOPtrList<coordinateSystem> newList(io);
|
IOPtrList<coordinateSystem>(io, lst)
|
||||||
transfer(newList);
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::coordinateSystems::coordinateSystems
|
Foam::coordinateSystems::coordinateSystems
|
||||||
(
|
(
|
||||||
const objectRegistry& registry
|
const IOobject& io,
|
||||||
|
const xfer<PtrList<coordinateSystem> >& lst
|
||||||
|
)
|
||||||
|
:
|
||||||
|
IOPtrList<coordinateSystem>(io, lst)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Read construct from registry, or return previously registered
|
||||||
|
const Foam::coordinateSystems& Foam::coordinateSystems::New
|
||||||
|
(
|
||||||
|
const objectRegistry& obr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IOPtrList<coordinateSystem> newList
|
if (obr.foundObject<coordinateSystems>(typeName))
|
||||||
|
{
|
||||||
|
return obr.lookupObject<coordinateSystems>(typeName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return obr.store
|
||||||
|
(
|
||||||
|
new coordinateSystems
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
typeName,
|
typeName,
|
||||||
"constant",
|
"constant",
|
||||||
registry,
|
obr,
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE
|
||||||
false // don't register
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
transfer(newList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
Foam::label Foam::coordinateSystems::find(const word& keyword) const
|
Foam::label Foam::coordinateSystems::find(const word& keyword) const
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
@ -114,55 +131,19 @@ Foam::wordList Foam::coordinateSystems::toc() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::coordinateSystems::rewriteDict(dictionary& dict, bool noType) const
|
|
||||||
{
|
|
||||||
if (dict.found(dataType) && !dict.isDict(dataType))
|
|
||||||
{
|
|
||||||
word name(dict.lookup(dataType));
|
|
||||||
label i = find(name);
|
|
||||||
|
|
||||||
if (i >= 0)
|
|
||||||
{
|
|
||||||
dict.remove(dataType);
|
|
||||||
dict.add(dataType, operator[](i).dict(noType));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"Foam::coordinateSystems::rewriteDict(dictionary&, bool) const"
|
|
||||||
) << "could not rewrite " << dataType << " " << name << nl
|
|
||||||
<< "available coordinate systems: " << toc() << nl << nl
|
|
||||||
<< "context: " << nl
|
|
||||||
<< dict << nl
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::coordinateSystems::writeData(Ostream& os, bool subDict) const
|
bool Foam::coordinateSystems::writeData(Ostream& os, bool subDict) const
|
||||||
{
|
{
|
||||||
// Write size of list
|
os << nl << size() << nl << token::BEGIN_LIST;
|
||||||
os << nl << size();
|
|
||||||
|
|
||||||
// Write beginning of contents
|
|
||||||
os << nl << token::BEGIN_LIST;
|
|
||||||
|
|
||||||
// Write list contents
|
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
os << nl;
|
os << nl;
|
||||||
operator[](i).writeDict(os, subDict);
|
operator[](i).writeDict(os, subDict);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write end of contents
|
|
||||||
os << token::END_LIST << nl;
|
os << token::END_LIST << nl;
|
||||||
|
|
||||||
// Check state of IOstream
|
|
||||||
return os.good();
|
return os.good();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -28,6 +28,10 @@ Class
|
|||||||
Description
|
Description
|
||||||
Provides a centralized coordinateSystem collection.
|
Provides a centralized coordinateSystem collection.
|
||||||
|
|
||||||
|
Note
|
||||||
|
Mixing normal constructors and the coordinateSystems::New constructor
|
||||||
|
may yield unexpected results.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
coordinateSystems.C
|
coordinateSystems.C
|
||||||
|
|
||||||
@ -36,7 +40,7 @@ SourceFiles
|
|||||||
#define coordinateSystems_H
|
#define coordinateSystems_H
|
||||||
|
|
||||||
#include "coordinateSystem.H"
|
#include "coordinateSystem.H"
|
||||||
#include "PtrList.H"
|
#include "IOPtrList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -49,33 +53,48 @@ namespace Foam
|
|||||||
|
|
||||||
class coordinateSystems
|
class coordinateSystems
|
||||||
:
|
:
|
||||||
public PtrList<coordinateSystem>
|
public IOPtrList<coordinateSystem>
|
||||||
{
|
{
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
coordinateSystems(const coordinateSystems&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const coordinateSystems&);
|
void operator=(const coordinateSystems&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Public Member Functions
|
//- Runtime type information
|
||||||
|
TypeName("coordinateSystems");
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
|
||||||
coordinateSystems();
|
|
||||||
|
|
||||||
//- Read construct from IOobject
|
//- Read construct from IOobject
|
||||||
explicit coordinateSystems(const IOobject&);
|
explicit coordinateSystems(const IOobject&);
|
||||||
|
|
||||||
//- Read construct from registry from "constant" instance
|
//- Construct from IOobject and a PtrList
|
||||||
coordinateSystems(const objectRegistry&);
|
coordinateSystems
|
||||||
|
(
|
||||||
|
const IOobject&,
|
||||||
|
const PtrList<coordinateSystem>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from IOobject and transferring the PtrList contents
|
||||||
|
coordinateSystems
|
||||||
|
(
|
||||||
|
const IOobject&,
|
||||||
|
const xfer<PtrList<coordinateSystem> >&
|
||||||
|
);
|
||||||
|
|
||||||
|
// Selectors
|
||||||
|
|
||||||
|
//- Return previously registered or read construct from "constant"
|
||||||
|
static const coordinateSystems& New(const objectRegistry&);
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|
||||||
//- Find and return index for a given keyword, returns -1 if not found
|
//- Find and return index for a given keyword, returns -1 if not found
|
||||||
label find(const word& key) const;
|
label find(const word& key) const;
|
||||||
|
|
||||||
@ -85,45 +104,6 @@ public:
|
|||||||
//- Return the table of contents (list of all keywords)
|
//- Return the table of contents (list of all keywords)
|
||||||
wordList toc() const;
|
wordList toc() const;
|
||||||
|
|
||||||
//- Rewrite coordinateSystem entry with appropriate dictionary entry
|
|
||||||
//
|
|
||||||
// This replaces coordinateSystems entries with their contents.
|
|
||||||
// For example,
|
|
||||||
// @verbatim
|
|
||||||
// cat1
|
|
||||||
// {
|
|
||||||
// coordinateSystem system_10;
|
|
||||||
// porosity 0.781;
|
|
||||||
// Darcy
|
|
||||||
// {
|
|
||||||
// d d [0 -2 0 0 0] (-1000 -1000 0.50753e+08);
|
|
||||||
// f f [0 -1 0 0 0] (-1000 -1000 12.83);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// @endverbatim
|
|
||||||
// might get re-written as the following (depending on the value of
|
|
||||||
// @c system_10 in the @c constant/coordinateSystems file):
|
|
||||||
// @verbatim
|
|
||||||
// cat1
|
|
||||||
// {
|
|
||||||
// coordinateSystem
|
|
||||||
// {
|
|
||||||
// origin (0 0 0);
|
|
||||||
// e3 (1 0 0);
|
|
||||||
// e1 (0 0 -1);
|
|
||||||
// }
|
|
||||||
// porosity 0.781;
|
|
||||||
// Darcy
|
|
||||||
// {
|
|
||||||
// d d [0 -2 0 0 0] (-1000 -1000 0.50753e+08);
|
|
||||||
// f f [0 -1 0 0 0] (-1000 -1000 12.83);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// @endverbatim
|
|
||||||
// When this form of re-writing is used, the coordinateRotation is
|
|
||||||
// reduced to the axes specification.
|
|
||||||
bool rewriteDict(dictionary&, bool noType=false) const;
|
|
||||||
|
|
||||||
//- write data
|
//- write data
|
||||||
bool writeData(Ostream&, bool subDict=true) const;
|
bool writeData(Ostream&, bool subDict=true) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -106,14 +106,11 @@ public:
|
|||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const point& origin,
|
const point& origin,
|
||||||
const coordinateRotation& cr
|
const coordinateRotation&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
cylindricalCS(const word& name, const dictionary& dict);
|
cylindricalCS(const word& name, const dictionary&);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,6 @@ namespace Foam
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::parabolicCylindricalCS::parabolicCylindricalCS()
|
Foam::parabolicCylindricalCS::parabolicCylindricalCS()
|
||||||
@ -113,6 +112,7 @@ Foam::vector Foam::parabolicCylindricalCS::localToGlobal
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::vectorField> Foam::parabolicCylindricalCS::localToGlobal
|
Foam::tmp<Foam::vectorField> Foam::parabolicCylindricalCS::localToGlobal
|
||||||
(
|
(
|
||||||
const vectorField& local,
|
const vectorField& local,
|
||||||
@ -123,7 +123,8 @@ Foam::tmp<Foam::vectorField> Foam::parabolicCylindricalCS::localToGlobal
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"parabolicCylindricalCS::localToGlobal(const vectorField&, bool) const"
|
"parabolicCylindricalCS::localToGlobal"
|
||||||
|
"(const vectorField&, bool) const"
|
||||||
) << "parabolic cylindrical coordinates v < 0"
|
) << "parabolic cylindrical coordinates v < 0"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,18 +107,11 @@ public:
|
|||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const point& origin,
|
const point& origin,
|
||||||
const coordinateRotation& cr
|
const coordinateRotation&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
parabolicCylindricalCS
|
parabolicCylindricalCS(const word&, const dictionary&);
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const dictionary& dict
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -45,6 +45,7 @@ Foam::sphericalCS::sphericalCS()
|
|||||||
coordinateSystem()
|
coordinateSystem()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::sphericalCS::sphericalCS
|
Foam::sphericalCS::sphericalCS
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
@ -96,6 +97,7 @@ Foam::vector Foam::sphericalCS::localToGlobal
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::vectorField> Foam::sphericalCS::localToGlobal
|
Foam::tmp<Foam::vectorField> Foam::sphericalCS::localToGlobal
|
||||||
(
|
(
|
||||||
const vectorField& local,
|
const vectorField& local,
|
||||||
@ -174,5 +176,4 @@ Foam::tmp<Foam::vectorField> Foam::sphericalCS::globalToLocal
|
|||||||
return tresult;
|
return tresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -105,19 +105,16 @@ public:
|
|||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const point& origin,
|
const point& origin,
|
||||||
const coordinateRotation& cr
|
const coordinateRotation&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
sphericalCS(const word& name, const dictionary& dict);
|
sphericalCS(const word& name, const dictionary&);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -36,7 +36,6 @@ namespace Foam
|
|||||||
addToRunTimeSelectionTable(coordinateSystem, toroidalCS, dictionary);
|
addToRunTimeSelectionTable(coordinateSystem, toroidalCS, dictionary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::toroidalCS::toroidalCS
|
Foam::toroidalCS::toroidalCS
|
||||||
@ -105,6 +104,7 @@ Foam::vector Foam::toroidalCS::localToGlobal
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::vectorField> Foam::toroidalCS::localToGlobal
|
Foam::tmp<Foam::vectorField> Foam::toroidalCS::localToGlobal
|
||||||
(
|
(
|
||||||
const vectorField& local,
|
const vectorField& local,
|
||||||
@ -129,6 +129,7 @@ Foam::tmp<Foam::vectorField> Foam::toroidalCS::localToGlobal
|
|||||||
return coordinateSystem::localToGlobal(lc, translate);
|
return coordinateSystem::localToGlobal(lc, translate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::vector Foam::toroidalCS::globalToLocal
|
Foam::vector Foam::toroidalCS::globalToLocal
|
||||||
(
|
(
|
||||||
const vector& global,
|
const vector& global,
|
||||||
@ -143,6 +144,7 @@ Foam::vector Foam::toroidalCS::globalToLocal
|
|||||||
return vector::zero;
|
return vector::zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::vectorField> Foam::toroidalCS::globalToLocal
|
Foam::tmp<Foam::vectorField> Foam::toroidalCS::globalToLocal
|
||||||
(
|
(
|
||||||
const vectorField& global,
|
const vectorField& global,
|
||||||
@ -182,5 +184,4 @@ void Foam::toroidalCS::writeDict(Ostream& os, bool subDict) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -106,12 +106,12 @@ public:
|
|||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const point& origin,
|
const point& origin,
|
||||||
const coordinateRotation& cr,
|
const coordinateRotation&,
|
||||||
const scalar radius
|
const scalar radius
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
toroidalCS(const word& name, const dictionary& dict);
|
toroidalCS(const word& name, const dictionary&);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -143,9 +143,10 @@ Foam::sampledPlane::sampledPlane
|
|||||||
{
|
{
|
||||||
|
|
||||||
// make plane relative to the coordinateSystem (Cartesian)
|
// make plane relative to the coordinateSystem (Cartesian)
|
||||||
|
// allow lookup from global coordinate systems
|
||||||
if (dict.found("coordinateSystem"))
|
if (dict.found("coordinateSystem"))
|
||||||
{
|
{
|
||||||
coordinateSystem cs(dict.subDict("coordinateSystem"));
|
coordinateSystem cs(dict, mesh);
|
||||||
|
|
||||||
point base = cs.globalPosition(planeDesc().refPoint());
|
point base = cs.globalPosition(planeDesc().refPoint());
|
||||||
vector norm = cs.globalVector(planeDesc().normal());
|
vector norm = cs.globalVector(planeDesc().normal());
|
||||||
|
|||||||
@ -136,8 +136,8 @@ Foam::sampledSurface::New
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"sampledSurface::New(const word&, "
|
"sampledSurface::New"
|
||||||
"const polyMesh&, const dictionary&)"
|
"(const word&, const polyMesh&, const dictionary&)"
|
||||||
) << "Unknown sample type " << sampleType
|
) << "Unknown sample type " << sampleType
|
||||||
<< endl << endl
|
<< endl << endl
|
||||||
<< "Valid sample types : " << endl
|
<< "Valid sample types : " << endl
|
||||||
@ -145,10 +145,7 @@ Foam::sampledSurface::New
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<sampledSurface>
|
return autoPtr<sampledSurface>(cstrIter()(name, mesh, dict));
|
||||||
(
|
|
||||||
cstrIter()(name, mesh, dict)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -161,10 +161,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Class used for the PtrLists read-construction
|
//- Class used for the PtrLists read-construction
|
||||||
// Has the ability to rewrite coordinate systems as required
|
|
||||||
class iNew
|
class iNew
|
||||||
:
|
|
||||||
public coordinateSystems
|
|
||||||
{
|
{
|
||||||
//- Reference to the volume mesh
|
//- Reference to the volume mesh
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
@ -173,17 +170,6 @@ public:
|
|||||||
|
|
||||||
iNew(const polyMesh& mesh)
|
iNew(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
coordinateSystems(mesh),
|
|
||||||
mesh_(mesh)
|
|
||||||
{}
|
|
||||||
|
|
||||||
iNew
|
|
||||||
(
|
|
||||||
const polyMesh& mesh,
|
|
||||||
const coordinateSystems& cs
|
|
||||||
)
|
|
||||||
:
|
|
||||||
coordinateSystems(cs),
|
|
||||||
mesh_(mesh)
|
mesh_(mesh)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -191,7 +177,6 @@ public:
|
|||||||
{
|
{
|
||||||
word name(is);
|
word name(is);
|
||||||
dictionary dict(is);
|
dictionary dict(is);
|
||||||
rewriteDict(dict, true);
|
|
||||||
|
|
||||||
return sampledSurface::New(name, mesh_, dict);
|
return sampledSurface::New(name, mesh_, dict);
|
||||||
}
|
}
|
||||||
@ -204,7 +189,7 @@ public:
|
|||||||
sampledSurface
|
sampledSurface
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const polyMesh& mesh,
|
const polyMesh&,
|
||||||
const bool triangulate=true
|
const bool triangulate=true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -212,8 +197,8 @@ public:
|
|||||||
sampledSurface
|
sampledSurface
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const polyMesh& mesh,
|
const polyMesh&,
|
||||||
const dictionary& dict
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Clone
|
//- Clone
|
||||||
@ -229,9 +214,9 @@ public:
|
|||||||
//- Return a reference to the selected surface
|
//- Return a reference to the selected surface
|
||||||
static autoPtr<sampledSurface> New
|
static autoPtr<sampledSurface> New
|
||||||
(
|
(
|
||||||
const word& sampleType,
|
const word& name,
|
||||||
const polyMesh& mesh,
|
const polyMesh&,
|
||||||
const dictionary& dict
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user