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:
@ -0,0 +1,3 @@
|
|||||||
|
porousExplicitSourceReactingParcelFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/porousExplicitSourceReactingParcelFoam
|
||||||
@ -1,5 +1,5 @@
|
|||||||
Info<< "\nConstructing reacting cloud" << endl;
|
Info<< "\nConstructing reacting cloud" << endl;
|
||||||
BasicTrackedReactingCloud<icoPoly8ThermoPhysics> parcels
|
BasicReactingCloud<icoPoly8ThermoPhysics> parcels
|
||||||
(
|
(
|
||||||
"reactingCloud1",
|
"reactingCloud1",
|
||||||
rho,
|
rho,
|
||||||
@ -38,7 +38,7 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "hReactionThermo.H"
|
#include "hReactionThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "BasicTrackedReactingCloud.H"
|
#include "BasicReactingCloud.H"
|
||||||
#include "rhoChemistryModel.H"
|
#include "rhoChemistryModel.H"
|
||||||
#include "chemistrySolver.H"
|
#include "chemistrySolver.H"
|
||||||
#include "thermoPhysicsTypes.H"
|
#include "thermoPhysicsTypes.H"
|
||||||
@ -1,3 +0,0 @@
|
|||||||
trackedReactingParcelFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/trackedReactingParcelFoam
|
|
||||||
@ -53,7 +53,10 @@ int main(int argc, char *argv[])
|
|||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
fileName vtkPath(runTime.path()/"VTK");
|
||||||
|
mkDir(vtkPath);
|
||||||
|
|
||||||
Info<< "Scanning times to determine track data" << nl << endl;
|
Info<< "Scanning times to determine track data" << nl << endl;
|
||||||
|
|
||||||
@ -63,29 +66,28 @@ int main(int argc, char *argv[])
|
|||||||
runTime.setTime(timeDirs[timeI], timeI);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
IOobject origProcHeader
|
IOobject positionsHeader
|
||||||
(
|
(
|
||||||
"origProc",
|
"positions",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
cloud::prefix/cloudName,
|
cloud::prefix/cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
);
|
);
|
||||||
IOobject idHeader
|
|
||||||
(
|
if (positionsHeader.headerOk())
|
||||||
"id",
|
|
||||||
runTime.timeName(),
|
|
||||||
cloud::prefix/cloudName,
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ
|
|
||||||
);
|
|
||||||
if (idHeader.headerOk() && origProcHeader.headerOk())
|
|
||||||
{
|
{
|
||||||
IOField<label> origProc(origProcHeader);
|
Info<< " Reading particle positions" << endl;
|
||||||
IOField<label> id(idHeader);
|
Cloud<passiveParticle> myCloud(mesh, cloudName, false);
|
||||||
forAll(id, i)
|
|
||||||
|
forAllConstIter(Cloud<passiveParticle>, myCloud, iter)
|
||||||
{
|
{
|
||||||
maxIds[origProc[i]] = max(maxIds[origProc[i]], id[i]);
|
label origId = iter().origId();
|
||||||
|
label origProc = iter().origProc();
|
||||||
|
|
||||||
|
maxIds[origProc] = max(maxIds[origProc], origId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -124,60 +126,35 @@ int main(int argc, char *argv[])
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
IOobject origProcHeader
|
if (positionsHeader.headerOk())
|
||||||
(
|
|
||||||
"origProc",
|
|
||||||
runTime.timeName(),
|
|
||||||
cloud::prefix/cloudName,
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
IOobject idHeader
|
|
||||||
(
|
|
||||||
"id",
|
|
||||||
runTime.timeName(),
|
|
||||||
cloud::prefix/cloudName,
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
if
|
|
||||||
(
|
|
||||||
positionsHeader.headerOk()
|
|
||||||
&& origProcHeader.headerOk()
|
|
||||||
&& idHeader.headerOk()
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< " Reading particle positions" << endl;
|
Info<< " Reading particle positions" << endl;
|
||||||
Cloud<passiveParticle> myCloud(mesh, cloudName, false);
|
Cloud<passiveParticle> myCloud(mesh, cloudName, false);
|
||||||
|
|
||||||
Info<< " Reading particle id" << endl;
|
|
||||||
IOField<label> id(idHeader);
|
|
||||||
|
|
||||||
Info<< " Reading particle origProc" << endl;
|
|
||||||
IOField<label> origProc(origProcHeader);
|
|
||||||
|
|
||||||
// collect the track data on the master processor
|
// collect the track data on the master processor
|
||||||
label i = 0;
|
|
||||||
List<pointField> allPositions(Pstream::nProcs());
|
List<pointField> allPositions(Pstream::nProcs());
|
||||||
allPositions[Pstream::myProcNo()].setSize(myCloud.size());
|
allPositions[Pstream::myProcNo()].setSize
|
||||||
|
(
|
||||||
|
myCloud.size(),
|
||||||
|
point::zero
|
||||||
|
);
|
||||||
|
|
||||||
|
List<labelField> allOrigIds(Pstream::nProcs());
|
||||||
|
allOrigIds[Pstream::myProcNo()].setSize(myCloud.size(), 0);
|
||||||
|
|
||||||
|
List<labelField> allOrigProcs(Pstream::nProcs());
|
||||||
|
allOrigProcs[Pstream::myProcNo()].setSize(myCloud.size(), 0);
|
||||||
|
|
||||||
|
label i = 0;
|
||||||
forAllConstIter(Cloud<passiveParticle>, myCloud, iter)
|
forAllConstIter(Cloud<passiveParticle>, myCloud, iter)
|
||||||
{
|
{
|
||||||
allPositions[Pstream::myProcNo()][i++] = iter().position();
|
allPositions[Pstream::myProcNo()][i] = iter().position();
|
||||||
|
allOrigIds[Pstream::myProcNo()][i] = iter().origId();
|
||||||
|
allOrigProcs[Pstream::myProcNo()][i] = iter().origProc();
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
Pstream::gatherList(allPositions);
|
Pstream::gatherList(allPositions);
|
||||||
|
Pstream::gatherList(allOrigIds);
|
||||||
List<labelList> allIds(Pstream::nProcs());
|
|
||||||
allIds[Pstream::myProcNo()] = id;
|
|
||||||
Pstream::gatherList(allIds);
|
|
||||||
|
|
||||||
List<labelList> allOrigProcs(Pstream::nProcs());
|
|
||||||
allOrigProcs[Pstream::myProcNo()] = origProc;
|
|
||||||
Pstream::gatherList(allOrigProcs);
|
Pstream::gatherList(allOrigProcs);
|
||||||
|
|
||||||
Info<< " Constructing tracks" << nl << endl;
|
Info<< " Constructing tracks" << nl << endl;
|
||||||
@ -189,7 +166,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
label globalId =
|
label globalId =
|
||||||
startIds[allOrigProcs[procI][i]]
|
startIds[allOrigProcs[procI][i]]
|
||||||
+ allIds[procI][i];
|
+ allOrigIds[procI][i];
|
||||||
|
|
||||||
if (globalId % sampleFrequency == 0)
|
if (globalId % sampleFrequency == 0)
|
||||||
{
|
{
|
||||||
@ -216,7 +193,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "\nWriting particle tracks" << nl << endl;
|
Info<< "\nWriting particle tracks" << nl << endl;
|
||||||
|
|
||||||
OFstream vtkTracks("particleTracks.vtk");
|
OFstream vtkTracks(vtkPath/"particleTracks.vtk");
|
||||||
|
|
||||||
// Total number of points in tracks + 1 per track
|
// Total number of points in tracks + 1 per track
|
||||||
label nPoints = 0;
|
label nPoints = 0;
|
||||||
|
|||||||
@ -129,16 +129,10 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <TemplateArgument>
|
||||||
#ifndef __CINT__
|
|
||||||
<TemplateArgument>
|
|
||||||
#endif
|
|
||||||
(Istream&, ClassName<TemplateArgument>&);
|
(Istream&, ClassName<TemplateArgument>&);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <TemplateArgument>
|
||||||
#ifndef __CINT__
|
|
||||||
<TemplateArgument>
|
|
||||||
#endif
|
|
||||||
(Ostream&, const ClassName<TemplateArgument>&);
|
(Ostream&, const ClassName<TemplateArgument>&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,51 +0,0 @@
|
|||||||
#----------------------------------*-sh-*--------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
# \\/ M anipulation |
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# License
|
|
||||||
# This file is part of OpenFOAM.
|
|
||||||
#
|
|
||||||
# OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
# Script
|
|
||||||
# cint/bashrc
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# Setup file for cint
|
|
||||||
# Sourced from OpenFOAM-*/etc/bashrc
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
for CINTSYSDIR in \
|
|
||||||
$HOME/pub/CINT/cint7 \
|
|
||||||
$WM_THIRD_PARTY_DIR/cint-svn/platforms/$WM_OPTIONS \
|
|
||||||
;
|
|
||||||
do
|
|
||||||
if [ -r $CINTSYSDIR ]
|
|
||||||
then
|
|
||||||
export CINTSYSDIR
|
|
||||||
export PATH=$PATH:$CINTSYSDIR/bin
|
|
||||||
export MANPATH=$MANPATH:$CINTSYSDIR/doc
|
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CINTSYSDIR/lib
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
[ -r "$CINTSYSDIR" ] || unset CINTSYSDIR
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
#----------------------------------*-sh-*--------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
# \\/ M anipulation |
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# License
|
|
||||||
# This file is part of OpenFOAM.
|
|
||||||
#
|
|
||||||
# OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
# Script
|
|
||||||
# cint/cshrc
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# Setup file for cint
|
|
||||||
# Sourced from OpenFOAM-*/etc/cshrc
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
@ -244,7 +244,6 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.sh
|
|||||||
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc
|
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc
|
||||||
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
|
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
|
||||||
_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc
|
_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc
|
||||||
_foamSource $WM_PROJECT_DIR/etc/apps/cint/bashrc
|
|
||||||
|
|
||||||
|
|
||||||
# Clean environment paths again. Only remove duplicates
|
# Clean environment paths again. Only remove duplicates
|
||||||
|
|||||||
@ -241,7 +241,6 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.csh
|
|||||||
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/cshrc
|
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/cshrc
|
||||||
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc
|
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc
|
||||||
# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc
|
# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc
|
||||||
# _foamSource $WM_PROJECT_DIR/etc/apps/cint/cshrc
|
|
||||||
|
|
||||||
|
|
||||||
# Clean environment paths again. Only remove duplicates
|
# Clean environment paths again. Only remove duplicates
|
||||||
|
|||||||
@ -60,10 +60,6 @@ $(sha1)/SHA1Digest.C
|
|||||||
|
|
||||||
primitives/random/Random.C
|
primitives/random/Random.C
|
||||||
|
|
||||||
functions = primitives/functions
|
|
||||||
$(functions)/Polynomial/makePolynomialsOrder7.C
|
|
||||||
|
|
||||||
|
|
||||||
containers/HashTables/HashTable/HashTableName.C
|
containers/HashTables/HashTable/HashTableName.C
|
||||||
containers/HashTables/StaticHashTable/StaticHashTableName.C
|
containers/HashTables/StaticHashTable/StaticHashTableName.C
|
||||||
containers/Lists/SortableList/ParSortableListName.C
|
containers/Lists/SortableList/ParSortableListName.C
|
||||||
|
|||||||
@ -122,19 +122,13 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <T, Key, Hash>
|
||||||
#ifndef __CINT__
|
|
||||||
<T, Key, Hash>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
HashPtrTable<T, Key, Hash>&
|
HashPtrTable<T, Key, Hash>&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <T, Key, Hash>
|
||||||
#ifndef __CINT__
|
|
||||||
<T, Key, Hash>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const HashPtrTable<T, Key, Hash>&
|
const HashPtrTable<T, Key, Hash>&
|
||||||
|
|||||||
@ -417,19 +417,13 @@ public:
|
|||||||
|
|
||||||
// IOstream Operator
|
// IOstream Operator
|
||||||
|
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <T, Key, Hash>
|
||||||
#ifndef __CINT__
|
|
||||||
<T, Key, Hash>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
HashTable<T, Key, Hash>&
|
HashTable<T, Key, Hash>&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <T, Key, Hash>
|
||||||
#ifndef __CINT__
|
|
||||||
<T, Key, Hash>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const HashTable<T, Key, Hash>&
|
const HashTable<T, Key, Hash>&
|
||||||
|
|||||||
@ -434,14 +434,13 @@ Foam::HashTable<T, Key, Hash>::const_iterator::operator*() const
|
|||||||
return elmtPtr_->obj_;
|
return elmtPtr_->obj_;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
template<class T, class Key, class Hash>
|
template<class T, class Key, class Hash>
|
||||||
inline const T&
|
inline const T&
|
||||||
Foam::HashTable<T, Key, Hash>::const_iterator::operator()() const
|
Foam::HashTable<T, Key, Hash>::const_iterator::operator()() const
|
||||||
{
|
{
|
||||||
return elmtPtr_->obj_;
|
return elmtPtr_->obj_;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
template<class T, class Key, class Hash>
|
template<class T, class Key, class Hash>
|
||||||
inline
|
inline
|
||||||
|
|||||||
@ -152,10 +152,7 @@ public:
|
|||||||
// Istream operator
|
// Istream operator
|
||||||
|
|
||||||
//- Read List from Istream, discarding contents of existing List.
|
//- Read List from Istream, discarding contents of existing List.
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <LListBase, T>
|
||||||
#ifndef __CINT__
|
|
||||||
<LListBase, T>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
ILList<LListBase, T>&
|
ILList<LListBase, T>&
|
||||||
|
|||||||
@ -327,19 +327,13 @@ public:
|
|||||||
|
|
||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <LListBase, T>
|
||||||
#ifndef __CINT__
|
|
||||||
<LListBase, T>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
LList<LListBase, T>&
|
LList<LListBase, T>&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <LListBase, T>
|
||||||
#ifndef __CINT__
|
|
||||||
<LListBase, T>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const LList<LListBase, T>&
|
const LList<LListBase, T>&
|
||||||
|
|||||||
@ -260,19 +260,13 @@ public:
|
|||||||
|
|
||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <LListBase, T>
|
||||||
#ifndef __CINT__
|
|
||||||
<LListBase, T>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
LPtrList<LListBase, T>&
|
LPtrList<LListBase, T>&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <LListBase, T>
|
||||||
#ifndef __CINT__
|
|
||||||
<LListBase, T>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const LPtrList<LListBase, T>&
|
const LPtrList<LListBase, T>&
|
||||||
|
|||||||
@ -277,10 +277,7 @@ public:
|
|||||||
|
|
||||||
// Ostream operator
|
// Ostream operator
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <LListBase, T>
|
||||||
#ifndef __CINT__
|
|
||||||
<LListBase, T>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const UILList<LListBase, T>&
|
const UILList<LListBase, T>&
|
||||||
|
|||||||
@ -210,20 +210,14 @@ public:
|
|||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
// Write DynamicList to Ostream.
|
// Write DynamicList to Ostream.
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <T, SizeInc, SizeMult, SizeDiv>
|
||||||
#ifndef __CINT__
|
|
||||||
<T, SizeInc, SizeMult, SizeDiv>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const DynamicList<T, SizeInc, SizeMult, SizeDiv>&
|
const DynamicList<T, SizeInc, SizeMult, SizeDiv>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Read from Istream, discarding contents of existing DynamicList.
|
//- Read from Istream, discarding contents of existing DynamicList.
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <T, SizeInc, SizeMult, SizeDiv>
|
||||||
#ifndef __CINT__
|
|
||||||
<T, SizeInc, SizeMult, SizeDiv>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
DynamicList<T, SizeInc, SizeMult, SizeDiv>&
|
DynamicList<T, SizeInc, SizeMult, SizeDiv>&
|
||||||
|
|||||||
@ -331,17 +331,11 @@ public:
|
|||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
//- Read List from Istream, discarding contents of existing List.
|
//- Read List from Istream, discarding contents of existing List.
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <T, Size>
|
||||||
#ifndef __CINT__
|
|
||||||
<T, Size>
|
|
||||||
#endif
|
|
||||||
(Istream&, FixedList<T, Size>&);
|
(Istream&, FixedList<T, Size>&);
|
||||||
|
|
||||||
// Write FixedList to Ostream.
|
// Write FixedList to Ostream.
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <T, Size>
|
||||||
#ifndef __CINT__
|
|
||||||
<T, Size>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const FixedList<T, Size>&
|
const FixedList<T, Size>&
|
||||||
|
|||||||
@ -398,7 +398,6 @@ inline bool Foam::FixedList<T, Size>::empty() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
template<class T, unsigned Size>
|
template<class T, unsigned Size>
|
||||||
template<class HashT>
|
template<class HashT>
|
||||||
inline unsigned Foam::FixedList<T, Size>::Hash<HashT>::operator()
|
inline unsigned Foam::FixedList<T, Size>::Hash<HashT>::operator()
|
||||||
@ -426,6 +425,5 @@ inline unsigned Foam::FixedList<T, Size>::Hash<HashT>::operator()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __CINT__
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -233,10 +233,7 @@ public:
|
|||||||
// Istream operator
|
// Istream operator
|
||||||
|
|
||||||
//- Read List from Istream, discarding contents of existing List.
|
//- Read List from Istream, discarding contents of existing List.
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <T>
|
||||||
#ifndef __CINT__
|
|
||||||
<T>
|
|
||||||
#endif
|
|
||||||
(Istream&, List<T>&);
|
(Istream&, List<T>&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -97,16 +97,16 @@ public:
|
|||||||
//- Assignment of all entries to the given value
|
//- Assignment of all entries to the given value
|
||||||
inline void operator=(const T&);
|
inline void operator=(const T&);
|
||||||
|
|
||||||
|
|
||||||
// Ostream operator
|
// Ostream operator
|
||||||
|
|
||||||
//- Write UIndirectList to Ostream
|
//- Write UIndirectList to Ostream
|
||||||
// Binary output is currently still a bit of a problem
|
// Binary output is currently still a bit of a problem
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <T>
|
||||||
#ifndef __CINT__
|
(
|
||||||
<T>
|
Ostream&,
|
||||||
#endif
|
const UIndirectList<T>&
|
||||||
(Ostream&, const UIndirectList<T>&);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -313,11 +313,11 @@ public:
|
|||||||
// Ostream operator
|
// Ostream operator
|
||||||
|
|
||||||
// Write UList to Ostream.
|
// Write UList to Ostream.
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <T>
|
||||||
#ifndef __CINT__
|
(
|
||||||
<T>
|
Ostream&,
|
||||||
#endif
|
const UList<T>&
|
||||||
(Ostream&, const UList<T>&);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reverse the first n elements of the list
|
// Reverse the first n elements of the list
|
||||||
|
|||||||
@ -83,8 +83,6 @@ class objectRegistry;
|
|||||||
Class IOobject Declaration
|
Class IOobject Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "CintDefs.H"
|
|
||||||
|
|
||||||
class IOobject
|
class IOobject
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -395,7 +393,6 @@ public:
|
|||||||
void operator=(const IOobject&);
|
void operator=(const IOobject&);
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CintUndefs.H"
|
|
||||||
|
|
||||||
#if defined (__GNUC__)
|
#if defined (__GNUC__)
|
||||||
template<>
|
template<>
|
||||||
|
|||||||
@ -148,9 +148,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
// Global predefined null output stream
|
// Global predefined null output stream
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
extern OFstream Snull;
|
extern OFstream Snull;
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -74,8 +74,6 @@ namespace Foam
|
|||||||
Class IOstream Declaration
|
Class IOstream Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "CintDefs.H"
|
|
||||||
|
|
||||||
class IOstream
|
class IOstream
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -193,9 +191,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Ostream operator
|
//- Ostream operator
|
||||||
#ifndef __MAKECINT__
|
|
||||||
friend Ostream& operator<<(Ostream& os, const versionNumber& vn);
|
friend Ostream& operator<<(Ostream& os, const versionNumber& vn);
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -545,7 +541,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CintUndefs.H"
|
|
||||||
|
|
||||||
Ostream& operator<<(Ostream& os, const IOstream::streamFormat& sf);
|
Ostream& operator<<(Ostream& os, const IOstream::streamFormat& sf);
|
||||||
Ostream& operator<<(Ostream& os, const IOstream::versionNumber& vn);
|
Ostream& operator<<(Ostream& os, const IOstream::versionNumber& vn);
|
||||||
@ -554,7 +549,6 @@ Ostream& operator<<(Ostream& os, const IOstream::versionNumber& vn);
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// ------ Manipulators (not taking arguments)
|
// ------ Manipulators (not taking arguments)
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
#ifndef __CINT__
|
|
||||||
|
|
||||||
typedef IOstream& (*IOstreamManip)(IOstream&);
|
typedef IOstream& (*IOstreamManip)(IOstream&);
|
||||||
|
|
||||||
@ -595,8 +589,6 @@ inline IOstream& scientific(IOstream& io)
|
|||||||
return io;
|
return io;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -52,19 +52,14 @@ class InfoProxy
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
#ifndef __MAKECINT__
|
|
||||||
const T& t_;
|
const T& t_;
|
||||||
#endif
|
|
||||||
|
|
||||||
InfoProxy(const T& t)
|
InfoProxy(const T& t)
|
||||||
:
|
:
|
||||||
t_(t)
|
t_(t)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <T>
|
||||||
#ifndef __CINT__
|
|
||||||
<T>
|
|
||||||
#endif
|
|
||||||
(Ostream&, const InfoProxy<T>&);
|
(Ostream&, const InfoProxy<T>&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -152,7 +152,6 @@ public:
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// ------ Manipulators (not taking arguments)
|
// ------ Manipulators (not taking arguments)
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
#ifndef __CINT__
|
|
||||||
|
|
||||||
typedef Istream& (*IstreamManip)(Istream&);
|
typedef Istream& (*IstreamManip)(Istream&);
|
||||||
|
|
||||||
@ -169,8 +168,6 @@ inline Istream& operator>>(Istream& is, IOstreamManip f)
|
|||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -70,6 +70,7 @@ protected:
|
|||||||
//- Current indent level
|
//- Current indent level
|
||||||
unsigned short indentLevel_;
|
unsigned short indentLevel_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
@ -87,8 +88,7 @@ public:
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
|
||||||
virtual ~Ostream()
|
virtual ~Ostream()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -199,7 +199,6 @@ public:
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// ------ Manipulators (not taking arguments)
|
// ------ Manipulators (not taking arguments)
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
#ifndef __CINT__
|
|
||||||
|
|
||||||
typedef Ostream& (*OstreamManip)(Ostream&);
|
typedef Ostream& (*OstreamManip)(Ostream&);
|
||||||
|
|
||||||
@ -254,8 +253,6 @@ inline Ostream& endl(Ostream& os)
|
|||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Useful aliases for tab and newline characters
|
// Useful aliases for tab and newline characters
|
||||||
static const char tab = '\t';
|
static const char tab = '\t';
|
||||||
|
|||||||
@ -151,9 +151,7 @@ public:
|
|||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
friend Ostream& operator<<(Ostream&, const commsStruct&);
|
friend Ostream& operator<<(Ostream&, const commsStruct&);
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -58,9 +58,7 @@ class ISstream
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
fileName name_;
|
fileName name_;
|
||||||
#ifndef __CINT__
|
|
||||||
istream& is_;
|
istream& is_;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|||||||
@ -58,9 +58,7 @@ class OSstream
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
fileName name_;
|
fileName name_;
|
||||||
#ifndef __CINT__
|
|
||||||
ostream& os_;
|
ostream& os_;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|||||||
@ -98,6 +98,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~ITstream()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
@ -142,31 +148,31 @@ public:
|
|||||||
// Read functions
|
// Read functions
|
||||||
|
|
||||||
//- Return next token from stream
|
//- Return next token from stream
|
||||||
Istream& read(token&);
|
virtual Istream& read(token&);
|
||||||
|
|
||||||
//- Read a character
|
//- Read a character
|
||||||
Istream& read(char&);
|
virtual Istream& read(char&);
|
||||||
|
|
||||||
//- Read a word
|
//- Read a word
|
||||||
Istream& read(word&);
|
virtual Istream& read(word&);
|
||||||
|
|
||||||
// Read a string (including enclosing double-quotes)
|
// Read a string (including enclosing double-quotes)
|
||||||
Istream& read(string&);
|
virtual Istream& read(string&);
|
||||||
|
|
||||||
//- Read a label
|
//- Read a label
|
||||||
Istream& read(label&);
|
virtual Istream& read(label&);
|
||||||
|
|
||||||
//- Read a floatScalar
|
//- Read a floatScalar
|
||||||
Istream& read(floatScalar&);
|
virtual Istream& read(floatScalar&);
|
||||||
|
|
||||||
//- Read a doubleScalar
|
//- Read a doubleScalar
|
||||||
Istream& read(doubleScalar&);
|
virtual Istream& read(doubleScalar&);
|
||||||
|
|
||||||
//- Read binary block
|
//- Read binary block
|
||||||
Istream& read(char*, std::streamsize);
|
virtual Istream& read(char*, std::streamsize);
|
||||||
|
|
||||||
//- Rewind and return the stream so that it may be read again
|
//- Rewind and return the stream so that it may be read again
|
||||||
Istream& rewind();
|
virtual Istream& rewind();
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|||||||
@ -66,8 +66,6 @@ Ostream& operator<<(Ostream&, const token&);
|
|||||||
Class token Declaration
|
Class token Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "CintDefs.H"
|
|
||||||
|
|
||||||
class token
|
class token
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -206,9 +204,7 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
#ifndef __MAKECINT__
|
|
||||||
friend Ostream& operator<<(Ostream&, const compound&);
|
friend Ostream& operator<<(Ostream&, const compound&);
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -431,7 +427,6 @@ public:
|
|||||||
friend ostream& operator<<(ostream&, const InfoProxy<token>&);
|
friend ostream& operator<<(ostream&, const InfoProxy<token>&);
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CintUndefs.H"
|
|
||||||
|
|
||||||
Ostream& operator<<(Ostream&, const token::punctuationToken&);
|
Ostream& operator<<(Ostream&, const token::punctuationToken&);
|
||||||
ostream& operator<<(ostream&, const token::punctuationToken&);
|
ostream& operator<<(ostream&, const token::punctuationToken&);
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class includeEntry
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("include");
|
ClassName("include");
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -96,7 +96,7 @@ class inputModeEntry
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("inputMode");
|
ClassName("inputMode");
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -118,7 +118,6 @@ public:
|
|||||||
|
|
||||||
//- Return true if the inputMode is %error
|
//- Return true if the inputMode is %error
|
||||||
static bool error();
|
static bool error();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class removeEntry
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("remove");
|
ClassName("remove");
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -66,9 +66,6 @@ class primitiveEntry
|
|||||||
public entry,
|
public entry,
|
||||||
public ITstream
|
public ITstream
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
//- Append the given token to this entry
|
//- Append the given token to this entry
|
||||||
@ -93,9 +90,6 @@ public:
|
|||||||
Istream&
|
Istream&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Read tokens from the given stream
|
|
||||||
bool read(const dictionary&, Istream&);
|
|
||||||
|
|
||||||
//- Read the complete entry from the given stream
|
//- Read the complete entry from the given stream
|
||||||
void readEntry(const dictionary&, Istream&);
|
void readEntry(const dictionary&, Istream&);
|
||||||
|
|
||||||
@ -169,6 +163,9 @@ public:
|
|||||||
// calling this function generates a FatalError
|
// calling this function generates a FatalError
|
||||||
dictionary& dict();
|
dictionary& dict();
|
||||||
|
|
||||||
|
//- Read tokens from the given stream
|
||||||
|
bool read(const dictionary&, Istream&);
|
||||||
|
|
||||||
// Write
|
// Write
|
||||||
void write(Ostream&) const;
|
void write(Ostream&) const;
|
||||||
|
|
||||||
|
|||||||
@ -150,12 +150,9 @@ public:
|
|||||||
|
|
||||||
//- Convert to Ostream
|
//- Convert to Ostream
|
||||||
// Prints basic message and then returns Ostream for further info.
|
// Prints basic message and then returns Ostream for further info.
|
||||||
#ifndef __CINT__
|
|
||||||
operator OSstream&();
|
operator OSstream&();
|
||||||
#endif
|
|
||||||
|
|
||||||
//- Explicitly convert to Ostream for << operations
|
//- Explicitly convert to Ostream for << operations
|
||||||
// needed in cint
|
|
||||||
OSstream& operator()()
|
OSstream& operator()()
|
||||||
{
|
{
|
||||||
return operator OSstream&();
|
return operator OSstream&();
|
||||||
@ -311,9 +308,7 @@ extern IOerror FatalIOError;
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
#include "errorManip.H"
|
#include "errorManip.H"
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -182,12 +182,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Convert to Ostream for << operations
|
//- Convert to Ostream for << operations
|
||||||
#ifndef __CINT__
|
|
||||||
operator OSstream&();
|
operator OSstream&();
|
||||||
#endif
|
|
||||||
|
|
||||||
//- Explicitly convert to Ostream for << operations
|
//- Explicitly convert to Ostream for << operations
|
||||||
// needed in cint
|
|
||||||
OSstream& operator()()
|
OSstream& operator()()
|
||||||
{
|
{
|
||||||
return operator OSstream&();
|
return operator OSstream&();
|
||||||
|
|||||||
@ -174,16 +174,10 @@ public:
|
|||||||
|
|
||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <Type>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type>
|
|
||||||
#endif
|
|
||||||
(Istream&, dimensioned<Type>&);
|
(Istream&, dimensioned<Type>&);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <Type>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type>
|
|
||||||
#endif
|
|
||||||
(Ostream&, const dimensioned<Type>&);
|
(Ostream&, const dimensioned<Type>&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -62,12 +62,10 @@ Istream& operator>>(Istream&, DynamicField<Type>&);
|
|||||||
Class DynamicField Declaration
|
Class DynamicField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "CintDefs.H"
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
class DynamicField
|
class DynamicField
|
||||||
:
|
:
|
||||||
public Field<Type> //private Field<Type>
|
public Field<Type>
|
||||||
{
|
{
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
@ -185,26 +183,16 @@ public:
|
|||||||
|
|
||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <Type>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type>
|
|
||||||
#endif
|
|
||||||
(Ostream&, const DynamicField<Type>&);
|
(Ostream&, const DynamicField<Type>&);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <Type>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type>
|
|
||||||
#endif
|
|
||||||
(Ostream&, const tmp<DynamicField<Type> >&);
|
(Ostream&, const tmp<DynamicField<Type> >&);
|
||||||
|
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <Type>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type>
|
|
||||||
#endif
|
|
||||||
(Istream&, DynamicField<Type>&);
|
(Istream&, DynamicField<Type>&);
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CintUndefs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -75,8 +75,6 @@ class dictionary;
|
|||||||
Class Field Declaration
|
Class Field Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "CintDefs.H"
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
class Field
|
class Field
|
||||||
:
|
:
|
||||||
@ -198,13 +196,11 @@ public:
|
|||||||
|
|
||||||
//- Return a pointer to a new calculatedFvPatchFieldField created on
|
//- Return a pointer to a new calculatedFvPatchFieldField created on
|
||||||
// freestore without setting patchField values
|
// freestore without setting patchField values
|
||||||
#ifndef __CINT__
|
|
||||||
template<class Type2>
|
template<class Type2>
|
||||||
static tmp<Field<Type> > NewCalculatedType(const Field<Type2>& f)
|
static tmp<Field<Type> > NewCalculatedType(const Field<Type2>& f)
|
||||||
{
|
{
|
||||||
return tmp<Field<Type> >(new Field<Type>(f.size()));
|
return tmp<Field<Type> >(new Field<Type>(f.size()));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -343,20 +339,13 @@ public:
|
|||||||
|
|
||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <Type>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type>
|
|
||||||
#endif
|
|
||||||
(Ostream&, const Field<Type>&);
|
(Ostream&, const Field<Type>&);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <Type>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type>
|
|
||||||
#endif
|
|
||||||
(Ostream&, const tmp<Field<Type> >&);
|
(Ostream&, const tmp<Field<Type> >&);
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CintUndefs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -75,14 +75,14 @@ public:
|
|||||||
//- The default cloud name: %defaultCloud
|
//- The default cloud name: %defaultCloud
|
||||||
static word defaultName;
|
static word defaultName;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct for the given objectRegistry and named cloud instance
|
//- Construct for the given objectRegistry and named cloud instance
|
||||||
cloud(const objectRegistry&, const word& cloudName = "");
|
cloud(const objectRegistry&, const word& cloudName = "");
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
|
||||||
virtual ~cloud();
|
virtual ~cloud();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
#ifdef __CINT__
|
|
||||||
# define tmp Foam::tmp
|
|
||||||
# define UList Foam::UList
|
|
||||||
# define List Foam::List
|
|
||||||
# define InfoProxy Foam::InfoProxy
|
|
||||||
#endif
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
#ifdef __CINT__
|
|
||||||
# undef tmp
|
|
||||||
# undef UList
|
|
||||||
# undef List
|
|
||||||
# undef InfoProxy
|
|
||||||
#endif
|
|
||||||
@ -124,19 +124,13 @@ public:
|
|||||||
|
|
||||||
// Ostream operator
|
// Ostream operator
|
||||||
|
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <Point, PointRef>
|
||||||
#ifndef __CINT__
|
|
||||||
<Point, PointRef>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
line&
|
line&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <Point, PointRef>
|
||||||
#ifndef __CINT__
|
|
||||||
<Point, PointRef>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const line&
|
const line&
|
||||||
|
|||||||
@ -184,10 +184,7 @@ public:
|
|||||||
|
|
||||||
// Ostream operator
|
// Ostream operator
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <Point>
|
||||||
#ifndef __CINT__
|
|
||||||
<Point>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const PointHit<Point>& b
|
const PointHit<Point>& b
|
||||||
|
|||||||
@ -202,7 +202,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class innerProduct<SphericalTensor<Cmpt>, SphericalTensor<Cmpt> >
|
class innerProduct<SphericalTensor<Cmpt>, SphericalTensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -227,7 +226,6 @@ public:
|
|||||||
|
|
||||||
typedef Vector<Cmpt> type;
|
typedef Vector<Cmpt> type;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -520,7 +520,6 @@ public:
|
|||||||
typedef SymmTensor<Cmpt> type;
|
typedef SymmTensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class innerProduct<SymmTensor<Cmpt>, SymmTensor<Cmpt> >
|
class innerProduct<SymmTensor<Cmpt>, SymmTensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -529,7 +528,6 @@ public:
|
|||||||
typedef SymmTensor<Cmpt> type;
|
typedef SymmTensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class innerProduct<SymmTensor<Cmpt>, Vector<Cmpt> >
|
class innerProduct<SymmTensor<Cmpt>, Vector<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -578,7 +576,7 @@ public:
|
|||||||
|
|
||||||
typedef SymmTensor<Cmpt> type;
|
typedef SymmTensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -647,7 +647,6 @@ operator&&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
|
|||||||
return(t1.xx()*st2.ii() + t1.yy()*st2.ii() + t1.zz()*st2.ii());
|
return(t1.xx()*st2.ii() + t1.yy()*st2.ii() + t1.zz()*st2.ii());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class typeOfSum<SphericalTensor<Cmpt>, Tensor<Cmpt> >
|
class typeOfSum<SphericalTensor<Cmpt>, Tensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -679,7 +678,7 @@ public:
|
|||||||
|
|
||||||
typedef Tensor<Cmpt> type;
|
typedef Tensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * Mixed Tensor SymmTensor Operators * * * * * * * * * * //
|
// * * * * * * * * * * Mixed Tensor SymmTensor Operators * * * * * * * * * * //
|
||||||
|
|
||||||
@ -806,7 +805,6 @@ operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class typeOfSum<SymmTensor<Cmpt>, Tensor<Cmpt> >
|
class typeOfSum<SymmTensor<Cmpt>, Tensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -839,7 +837,6 @@ public:
|
|||||||
|
|
||||||
typedef Tensor<Cmpt> type;
|
typedef Tensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -139,19 +139,13 @@ public:
|
|||||||
|
|
||||||
// Friend Operators
|
// Friend Operators
|
||||||
|
|
||||||
friend bool operator==
|
friend bool operator== <Type1, Type2>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type1, Type2>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
const Tuple2<Type1, Type2>& a,
|
const Tuple2<Type1, Type2>& a,
|
||||||
const Tuple2<Type1, Type2>& b
|
const Tuple2<Type1, Type2>& b
|
||||||
);
|
);
|
||||||
|
|
||||||
friend bool operator!=
|
friend bool operator!= <Type1, Type2>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type1, Type2>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
const Tuple2<Type1, Type2>& a,
|
const Tuple2<Type1, Type2>& a,
|
||||||
const Tuple2<Type1, Type2>& b
|
const Tuple2<Type1, Type2>& b
|
||||||
@ -161,20 +155,14 @@ public:
|
|||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
//- Read Tuple2 from Istream, discarding contents of existing Tuple2.
|
//- Read Tuple2 from Istream, discarding contents of existing Tuple2.
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <Type1, Type2>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type1, Type2>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Istream& is,
|
Istream& is,
|
||||||
Tuple2<Type1, Type2>& t2
|
Tuple2<Type1, Type2>& t2
|
||||||
);
|
);
|
||||||
|
|
||||||
// Write Tuple2 to Ostream.
|
// Write Tuple2 to Ostream.
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <Type1, Type2>
|
||||||
#ifndef __CINT__
|
|
||||||
<Type1, Type2>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const Tuple2<Type1, Type2>& t2
|
const Tuple2<Type1, Type2>& t2
|
||||||
|
|||||||
@ -136,19 +136,13 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Istream& operator>>
|
friend Istream& operator>> <Form, Cmpt, nCmpt>
|
||||||
#ifndef __CINT__
|
|
||||||
<Form, Cmpt, nCmpt>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
VectorSpace<Form, Cmpt, nCmpt>&
|
VectorSpace<Form, Cmpt, nCmpt>&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<< <Form, Cmpt, nCmpt>
|
||||||
#ifndef __CINT__
|
|
||||||
<Form, Cmpt, nCmpt>
|
|
||||||
#endif
|
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const VectorSpace<Form, Cmpt, nCmpt>&
|
const VectorSpace<Form, Cmpt, nCmpt>&
|
||||||
|
|||||||
@ -263,7 +263,6 @@ inline const Cmpt& component
|
|||||||
|
|
||||||
// Powers of a Form
|
// Powers of a Form
|
||||||
// Equivalent to outer-products between the Form and itself
|
// Equivalent to outer-products between the Form and itself
|
||||||
#ifndef __CINT__
|
|
||||||
// Form^0 = 1.0
|
// Form^0 = 1.0
|
||||||
template<class Form, class Cmpt, int nCmpt>
|
template<class Form, class Cmpt, int nCmpt>
|
||||||
inline typename powProduct<Form, 0>::type pow
|
inline typename powProduct<Form, 0>::type pow
|
||||||
@ -300,7 +299,7 @@ inline typename powProduct<Form, 2>::type pow
|
|||||||
{
|
{
|
||||||
return sqr(static_cast<const Form&>(v));
|
return sqr(static_cast<const Form&>(v));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
template<class Form, class Cmpt, int nCmpt>
|
template<class Form, class Cmpt, int nCmpt>
|
||||||
inline scalar magSqr
|
inline scalar magSqr
|
||||||
@ -515,7 +514,6 @@ inline Form operator+
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Form, class Cmpt, int nCmpt>
|
template<class Form, class Cmpt, int nCmpt>
|
||||||
inline Form operator-
|
inline Form operator-
|
||||||
(
|
(
|
||||||
|
|||||||
@ -61,8 +61,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifndef __CINT__
|
|
||||||
|
|
||||||
template<class arg1, class arg2>
|
template<class arg1, class arg2>
|
||||||
class outerProduct
|
class outerProduct
|
||||||
{
|
{
|
||||||
@ -121,52 +119,6 @@ public:
|
|||||||
>::type type;
|
>::type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
template<class arg1, class arg2>
|
|
||||||
class outerProduct
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef arg1 type;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<class arg1, class arg2>
|
|
||||||
class crossProduct
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef arg1 type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class arg1, class arg2>
|
|
||||||
class innerProduct
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef arg1 type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class arg1, class arg2>
|
|
||||||
class scalarProduct
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef typename pTraits<arg1>::cmptType type;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<class arg1, int arg2>
|
|
||||||
class powProduct
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef arg1 type;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -69,16 +69,6 @@ Foam::Polynomial<PolySize>::Polynomial(const word& name, Istream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<int PolySize>
|
|
||||||
Foam::Polynomial<PolySize>::Polynomial(const Polynomial<PolySize>& poly)
|
|
||||||
:
|
|
||||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(poly),
|
|
||||||
name_(poly.name_),
|
|
||||||
logActive_(poly.logActive_),
|
|
||||||
logCoeff_(poly.logCoeff_)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<int PolySize>
|
template<int PolySize>
|
||||||
Foam::Polynomial<PolySize>::Polynomial
|
Foam::Polynomial<PolySize>::Polynomial
|
||||||
(
|
(
|
||||||
@ -93,13 +83,6 @@ Foam::Polynomial<PolySize>::Polynomial
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<int PolySize>
|
|
||||||
Foam::Polynomial<PolySize>::~Polynomial()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<int PolySize>
|
template<int PolySize>
|
||||||
@ -210,16 +193,4 @@ Foam::Polynomial<PolySize>::integrateMinus1(const scalar intConstant)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<int PolySize>
|
|
||||||
void Foam::Polynomial<PolySize>::operator=(const Polynomial<PolySize>& poly)
|
|
||||||
{
|
|
||||||
name_ = poly.name_;
|
|
||||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>::operator=(poly);
|
|
||||||
logActive_ = poly.logActive_;
|
|
||||||
logCoeff_ = poly.logCoeff_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -52,7 +52,6 @@ SourceFiles
|
|||||||
#include "scalar.H"
|
#include "scalar.H"
|
||||||
#include "Ostream.H"
|
#include "Ostream.H"
|
||||||
#include "VectorSpace.H"
|
#include "VectorSpace.H"
|
||||||
#include "Vector.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -81,8 +80,6 @@ class Polynomial
|
|||||||
:
|
:
|
||||||
public VectorSpace<Polynomial<PolySize>, scalar, PolySize>
|
public VectorSpace<Polynomial<PolySize>, scalar, PolySize>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Polynomial name
|
//- Polynomial name
|
||||||
@ -101,9 +98,6 @@ public:
|
|||||||
|
|
||||||
typedef Polynomial<PolySize+1> intPolyType;
|
typedef Polynomial<PolySize+1> intPolyType;
|
||||||
|
|
||||||
//- Run-time type information
|
|
||||||
TypeName("Polynomial")
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
@ -113,17 +107,10 @@ public:
|
|||||||
//- Construct from name and Istream
|
//- Construct from name and Istream
|
||||||
Polynomial(const word& name, Istream& is);
|
Polynomial(const word& name, Istream& is);
|
||||||
|
|
||||||
//- Copy constructor
|
|
||||||
Polynomial(const Polynomial& poly);
|
|
||||||
|
|
||||||
//- Copy constructor with name
|
//- Copy constructor with name
|
||||||
Polynomial(const word& name, const Polynomial& poly);
|
Polynomial(const word& name, const Polynomial& poly);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
~Polynomial();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
@ -155,11 +142,6 @@ public:
|
|||||||
scalar integrateLimits(const scalar x1, const scalar x2) const;
|
scalar integrateLimits(const scalar x1, const scalar x2) const;
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
|
||||||
|
|
||||||
void operator=(const Polynomial& poly);
|
|
||||||
|
|
||||||
|
|
||||||
//- Ostream Operator
|
//- Ostream Operator
|
||||||
friend Ostream& operator<< <PolySize>
|
friend Ostream& operator<< <PolySize>
|
||||||
(
|
(
|
||||||
@ -175,17 +157,6 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define makePolynomial(PolySize) \
|
|
||||||
\
|
|
||||||
defineTemplateTypeNameAndDebugWithName \
|
|
||||||
( \
|
|
||||||
Polynomial<PolySize>, \
|
|
||||||
"Polynomial<"#PolySize">", \
|
|
||||||
0 \
|
|
||||||
)
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "Polynomial.C"
|
# include "Polynomial.C"
|
||||||
# include "PolynomialIO.C"
|
# include "PolynomialIO.C"
|
||||||
|
|||||||
@ -1,51 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "Polynomial.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
makePolynomial(2);
|
|
||||||
makePolynomial(3);
|
|
||||||
makePolynomial(4);
|
|
||||||
makePolynomial(5);
|
|
||||||
makePolynomial(6);
|
|
||||||
makePolynomial(7);
|
|
||||||
makePolynomial(8);
|
|
||||||
|
|
||||||
// explicitly define max order + 1 to define the integrated form
|
|
||||||
defineTemplateTypeNameAndDebugWithName
|
|
||||||
(
|
|
||||||
Polynomial<9>,
|
|
||||||
"Polynomial<9>",
|
|
||||||
0
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -22,12 +22,77 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "IOPosition.H"
|
#include "IOPosition.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
Foam::word Foam::IOPosition<ParticleType>::particlePropertiesName
|
||||||
|
(
|
||||||
|
"particleProperties"
|
||||||
|
);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
void Foam::IOPosition<ParticleType>::readParticleProperties()
|
||||||
|
{
|
||||||
|
IOobject propsDictHeader
|
||||||
|
(
|
||||||
|
particlePropertiesName,
|
||||||
|
cloud_.db().time().timeName(),
|
||||||
|
"uniform"/cloud::prefix/cloud_.name(),
|
||||||
|
cloud_.db(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
if (propsDictHeader.headerOk())
|
||||||
|
{
|
||||||
|
const IOdictionary propsDict(propsDictHeader);
|
||||||
|
|
||||||
|
word procName("processor" + Foam::name(Pstream::myProcNo()));
|
||||||
|
if (propsDict.found(procName))
|
||||||
|
{
|
||||||
|
propsDict.subDict(procName).lookup("particleCount")
|
||||||
|
>> Particle<ParticleType>::particleCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
void Foam::IOPosition<ParticleType>::writeParticleProperties() const
|
||||||
|
{
|
||||||
|
IOdictionary propsDict
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
particlePropertiesName,
|
||||||
|
cloud_.db().time().timeName(),
|
||||||
|
"uniform"/cloud::prefix/cloud_.name(),
|
||||||
|
cloud_.db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
word procName("processor" + Foam::name(Pstream::myProcNo()));
|
||||||
|
propsDict.add(procName, dictionary());
|
||||||
|
propsDict.subDict(procName).add
|
||||||
|
(
|
||||||
|
"particleCount",
|
||||||
|
Particle<ParticleType>::particleCount
|
||||||
|
);
|
||||||
|
|
||||||
|
propsDict.regIOobject::write();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
@ -70,6 +135,8 @@ bool Foam::IOPosition<ParticleType>::write() const
|
|||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::IOPosition<ParticleType>::writeData(Ostream& os) const
|
bool Foam::IOPosition<ParticleType>::writeData(Ostream& os) const
|
||||||
{
|
{
|
||||||
|
writeParticleProperties();
|
||||||
|
|
||||||
os<< cloud_.size() << nl << token::BEGIN_LIST << nl;
|
os<< cloud_.size() << nl << token::BEGIN_LIST << nl;
|
||||||
|
|
||||||
forAllConstIter(typename Cloud<ParticleType>, cloud_, iter)
|
forAllConstIter(typename Cloud<ParticleType>, cloud_, iter)
|
||||||
@ -90,6 +157,8 @@ void Foam::IOPosition<ParticleType>::readData
|
|||||||
bool checkClass
|
bool checkClass
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
readParticleProperties();
|
||||||
|
|
||||||
Istream& is = readStream(checkClass ? typeName : "");
|
Istream& is = readStream(checkClass ? typeName : "");
|
||||||
|
|
||||||
token firstToken(is);
|
token firstToken(is);
|
||||||
|
|||||||
@ -59,30 +59,38 @@ class IOPosition
|
|||||||
const Cloud<ParticleType>& cloud_;
|
const Cloud<ParticleType>& cloud_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Read particle properties dictionary
|
||||||
|
void readParticleProperties();
|
||||||
|
|
||||||
|
//- Write particle properties dictionary
|
||||||
|
void writeParticleProperties() const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// Static data
|
||||||
|
|
||||||
//- Runtime type name information
|
//- Runtime type name information
|
||||||
virtual const word& type() const
|
virtual const word& type() const
|
||||||
{
|
{
|
||||||
return cloud_.type();
|
return cloud_.type();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Name of particle properties dictionary
|
||||||
|
static word particlePropertiesName;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from cloud
|
//- Construct from cloud
|
||||||
IOPosition
|
IOPosition(const Cloud<ParticleType>&);
|
||||||
(
|
|
||||||
const Cloud<ParticleType>&
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
void readData
|
void readData(Cloud<ParticleType>& c, bool checkClass);
|
||||||
(
|
|
||||||
Cloud<ParticleType>& c,
|
|
||||||
bool checkClass
|
|
||||||
);
|
|
||||||
|
|
||||||
bool write() const;
|
bool write() const;
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,12 @@ License
|
|||||||
#include "wallPolyPatch.H"
|
#include "wallPolyPatch.H"
|
||||||
#include "transform.H"
|
#include "transform.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
Foam::label Foam::Particle<ParticleType>::particleCount = 0;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
@ -69,7 +75,7 @@ void Foam::Particle<ParticleType>::findFaces
|
|||||||
DynamicList<label>& faceList
|
DynamicList<label>& faceList
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const polyMesh& mesh = cloud_.polyMesh_;
|
const polyMesh& mesh = cloud_.mesh();
|
||||||
const labelList& faces = mesh.cells()[celli];
|
const labelList& faces = mesh.cells()[celli];
|
||||||
const vector& C = mesh.cellCentres()[celli];
|
const vector& C = mesh.cellCentres()[celli];
|
||||||
|
|
||||||
@ -176,7 +182,9 @@ Foam::Particle<ParticleType>::Particle
|
|||||||
position_(position),
|
position_(position),
|
||||||
celli_(celli),
|
celli_(celli),
|
||||||
facei_(-1),
|
facei_(-1),
|
||||||
stepFraction_(0.0)
|
stepFraction_(0.0),
|
||||||
|
origProc_(Pstream::myProcNo()),
|
||||||
|
origId_(particleCount++)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -187,7 +195,9 @@ Foam::Particle<ParticleType>::Particle(const Particle<ParticleType>& p)
|
|||||||
position_(p.position_),
|
position_(p.position_),
|
||||||
celli_(p.celli_),
|
celli_(p.celli_),
|
||||||
facei_(p.facei_),
|
facei_(p.facei_),
|
||||||
stepFraction_(p.stepFraction_)
|
stepFraction_(p.stepFraction_),
|
||||||
|
origProc_(p.origProc_),
|
||||||
|
origId_(p.origId_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -127,6 +127,12 @@ protected:
|
|||||||
//- Fraction of time-step completed
|
//- Fraction of time-step completed
|
||||||
scalar stepFraction_;
|
scalar stepFraction_;
|
||||||
|
|
||||||
|
//- Originating processor id
|
||||||
|
label origProc_;
|
||||||
|
|
||||||
|
//- Local particle id on originating processor
|
||||||
|
label origId_;
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
@ -267,11 +273,14 @@ public:
|
|||||||
|
|
||||||
// Static data members
|
// Static data members
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("Particle");
|
||||||
|
|
||||||
//- String representation of properties
|
//- String representation of properties
|
||||||
static string propHeader;
|
static string propHeader;
|
||||||
|
|
||||||
//- Runtime type information
|
//- Cumulative particle count used for particle id
|
||||||
TypeName("Particle");
|
static label particleCount;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
@ -396,6 +405,12 @@ public:
|
|||||||
//- Return the fraction of time-step completed
|
//- Return the fraction of time-step completed
|
||||||
inline scalar stepFraction() const;
|
inline scalar stepFraction() const;
|
||||||
|
|
||||||
|
//- Return the originating processor id
|
||||||
|
inline label origProc() const;
|
||||||
|
|
||||||
|
//- Return the particle id on originating processor
|
||||||
|
inline label origId() const;
|
||||||
|
|
||||||
|
|
||||||
// Track
|
// Track
|
||||||
|
|
||||||
|
|||||||
@ -26,15 +26,10 @@ License
|
|||||||
|
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline scalar Particle<ParticleType>::lambda
|
inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
||||||
(
|
(
|
||||||
const vector& from,
|
const vector& from,
|
||||||
const vector& to,
|
const vector& to,
|
||||||
@ -182,7 +177,7 @@ inline scalar Particle<ParticleType>::lambda
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline scalar Particle<ParticleType>::lambda
|
inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
||||||
(
|
(
|
||||||
const vector& from,
|
const vector& from,
|
||||||
const vector& to,
|
const vector& to,
|
||||||
@ -234,7 +229,7 @@ inline scalar Particle<ParticleType>::lambda
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline bool Particle<ParticleType>::inCell() const
|
inline bool Foam::Particle<ParticleType>::inCell() const
|
||||||
{
|
{
|
||||||
DynamicList<label>& faces = cloud_.labels_;
|
DynamicList<label>& faces = cloud_.labels_;
|
||||||
findFaces(position_, faces);
|
findFaces(position_, faces);
|
||||||
@ -244,7 +239,7 @@ inline bool Particle<ParticleType>::inCell() const
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline bool Particle<ParticleType>::inCell
|
inline bool Foam::Particle<ParticleType>::inCell
|
||||||
(
|
(
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label celli,
|
const label celli,
|
||||||
@ -261,7 +256,7 @@ inline bool Particle<ParticleType>::inCell
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline Particle<ParticleType>::trackData::trackData
|
inline Foam::Particle<ParticleType>::trackData::trackData
|
||||||
(
|
(
|
||||||
Cloud<ParticleType>& cloud
|
Cloud<ParticleType>& cloud
|
||||||
)
|
)
|
||||||
@ -269,8 +264,10 @@ inline Particle<ParticleType>::trackData::trackData
|
|||||||
cloud_(cloud)
|
cloud_(cloud)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline Cloud<ParticleType>& Particle<ParticleType>::trackData::cloud()
|
inline Foam::Cloud<ParticleType>&
|
||||||
|
Foam::Particle<ParticleType>::trackData::cloud()
|
||||||
{
|
{
|
||||||
return cloud_;
|
return cloud_;
|
||||||
}
|
}
|
||||||
@ -279,76 +276,92 @@ inline Cloud<ParticleType>& Particle<ParticleType>::trackData::cloud()
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Cloud<ParticleType>& Particle<ParticleType>::cloud() const
|
inline const Foam::Cloud<ParticleType>&
|
||||||
|
Foam::Particle<ParticleType>::cloud() const
|
||||||
{
|
{
|
||||||
return cloud_;
|
return cloud_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const vector& Particle<ParticleType>::position() const
|
inline const Foam::vector& Foam::Particle<ParticleType>::position() const
|
||||||
{
|
{
|
||||||
return position_;
|
return position_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline vector& Particle<ParticleType>::position()
|
inline Foam::vector& Foam::Particle<ParticleType>::position()
|
||||||
{
|
{
|
||||||
return position_;
|
return position_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline label Particle<ParticleType>::cell() const
|
inline Foam::label Foam::Particle<ParticleType>::cell() const
|
||||||
{
|
|
||||||
return celli_;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class ParticleType>
|
|
||||||
inline label& Particle<ParticleType>::cell()
|
|
||||||
{
|
{
|
||||||
return celli_;
|
return celli_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline label Particle<ParticleType>::face() const
|
inline Foam::label& Foam::Particle<ParticleType>::cell()
|
||||||
|
{
|
||||||
|
return celli_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
inline Foam::label Foam::Particle<ParticleType>::face() const
|
||||||
{
|
{
|
||||||
return facei_;
|
return facei_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline bool Particle<ParticleType>::onBoundary() const
|
inline bool Foam::Particle<ParticleType>::onBoundary() const
|
||||||
{
|
{
|
||||||
return facei_ != -1 && facei_ >= cloud_.pMesh().nInternalFaces();
|
return facei_ != -1 && facei_ >= cloud_.pMesh().nInternalFaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline scalar& Particle<ParticleType>::stepFraction()
|
inline Foam::scalar& Foam::Particle<ParticleType>::stepFraction()
|
||||||
{
|
{
|
||||||
return stepFraction_;
|
return stepFraction_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline scalar Particle<ParticleType>::stepFraction() const
|
inline Foam::scalar Foam::Particle<ParticleType>::stepFraction() const
|
||||||
{
|
{
|
||||||
return stepFraction_;
|
return stepFraction_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline bool Particle<ParticleType>::softImpact() const
|
inline Foam::label Foam::Particle<ParticleType>::origProc() const
|
||||||
|
{
|
||||||
|
return origProc_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
inline Foam::label Foam::Particle<ParticleType>::origId() const
|
||||||
|
{
|
||||||
|
return origId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
inline bool Foam::Particle<ParticleType>::softImpact() const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline scalar Particle<ParticleType>::currentTime() const
|
inline Foam::scalar Foam::Particle<ParticleType>::currentTime() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
cloud_.pMesh().time().value()
|
cloud_.pMesh().time().value()
|
||||||
@ -357,14 +370,14 @@ inline scalar Particle<ParticleType>::currentTime() const
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline label Particle<ParticleType>::patch(const label facei) const
|
inline Foam::label Foam::Particle<ParticleType>::patch(const label facei) const
|
||||||
{
|
{
|
||||||
return cloud_.facePatch(facei);
|
return cloud_.facePatch(facei);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline label Particle<ParticleType>::patchFace
|
inline Foam::label Foam::Particle<ParticleType>::patchFace
|
||||||
(
|
(
|
||||||
const label patchi,
|
const label patchi,
|
||||||
const label facei
|
const label facei
|
||||||
@ -375,21 +388,18 @@ inline label Particle<ParticleType>::patchFace
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline scalar Particle<ParticleType>::wallImpactDistance(const vector&) const
|
inline Foam::scalar
|
||||||
|
Foam::Particle<ParticleType>::wallImpactDistance(const vector&) const
|
||||||
{
|
{
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline label Particle<ParticleType>::faceInterpolation() const
|
inline Foam::label Foam::Particle<ParticleType>::faceInterpolation() const
|
||||||
{
|
{
|
||||||
return facei_;
|
return facei_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -31,12 +31,11 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::string Foam::Particle<ParticleType>::propHeader = "(Px Py Pz) cellI";
|
Foam::string Foam::Particle<ParticleType>::propHeader =
|
||||||
|
"(Px Py Pz) cellI origProc origId";
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from Istream
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::Particle<ParticleType>::Particle
|
Foam::Particle<ParticleType>::Particle
|
||||||
(
|
(
|
||||||
@ -47,20 +46,26 @@ Foam::Particle<ParticleType>::Particle
|
|||||||
:
|
:
|
||||||
cloud_(cloud),
|
cloud_(cloud),
|
||||||
facei_(-1),
|
facei_(-1),
|
||||||
stepFraction_(0.0)
|
stepFraction_(0.0),
|
||||||
|
origProc_(Pstream::myProcNo()),
|
||||||
|
origId_(-1)
|
||||||
{
|
{
|
||||||
if (is.format() == IOstream::ASCII)
|
if (is.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
is >> position_ >> celli_;
|
is >> position_ >> celli_ >> origProc_ >> origId_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// In binary read both celli_ and facei_, needed for parallel transfer
|
// In binary read all particle data - needed for parallel transfer
|
||||||
is.read
|
is.read
|
||||||
(
|
(
|
||||||
reinterpret_cast<char*>(&position_),
|
reinterpret_cast<char*>(&position_),
|
||||||
sizeof(position_) + sizeof(celli_)
|
sizeof(position_)
|
||||||
+ sizeof(facei_) + sizeof(stepFraction_)
|
+ sizeof(celli_)
|
||||||
|
+ sizeof(facei_)
|
||||||
|
+ sizeof(stepFraction_)
|
||||||
|
+ sizeof(origProc_)
|
||||||
|
+ sizeof(origId_)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +97,9 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Particle<ParticleType>& p)
|
|||||||
if (os.format() == IOstream::ASCII)
|
if (os.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
os << p.position_
|
os << p.position_
|
||||||
<< token::SPACE << p.celli_;
|
<< token::SPACE << p.celli_
|
||||||
|
<< token::SPACE << p.origProc_
|
||||||
|
<< token::SPACE << p.origId_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -100,8 +107,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Particle<ParticleType>& p)
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.position_),
|
reinterpret_cast<const char*>(&p.position_),
|
||||||
sizeof(p.position_) + sizeof(p.celli_)
|
sizeof(p.position_)
|
||||||
+ sizeof(p.facei_) + sizeof(p.stepFraction_)
|
+ sizeof(p.celli_)
|
||||||
|
+ sizeof(p.facei_)
|
||||||
|
+ sizeof(p.stepFraction_)
|
||||||
|
+ sizeof(p.origProc_)
|
||||||
|
+ sizeof(p.origId_)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,72 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "ParticleTrackingData.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Foam::label Foam::ParticleTrackingData<ParcelType>::PARTICLE_COUNT = 0;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData
|
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& cloud
|
|
||||||
)
|
|
||||||
:
|
|
||||||
cloud_(cloud),
|
|
||||||
origProc_(Pstream::myProcNo()),
|
|
||||||
id_(PARTICLE_COUNT++)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData
|
|
||||||
(
|
|
||||||
const ParticleTrackingData& ptd
|
|
||||||
)
|
|
||||||
:
|
|
||||||
cloud_(ptd.cloud_),
|
|
||||||
origProc_(ptd.origProc_),
|
|
||||||
id_(ptd.id_)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Foam::ParticleTrackingData<ParcelType>::~ParticleTrackingData()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#include "ParticleTrackingDataIO.C"
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,166 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::ParticleTrackingData
|
|
||||||
|
|
||||||
Description
|
|
||||||
Class to provide additional properties to allow construction of
|
|
||||||
particle tracks
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
ParticleTrackingData.C
|
|
||||||
ParticleTrackingDataIO.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef ParticleTrackingData_H
|
|
||||||
#define ParticleTrackingData_H
|
|
||||||
|
|
||||||
#include "Cloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// Forward declaration of classes and friend functions
|
|
||||||
template<class ParcelType>
|
|
||||||
class ParticleTrackingData;
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Ostream& operator<<
|
|
||||||
(
|
|
||||||
Ostream&,
|
|
||||||
const ParticleTrackingData<ParcelType>&
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class ParticleTrackingData Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
class ParticleTrackingData
|
|
||||||
{
|
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Reference to the cloud
|
|
||||||
const Cloud<ParcelType>& cloud_;
|
|
||||||
|
|
||||||
//- Originating processor id
|
|
||||||
label origProc_;
|
|
||||||
|
|
||||||
//- Local particle id
|
|
||||||
label id_;
|
|
||||||
|
|
||||||
//- Cumulative particle count used for particle id
|
|
||||||
static label PARTICLE_COUNT;
|
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
|
||||||
|
|
||||||
//- Write properties - particle count
|
|
||||||
static void writeProperties(const Cloud<ParcelType>& cloud);
|
|
||||||
|
|
||||||
//- Read properties - particle count
|
|
||||||
static void readProperties(const Cloud<ParcelType>& cloud);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from cloud
|
|
||||||
ParticleTrackingData(const Cloud<ParcelType>& cloud);
|
|
||||||
|
|
||||||
//- Construct copy
|
|
||||||
ParticleTrackingData(const ParticleTrackingData& ptd);
|
|
||||||
|
|
||||||
//- Construct from Istream and mesh
|
|
||||||
ParticleTrackingData
|
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& cloud,
|
|
||||||
Istream& is,
|
|
||||||
bool readFields
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
~ParticleTrackingData();
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Return const access to the cloud
|
|
||||||
inline const Cloud<ParcelType>& cloud() const;
|
|
||||||
|
|
||||||
//- Return const access to the originating processor id
|
|
||||||
inline label origProc() const;
|
|
||||||
|
|
||||||
//- Return const access to the local particle id
|
|
||||||
inline label id() const;
|
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
|
||||||
|
|
||||||
//- Read fields
|
|
||||||
static void readFields(Cloud<ParcelType>& c);
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
static void writeFields(const Cloud<ParcelType>& c);
|
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
|
||||||
|
|
||||||
friend Ostream& operator<< <ParcelType>
|
|
||||||
(
|
|
||||||
Ostream&,
|
|
||||||
const ParticleTrackingData<ParcelType>&
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#include "ParticleTrackingDataI.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
# include "ParticleTrackingData.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
inline const Foam::Cloud<ParcelType>&
|
|
||||||
Foam::ParticleTrackingData<ParcelType>::cloud() const
|
|
||||||
{
|
|
||||||
return cloud_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
inline Foam::label Foam::ParticleTrackingData<ParcelType>::origProc() const
|
|
||||||
{
|
|
||||||
return origProc_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
inline Foam::label Foam::ParticleTrackingData<ParcelType>::id() const
|
|
||||||
{
|
|
||||||
return id_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,233 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "ParticleTrackingData.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ParticleTrackingData<ParcelType>::readProperties
|
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& cloud
|
|
||||||
)
|
|
||||||
{
|
|
||||||
IOobject propsDictHeader
|
|
||||||
(
|
|
||||||
"particleTrackingProperties",
|
|
||||||
cloud.db().time().timeName(),
|
|
||||||
"uniform/Lagrangian"/cloud.name(),
|
|
||||||
cloud.db(),
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
if (propsDictHeader.headerOk())
|
|
||||||
{
|
|
||||||
const IOdictionary propsDict(propsDictHeader);
|
|
||||||
|
|
||||||
word procName("processor" + name(Pstream::myProcNo()));
|
|
||||||
if (propsDict.found(procName))
|
|
||||||
{
|
|
||||||
propsDict.subDict(procName).lookup("particleCount") >>
|
|
||||||
PARTICLE_COUNT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ParticleTrackingData<ParcelType>::writeProperties
|
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& cloud
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (cloud.db().time().outputTime())
|
|
||||||
{
|
|
||||||
IOdictionary propsDict
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"particleTrackingProperties",
|
|
||||||
cloud.db().time().timeName(),
|
|
||||||
"uniform/Lagrangian"/cloud.name(),
|
|
||||||
cloud.db(),
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
word procName("processor" + name(Pstream::myProcNo()));
|
|
||||||
propsDict.add(procName, dictionary());
|
|
||||||
propsDict.subDict(procName).add("particleCount", PARTICLE_COUNT);
|
|
||||||
|
|
||||||
propsDict.regIOobject::write();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData
|
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& cloud,
|
|
||||||
Istream& is,
|
|
||||||
bool readFields
|
|
||||||
)
|
|
||||||
:
|
|
||||||
cloud_(cloud),
|
|
||||||
origProc_(-1),
|
|
||||||
id_(-1)
|
|
||||||
{
|
|
||||||
if (readFields)
|
|
||||||
{
|
|
||||||
if (is.format() == IOstream::ASCII)
|
|
||||||
{
|
|
||||||
is >> origProc_ >> id_;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
is.read
|
|
||||||
(
|
|
||||||
reinterpret_cast<char*>(&origProc_),
|
|
||||||
sizeof(origProc_) + sizeof(id_)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check state of Istream
|
|
||||||
is.check
|
|
||||||
(
|
|
||||||
"ParticleTrackingData<ParcelType>::ParticleTrackingData"
|
|
||||||
"("
|
|
||||||
"Istream&, "
|
|
||||||
"bool"
|
|
||||||
")"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ParticleTrackingData<ParcelType>::readFields
|
|
||||||
(
|
|
||||||
Cloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (!c.size())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
readProperties(c);
|
|
||||||
|
|
||||||
IOField<label> origProc(c.fieldIOobject("origProc", IOobject::MUST_READ));
|
|
||||||
c.checkFieldIOobject(c, origProc);
|
|
||||||
|
|
||||||
IOField<label> id(c.fieldIOobject("id", IOobject::MUST_READ));
|
|
||||||
c.checkFieldIOobject(c, id);
|
|
||||||
|
|
||||||
label i = 0;
|
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
|
||||||
{
|
|
||||||
ParcelType& p = iter();
|
|
||||||
p.origProc_ = origProc[i];
|
|
||||||
p.id_ = id[i];
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::ParticleTrackingData<ParcelType>::writeFields
|
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
|
||||||
writeProperties(c);
|
|
||||||
|
|
||||||
const label np = c.size();
|
|
||||||
|
|
||||||
IOField<label> origProc
|
|
||||||
(
|
|
||||||
c.fieldIOobject("origProc", IOobject::NO_READ),
|
|
||||||
np
|
|
||||||
);
|
|
||||||
IOField<label> id(c.fieldIOobject("id", IOobject::NO_READ), np);
|
|
||||||
|
|
||||||
label i = 0;
|
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
|
||||||
{
|
|
||||||
const ParcelType& p = iter();
|
|
||||||
|
|
||||||
origProc[i] = p.origProc();
|
|
||||||
id[i] = p.id();
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
origProc.write();
|
|
||||||
id.write();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Foam::Ostream& Foam::operator<<
|
|
||||||
(
|
|
||||||
Ostream& os,
|
|
||||||
const ParticleTrackingData<ParcelType>& p
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (os.format() == IOstream::ASCII)
|
|
||||||
{
|
|
||||||
os << p.origProc_ << token::SPACE << p.id_ << token::SPACE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
os.write
|
|
||||||
(
|
|
||||||
reinterpret_cast<const char*>(&p.origProc_),
|
|
||||||
sizeof(p.origProc_) + sizeof(p.id_)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check state of Ostream
|
|
||||||
os.check
|
|
||||||
(
|
|
||||||
"Ostream& operator<<"
|
|
||||||
"("
|
|
||||||
"Ostream&, "
|
|
||||||
"const ParticleTrackingData<ParcelType>&"
|
|
||||||
")"
|
|
||||||
);
|
|
||||||
|
|
||||||
return os;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -23,7 +23,6 @@ $(DERIVEDCLOUDS)/basicKinematicCloud/basicKinematicCloud.C
|
|||||||
$(DERIVEDCLOUDS)/basicThermoCloud/basicThermoCloud.C
|
$(DERIVEDCLOUDS)/basicThermoCloud/basicThermoCloud.C
|
||||||
$(DERIVEDCLOUDS)/BasicReactingCloud/defineBasicReactingCloud.C
|
$(DERIVEDCLOUDS)/BasicReactingCloud/defineBasicReactingCloud.C
|
||||||
$(DERIVEDCLOUDS)/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C
|
$(DERIVEDCLOUDS)/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C
|
||||||
$(DERIVEDCLOUDS)/BasicTrackedReactingCloud/defineBasicTrackedReactingCloud.C
|
|
||||||
|
|
||||||
|
|
||||||
/* kinematic parcel sub-models */
|
/* kinematic parcel sub-models */
|
||||||
@ -46,12 +45,6 @@ $(REACTINGPARCEL)/defineBasicReactingParcel.C
|
|||||||
$(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C
|
$(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C
|
||||||
|
|
||||||
|
|
||||||
/* tracked reacting parcel sub-models */
|
|
||||||
TRACKEDREACTINGPARCEL=$(DERIVEDPARCELS)/BasicTrackedReactingParcel
|
|
||||||
$(TRACKEDREACTINGPARCEL)/defineTrackedReactingParcel.C
|
|
||||||
$(TRACKEDREACTINGPARCEL)/makeBasicTrackedReactingParcelSubmodels.C
|
|
||||||
|
|
||||||
|
|
||||||
/* reacting multiphase parcel sub-models */
|
/* reacting multiphase parcel sub-models */
|
||||||
REACTINGMPPARCEL=$(DERIVEDPARCELS)/BasicReactingMultiphaseParcel
|
REACTINGMPPARCEL=$(DERIVEDPARCELS)/BasicReactingMultiphaseParcel
|
||||||
$(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C
|
$(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C
|
||||||
|
|||||||
@ -1,70 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "BasicTrackedReactingCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicTrackedReactingCloud<ThermoType>::BasicTrackedReactingCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
)
|
|
||||||
:
|
|
||||||
ReactingCloud<BasicTrackedReactingParcel<ThermoType> >
|
|
||||||
(
|
|
||||||
cloudName,
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
g,
|
|
||||||
thermo
|
|
||||||
)
|
|
||||||
{
|
|
||||||
BasicTrackedReactingParcel<ThermoType>::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicTrackedReactingCloud<ThermoType>::~BasicTrackedReactingCloud()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
void Foam::BasicTrackedReactingCloud<ThermoType>::writeFields() const
|
|
||||||
{
|
|
||||||
BasicTrackedReactingParcel<ThermoType>::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,113 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::BasicTrackedReactingCloud
|
|
||||||
|
|
||||||
Description
|
|
||||||
Tracked racting cloud templated on the type of carrier phase thermodynamics
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
BasicTrackedReactingCloud.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef BasicTrackedReactingCloud_H
|
|
||||||
#define BasicTrackedReactingCloud_H
|
|
||||||
|
|
||||||
#include "ReactingCloud.H"
|
|
||||||
#include "BasicTrackedReactingParcel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// Forward declaration of classes
|
|
||||||
template<class ThermoType>
|
|
||||||
class BasicTrackedReactingCloud;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class BasicTrackedReactingCloud Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
class BasicTrackedReactingCloud
|
|
||||||
:
|
|
||||||
public ReactingCloud<BasicTrackedReactingParcel<ThermoType> >
|
|
||||||
{
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
BasicTrackedReactingCloud(const BasicTrackedReactingCloud&);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const BasicTrackedReactingCloud&);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("BasicTrackedReactingCloud");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct given carrier gas fields
|
|
||||||
BasicTrackedReactingCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
~BasicTrackedReactingCloud();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
void writeFields() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
#include "BasicTrackedReactingCloud.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "createReactingCloudTypes.H"
|
|
||||||
#include "BasicTrackedReactingCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
createReactingCloudType(BasicTrackedReactingCloud);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "TrackedReactingParcel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template <class ParcelType>
|
|
||||||
Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel
|
|
||||||
(
|
|
||||||
const TrackedReactingParcel<ParcelType>& p
|
|
||||||
)
|
|
||||||
:
|
|
||||||
ReactingParcel<ParcelType>(p),
|
|
||||||
ParticleTrackingData<ParcelType>(p)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#include "TrackedReactingParcelIO.C"
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
|
|
||||||
@ -1,169 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::TrackedReactingParcel
|
|
||||||
|
|
||||||
Description
|
|
||||||
Adds tracking to ReactingParcel
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
TrackedReactingParcelI.H
|
|
||||||
TrackedReactingParcel.C
|
|
||||||
TrackedReactingParcelIO.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef TrackedReactingParcel_H
|
|
||||||
#define TrackedReactingParcel_H
|
|
||||||
|
|
||||||
#include "ReactingParcel.H"
|
|
||||||
#include "ParticleTrackingData.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
class TrackedReactingParcel;
|
|
||||||
|
|
||||||
// Forward declaration of friend functions
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Ostream& operator<<
|
|
||||||
(
|
|
||||||
Ostream&,
|
|
||||||
const TrackedReactingParcel<ParcelType>&
|
|
||||||
);
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class TrackedReactingParcel Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
class TrackedReactingParcel
|
|
||||||
:
|
|
||||||
public ReactingParcel<ParcelType>,
|
|
||||||
public ParticleTrackingData<ParcelType>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef typename ReactingParcel<ParcelType>::constantProperties
|
|
||||||
constantProperties;
|
|
||||||
|
|
||||||
// Static data
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("TrackedReactingParcel");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from owner, position, and cloud owner
|
|
||||||
// Other properties initialised as null
|
|
||||||
inline TrackedReactingParcel
|
|
||||||
(
|
|
||||||
ReactingCloud<ParcelType>& owner,
|
|
||||||
const vector& position,
|
|
||||||
const label cellI
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
inline TrackedReactingParcel
|
|
||||||
(
|
|
||||||
ReactingCloud<ParcelType>& owner,
|
|
||||||
const vector& position,
|
|
||||||
const label cellI,
|
|
||||||
const label typeId,
|
|
||||||
const scalar nParticle0,
|
|
||||||
const scalar d0,
|
|
||||||
const vector& U0,
|
|
||||||
const scalarField& Y0,
|
|
||||||
const constantProperties& constProps
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from Istream
|
|
||||||
TrackedReactingParcel
|
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& c,
|
|
||||||
Istream& is,
|
|
||||||
bool readFields = true
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct as a copy
|
|
||||||
TrackedReactingParcel(const TrackedReactingParcel& p);
|
|
||||||
|
|
||||||
//- Construct and return a clone
|
|
||||||
autoPtr<TrackedReactingParcel> clone() const
|
|
||||||
{
|
|
||||||
return
|
|
||||||
autoPtr<TrackedReactingParcel>
|
|
||||||
(
|
|
||||||
new TrackedReactingParcel(*this)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
// I-O
|
|
||||||
|
|
||||||
//- Read
|
|
||||||
static void readFields(ReactingCloud<ParcelType>& c);
|
|
||||||
|
|
||||||
//- Write
|
|
||||||
static void writeFields(const ReactingCloud<ParcelType>& c);
|
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
|
||||||
|
|
||||||
friend Ostream& operator<< <ParcelType>
|
|
||||||
(
|
|
||||||
Ostream&,
|
|
||||||
const TrackedReactingParcel<ParcelType>&
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#include "TrackedReactingParcelI.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
#include "TrackedReactingParcel.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template <class ParcelType>
|
|
||||||
inline Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel
|
|
||||||
(
|
|
||||||
ReactingCloud<ParcelType>& owner,
|
|
||||||
const vector& position,
|
|
||||||
const label cellI
|
|
||||||
)
|
|
||||||
:
|
|
||||||
ReactingParcel<ParcelType>(owner, position, cellI),
|
|
||||||
ParticleTrackingData<ParcelType>(owner)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template <class ParcelType>
|
|
||||||
inline Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel
|
|
||||||
(
|
|
||||||
ReactingCloud<ParcelType>& owner,
|
|
||||||
const vector& position,
|
|
||||||
const label cellI,
|
|
||||||
const label typeId,
|
|
||||||
const scalar nParticle0,
|
|
||||||
const scalar d0,
|
|
||||||
const vector& U0,
|
|
||||||
const scalarField& Y0,
|
|
||||||
const constantProperties& constProps
|
|
||||||
)
|
|
||||||
:
|
|
||||||
ReactingParcel<ParcelType>
|
|
||||||
(
|
|
||||||
owner,
|
|
||||||
position,
|
|
||||||
cellI,
|
|
||||||
typeId,
|
|
||||||
nParticle0,
|
|
||||||
d0,
|
|
||||||
U0,
|
|
||||||
Y0,
|
|
||||||
constProps
|
|
||||||
),
|
|
||||||
ParticleTrackingData<ParcelType>(owner)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,105 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "TrackedReactingParcel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template <class ParcelType>
|
|
||||||
Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel
|
|
||||||
(
|
|
||||||
const Cloud<ParcelType>& cloud,
|
|
||||||
Istream& is,
|
|
||||||
bool readFields
|
|
||||||
)
|
|
||||||
:
|
|
||||||
ReactingParcel<ParcelType>(cloud, is, readFields),
|
|
||||||
ParticleTrackingData<ParcelType>(cloud, is, readFields)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::TrackedReactingParcel<ParcelType>::readFields
|
|
||||||
(
|
|
||||||
ReactingCloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (!c.size())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReactingParcel<ParcelType>::readFields(c);
|
|
||||||
ParticleTrackingData<ParcelType>::readFields(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
void Foam::TrackedReactingParcel<ParcelType>::writeFields
|
|
||||||
(
|
|
||||||
const ReactingCloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ReactingParcel<ParcelType>::writeFields(c);
|
|
||||||
ParticleTrackingData<ParcelType>::writeFields(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Foam::Ostream& Foam::operator<<
|
|
||||||
(
|
|
||||||
Ostream& os,
|
|
||||||
const TrackedReactingParcel<ParcelType>& p
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (os.format() == IOstream::ASCII)
|
|
||||||
{
|
|
||||||
os << static_cast<const ReactingParcel<ParcelType>&>(p)
|
|
||||||
<< static_cast<const ParticleTrackingData<ParcelType>&>(p);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
os << static_cast<const ReactingParcel<ParcelType>&>(p)
|
|
||||||
<< static_cast<const ParticleTrackingData<ParcelType>&>(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check state of Ostream
|
|
||||||
os.check
|
|
||||||
(
|
|
||||||
"Ostream& operator<<"
|
|
||||||
"("
|
|
||||||
"Ostream&, "
|
|
||||||
"const TrackedReactingParcel<ParcelType>&"
|
|
||||||
")"
|
|
||||||
);
|
|
||||||
|
|
||||||
return os;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,113 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "BasicTrackedReactingParcel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel
|
|
||||||
(
|
|
||||||
ReactingCloud<BasicTrackedReactingParcel<ThermoType> >& owner,
|
|
||||||
const vector& position,
|
|
||||||
const label cellI
|
|
||||||
)
|
|
||||||
:
|
|
||||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >
|
|
||||||
(
|
|
||||||
owner,
|
|
||||||
position,
|
|
||||||
cellI
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel
|
|
||||||
(
|
|
||||||
ReactingCloud<BasicTrackedReactingParcel<ThermoType> >& owner,
|
|
||||||
const vector& position,
|
|
||||||
const label cellI,
|
|
||||||
const label typeId,
|
|
||||||
const scalar nParticle0,
|
|
||||||
const scalar d0,
|
|
||||||
const vector& U0,
|
|
||||||
const scalarField& Y0,
|
|
||||||
const typename
|
|
||||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >::
|
|
||||||
constantProperties& constProps
|
|
||||||
)
|
|
||||||
:
|
|
||||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >
|
|
||||||
(
|
|
||||||
owner,
|
|
||||||
position,
|
|
||||||
cellI,
|
|
||||||
typeId,
|
|
||||||
nParticle0,
|
|
||||||
d0,
|
|
||||||
U0,
|
|
||||||
Y0,
|
|
||||||
constProps
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel
|
|
||||||
(
|
|
||||||
const Cloud<BasicTrackedReactingParcel<ThermoType> >& cloud,
|
|
||||||
Istream& is,
|
|
||||||
bool readFields
|
|
||||||
)
|
|
||||||
:
|
|
||||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >
|
|
||||||
(
|
|
||||||
cloud,
|
|
||||||
is,
|
|
||||||
readFields
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel
|
|
||||||
(
|
|
||||||
const BasicTrackedReactingParcel<ThermoType>& p
|
|
||||||
)
|
|
||||||
:
|
|
||||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >(p)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicTrackedReactingParcel<ThermoType>::~BasicTrackedReactingParcel()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,137 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::BasicTrackedReactingParcel
|
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
BasicTrackedReactingParcel.C
|
|
||||||
BasicTrackedReactingParcelIO.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef BasicTrackedReactingParcel_H
|
|
||||||
#define BasicTrackedReactingParcel_H
|
|
||||||
|
|
||||||
#include "TrackedReactingParcel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// Forward declaration of classes
|
|
||||||
template<class ThermoType>
|
|
||||||
class BasicTrackedReactingParcel;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class BasicTrackedReactingParcel Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
class BasicTrackedReactingParcel
|
|
||||||
:
|
|
||||||
public TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- The type of thermodynamics this parcel was instantiated for
|
|
||||||
typedef ThermoType thermoType;
|
|
||||||
|
|
||||||
//- Run-time type information
|
|
||||||
TypeName("BasicTrackedReactingParcel");
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from owner, position, and cloud owner
|
|
||||||
// Other properties initialised as null
|
|
||||||
BasicTrackedReactingParcel
|
|
||||||
(
|
|
||||||
ReactingCloud<BasicTrackedReactingParcel>& owner,
|
|
||||||
const vector& position,
|
|
||||||
const label cellI
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
BasicTrackedReactingParcel
|
|
||||||
(
|
|
||||||
ReactingCloud<BasicTrackedReactingParcel>& owner,
|
|
||||||
const vector& position,
|
|
||||||
const label cellI,
|
|
||||||
const label typeId,
|
|
||||||
const scalar nParticle0,
|
|
||||||
const scalar d0,
|
|
||||||
const vector& U0,
|
|
||||||
const scalarField& Y0,
|
|
||||||
const typename
|
|
||||||
TrackedReactingParcel<BasicTrackedReactingParcel>::
|
|
||||||
constantProperties& constProps
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from Istream
|
|
||||||
BasicTrackedReactingParcel
|
|
||||||
(
|
|
||||||
const Cloud<BasicTrackedReactingParcel>& c,
|
|
||||||
Istream& is,
|
|
||||||
bool readFields = true
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct as a copy
|
|
||||||
BasicTrackedReactingParcel(const BasicTrackedReactingParcel& p);
|
|
||||||
|
|
||||||
//- Construct and return a clone
|
|
||||||
autoPtr<BasicTrackedReactingParcel> clone() const
|
|
||||||
{
|
|
||||||
return
|
|
||||||
autoPtr<BasicTrackedReactingParcel>
|
|
||||||
(
|
|
||||||
new BasicTrackedReactingParcel(*this)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~BasicTrackedReactingParcel();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
#include "BasicTrackedReactingParcel.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "createTrackedReactingParcelTypes.H"
|
|
||||||
#include "BasicTrackedReactingParcel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
createTrackedReactingParcelType(BasicTrackedReactingParcel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "BasicTrackedReactingParcel.H"
|
|
||||||
|
|
||||||
// Kinematic
|
|
||||||
#include "makeReactingParcelDispersionModels.H"
|
|
||||||
#include "makeReactingParcelDragModels.H"
|
|
||||||
#include "makeReactingParcelInjectionModels.H"
|
|
||||||
#include "makeReactingParcelPatchInteractionModels.H"
|
|
||||||
#include "makeReactingParcelPostProcessingModels.H"
|
|
||||||
|
|
||||||
// Thermo
|
|
||||||
#include "makeReactingParcelHeatTransferModels.H"
|
|
||||||
|
|
||||||
// Reacting
|
|
||||||
#include "makeReactingParcelCompositionModels.H"
|
|
||||||
#include "makeReactingParcelPhaseChangeModels.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
// Kinematic sub-models
|
|
||||||
makeReactingDispersionModels(BasicTrackedReactingParcel);
|
|
||||||
makeReactingDragModels(BasicTrackedReactingParcel);
|
|
||||||
makeReactingInjectionModels(BasicTrackedReactingParcel);
|
|
||||||
makeReactingPatchInteractionModels(BasicTrackedReactingParcel);
|
|
||||||
makeReactingPostProcessingModels(BasicTrackedReactingParcel);
|
|
||||||
|
|
||||||
// Thermo sub-models
|
|
||||||
makeReactingHeatTransferModels(BasicTrackedReactingParcel);
|
|
||||||
|
|
||||||
// Reacting sub-models
|
|
||||||
makeReactingCompositionModels(BasicTrackedReactingParcel);
|
|
||||||
makeReactingPhaseChangeModels(BasicTrackedReactingParcel);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -37,7 +37,7 @@ void Foam::InjectionModel<CloudType>::readProps()
|
|||||||
(
|
(
|
||||||
"injectionProperties",
|
"injectionProperties",
|
||||||
owner_.db().time().timeName(),
|
owner_.db().time().timeName(),
|
||||||
"uniform/Lagrangian"/owner_.name(),
|
"uniform"/cloud::prefix/owner_.name(),
|
||||||
owner_.db(),
|
owner_.db(),
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
@ -67,7 +67,7 @@ void Foam::InjectionModel<CloudType>::writeProps()
|
|||||||
(
|
(
|
||||||
"injectionProperties",
|
"injectionProperties",
|
||||||
owner_.db().time().timeName(),
|
owner_.db().time().timeName(),
|
||||||
"uniform/Lagrangian"/owner_.name(),
|
"uniform"/cloud::prefix/owner_.name(),
|
||||||
owner_.db(),
|
owner_.db(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
|
|||||||
@ -105,6 +105,7 @@ private:
|
|||||||
// - schedule
|
// - schedule
|
||||||
mutable autoPtr<mapDistribute> mapPtr_;
|
mutable autoPtr<mapDistribute> mapPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Collect single list of samples and originating processor+face.
|
//- Collect single list of samples and originating processor+face.
|
||||||
@ -162,7 +163,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
ClassName("directMappedPatchBase");
|
TypeName("directMappedPatchBase");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
@ -177,15 +178,14 @@ public:
|
|||||||
directMappedPatchBase(const polyPatch&, const directMappedPatchBase&);
|
directMappedPatchBase(const polyPatch&, const directMappedPatchBase&);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~directMappedPatchBase();
|
||||||
~directMappedPatchBase();
|
|
||||||
|
|
||||||
void clearOut();
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
void clearOut();
|
||||||
|
|
||||||
//- What to sample
|
//- What to sample
|
||||||
const sampleMode& mode() const
|
const sampleMode& mode() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -151,9 +151,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~directMappedPolyPatch();
|
||||||
~directMappedPolyPatch();
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|||||||
@ -158,9 +158,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~directMappedWallPolyPatch();
|
||||||
~directMappedWallPolyPatch();
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|||||||
@ -8,7 +8,6 @@ $(atomicWeights)/atomicWeights.C
|
|||||||
$(specie)/specie.C
|
$(specie)/specie.C
|
||||||
$(speciesTable)/speciesTable.C
|
$(speciesTable)/speciesTable.C
|
||||||
$(equationOfState)/perfectGas/perfectGas.C
|
$(equationOfState)/perfectGas/perfectGas.C
|
||||||
$(equationOfState)/icoPolynomial/makeIcoPolynomials.C
|
|
||||||
$(reactions)/makeChemkinReactions.C
|
$(reactions)/makeChemkinReactions.C
|
||||||
$(reactions)/makeReactionThermoReactions.C
|
$(reactions)/makeReactionThermoReactions.C
|
||||||
$(reactions)/makeLangmuirHinshelwoodReactions.C
|
$(reactions)/makeLangmuirHinshelwoodReactions.C
|
||||||
|
|||||||
@ -105,8 +105,6 @@ class icoPolynomial
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TypeName("icoPolynomial")
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
|
|||||||
@ -1,44 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "icoPolynomial.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
makeIcoPolynomial(1)
|
|
||||||
makeIcoPolynomial(2)
|
|
||||||
makeIcoPolynomial(3)
|
|
||||||
makeIcoPolynomial(4)
|
|
||||||
makeIcoPolynomial(5)
|
|
||||||
makeIcoPolynomial(6)
|
|
||||||
makeIcoPolynomial(7)
|
|
||||||
makeIcoPolynomial(8)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: 1.5 |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
@ -10,7 +10,6 @@ FoamFile
|
|||||||
version 2.0;
|
version 2.0;
|
||||||
format ascii;
|
format ascii;
|
||||||
class volScalarField;
|
class volScalarField;
|
||||||
location "0";
|
|
||||||
object T;
|
object T;
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -24,422 +23,19 @@ boundaryField
|
|||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value nonuniform List<scalar>
|
value uniform 300;
|
||||||
400
|
|
||||||
(
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
600
|
|
||||||
600
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
600
|
|
||||||
600
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
300
|
|
||||||
)
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ceiling
|
ceiling
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform 300;
|
value uniform 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
fixedWalls
|
fixedWalls
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user