41 m_temp1(m_fe->newDofHaloVector()),
42 m_temp2(m_fe->newDofHaloVector())
171 bc.second->applyAsDirichlet(
m_lhs,
m_rhs, time + dt);
182 #ifdef CEPS_DEBUG_ENABLED
183 m_uNp1->checkNanOrInf(
"in solution vector ");
292 #ifdef CEPS_DEBUG_ENABLED
293 m_uNp1->checkNanOrInf(
"in solution vector ");
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
virtual CepsBool isChangingBetweenTimes(CepsReal t1, CepsReal t2) const
Tells if this assembler changes between the two times.
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.
ScalarFunction * getAnalyticSolution() const
Pointer on analytic or refScalarFunction solution.
CepsBool hasAnalyticSolution() const
Tells if there is an analytic or reference solution.
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.
DMatPtr m_bcMat
Matrix of boundary conditions.
CepsBool m_hasRegSrc
Flag telling if there are regular source terms.
AbstractDiscretization * m_discretization
Link to PDE discretization.
AbstractAssembler * m_bcAsb
Assembler for Robin and Neumann BCs.
LinearSystem * m_linearSystem
Linear system.
DMatPtr m_opMat
Matrix of operator.
DVecPtr m_bcVec
Vector of boundary conditions.
AbstractAssembler * m_opAsb
Assembler for the operator matrix.
CepsBool m_hasLapSrc
Flag telling if there are Delta f source terms.
AbstractPdeProblem * m_problem
Link to PDE to solve.
DMatPtr m_lapSrcMat
Matrix used for laplace source terms.
Astract Problem which does depend on time.
Base class for solving PDE with time dependance.
CepsBool m_cheatConvergence
If true, use exact solution for first steps of multi steps methods.
TimeStepper * m_timeStepper
Monitors time evolution.
virtual void swapMultiStepPointers()
Swaps vectors of array pointers for next step (for multistep methods)
CepsVector< DHVecPtr > m_regSourcesNm
Sources at previous steps (if problem has source terms)
CepsString m_type
Numerical scheme descriptor.
DMatPtr m_dtMat
Matrix of time derivative of the system.
CepsVector< DHVecPtr > m_uNm
Solution vectors at different time steps. Several vectors are needed for multi-step methods....
CepsUInt m_nbMultiSteps
Maximum number of steps needed to compute next solution (eg CN:2)
DVecPtr m_timeDerEqsVec
Vector of 1 or 0, depending on whether the dof equation has a time derivative or not.
CepsVector< DHVecPtr > m_lapSourcesNm
Sources at previous steps (if problem has laplace source terms)
static constexpr CepsReal c_alphaCN[3]
LHS coeffcients of the CN scheme.
CepsReal m_scaleSystem
A factor for both matrix and vector (typically 1/dt)
void updateAssemblers() override
Update assemblers and recompute everything is needed.
static constexpr CepsReal c_alphaSBDF[5]
LHS coeffcients of the SBDF schemes.
DVecPtr m_noTimeDerEqsVec
The opposite version of m_timeDerEqsVec, such as m_timeDerEqsVec + m_noTimeDerEqsVec = vec(1)
DHVecPtr m_uNp1
Vectors of unknowns at time t^n+1.
virtual void fillSourceTermsVector(CepsReal tn)
Adds contributions from all source terms into m_regSourcesNm[0].
static constexpr CepsReal c_akSBDF[4][4]
RHS coeffcients of the SBDF schemes.
Manager * getDirichletBCs() const
Get the manager for Dirichlet conditions.
DHVecPtr m_temp2
Temporary vector for assembly of source terms.
void assembleAndSolveSBDF(CepsUInt nSteps)
Updates matrix and RHS for the SBDF numerical scheme.
FETimedSolver()=delete
Deleted constructor.
void assembleAndSolve() override
Main routine used during solving, assemble the system depending on the scheme and solve the linear sy...
DHVecPtr m_temp1
Temporary vector for assembly of source terms.
void assembleAndSolveCN(CepsUInt nSteps)
Updates matrix and RHS for the CN numerical scheme.
~FETimedSolver() override
Destructor.
FiniteElements * m_fe
Geometry and reference FE.
Holds all finite elements corresponding to each geometrical element.
DMatPtr getMassMatrix() const
Pointer on mass matrix.
virtual void solve(DVecPtr solution)
Solve current linear system. Calls the solver's method.
CepsReal getTimeStep() const
Time step.
virtual CepsReal getTime()
current simulation time
CepsUInt getNbTakenTimeSteps() const
Number of time steps performed until now.
A namespace for all utility methods.
_Derived runtimeCast(_Base x)
Perform a runtime cast between base type and derived type if we can.
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.