24 #ifndef BackwardEulerProblem_H_
25 #define BackwardEulerProblem_H_
50 template<
typename OPTPROBLEM,
typename SPARSITYPATTERN,
typename VECTOR,
51 int dopedim,
int dealdim,
template<
int,
int>
class FE = dealii::FESystem,
52 template<
int,
int>
class DH = dealii::DoFHandler>
54 SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH>
58 PrimalTSBase<OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim,
61 initial_problem_ = NULL;
65 if (initial_problem_ != NULL)
66 delete initial_problem_;
79 return "backward Euler";
89 dealdim, FE, DH>, VECTOR, dealdim>&
92 if (initial_problem_ == NULL)
96 dopedim, dealdim, FE, DH>, VECTOR, dealdim>(*this);
98 return *initial_problem_;
149 template<
typename EDC>
152 dealii::Vector<double> &local_vector,
double scale,
double )
156 dealii::Vector<double> tmp(local_vector);
164 this->
GetProblem().ElementTimeEquation(edc, tmp, scale);
167 this->
GetProblem().ElementTimeEquationExplicit(edc, local_vector,
170 else if (this->
GetPart() ==
"Old")
172 this->
GetProblem().ElementTimeEquation(edc, local_vector,
202 template<
typename EDC>
205 dealii::Vector<double> &local_vector,
double scale)
209 this->
GetProblem().ElementRhs(edc, local_vector,
212 else if (this->
GetPart() ==
"Old")
249 const std::map<std::string,
const dealii::Vector<double>*> ¶m_values,
250 const std::map<std::string, const VECTOR*> &domain_values,
251 VECTOR& rhs_vector,
double scale)
255 this->
GetProblem().PointRhs(param_values, domain_values, rhs_vector,
258 else if (this->
GetPart() ==
"Old")
300 template<
typename EDC>
303 dealii::FullMatrix<double> &local_matrix)
305 assert(this->
GetPart() ==
"New");
306 dealii::FullMatrix<double> m(local_matrix);
308 this->
GetProblem().ElementMatrix(edc, local_matrix,
313 local_matrix.add(1.0, m);
316 this->
GetProblem().ElementTimeMatrixExplicit(edc, m);
317 local_matrix.add(1.0, m);
338 template<
typename FDC>
341 dealii::Vector<double> &local_vector,
double scale,
346 this->
GetProblem().FaceEquation(fdc, local_vector,
350 else if (this->
GetPart() ==
"Old")
377 template<
typename FDC>
380 dealii::Vector<double> &local_vector,
double scale,
385 this->
GetProblem().InterfaceEquation(fdc, local_vector,
389 else if (this->
GetPart() ==
"Old")
414 template<
typename FDC>
417 dealii::Vector<double> &local_vector,
double scale = 1.)
436 template<
typename FDC>
439 dealii::FullMatrix<double> &local_matrix)
441 assert(this->
GetPart() ==
"New");
442 this->
GetProblem().FaceMatrix(fdc, local_matrix,
460 template<
typename FDC>
463 dealii::FullMatrix<double> &local_matrix)
465 assert(this->
GetPart() ==
"New");
466 this->
GetProblem().InterfaceMatrix(fdc, local_matrix,
487 template<
typename FDC>
490 dealii::Vector<double> &local_vector,
double scale,
495 this->
GetProblem().BoundaryEquation(fdc, local_vector,
498 else if (this->
GetPart() ==
"Old")
523 template<
typename FDC>
526 dealii::Vector<double> &local_vector,
double scale)
528 this->
GetProblem().BoundaryRhs(fdc, local_vector,
546 template<
typename FDC>
549 dealii::FullMatrix<double> &local_matrix)
551 assert(this->
GetPart() ==
"New");
552 this->
GetProblem().BoundaryMatrix(fdc, local_matrix,
559 dealdim, FE, DH>, VECTOR, dealdim> * initial_problem_;
void FaceRhs(const FDC &fdc, dealii::Vector< double > &local_vector, double scale=1.)
Definition: backward_euler_problem.h:416
void ElementEquation(const EDC &edc, dealii::Vector< double > &local_vector, double scale, double)
Definition: backward_euler_problem.h:151
void InterfaceEquation(const FDC &fdc, dealii::Vector< double > &local_vector, double scale, double)
Definition: backward_euler_problem.h:379
void PointRhs(const std::map< std::string, const dealii::Vector< double > * > ¶m_values, const std::map< std::string, const VECTOR * > &domain_values, VECTOR &rhs_vector, double scale)
Definition: backward_euler_problem.h:248
void BoundaryMatrix(const FDC &fdc, dealii::FullMatrix< double > &local_matrix)
Definition: backward_euler_problem.h:548
void ElementRhs(const EDC &edc, dealii::Vector< double > &local_vector, double scale)
Definition: backward_euler_problem.h:204
BackwardEulerProblem(OPTPROBLEM &OP)
Definition: backward_euler_problem.h:57
Definition: primal_ts_base.h:49
Definition: backward_euler_problem.h:53
void BoundaryEquation(const FDC &fdc, dealii::Vector< double > &local_vector, double scale, double)
Definition: backward_euler_problem.h:489
InitialProblem< BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >, VECTOR, dealdim > & GetInitialProblem()
Definition: backward_euler_problem.h:90
BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH > & GetBaseProblem()
Definition: backward_euler_problem.h:111
void BoundaryRhs(const FDC &fdc, dealii::Vector< double > &local_vector, double scale)
Definition: backward_euler_problem.h:525
~BackwardEulerProblem()
Definition: backward_euler_problem.h:63
Definition: initialproblem.h:42
OPTPROBLEM & GetProblem()
Definition: ts_base.h:480
std::string GetName()
Definition: backward_euler_problem.h:77
std::string GetPart() const
Definition: ts_base.h:493
void FaceEquation(const FDC &fdc, dealii::Vector< double > &local_vector, double scale, double)
Definition: backward_euler_problem.h:340
void FaceMatrix(const FDC &fdc, dealii::FullMatrix< double > &local_matrix)
Definition: backward_euler_problem.h:438
void InterfaceMatrix(const FDC &fdc, dealii::FullMatrix< double > &local_matrix)
Definition: backward_euler_problem.h:462
void ElementMatrix(const EDC &edc, dealii::FullMatrix< double > &local_matrix)
Definition: backward_euler_problem.h:302