37 m_sigmaOpts (
"CONSTANT 1. 0. 0. 0. 1. 0. 0. 0. 1.")
77 std::stringstream ssa,ssc;
84 +
"UNKNOWN 0 ATTRIBUTES " + ssa.str());
86 +
"UNKNOWN 0 ATTRIBUTES " + ssc.str());
std::basic_string< CepsChar > CepsString
C++ format string.
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.
virtual void defineAnalyticSolution()
Set directly the analytic function, default sets no solution, unless there is a collection of referen...
void addUnknown(const CepsString &label, CepsSet< CepsAttribute > attrs={}, CepsLocationFlag flag=CepsLocationFlag::Point, const CepsString &unit="")
Register a new unknown.
InputParameters * m_parameters
Input file data.
Geometry * m_geom
Link to geometry on which the pb is defined.
BoundaryConditionManager * m_boundaryConditions
All BCs should be there.
FunctionDictionary * m_functions
Collection of custom functions.
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.
void solve() override
Solves the whole PDE in time.
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.
DirichletAnodeCathodeProblem(Geometry *g, InputParameters *p=nullptr)
Constructor from geometry and optional input file.
void run() override
Run does nothing. The tests call directly a LaplacianSolver solve method.
TensorSAFunc * getDiffusionTensor() const
Diffusion tensor.
~DirichletAnodeCathodeProblem() override
Destructor.
void defineAnalyticSolution() override
No analytic solution.
void setupWithParameters(InputParameters *p) override
Sets the diffusion tensor.
CepsString m_sigmaOpts
Text input for conductivity.
void defineSourceTerms() override
No source term.
void defineUnknowns() override
Lists the unknowns of the problem (one here)
void defineBoundaryConditions() override
Dirichlet 1/0 on electrodes, neumann 0 elsewhere.
DirichletAnodeCathode solver with custom stiffness tensor.
Base class for electrode objects. This one just holds attributes and size, and has very few options.
void addConstant(const CepsString &label, const CepsString ¶ms)
Add a constant function through parameter string.
const TensorEntry getTensor(const CepsString &label) const
Get a single tensor entry, const version.
void add(const CepsString &label, const CepsString ¶ms, Geometry *geom=nullptr)
Add an object from parameters.
Encapsulates all the geometrical data.
An abstract class for objects (problems) that have an anode and a cathode The template argument must ...
ElectrodeBase * m_anode
Electrode object.
ElectrodeBase * m_cathode
Electrode object.
Laplacian PDE, single unknown, constant stiffness coefficient.
void stop(CepsString lbl)
Stops the measure of a labeled chronometer.
void start(CepsString lbl, CepsString dspl="")
Creates or continue a labeled chronometer.
A SAFunc is a ceps::Function that uses CepsStandardArgs as argument of call operator (),...
CepsSet< CepsAttribute > & getAttributes()
Returns the attributes of the entity.
CepsBool isProfiling()
Check if we are currently profiling on the master proc (always false on slave procs).