eReactingFoam-4.x/diffusivityModel/Electron/Electron.C

110 lines
3.2 KiB
C

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "Electron.H"
#include "dictionary.H"
#include "scalarList.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// const dataType Foam::Electron::staticData();
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::Electron::Electron(const dictionary& thermoDict, const dictionary& tranDict)
:
Particle(thermoDict, tranDict),
fitDict_(tranDict.subDict("fitCoefs")),
collisionTargets_(fitDict_.lookup("species")),
DejFitCoefs_(collisionTargets_.size())
{
forAll (DejFitCoefs_, idx)
{
DejFitCoefs_.set(idx, new scalarList(fitDict_.lookup(collisionTargets_[idx])));
Info << DejFitCoefs_[idx] << endl;
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::Electron::~Electron()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
void Foam::Electron::operator=(const Electron& rhs)
{
// Check for assignment to self
if (this == &rhs)
{
FatalErrorInFunction
<< "Attempted assignment to self"
<< abort(FatalError);
}
}
// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<<(Ostream& os, const Electron& st)
{
os << static_cast<const Particle&>(st); // << tab
/*
<< st.alpha_ << tab
<< st.C6_ << tab
<< st.Zrot_ << tab
<< st.n_ << tab
<< st.rctTarget_ << tab
<< st.Arct_ << tab
<< st.Brct_;
*/
os.check("Ostream& operator<<(Ostream& os, const specie& st)");
return os;
}
// ************************************************************************* //