aslFDElChemKinetics.h
Go to the documentation of this file.
/*
* Advanced Simulation Library <http://asl.org.il>
*
* Copyright 2015 Avtech Scientific <http://avtechscientific.com>
*
*
* This file is part of Advanced Simulation Library (ASL).
*
* ASL is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, version 3 of the License.
*
* ASL 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with ASL. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ASLFDELCHEMKINETICS_H
#define ASLFDELCHEMKINETICS_H
#include "aslSingleKernelNM.h"
#include "acl/aclMath/aclVectorOfElementsDef.h"
namespace acl
{
class VectorOfElementsData;
class VectorOfElements;
}
namespace asl
{
class VectorTemplate;
template <typename V> class DataWithGhostNodes;
typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
class FDBVKinetics: public SingleKernelMapNM
{
public:
typedef SPDataWithGhostNodesACLData Data;
typedef SPAbstractDataWithGhostNodes Field;
typedef acl::VectorOfElements Param;
private:
acl::SPKernel kernelJ;
std::vector<Data> aI;
Data efSPhi;
Field phi;
vector<double> nI;
Param j0;
Param beta;
double n;
virtual void init0();
public:
FDBVKinetics(Data a0,
double n0,
Data aI,
double nI,
Data phiS,
Field phi,
const Param & j0,
const Param & beta,
double n);
void setElectricFieldSource(Field phi);
Field getElectricFieldSource() const;
inline Data & getAI(unsigned int i=0);
void addAI(Data ai, double ni);
void executeJ();
};
typedef std::shared_ptr<FDBVKinetics> SPFDBVKinetics;
SPFDBVKinetics generateFDBVKinetics(SPDataWithGhostNodesACLData a0,
double n0,
SPDataWithGhostNodesACLData aI,
double nI,
SPDataWithGhostNodesACLData phiS,
SPAbstractDataWithGhostNodes phi,
double j0,
double beta,
double n);
// ------------------------- Implementation ------------------------
inline FDBVKinetics::Data & FDBVKinetics::getAI(unsigned int i)
{
return aI[i];
}
} // asl
#endif // ASLFDADVECTIONDIFFUSION_H
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:92
asl::FDBVKinetics::Param
acl::VectorOfElements Param
Definition: aslFDElChemKinetics.h:93
asl::FDBVKinetics::executeJ
void executeJ()
asl::FDBVKinetics::Field
SPAbstractDataWithGhostNodes Field
Definition: aslFDElChemKinetics.h:92
asl::FDBVKinetics::getAI
Data & getAI(unsigned int i=0)
asl::FDBVKinetics::getElectricFieldSource
Field getElectricFieldSource() const
asl::FDBVKinetics::getAI
Data & getAI(unsigned int i=0)
Definition: aslFDElChemKinetics.h:141
asl::FDBVKinetics::addAI
void addAI(Data ai, double ni)
asl::FDBVKinetics::Data
SPDataWithGhostNodesACLData Data
Definition: aslFDElChemKinetics.h:91
asl::FDBVKinetics::setElectricFieldSource
void setElectricFieldSource(Field phi)
asl::FDBVKinetics::FDBVKinetics
FDBVKinetics(Data a0, double n0, Data aI, double nI, Data phiS, Field phi, const Param &j0, const Param &beta, double n)
acl
Advanced Computational Language.
Definition: acl.h:41
acl::SPKernel
std::shared_ptr< Kernel > SPKernel
Definition: aclKernelMerger.h:34
asl
Advanced Simulation Library.
Definition: aslDataInc.h:31
asl::DataWithGhostNodesACLData
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:45
asl::generateFDBVKinetics
SPFDBVKinetics generateFDBVKinetics(SPDataWithGhostNodesACLData a0, double n0, SPDataWithGhostNodesACLData aI, double nI, SPDataWithGhostNodesACLData phiS, SPAbstractDataWithGhostNodes phi, double j0, double beta, double n)
asl::SPFDBVKinetics
std::shared_ptr< FDBVKinetics > SPFDBVKinetics
Definition: aslFDElChemKinetics.h:124
asl::SPAbstractDataWithGhostNodes
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition: aslGenerators.h:50
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
aslSingleKernelNM.h