This source file includes following definitions.
- assemble_and_addScaled_to
- assemble_and_addScaled_to
- new_sdp_u
- new_sls
- new_sd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #include <config.h>
22 #include "secOrd_op_rhs.h"
23 #include "secOrd_op_rhs_impl.h"
24
25 using Esfem::SecOrd_op::Rhs;
26 using Esfem::SecOrd_op::Vec_rhs;
27 using Esfem::SecOrd_op::sRhs;
28 using Esfem::SecOrd_op::vRhs;
29
30 using FE_function = Esfem::Grid::Scal_FEfun::Dune_FEfun;
31
32 using Vec_FE_function = Esfem::Grid::Vec_FEfun::Dune_FEfun;
33
34
35
36
37 Rhs::Rhs(const Grid::Grid_and_time& gt, const Growth type)
38 :d_ptr {std::make_unique<Data>(gt, type)}
39 {}
40 Rhs::~Rhs() = default;
41 void Rhs::assemble_and_addScaled_to(Grid::Scal_FEfun& fef){
42 assemble_RHS(d_ptr -> rhs, d_ptr -> load_vector);
43 FE_function& dune_fef = fef;
44 dune_fef.axpy(d_ptr -> tp.deltaT(), d_ptr -> load_vector);
45 }
46
47
48
49
50 Vec_rhs::Vec_rhs(const Grid::Grid_and_time& gt)
51 :d_ptr {std::make_unique<Data>(gt)}
52 {}
53 Vec_rhs::~Vec_rhs() = default;
54 void Vec_rhs::assemble_and_addScaled_to(Grid::Vec_FEfun& vfef){
55 assemble_RHS(d_ptr -> rhs, d_ptr -> load_vector);
56 Vec_FE_function& dune_vfef = vfef;
57 dune_vfef.axpy(d_ptr -> tp.deltaT(), d_ptr -> load_vector);
58 }
59
60
61
62
63 sRhs* sRhs::new_sdp_u(Grid::Grid_and_time& gt){
64 return new Impl::sdp_u_rhs {gt};
65 }
66
67
68
69
70 vRhs* vRhs::new_sls(Grid::Grid_and_time& gt){
71 return new Impl::sls_rhs {gt};
72 }
73 vRhs* vRhs::new_sd(Grid::Grid_and_time& gt){
74 return new Impl::sd_rhs {gt};
75 }
76
77
78
79
80 Rhs::Data::Data(const Grid::Grid_and_time& gt, const Growth type)
81 :tp {gt.time_provider()}, rhs {tp, type},
82 load_vector {"load_vector", gt.fe_space()}
83 {}
84
85 Vec_rhs::Data::Data(const Grid::Grid_and_time& gt)
86 :tp {gt.time_provider()}, rhs {tp},
87 load_vector {"vec_load_vector", gt.vec_fe_space()}
88 {}