79 std::stringstream ssa,ssc;
91 CEPS_ABORT_IF(options.size() != 2,
"robin coefficient entry requires a scalar and an attribute");
92 m_boundaryConditions->
add(
"boundary ROBIN 0.0 UNKNOWN 0 ATTRIBUTES " + options[1] +
" ROBINCOEFF " + options[0]);
#define CEPS_ABORT_IF(condition, message)
Stops the execution with a message if condition is true. If testing is enabled, only throws a runtime...
CepsInt CepsAttribute
Used to define regions.
CepsBool hasAnalyticSolution() const
Tells if there is an analytic or reference solution.
void setProblemName(const CepsString &name)
Set the name of the problem.
void addUnknown(const CepsString &label, CepsSet< CepsAttribute > attrs={}, CepsLocationFlag flag=CepsLocationFlag::Point, const CepsString &unit="")
Register a new unknown.
void addZeroDUnknown(CepsString label, const CepsString &unit="")
Register a new unknown, defined outside of geometry.
CepsBool m_ignoreZeroDError
Ignore 0D unknowns when computing errors.
void addUnknownInteraction(CepsString label1, CepsString label2, CepsSet< CepsAttribute > attrs={})
Register interaction between unknowns. Also sets the interaction within Unknown instances label1 and ...
InputParameters * m_parameters
Input file data.
BoundaryConditionManager * m_boundaryConditions
All BCs should be there.
void initializeEquation() override
Initializes equations (unknowns, bc, source term) and creates the spatial discretization This method ...
CepsArray2< CepsArray3< CepsReal > > m_errors
Will store Linf, L1 and L2 relative errors.
CepsArray2< CepsArray3< CepsReal > > getErrors() const
Gets the currently computed errors. First index selects absolute(0) orrelative(1) second index is L-i...
void add(const CepsString ¶ms)
Add a boundary condition term from parameters.
Profiler * getProfiler() const
Access to profiler.
Poisson equation with Dirichlet 1 on anode, 0 on cathode. Neumann elsewhere. Functional tensorial con...
void setupWithParameters(InputParameters *p) override
Sets the diffusion tensor.
CepsBool requireNullMean() const
Tells if this problem requires a null mean constraint.
void defineAnalyticSolution() override
No analytic solution.
void run() override
Run does nothing. The tests call directly a LaplacianSolver solve method.
~FluxAnodeCathodeProblem() override
Destructor.
void defineSourceTerms() override
No source term.
void setupWithParameters(InputParameters *p) override
Sets the parameters.
FluxAnodeCathodeProblem(Geometry *g, InputParameters *p=nullptr)
Constructor from geometry and optional input file.
void defineUnknowns() override
Lists the unknowns of the problem (one here)
CepsString m_robinCoeffs
Robin coefficients.
void defineBoundaryConditions() override
Neumann -1/1 and 0 elsewhere.
Solver for a Poisson equation with Neumann BC (using 0 mean constraint)
void solve() override
Solve and postprocess.
Encapsulates all the geometrical data.
ElectrodeBase * m_anode
Electrode object.
ElectrodeBase * m_cathode
Electrode object.
void stop(CepsString lbl)
Stops the measure of a labeled chronometer.
void start(CepsString lbl, CepsString dspl="")
Creates or continue a labeled chronometer.
CepsSet< CepsAttribute > & getAttributes()
Returns the attributes of the entity.
CepsVector< CepsString > split(const CepsString &s, const CepsString &delimiters=CepsString(" \t"))
Splits a string using mulitple delimiters in a single string.
CepsBool isProfiling()
Check if we are currently profiling on the master proc (always false on slave procs).