16 #ifndef dealii_derivative_form_h 17 #define dealii_derivative_form_h 19 #include <deal.II/base/tensor.h> 21 DEAL_II_NAMESPACE_OPEN
55 template <
int order,
int dim,
int spacedim,
typename Number=
double>
142 <<
"Invalid DerivativeForm index " << arg1);
165 template <
int order,
int dim,
int spacedim,
typename Number>
176 template <
int order,
int dim,
int spacedim,
typename Number>
180 Assert( (dim == spacedim),
181 ExcMessage(
"Only allowed for forms with dim==spacedim."));
183 for (
unsigned int j=0; j<dim; ++j)
190 template <
int order,
int dim,
int spacedim,
typename Number>
195 Assert( (dim == spacedim),
196 ExcMessage(
"Only allowed when dim==spacedim."));
199 for (
unsigned int j=0; j<dim; ++j)
207 template <
int order,
int dim,
int spacedim,
typename Number>
212 Assert( (1 == spacedim) && (order==1),
213 ExcMessage(
"Only allowed for spacedim==1 and order==1."));
223 template <
int order,
int dim,
int spacedim,
typename Number>
235 template <
int order,
int dim,
int spacedim,
typename Number>
247 template <
int order,
int dim,
int spacedim,
typename Number>
251 Assert( (1 == spacedim) && (order==1),
260 template <
int order,
int dim,
int spacedim,
typename Number>
264 Assert( (dim == spacedim),
265 ExcMessage(
"Only allowed when dim==spacedim."));
270 for (
unsigned int j=0; j<dim; ++j)
279 template <
int order,
int dim,
int spacedim,
typename Number>
288 for (
unsigned int i=0; i<spacedim; ++i)
289 for (
unsigned int j=0; j<dim; ++j)
290 tt[j][i] = (*
this)[i][j];
297 template <
int order,
int dim,
int spacedim,
typename Number>
304 for (
unsigned int i=0; i<spacedim; ++i)
305 for (
unsigned int j=0; j<dim; ++j)
306 dest[i][j] = (*
this)[i] * T[j];
313 template <
int order,
int dim,
int spacedim,
typename Number>
319 for (
unsigned int i=0; i<spacedim; ++i)
320 sum_of_squares += tensor[i].norm_square();
321 return std::sqrt(sum_of_squares);
326 template <
int order,
int dim,
int spacedim,
typename Number>
341 for (
unsigned int i=0; i<dim; ++i)
342 for (
unsigned int j=0; j<dim; ++j)
343 G[i][j] = DF_t[i] * DF_t[j];
351 template <
int order,
int dim,
int spacedim,
typename Number>
366 for (
unsigned int i=0; i<dim; ++i)
367 for (
unsigned int j=0; j<dim; ++j)
368 G[i][j] = DF_t[i] * DF_t[j];
370 return (this->times_T_t(
invert(G)));
375 template <
int order,
int dim,
int spacedim,
typename Number>
397 template <
int spacedim,
int dim,
typename Number>
404 for (
unsigned int i=0; i<spacedim; ++i)
418 template <
int spacedim,
int dim,
typename Number>
426 for (
unsigned int i=0; i<dim; ++i)
438 template <
int spacedim,
int dim,
typename Number>
446 for (
unsigned int i=0; i<spacedim; ++i)
460 template <
int dim,
int spacedim,
typename Number>
471 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)
VectorizedArray< Number > sqrt(const ::VectorizedArray< Number > &x)
static ::ExceptionBase & ExcInvalidTensorIndex(int arg1)