AnisotropicHookean.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef MERCURYDPM_ANISOTROPICHOOKEAN_H
6 #define MERCURYDPM_ANISOTROPICHOOKEAN_H
7 #include "constitutive_laws.h"
8 
9 namespace oomph
10 {
11 
16 {
17  std::array<double, 3> anisotropy_ { 1.0, 1.0, 1.0 };
18 
19 public:
20 
21  void setAnisotropy(std::array<double, 3> anisotropy) {
22  anisotropy_ = anisotropy;
23  }
24 
27  AnisotropicHookean( double* nu_pt, double* e_pt )
28  : GeneralisedHookean( nu_pt, e_pt ) {}
29 
30  //=====================================================================
35  //=====================================================================
37  const DenseMatrix<double>& g,
38  const DenseMatrix<double>& G,
40  {
42 
43  // Make anisotropic
44  const unsigned dim = sigma.nrow();
45  for (unsigned i = 0; i < dim; i++)
46  {
47  for ( unsigned j = 0; j < dim; j++ )
48  {
49  sigma( i, j) *= anisotropy_[i];
50  }
51  }
52 
53  // Symmetrize
54  for (unsigned i = 0; i < dim; i++)
55  {
56  for (unsigned j = 0; j < i; j++)
57  {
58  sigma(i, j) = sigma(j, i);
59  }
60  }
61  }
62 };
63 }
64 
65 #endif//MERCURYDPM_ANISOTROPICHOOKEAN_H
int i
Definition: BiCGSTAB_step_by_step.cpp:9
JacobiRotation< float > G
Definition: Jacobi_makeGivens.cpp:2
Definition: AnisotropicHookean.h:16
std::array< double, 3 > anisotropy_
Definition: AnisotropicHookean.h:17
AnisotropicHookean(double *nu_pt, double *e_pt)
Definition: AnisotropicHookean.h:27
void calculate_second_piola_kirchhoff_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)
Definition: AnisotropicHookean.h:36
void setAnisotropy(std::array< double, 3 > anisotropy)
Definition: AnisotropicHookean.h:21
Definition: constitutive_laws.h:699
void calculate_second_piola_kirchhoff_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)
Definition: constitutive_laws.cc:682
int sigma
Definition: calibrate.py:179
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2