Skip to content
Snippets Groups Projects
Commit 76ee7b69 authored by akbib's avatar akbib Committed by akbib
Browse files

Adjust to new template parameter of SymmetricTensor

[[Imported from SVN: r12665]]
parent 54e60b32
Branches
Tags
No related merge requests found
......@@ -16,8 +16,8 @@ namespace Dune {
* \param grad The gradient of the direction in which the linearisation is computed.
* \param strain The tensor to store the strain in.
*/
template <int dim>
void computeNonlinearStrain(const Dune::FieldMatrix<double, dim, dim>& grad, SymmetricTensor<dim>& strain) {
template <int dim, class field_type=double>
void computeNonlinearStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, SymmetricTensor<dim,field_type>& strain) {
strain = 0;
for (int i=0; i<dim ; ++i) {
strain(i,i) +=grad[i][i];
......@@ -38,8 +38,8 @@ namespace Dune {
* \param grad The gradient of the direction in which the linearisation is computed.
* \param strain The tensor to store the strain in.
*/
template <int dim>
void computeLinearisedStrain(const Dune::FieldMatrix<double, dim, dim>& grad, SymmetricTensor<dim>& strain) {
template <int dim, class field_type=double>
void computeLinearisedStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, SymmetricTensor<dim,field_type>& strain) {
for (int i=0; i<dim ; ++i)
{
strain(i,i) = grad[i][i];
......@@ -55,9 +55,9 @@ namespace Dune {
* \param conf The deformation gradient(!) of the configuration at which the linearisation is evaluated.
* \param strain The tensor to store the strain in.
*/
template <int dim>
void computeLinearisedStrain(const Dune::FieldMatrix<double, dim, dim>& grad, const Dune::FieldMatrix<double, dim, dim>& conf,
SymmetricTensor<dim>& strain) {
template <int dim, class field_type=double>
void computeLinearisedStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, const Dune::FieldMatrix<field_type, dim, dim>& conf,
SymmetricTensor<dim,field_type>& strain) {
strain = 0;
for (int i=0;i<dim; i++)
for (int j=i;j<dim;j++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment