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>
335 return ::determinant(T);
342 for (
unsigned int i=0; i<dim; ++i)
343 for (
unsigned int j=0; j<dim; ++j)
344 G[i][j] = DF_t[i] * DF_t[j];
352 template <
int order,
int dim,
int spacedim,
typename Number>
367 for (
unsigned int i=0; i<dim; ++i)
368 for (
unsigned int j=0; j<dim; ++j)
369 G[i][j] = DF_t[i] * DF_t[j];
371 return (this->times_T_t(
invert(G)));
376 template <
int order,
int dim,
int spacedim,
typename Number>
398 template <
int spacedim,
int dim,
typename Number>
405 for (
unsigned int i=0; i<spacedim; ++i)
419 template <
int spacedim,
int dim,
typename Number>
427 for (
unsigned int i=0; i<dim; ++i)
439 template <
int spacedim,
int dim,
typename Number>
447 for (
unsigned int i=0; i<spacedim; ++i)
461 template <
int dim,
int spacedim,
typename Number>
472 DEAL_II_NAMESPACE_CLOSE
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)
SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)