ASPECT
elastic_tensor_decomposition.h
Go to the documentation of this file.
1 // ------------------------------------------------------
2 //
3 // SPDX-License-Identifier: GPL-2.0-or-later
4 //
5 // SPDX-FileCopyrightText: Copyright (C) 2023-2025 by the ASPECT authors.
6 //
7 // This file is part of ASPECT.
8 //
9 // Detailed license information governing the source code and
10 // contributions can be found in the folder LICENSES and in
11 // LICENSE and CONTRIBUTING.md at the top level directory.
12 //
13 // ------------------------------------------------------
14 
15 #ifndef _aspect_particle_property_elastic_tensor_decomposition_h
16 #define _aspect_particle_property_elastic_tensor_decomposition_h
17 
20 
21 namespace aspect
22 {
23  namespace Particle
24  {
25  namespace Property
26  {
27  namespace Utilities
28  {
42  using namespace aspect::Utilities;
43 
48  std::array<unsigned int, 3>
49  indexed_even_permutation(const unsigned int index);
50 
59 
67 
86  Tensor<2,3> compute_unpermutated_SCCS(const SymmetricTensor<2,3> &dilatation_stiffness_tensor,
87  const SymmetricTensor<2,3> &voigt_stiffness_tensor);
88 
100  std::array<std::array<double,3>,7>
102  const Tensor<2,3> &unpermutated_SCCS,
103  const SymmetricTensor<2,6> &elastic_matrix);
104 
105 
111  Tensor<2,21>(
112  {
113  {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
114  {0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
115  {0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
116  {0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
117  {0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
118  {0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
119  {0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
120  {0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
121  {0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0},
122  {0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0},
123  {0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0},
124  {0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0},
125  {0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0},
126  {0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0},
127  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0},
128  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0},
129  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0},
130  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0},
131  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0},
132  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0},
133  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
134  })
135  );
136 
138  Tensor<2,9>(
139  {
140  {1,0,0,0,0,0,0,0,0},
141  {0,1,0,0,0,0,0,0,0},
142  {0,0,1,0,0,0,0,0,0},
143  {0,0,0,1,0,0,0,0,0},
144  {0,0,0,0,1,0,0,0,0},
145  {0,0,0,0,0,1,0,0,0},
146  {0,0,0,0,0,0,1,0,0},
147  {0,0,0,0,0,0,0,1,0},
148  {0,0,0,0,0,0,0,0,1}
149  })
150  );
151 
153  Tensor<2,9>(
154  {
155  {0.5,0.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0},
156  {0.5,0.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0},
157  {0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0},
158  {0.0,0.0,0.0,0.5,0.5,0.0,0.0,0.0,0.0},
159  {0.0,0.0,0.0,0.5,0.5,0.0,0.0,0.0,0.0},
160  {0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0},
161  {0.0,0.0,0.0,0.0,0.0,0.0,0.5,0.5,0.0},
162  {0.0,0.0,0.0,0.0,0.0,0.0,0.5,0.5,0.0},
163  {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0}
164  })
165  );
166 
168  Tensor<2,9>(
169  {
170  {3./8. , 3./8. , 0.0, 0.0, 0.0, 1./(4.*std::sqrt(2.)) , 0.0, 0.0, 1./4. },
171  {3./8. , 3./8. , 0.0, 0.0, 0.0, 1./(4.*std::sqrt(2.)) , 0.0, 0.0, 1./4. },
172  {0.0 , 0.0 , 1.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0 },
173  {0.0 , 0.0 , 0.0, 0.5, 0.5, 0.0 , 0.0, 0.0, 0.0 },
174  {0.0 , 0.0 , 0.0, 0.5, 0.5, 0.0 , 0.0, 0.0, 0.0 },
175  {1./(4.*std::sqrt(2.)), 1./(4.*std::sqrt(2.)), 0.0, 0.0, 0.0, 3./4. , 0.0, 0.0, -1./(2.*std::sqrt(2.))},
176  {0.0 , 0.0 , 0.0, 0.0, 0.0, 0.0 , 0.5, 0.5, 0.0 },
177  {0.0 , 0.0 , 0.0, 0.0, 0.0, 0.0 , 0.5, 0.5, 0.0 },
178  {1./4. , 1./4. , 0.0, 0.0, 0.0, -1./(2.*std::sqrt(2.)) , 0.0, 0.0, 0.5 }
179  })
180  );
181 
183  Tensor<2,9>(
184  {
185  {3./15. , 3./15. , 3./15. , std::sqrt(2.)/15. , std::sqrt(2.)/15. , std::sqrt(2.)/15. , 2./15. , 2./15. , 2./15. },
186  {3./15. , 3./15. , 3./15. , std::sqrt(2.)/15. , std::sqrt(2.)/15. , std::sqrt(2.)/15. , 2./15. , 2./15. , 2./15. },
187  {3./15. , 3./15. , 3./15. , std::sqrt(2.)/15. , std::sqrt(2.)/15. , std::sqrt(2.)/15. , 2./15. , 2./15. , 2./15. },
188  {std::sqrt(2.)/15., std::sqrt(2.)/15., std::sqrt(2.)/15., 4./15. , 4./15. , 4./15. , -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15. },
189  {std::sqrt(2.)/15., std::sqrt(2.)/15., std::sqrt(2.)/15., 4./15. , 4./15. , 4./15. , -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15. },
190  {std::sqrt(2.)/15., std::sqrt(2.)/15., std::sqrt(2.)/15., 4./15. , 4./15. , 4./15. , -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15. },
191  {2./15. , 2./15. , 2./15. , -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., 1./5. , 1./5. , 1./5. },
192  {2./15. , 2./15. , 2./15. , -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., 1./5. , 1./5. , 1./5. },
193  {2./15. , 2./15. , 2./15. , -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., 1./5. , 1./5. , 1./5. }
194  })
195  );
196  }
197 
204  template <int dim>
206  {
207  public:
211  ElasticTensorDecomposition() = default;
212 
217  void
218  initialize () override;
219 
231  void
232  initialize_one_particle_property (const Point<dim> &position,
233  std::vector<double> &particle_properties) const override;
234 
238  void
239  update_particle_properties (const ParticleUpdateInputs<dim> &inputs,
240  typename ParticleHandler<dim>::particle_iterator_range &particles) const override;
241 
247  need_update () const override;
248 
256  std::vector<std::pair<std::string, unsigned int>>
257  get_property_information() const override;
258 
259  private:
261  };
262  }
263  }
264 }
265 
266 #endif
std::array< unsigned int, 3 > indexed_even_permutation(const unsigned int index)
const SymmetricTensor< 2, 21 > projection_matrix_triclinic_to_monoclinic(Tensor< 2, 21 >({ {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, }))
Tensor< 2, 3 > compute_unpermutated_SCCS(const SymmetricTensor< 2, 3 > &dilatation_stiffness_tensor, const SymmetricTensor< 2, 3 > &voigt_stiffness_tensor)
const SymmetricTensor< 2, 9 > projection_matrix_tetragonal_to_hexagonal(Tensor< 2, 9 >({ {3./8., 3./8., 0.0, 0.0, 0.0, 1./(4.*std::sqrt(2.)), 0.0, 0.0, 1./4. }, {3./8., 3./8., 0.0, 0.0, 0.0, 1./(4.*std::sqrt(2.)), 0.0, 0.0, 1./4. }, {0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, {0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0 }, {0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0 }, {1./(4.*std::sqrt(2.)), 1./(4.*std::sqrt(2.)), 0.0, 0.0, 0.0, 3./4., 0.0, 0.0, -1./(2.*std::sqrt(2.))}, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0 }, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0 }, {1./4., 1./4., 0.0, 0.0, 0.0, -1./(2.*std::sqrt(2.)), 0.0, 0.0, 0.5 } }))
const SymmetricTensor< 2, 9 > projection_matrix_monoclinic_to_orthorhombic(Tensor< 2, 9 >({ {1, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1} }))
const SymmetricTensor< 2, 9 > projection_matrix_hexagonal_to_isotropic(Tensor< 2, 9 >({ {3./15., 3./15., 3./15., std::sqrt(2.)/15., std::sqrt(2.)/15., std::sqrt(2.)/15., 2./15., 2./15., 2./15. }, {3./15., 3./15., 3./15., std::sqrt(2.)/15., std::sqrt(2.)/15., std::sqrt(2.)/15., 2./15., 2./15., 2./15. }, {3./15., 3./15., 3./15., std::sqrt(2.)/15., std::sqrt(2.)/15., std::sqrt(2.)/15., 2./15., 2./15., 2./15. }, {std::sqrt(2.)/15., std::sqrt(2.)/15., std::sqrt(2.)/15., 4./15., 4./15., 4./15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15. }, {std::sqrt(2.)/15., std::sqrt(2.)/15., std::sqrt(2.)/15., 4./15., 4./15., 4./15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15. }, {std::sqrt(2.)/15., std::sqrt(2.)/15., std::sqrt(2.)/15., 4./15., 4./15., 4./15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15. }, {2./15., 2./15., 2./15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., 1./5., 1./5., 1./5. }, {2./15., 2./15., 2./15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., 1./5., 1./5., 1./5. }, {2./15., 2./15., 2./15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., -std::sqrt(2.)/15., 1./5., 1./5., 1./5. } }))
std::array< std::array< double, 3 >, 7 > compute_elastic_tensor_SCCS_decompositions(const Tensor< 2, 3 > &unpermutated_SCCS, const SymmetricTensor< 2, 6 > &elastic_matrix)
SymmetricTensor< 2, 3 > compute_voigt_stiffness_tensor(const SymmetricTensor< 2, 6 > &elastic_tensor)
boost::iterator_range< particle_iterator > particle_iterator_range
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)
const SymmetricTensor< 2, 9 > projection_matrix_orthorhombic_to_tetragonal(Tensor< 2, 9 >({ {0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0}, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0}, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0} }))
SymmetricTensor< 2, 3 > compute_dilatation_stiffness_tensor(const SymmetricTensor< 2, 6 > &elastic_tensor)