12 #include <deal.II/base/types.h>
13 #define BOOST_ALLOW_DEPRECATED_HEADERS
15 #include "static_scalar_input.hpp"
18 using namespace StaticScalarSolver;
21 #pragma GCC diagnostic push
22 #pragma GCC diagnostic ignored "-Wunused-parameter"
27 types::material_id mid,
29 std::vector<double>& values)
const
31 Assert(r.size() == values.size(),
32 ExcDimensionMismatch(r.size(), values.size()));
34 auto v = values.begin();
36 *v = ep_0 * (pow(p[0], 2) * pow(p[1], 2) + 1);
44 types::material_id mid,
46 std::vector<double>& values)
const
48 Assert(r.size() == values.size(),
49 ExcDimensionMismatch(r.size(), values.size()));
51 auto v = values.begin();
53 *v = ep_0 * (pow(p[0], 2) * pow(p[1], 2) * pow(p[2], 2) + 1);
61 types::material_id mid,
63 std::vector<double>& values)
const
65 Assert(r.size() == values.size(),
66 ExcDimensionMismatch(r.size(), values.size()));
68 auto v = values.begin();
72 (2 * p[0] * pow(p[1], 2) * sin(k * p[0]) +
73 2 * p[1] * pow(p[0], 2) * sin(k * p[1]) +
74 k * (pow(p[0], 2) * pow(p[1], 2) + 1) * (cos(k * p[0]) + cos(k * p[1])));
82 types::material_id mid,
84 std::vector<double>& values)
const
86 Assert(r.size() == values.size(),
87 ExcDimensionMismatch(r.size(), values.size()));
89 auto v = values.begin();
92 (2 * p[0] * pow(p[1], 2) * pow(p[2], 2) * sin(k * p[0]) +
93 2 * p[1] * pow(p[0], 2) * pow(p[2], 2) * sin(k * p[1]) +
94 2 * p[2] * pow(p[1], 2) * pow(p[0], 2) * sin(k * p[2]) +
95 k * (pow(p[0], 2) * pow(p[1], 2) * pow(p[2], 2) + 1) *
96 (cos(k * p[0]) + cos(k * p[1]) + cos(k * p[2])));
104 types::material_id mid,
106 std::vector<Tensor<1, 2>>& values)
const
108 Assert(r.size() == values.size(),
109 ExcDimensionMismatch(r.size(), values.size()));
111 for (
unsigned int i = 0; i < values.size(); i++) {
120 types::material_id mid,
122 std::vector<Tensor<1, 3>>& values)
const
124 Assert(r.size() == values.size(),
125 ExcDimensionMismatch(r.size(), values.size()));
127 for (
unsigned int i = 0; i < values.size(); i++) {
137 const std::vector<Tensor<1, 2>>& n,
138 types::boundary_id bid,
139 types::material_id mid,
142 std::vector<double>& values)
const
144 Assert(r.size() == values.size(),
145 ExcDimensionMismatch(r.size(), values.size()));
147 auto v = values.begin();
149 *v = (ep_0 * (pow(p[0], 2) * pow(p[1], 2) + 1)) * (p.norm() + 2);
157 const std::vector<Tensor<1, 3>>& n,
158 types::boundary_id bid,
159 types::material_id mid,
162 std::vector<double>& values)
const
164 Assert(r.size() == values.size(),
165 ExcDimensionMismatch(r.size(), values.size()));
167 auto v = values.begin();
169 *v = (ep_0 * (pow(p[0], 2) * pow(p[1], 2) * pow(p[2], 2) + 1)) *
178 const std::vector<Tensor<1, 2>>& n,
179 types::boundary_id bid,
180 types::material_id mid,
183 std::vector<double>& values)
const
186 Assert(r.size() == values.size(),
187 ExcDimensionMismatch(r.size(), values.size()));
192 Tensor<1, 2> grad_phi;
194 auto v = values.begin();
197 epsilon = ep_0 * (pow(p[0], 2) * pow(p[1], 2) + 1);
198 phi = cos(k * p[0]) + cos(k * p[1]);
199 grad_phi[0] = -k * sin(k * p[0]);
200 grad_phi[1] = -k * sin(k * p[1]);
201 gamma = epsilon * (p.norm() + 2);
203 *v = epsilon * (*nn * grad_phi) + gamma * phi;
212 const std::vector<Tensor<1, 3>>& n,
213 types::boundary_id bid,
214 types::material_id mid,
217 std::vector<double>& values)
const
220 Assert(r.size() == values.size(),
221 ExcDimensionMismatch(r.size(), values.size()));
226 Tensor<1, 3> grad_phi;
228 auto v = values.begin();
231 epsilon = ep_0 * (pow(p[0], 2) * pow(p[1], 2) * pow(p[2], 2) + 1);
232 phi = (cos(k * p[0]) + cos(k * p[1]) + cos(k * p[2]));
233 grad_phi[0] = -k * sin(k * p[0]);
234 grad_phi[1] = -k * sin(k * p[1]);
235 grad_phi[2] = -k * sin(k * p[2]);
236 gamma = epsilon * (p.norm() + 2);
237 *v = epsilon * (*nn * grad_phi) + gamma * phi;
246 const std::vector<Tensor<1, 2>>& n,
247 types::material_id mid,
250 std::vector<double>& values)
const
252 Assert(r.size() == values.size(),
253 ExcDimensionMismatch(r.size(), values.size()));
255 for (
unsigned int i = 0; i < values.size(); i++)
262 const std::vector<Tensor<1, 3>>& n,
263 types::material_id mid,
266 std::vector<double>& values)
const
268 Assert(r.size() == values.size(),
269 ExcDimensionMismatch(r.size(), values.size()));
271 for (
unsigned int i = 0; i < values.size(); i++)
289 #pragma GCC diagnostic pop
void value_list(const std::vector< Point< dim >> &r, const std::vector< Tensor< 1, dim >> &n, types::material_id mid, unsigned int cuid, unsigned int fuid, std::vector< double > &values) const
Computes the right-hand side of the second continuity condition ( , , , or ).
void value_list(const std::vector< Point< dim >> &r, const std::vector< Tensor< 1, dim >> &n, types::boundary_id bid, types::material_id mid, unsigned int cuid, unsigned int fuid, std::vector< double > &values) const
Computes the coefficient at quadrature points.
void value_list(const std::vector< Point< dim >> &r, types::material_id mid, unsigned int cuid, std::vector< Tensor< 1, dim >> &values) const
Computes the two-dimensional free-current density on the right-hand side of the partial differential...
void value_list(const std::vector< Point< dim >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const
Computes the right-hand side of the div-grad partial differential equation at quadrature points.
void value_list(const std::vector< Point< dim >> &r, const std::vector< Tensor< 1, dim >> &n, types::boundary_id bid, types::material_id mid, unsigned int cuid, unsigned int fuid, std::vector< double > &values) const
Computes the right-hand side of the Robin boundary condition ( or ).
void value_list(const std::vector< Point< dim >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const
Computes the values of the coefficient at quadrature points.
virtual double value(const Point< dim > &r, const unsigned int component=0) const override final
Returns the value of weight at point r. All error norms, , , and , at point r will be multiplied by t...