56 bcManager->
getNeumannBCs()->at(
"ANODE" )->setScaleFactor(1./anodeMeas );
57 bcManager->
getNeumannBCs()->at(
"CATHODE")->setScaleFactor(1./cathodeMeas);
67 CEPS_SAYS(
" Solution vector with mean " << uMean);
73 return ceps::runtimeCast<FluxAnodeCathodeProblem*>(
m_problem);
83 LhsAssembler* opAsb = ceps::getNew<LhsAssembler>(
m_fe);
102 m_bcAsb = ceps::getNew<FEDivKGradBCAssembler>(
m_fe);
#define CEPS_SAYS(message)
Writes a message in the debug log and in the terminal (stdio).
float CepsReal
Need single precision floating point.
CepsReal getDomainMeasure(const CepsVector< FEBase * > &cells, const CepsSet< CepsAttribute > &attributes, CepsBool onlyOfThisProc)
Compute the measure of a set of a cells.
void setMatrix(DistributedMatrix *mat)
The matrix to assemble.
void setVector(DistributedVector *vec)
The vector to assemble.
InputParameters * getParameters() const
Text parameters.
Unknown * getUnknown(const CepsString &label) const
Get an unknown by its name.
BoundaryConditionManager * getBoundaryConditionManager() const
Get boundary condition manager.
DMatPtr m_lhs
Left hand side of the system.
DVecPtr m_rhs
Right hand side of the system.
AbstractAssembler * m_bcAsb
Assembler for Robin and Neumann BCs.
AbstractAssembler * m_opAsb
Assembler for the operator matrix.
AbstractPdeProblem * m_problem
Link to PDE to solve.
void solve() override
Solves the whole PDE in time.
DHVecPtr m_solution
The actual vector with the solution.
Boundary condition to manage Dirichlet, Neumann and Robin conditions.
Manager * getNeumannBCs() const
Get the manager for Neumann conditions of dim.
Assembles the stiffness matrix for a given k-simplexes geometry.
void setKForUnknown(Unknown *u, CepsMathScalar k)
Register the diffusion coefficient (x,t,...) for given unknown.
Computes the integral of a quantity on the whole domain or subdomains, using a FE matrix.
CepsReal integrate(DHVecPtr u, DMatPtr mat=nullptr)
Returns the value of the integral by computing ones dot Mu.
A class that adds a 0 mean constraint to an already existing assembler.
FiniteElements * m_fe
Geometry and reference FE.
CepsVector< FEBase * > & getBoundaryFiniteElements()
Get vector containing all finite elements of the maximum valid dim.
DMatPtr getMassMatrix() const
Pointer on mass matrix.
Poisson equation with Neumann 1 on anode, -1 on cathode. Neumann 0 elsewhere. Functional tensorial co...
FluxAnodeCathodeProblem * getFluxAnodeCathodeProblem() const
Returns a pointer to the linked problem with appropriate type.
FluxAnodeCathodeSolver(FluxAnodeCathodeProblem *problem)
Constructor.
void setupWithParameters(InputParameters *params) override
Set attributes from input file. Parameters are passed as arguments in case one wants to use other par...
~FluxAnodeCathodeSolver() override
Destructor.
void initializeAssemblers() override
Creates the LHS assembler.
void solve() override
Solve and postprocess.
CepsSet< CepsAttribute > & getAnodeAttributes() const
Anode attributes.
CepsSet< CepsAttribute > & getCathodeAttributes() const
Cathode attributes.
Solve laplacian equation with backward Euler, constant time step, using Finite Elements.