Trilinos::Sacado example
Typedefs | Functions
Sacado-auxiliary_functions.h File Reference
#include <deal.II/base/symmetric_tensor.h>
#include <iostream>
#include <Sacado.hpp>
Include dependency graph for Sacado-auxiliary_functions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using fad_double = Sacado::Fad::DFad< double >
 

Functions

template<int dim>
SymmetricTensor< 2, dim, fad_doubleinit_Sacado (const SymmetricTensor< 2, dim, double > &SymTensor)
 
template<int dim>
SymmetricTensor< 2, dim > extract_value_from_Sacado (const SymmetricTensor< 2, dim, fad_double > &SymTensor_Sacado)
 
template<int dim>
Vector< fad_doublereinit (unsigned int a, bool b)
 

Typedef Documentation

◆ fad_double

using fad_double = Sacado::Fad::DFad<double>

Function Documentation

◆ extract_value_from_Sacado()

template<int dim>
SymmetricTensor<2,dim> extract_value_from_Sacado ( const SymmetricTensor< 2, dim, fad_double > &  SymTensor_Sacado)
25 {
26  SymmetricTensor<2,dim> SymTensor;
27  // .val() extracts the \a double value from the Sacado variable
28  for ( unsigned int i=0; i<dim; ++i)
29  for ( unsigned int j=i; j<dim; ++j )
30  SymTensor[i][j] = SymTensor_Sacado[i][j].val();
31 
32  return SymTensor;
33 }

◆ init_Sacado()

template<int dim>
SymmetricTensor<2,dim,fad_double> init_Sacado ( const SymmetricTensor< 2, dim, double > &  SymTensor)
13 {
14  SymmetricTensor<2,dim,fad_double> SymTensor_Sacado;
15  for ( unsigned int i=0; i<dim; ++i)
16  for ( unsigned int j=i; j<dim; ++j )
17  SymTensor_Sacado[i][j] = SymTensor[i][j];
18 
19  return SymTensor_Sacado;
20 }

◆ reinit()

template<int dim>
Vector<fad_double> reinit ( unsigned int  a,
bool  b 
)
38 {
39  Vector<fad_double> abc (5);
40  return abc;
41 }