34 , aux_gradients(dim + 1)
53 const unsigned int n_points = points.size();
54 Assert(values.size() == n_points,
59 std::lock_guard<std::mutex> lock(mutex);
61 for (
unsigned int d = 0; d < dim + 1; ++d)
62 aux_values[d].resize(n_points);
63 vector_values(points, aux_values);
65 for (
unsigned int k = 0;
k < n_points; ++
k)
69 for (
unsigned int d = 0; d < dim + 1; ++d)
70 values[
k](d) = aux_values[d][
k];
80 Assert(value.size() == dim + 1,
83 const unsigned int n_points = 1;
84 std::vector<Point<dim>> points(1);
89 std::lock_guard<std::mutex> lock(mutex);
91 for (
unsigned int d = 0; d < dim + 1; ++d)
92 aux_values[d].resize(n_points);
93 vector_values(points, aux_values);
95 for (
unsigned int d = 0; d < dim + 1; ++d)
96 value(d) = aux_values[d][0];
106 const unsigned int n_points = 1;
107 std::vector<Point<dim>> points(1);
112 std::lock_guard<std::mutex> lock(mutex);
114 for (
unsigned int d = 0; d < dim + 1; ++d)
115 aux_values[d].resize(n_points);
116 vector_values(points, aux_values);
118 return aux_values[
comp][0];
128 const unsigned int n_points = points.size();
129 Assert(values.size() == n_points,
134 std::lock_guard<std::mutex> lock(mutex);
136 for (
unsigned int d = 0; d < dim + 1; ++d)
137 aux_gradients[d].resize(n_points);
138 vector_gradients(points, aux_gradients);
140 for (
unsigned int k = 0;
k < n_points; ++
k)
144 for (
unsigned int d = 0; d < dim + 1; ++d)
145 values[
k][d] = aux_gradients[d][
k];
156 const unsigned int n_points = points.size();
157 Assert(values.size() == n_points,
162 std::lock_guard<std::mutex> lock(mutex);
164 for (
unsigned int d = 0; d < dim + 1; ++d)
165 aux_values[d].resize(n_points);
166 vector_laplacians(points, aux_values);
168 for (
unsigned int k = 0;
k < n_points; ++
k)
172 for (
unsigned int d = 0; d < dim + 1; ++d)
173 values[
k](d) = aux_values[d][
k];
191 : inv_sqr_radius(1 /
r /
r)
203 std::vector<std::vector<double>> &values)
const
205 const unsigned int n = points.size();
207 Assert(values.size() == dim + 1,
209 for (
unsigned int d = 0; d < dim + 1; ++d)
212 for (
unsigned int k = 0;
k < n; ++
k)
218 for (
unsigned int d = 1; d < dim; ++d)
220 r2 *= inv_sqr_radius;
223 values[0][
k] = 1. -
r2;
225 for (
unsigned int d = 1; d < dim; ++d)
228 values[dim][
k] = -2 * (dim - 1) * inv_sqr_radius * p[0] / Reynolds +
241 const unsigned int n = points.size();
243 Assert(values.size() == dim + 1,
245 for (
unsigned int d = 0; d < dim + 1; ++d)
248 for (
unsigned int k = 0;
k < n; ++
k)
252 values[0][
k][0] = 0.;
253 for (
unsigned int d = 1; d < dim; ++d)
254 values[0][
k][d] = -2. * p[d] * inv_sqr_radius;
256 for (
unsigned int d = 1; d < dim; ++d)
259 values[dim][
k][0] = -2 * (dim - 1) * inv_sqr_radius / Reynolds;
260 for (
unsigned int d = 1; d < dim; ++d)
261 values[dim][
k][d] = 0.;
271 std::vector<std::vector<double>> &values)
const
273 const unsigned int n = points.size();
275 Assert(values.size() == dim + 1,
277 for (
unsigned int d = 0; d < dim + 1; ++d)
280 for (
auto &point_values : values)
281 std::fill(point_values.begin(), point_values.end(), 0.);
307 std::vector<std::vector<double>> &values)
const
309 unsigned int n = points.size();
311 Assert(values.size() == dim + 1,
313 for (
unsigned int d = 0; d < dim + 1; ++d)
316 for (
unsigned int k = 0;
k < n; ++
k)
330 values[2][
k] =
cx *
sx *
cy *
sy + this->mean_pressure;
341 values[3][
k] =
cx *
sx *
cy *
sy *
cz *
sz + this->mean_pressure;
358 unsigned int n = points.size();
360 Assert(values.size() == dim + 1,
362 for (
unsigned int d = 0; d < dim + 1; ++d)
365 for (
unsigned int k = 0;
k < n; ++
k)
374 const double cx2 = .5 + .5 *
c2x;
375 const double cy2 = .5 + .5 *
c2y;
391 const double cz2 = .5 + .5 *
c2z;
422 std::vector<std::vector<double>> &values)
const
424 unsigned int n = points.size();
426 Assert(values.size() == dim + 1,
428 for (
unsigned int d = 0; d < dim + 1; ++d)
433 vector_values(points, values);
434 for (
unsigned int d = 0; d < dim; ++d)
435 for (
double &point_value : values[d])
436 point_value *= -reaction;
440 for (
unsigned int d = 0; d < dim; ++d)
441 std::fill(values[d].begin(), values[d].end(), 0.);
445 for (
unsigned int k = 0;
k < n; ++
k)
458 values[0][
k] += -viscosity *
pi2 * (1. + 2. *
c2x) *
s2y -
460 values[1][
k] += viscosity *
pi2 *
s2x * (1. + 2. *
c2y) -
473 values[1][
k] += .5 * viscosity *
pi2 *
s2x * (1. + 2. *
c2y) *
s2z -
494 , coslo(
std::cos(lambda * omega))
546 const std::vector<
Point<2>> &points,
547 std::vector<std::vector<double>> &values)
const
549 unsigned int n = points.size();
552 for (
unsigned int d = 0; d < 2 + 1; ++d)
555 for (
unsigned int k = 0;
k < n; ++
k)
558 const double x = p[0];
559 const double y = p[1];
561 if ((
x < 0) || (
y < 0))
564 const double r2 =
x *
x +
y *
y;
576 for (
unsigned int d = 0; d < 3; ++d)
586 const std::vector<
Point<2>> &points,
589 unsigned int n = points.size();
592 for (
unsigned int d = 0; d < 2 + 1; ++d)
595 for (
unsigned int k = 0;
k < n; ++
k)
598 const double x = p[0];
599 const double y = p[1];
601 if ((
x < 0) || (
y < 0))
604 const double r2 =
x *
x +
y *
y;
636 for (
unsigned int d = 0; d < 3; ++d)
646 const std::vector<
Point<2>> &points,
647 std::vector<std::vector<double>> &values)
const
649 unsigned int n = points.size();
652 for (
unsigned int d = 0; d < 2 + 1; ++d)
655 for (
auto &point_values : values)
656 std::fill(point_values.begin(), point_values.end(), 0.);
680 std::vector<std::vector<double>> &values)
const
682 unsigned int n = points.size();
685 for (
unsigned int d = 0; d < 2 + 1; ++d)
688 for (
unsigned int k = 0;
k < n; ++
k)
691 const double x = p[0];
704 const std::vector<
Point<2>> &points,
705 std::vector<std::vector<
Tensor<1, 2>>> &gradients)
const
707 unsigned int n = points.size();
713 for (
unsigned int i = 0; i < n; ++i)
715 const double x = points[i][0];
716 const double y = points[i][1];
729 gradients[2][i][1] = 0.;
737 std::vector<std::vector<double>> &values)
const
739 unsigned int n = points.size();
741 for (
unsigned int d = 0; d < 2 + 1; ++d)
747 for (
unsigned int k = 0;
k < n; ++
k)
750 const double x = p[0];
751 const double y =
zp * p[1];
760 values[0][
k] =
u *
ux + v *
uy;
761 values[1][
k] =
u *
vx + v *
vy;
767 for (
auto &point_values : values)
768 std::fill(point_values.begin(), point_values.end(), 0.);
106 const unsigned int n_points = 1; {
…}
100 template <
int dim> {
…}
65 for (
unsigned int k = 0;
k < n_points; ++
k) {
…}
53 const unsigned int n_points = points.size(); {
…}
virtual void vector_value_list(const std::vector< Point< dim > > &points, std::vector< Vector< double > > &values) const override
void pressure_adjustment(double p)
virtual void vector_gradient_list(const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim > > > &gradients) const override
virtual void vector_laplacian_list(const std::vector< Point< dim > > &points, std::vector< Vector< double > > &values) const override
virtual std::size_t memory_consumption() const override
virtual void vector_value(const Point< dim > &points, Vector< double > &value) const override
virtual double value(const Point< dim > &points, const unsigned int component) const override
Kovasznay(const double Re, bool Stokes=false)
virtual void vector_values(const std::vector< Point< 2 > > &points, std::vector< std::vector< double > > &values) const override
virtual void vector_gradients(const std::vector< Point< 2 > > &points, std::vector< std::vector< Tensor< 1, 2 > > > &gradients) const override
virtual void vector_laplacians(const std::vector< Point< 2 > > &points, std::vector< std::vector< double > > &values) const override
double lambda() const
The value of lambda.
PoisseuilleFlow(const double r, const double Re)
virtual void vector_gradients(const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim > > > &gradients) const override
virtual void vector_values(const std::vector< Point< dim > > &points, std::vector< std::vector< double > > &values) const override
virtual void vector_laplacians(const std::vector< Point< dim > > &points, std::vector< std::vector< double > > &values) const override
virtual void vector_values(const std::vector< Point< dim > > &points, std::vector< std::vector< double > > &values) const override
StokesCosine(const double viscosity=1., const double reaction=0.)
void set_parameters(const double viscosity, const double reaction)
virtual void vector_gradients(const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim > > > &gradients) const override
virtual void vector_laplacians(const std::vector< Point< dim > > &points, std::vector< std::vector< double > > &values) const override
static const double lambda
virtual void vector_gradients(const std::vector< Point< 2 > > &points, std::vector< std::vector< Tensor< 1, 2 > > > &gradients) const override
virtual void vector_values(const std::vector< Point< 2 > > &points, std::vector< std::vector< double > > &values) const override
double Psi_1(double phi) const
The derivative of Psi()
double Psi(double phi) const
The auxiliary function Psi.
const double lp
Auxiliary variable 1+lambda.
const double lm
Auxiliary variable 1-lambda.
virtual void vector_laplacians(const std::vector< Point< 2 > > &points, std::vector< std::vector< double > > &values) const override
double Psi_3(double phi) const
The 3rd derivative of Psi()
StokesLSingularity()
Constructor setting up some data.
double Psi_4(double phi) const
The 4th derivative of Psi()
double Psi_2(double phi) const
The 2nd derivative of Psi()
const double coslo
Cosine of lambda times omega.
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define DEAL_II_NOT_IMPLEMENTED()
::VectorizedArray< Number, width > exp(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > cos(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sin(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > pow(const ::VectorizedArray< Number, width > &, const Number p)