44 m_pdeSnapshotTime(0.1)
84 "Pde time step must be strictly positive"
99 "Pde output periodicity is lower than time step, output will be set to 1 per time step"
103 "Pde output periodicity must be strictly positive"
142 return std::abs(tt-std::round(tt)) < 1.e-3;
#define CEPS_WARNS_IF(condition, message)
If condition is true, writes a warning in the debug log and in the terminal (stderr).
#define CEPS_ABORT_IF(condition, message)
Stops the execution with a message if condition is true. If testing is enabled, only throws a runtime...
CepsArray< _Type, 2U > CepsArray2
C++ array, 2 elements.
float CepsReal
Need single precision floating point.
std::shared_ptr< DistributedHaloVector > DHVecPtr
Typedef for pointer on Distributed Halo CepsVector.
void evaluateFunctionOnDofs(ceps::Function< CepsReal(CepsStandardArgs)> *func, DHVecPtr v, CepsReal t=0.) const
Fills vector v with values of function func at owned and halo dofs and time t.
Base class for creating PDEs to solve.
CepsBool hasAnalyticSolution() const
Tells if there is an analytic or reference solution.
CepsString m_refSolFiles
base name of reference solution file, if any
AbstractDiscretization * m_discr
Discretization method (eg FE for now)
CepsReal m_refSolSnapDt
reference solution output period
InputParameters * m_parameters
Input file data.
virtual void initializeEquation()
Initializes equations (unknowns, bc, source term) and creates the spatial discretization This method ...
void setTimes(CepsReal tStart, CepsReal tEnd, CepsReal dt)
Define the start and end times, also time step.
CepsReal m_pdeEndTime
End time.
CepsReal m_pdeTimeStep
Time Step for the PDE.
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > getErrors() const
Get the errors.
virtual void getInitialCondition(DHVecPtr v) const
Build vector from function pointed by m_initialCondition.
CepsReal getTimeStep() const
pde time step
AbstractTimedPdeProblem(Geometry *geom, InputParameters *params=nullptr)
Constructor with geometry and optional parameters.
CepsReal m_pdeStartTime
Initial time.
ScalarFunction * m_initialCondition
Function defining the initial condition, which is 0 if pointer is null.
void setupWithParameters(InputParameters *params) override
Set attributes from input file. Parameters are passed as arguments in case one wants to use other par...
void setSnapshotTime(CepsReal st)
Periodicity of outputs, in time units.
CepsReal getEndTime() const override
pde end time
void initializeEquation() override
Initializes equations (unknowns, bc, source term) and creates the spatial discretization This method ...
CepsReal getStartTime() const override
pde start time
CepsReal m_pdeSnapshotTime
Periodicity of outputs.
CepsBool canComputeErrorAtTime(CepsReal t) const
Tells if either analytic solution or reference solution has a snapshot at time t.
CepsReal getSnapshotTime() const override
Periodicity of outputs, in time units.
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > m_errors
Will store Linf, L1 and L2 relative errors.
virtual void defineInitialCondition()
Sets the pointer on function for initial guess. Here it is set to nullptr, so it will be 0.
Encapsulates all the geometrical data.
CepsBool isValidPtr(_Type *ptr)
Tells if pointer is not null.
const _Type & max(const CepsVector< _Type, _Alloc > &vec)
Returns the maximum of the vector, const version.
const _Type & min(const CepsVector< _Type, _Alloc > &vec)
Returns the minimum of the vector, const version.
CepsBool equals(CepsReal a, CepsReal b, CepsReal error=1.0)
CepsReal equality up to machine precision.