31 std::vector<std::vector<Polynomials::Polynomial<double>>>
32 get_abf_polynomials(
const unsigned int k)
34 std::vector<std::vector<Polynomials::Polynomial<double>>> pols(dim);
38 for (
unsigned int d = 1;
d < dim; ++
d)
41 for (
unsigned int d = 1;
d < dim; ++
d)
71 Assert(values.size() == this->n() || values.empty(),
73 Assert(grads.size() == this->n() || grads.empty(),
75 Assert(grad_grads.size() == this->n() || grad_grads.empty(),
77 Assert(third_derivatives.size() == this->n() || third_derivatives.empty(),
79 Assert(fourth_derivatives.size() == this->n() || fourth_derivatives.empty(),
88 std::lock_guard<std::mutex> lock(
mutex);
90 p_values.resize((values.empty()) ? 0 : n_sub);
91 p_grads.resize((grads.empty()) ? 0 : n_sub);
96 for (
unsigned int d = 0; d < dim; ++d)
110 for (
unsigned int c = 0; c < dim; ++c)
111 p[c] = unit_point[(c + d) % dim];
120 for (
unsigned int i = 0; i <
p_values.size(); ++i)
121 values[i + d * n_sub][d] =
p_values[i];
123 for (
unsigned int i = 0; i <
p_grads.size(); ++i)
124 for (
unsigned int d1 = 0; d1 < dim; ++d1)
125 grads[i + d * n_sub][d][(d1 + d) % dim] =
p_grads[i][d1];
128 for (
unsigned int d1 = 0; d1 < dim; ++d1)
129 for (
unsigned int d2 = 0; d2 < dim; ++d2)
130 grad_grads[i + d * n_sub][d][(d1 + d) % dim][(d2 + d) % dim] =
134 for (
unsigned int d1 = 0; d1 < dim; ++d1)
135 for (
unsigned int d2 = 0; d2 < dim; ++d2)
136 for (
unsigned int d3 = 0; d3 < dim; ++d3)
137 third_derivatives[i + d * n_sub][d][(d1 + d) % dim]
138 [(d2 + d) % dim][(d3 + d) % dim] =
142 for (
unsigned int d1 = 0; d1 < dim; ++d1)
143 for (
unsigned int d2 = 0; d2 < dim; ++d2)
144 for (
unsigned int d3 = 0; d3 < dim; ++d3)
145 for (
unsigned int d4 = 0; d4 < dim; ++d4)
146 fourth_derivatives[i + d * n_sub][d][(d1 + d) % dim]
147 [(d2 + d) % dim][(d3 + d) % dim]
167 return 2 * (k + 3) * (k + 1);
172 return 3 * (k + 3) * (k + 1) * (k + 1);
183std::unique_ptr<TensorPolynomialsBase<dim>>
186 return std::make_unique<PolynomialsABF<dim>>(*this);
std::vector< Tensor< 4, dim > > p_fourth_derivatives
std::vector< Tensor< 2, dim > > p_grad_grads
std::vector< Tensor< 1, dim > > p_grads
std::vector< Tensor< 3, dim > > p_third_derivatives
const AnisotropicPolynomials< dim > polynomial_space
PolynomialsABF(const unsigned int k)
static unsigned int n_polynomials(const unsigned int degree)
std::vector< double > p_values
void evaluate(const Point< dim > &unit_point, std::vector< Tensor< 1, dim > > &values, std::vector< Tensor< 2, dim > > &grads, std::vector< Tensor< 3, dim > > &grad_grads, std::vector< Tensor< 4, dim > > &third_derivatives, std::vector< Tensor< 5, dim > > &fourth_derivatives) const override
virtual std::unique_ptr< TensorPolynomialsBase< dim > > clone() const override
static std::vector< Polynomial< double > > generate_complete_basis(const unsigned int degree)
static std::vector< Polynomial< double > > generate_complete_basis(const unsigned int degree)
TensorPolynomialsBase(const unsigned int deg, const unsigned int n_polynomials)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define DEAL_II_NOT_IMPLEMENTED()
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)