16 #ifndef dealii_derivative_form_h 17 #define dealii_derivative_form_h 19 #include <deal.II/base/tensor.h> 21 DEAL_II_NAMESPACE_OPEN
57 template <
int order,
int dim,
int spacedim,
typename Number =
double>
152 <<
"Invalid DerivativeForm index " << arg1);
174 template <
int order,
int dim,
int spacedim,
typename Number>
179 ExcMessage(
"Only allowed for forms with dim==spacedim."));
181 for (
unsigned int j = 0; j < dim; ++j)
187 template <
int order,
int dim,
int spacedim,
typename Number>
195 for (
unsigned int j = 0; j < dim; ++j)
202 template <
int order,
int dim,
int spacedim,
typename Number>
207 Assert((1 == spacedim) && (order == 1),
208 ExcMessage(
"Only allowed for spacedim==1 and order==1."));
217 template <
int order,
int dim,
int spacedim,
typename Number>
228 template <
int order,
int dim,
int spacedim,
typename Number>
240 template <
int order,
int dim,
int spacedim,
typename Number>
244 Assert((1 == spacedim) && (order == 1),
252 template <
int order,
int dim,
int spacedim,
typename Number>
261 for (
unsigned int j = 0; j < dim; ++j)
269 template <
int order,
int dim,
int spacedim,
typename Number>
276 for (
unsigned int i = 0; i < spacedim; ++i)
277 for (
unsigned int j = 0; j < dim; ++j)
278 tt[j][i] = (*
this)[i][j];
285 template <
int order,
int dim,
int spacedim,
typename Number>
292 for (
unsigned int i = 0; i < spacedim; ++i)
293 for (
unsigned int j = 0; j < dim; ++j)
294 dest[i][j] = (*
this)[i] * T[j];
301 template <
int order,
int dim,
int spacedim,
typename Number>
306 for (
unsigned int i = 0; i < spacedim; ++i)
307 sum_of_squares += tensor[i].norm_square();
308 return std::sqrt(sum_of_squares);
313 template <
int order,
int dim,
int spacedim,
typename Number>
329 for (
unsigned int i = 0; i < dim; ++i)
330 for (
unsigned int j = 0; j < dim; ++j)
331 G[i][j] = DF_t[i] * DF_t[j];
339 template <
int order,
int dim,
int spacedim,
typename Number>
353 for (
unsigned int i = 0; i < dim; ++i)
354 for (
unsigned int j = 0; j < dim; ++j)
355 G[i][j] = DF_t[i] * DF_t[j];
357 return (this->times_T_t(
invert(G)));
362 template <
int order,
int dim,
int spacedim,
typename Number>
395 template <
int spacedim,
int dim,
typename Number>
401 for (
unsigned int i = 0; i < spacedim; ++i)
402 dest[i] = grad_F[i] * d_x;
417 template <
int spacedim,
int dim,
typename Number>
423 for (
unsigned int i = 0; i < dim; ++i)
445 template <
int spacedim,
int dim,
typename Number>
452 for (
unsigned int i = 0; i < spacedim; ++i)
466 template <
int dim,
int spacedim,
typename Number>
476 DEAL_II_NAMESPACE_CLOSE
Number determinant(const SymmetricTensor< 2, dim, Number > &)
SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &t)
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define DeclException1(Exception1, type1, outsequence)
#define Assert(cond, exc)
Number determinant(const SymmetricTensor< 2, dim, Number > &t)
static ::ExceptionBase & ExcInvalidTensorIndex(int arg1)