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
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,8 @@ namespace Dune { ...@@ -16,8 +16,8 @@ namespace Dune {
* \param grad The gradient of the direction in which the linearisation is computed. * \param grad The gradient of the direction in which the linearisation is computed.
* \param strain The tensor to store the strain in. * \param strain The tensor to store the strain in.
*/ */
template <int dim> template <int dim, class field_type=double>
void computeNonlinearStrain(const Dune::FieldMatrix<double, dim, dim>& grad, SymmetricTensor<dim>& strain) { void computeNonlinearStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, SymmetricTensor<dim,field_type>& strain) {
strain = 0; strain = 0;
for (int i=0; i<dim ; ++i) { for (int i=0; i<dim ; ++i) {
strain(i,i) +=grad[i][i]; strain(i,i) +=grad[i][i];
...@@ -38,8 +38,8 @@ namespace Dune { ...@@ -38,8 +38,8 @@ namespace Dune {
* \param grad The gradient of the direction in which the linearisation is computed. * \param grad The gradient of the direction in which the linearisation is computed.
* \param strain The tensor to store the strain in. * \param strain The tensor to store the strain in.
*/ */
template <int dim> template <int dim, class field_type=double>
void computeLinearisedStrain(const Dune::FieldMatrix<double, dim, dim>& grad, SymmetricTensor<dim>& strain) { void computeLinearisedStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, SymmetricTensor<dim,field_type>& strain) {
for (int i=0; i<dim ; ++i) for (int i=0; i<dim ; ++i)
{ {
strain(i,i) = grad[i][i]; strain(i,i) = grad[i][i];
...@@ -55,9 +55,9 @@ namespace Dune { ...@@ -55,9 +55,9 @@ namespace Dune {
* \param conf The deformation gradient(!) of the configuration at which the linearisation is evaluated. * \param conf The deformation gradient(!) of the configuration at which the linearisation is evaluated.
* \param strain The tensor to store the strain in. * \param strain The tensor to store the strain in.
*/ */
template <int dim> template <int dim, class field_type=double>
void computeLinearisedStrain(const Dune::FieldMatrix<double, dim, dim>& grad, const Dune::FieldMatrix<double, dim, dim>& conf, void computeLinearisedStrain(const Dune::FieldMatrix<field_type, dim, dim>& grad, const Dune::FieldMatrix<field_type, dim, dim>& conf,
SymmetricTensor<dim>& strain) { SymmetricTensor<dim,field_type>& strain) {
strain = 0; strain = 0;
for (int i=0;i<dim; i++) for (int i=0;i<dim; i++)
for (int j=i;j<dim;j++) 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