libMesh
Public Member Functions | Private Attributes | List of all members
LargeDeformationElasticity Class Referenceabstract
Inheritance diagram for LargeDeformationElasticity:
[legend]

Public Member Functions

 LargeDeformationElasticity (EquationSystems &es_in)
 
Real kronecker_delta (unsigned int i, unsigned int j)
 Kronecker delta function. More...
 
Real elasticity_tensor (Real young_modulus, Real poisson_ratio, unsigned int i, unsigned int j, unsigned int k, unsigned int l)
 Evaluate the fourth order tensor (C_ijkl) that relates stress to strain. More...
 
virtual void jacobian (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, NonlinearImplicitSystem &)
 Evaluate the Jacobian of the nonlinear system. More...
 
virtual void residual (const NumericVector< Number > &soln, NumericVector< Number > &residual, NonlinearImplicitSystem &)
 Evaluate the residual of the nonlinear system. More...
 
void compute_stresses ()
 Compute the Cauchy stress for the current solution. More...
 
virtual void residual (const NumericVector< Number > &X, NumericVector< Number > &R, sys_type &S)=0
 Residual function. More...
 
virtual void jacobian (const NumericVector< Number > &X, SparseMatrix< Number > &J, sys_type &S)=0
 Jacobian function. More...
 

Private Attributes

EquationSystemses
 

Detailed Description

Definition at line 85 of file systems_of_equations_ex7.C.

Constructor & Destructor Documentation

◆ LargeDeformationElasticity()

LargeDeformationElasticity::LargeDeformationElasticity ( EquationSystems es_in)
inline

Definition at line 93 of file systems_of_equations_ex7.C.

93  :
94  es(es_in)
95  {}

Member Function Documentation

◆ compute_stresses()

void LargeDeformationElasticity::compute_stresses ( )
inline

Compute the Cauchy stress for the current solution.

Definition at line 393 of file systems_of_equations_ex7.C.

394  {
395  const Real young_modulus = es.parameters.get<Real>("young_modulus");
396  const Real poisson_ratio = es.parameters.get<Real>("poisson_ratio");
397 
398  const MeshBase & mesh = es.get_mesh();
399  const unsigned int dim = mesh.mesh_dimension();
400 
401  NonlinearImplicitSystem & system =
402  es.get_system<NonlinearImplicitSystem>("NonlinearElasticity");
403 
404  unsigned int displacement_vars[3];
405  displacement_vars[0] = system.variable_number ("u");
406  displacement_vars[1] = system.variable_number ("v");
407  displacement_vars[2] = system.variable_number ("w");
408  const unsigned int u_var = system.variable_number ("u");
409 
410  const DofMap & dof_map = system.get_dof_map();
411  FEType fe_type = dof_map.variable_type(u_var);
412  std::unique_ptr<FEBase> fe (FEBase::build(dim, fe_type));
413  QGauss qrule (dim, fe_type.default_quadrature_order());
414  fe->attach_quadrature_rule (&qrule);
415 
416  const std::vector<Real> & JxW = fe->get_JxW();
417  const std::vector<std::vector<RealGradient>> & dphi = fe->get_dphi();
418 
419  // Also, get a reference to the ExplicitSystem
420  ExplicitSystem & stress_system = es.get_system<ExplicitSystem>("StressSystem");
421  const DofMap & stress_dof_map = stress_system.get_dof_map();
422  unsigned int sigma_vars[6];
423  sigma_vars[0] = stress_system.variable_number ("sigma_00");
424  sigma_vars[1] = stress_system.variable_number ("sigma_01");
425  sigma_vars[2] = stress_system.variable_number ("sigma_02");
426  sigma_vars[3] = stress_system.variable_number ("sigma_11");
427  sigma_vars[4] = stress_system.variable_number ("sigma_12");
428  sigma_vars[5] = stress_system.variable_number ("sigma_22");
429 
430  // Storage for the stress dof indices on each element
431  std::vector<std::vector<dof_id_type>> dof_indices_var(system.n_vars());
432  std::vector<dof_id_type> stress_dof_indices_var;
433 
434  // To store the stress tensor on each element
435  DenseMatrix<Number> elem_avg_stress_tensor(3, 3);
436 
437  for (const auto & elem : mesh.active_local_element_ptr_range())
438  {
439  for (unsigned int var=0; var<3; var++)
440  dof_map.dof_indices (elem, dof_indices_var[var], displacement_vars[var]);
441 
442  const unsigned int n_var_dofs = dof_indices_var[0].size();
443 
444  fe->reinit (elem);
445 
446  // clear the stress tensor
447  elem_avg_stress_tensor.resize(3, 3);
448 
449  for (unsigned int qp=0; qp<qrule.n_points(); qp++)
450  {
451  DenseMatrix<Number> grad_u(3, 3);
452  // Row is variable u1, u2, or u3, column is x, y, or z
453  for (unsigned int var_i=0; var_i<3; var_i++)
454  for (unsigned int var_j=0; var_j<3; var_j++)
455  for (unsigned int j=0; j<n_var_dofs; j++)
456  grad_u(var_i,var_j) += dphi[j][qp](var_j) * system.current_solution(dof_indices_var[var_i][j]);
457 
458  DenseMatrix<Number> strain_tensor(3, 3);
459  for (unsigned int i=0; i<3; i++)
460  for (unsigned int j=0; j<3; j++)
461  {
462  strain_tensor(i,j) += 0.5 * (grad_u(i,j) + grad_u(j,i));
463 
464  for (unsigned int k=0; k<3; k++)
465  strain_tensor(i,j) += 0.5 * grad_u(k,i)*grad_u(k,j);
466  }
467 
468  // Define the deformation gradient
469  DenseMatrix<Number> F(3, 3);
470  F = grad_u;
471  for (unsigned int var=0; var<3; var++)
472  F(var, var) += 1.;
473 
474  DenseMatrix<Number> stress_tensor(3, 3);
475  for (unsigned int i=0; i<3; i++)
476  for (unsigned int j=0; j<3; j++)
477  for (unsigned int k=0; k<3; k++)
478  for (unsigned int l=0; l<3; l++)
479  stress_tensor(i,j) +=
480  elasticity_tensor(young_modulus, poisson_ratio, i, j, k, l) * strain_tensor(k, l);
481 
482  // stress_tensor now holds the second Piola-Kirchoff stress (PK2) at point qp.
483  // However, in this example we want to compute the Cauchy stress which is given by
484  // 1/det(F) * F * PK2 * F^T, hence we now apply this transformation.
485  stress_tensor.scale(1./F.det());
486  stress_tensor.left_multiply(F);
487  stress_tensor.right_multiply_transpose(F);
488 
489  // We want to plot the average Cauchy stress on each element, hence
490  // we integrate stress_tensor
491  elem_avg_stress_tensor.add(JxW[qp], stress_tensor);
492  }
493 
494  // Get the average stress per element by dividing by volume
495  elem_avg_stress_tensor.scale(1./elem->volume());
496 
497  // load elem_sigma data into stress_system
498  unsigned int stress_var_index = 0;
499  for (unsigned int i=0; i<3; i++)
500  for (unsigned int j=i; j<3; j++)
501  {
502  stress_dof_map.dof_indices (elem, stress_dof_indices_var, sigma_vars[stress_var_index]);
503 
504  // We are using CONSTANT MONOMIAL basis functions, hence we only need to get
505  // one dof index per variable
506  dof_id_type dof_index = stress_dof_indices_var[0];
507 
508  if ((stress_system.solution->first_local_index() <= dof_index) &&
509  (dof_index < stress_system.solution->last_local_index()))
510  stress_system.solution->set(dof_index, elem_avg_stress_tensor(i,j));
511 
512  stress_var_index++;
513  }
514  }
515 
516  // Should call close and update when we set vector entries directly
517  stress_system.solution->close();
518  stress_system.update();
519  }

References libMesh::MeshBase::active_local_element_ptr_range(), libMesh::DenseMatrix< T >::add(), libMesh::FEGenericBase< OutputType >::build(), libMesh::System::current_solution(), libMesh::FEType::default_quadrature_order(), libMesh::DenseMatrix< T >::det(), dim, libMesh::DofMap::dof_indices(), elasticity_tensor(), libMesh::Parameters::get(), libMesh::System::get_dof_map(), libMesh::EquationSystems::get_mesh(), libMesh::EquationSystems::get_system(), libMesh::DenseMatrix< T >::left_multiply(), mesh, libMesh::MeshBase::mesh_dimension(), libMesh::System::n_vars(), libMesh::EquationSystems::parameters, libMesh::Real, libMesh::DenseMatrix< T >::resize(), libMesh::DenseMatrix< T >::right_multiply_transpose(), libMesh::DenseMatrix< T >::scale(), libMesh::System::solution, libMesh::System::update(), libMesh::System::variable_number(), and libMesh::DofMap::variable_type().

Referenced by main().

◆ elasticity_tensor()

Real LargeDeformationElasticity::elasticity_tensor ( Real  young_modulus,
Real  poisson_ratio,
unsigned int  i,
unsigned int  j,
unsigned int  k,
unsigned int  l 
)
inline

Evaluate the fourth order tensor (C_ijkl) that relates stress to strain.

Definition at line 109 of file systems_of_equations_ex7.C.

115  {
116  // Define the Lame constants
117  const Real lambda_1 = (young_modulus*poisson_ratio)/((1.+poisson_ratio)*(1.-2.*poisson_ratio));
118  const Real lambda_2 = young_modulus/(2.*(1.+poisson_ratio));
119 
120  return lambda_1 * kronecker_delta(i,j) * kronecker_delta(k,l) +
121  lambda_2 * (kronecker_delta(i,k) * kronecker_delta(j,l) + kronecker_delta(i,l) * kronecker_delta(j,k));
122  }

References kronecker_delta(), and libMesh::Real.

◆ jacobian() [1/2]

virtual void LargeDeformationElasticity::jacobian ( const NumericVector< Number > &  soln,
SparseMatrix< Number > &  jacobian,
NonlinearImplicitSystem  
)
inlinevirtual

Evaluate the Jacobian of the nonlinear system.

Definition at line 128 of file systems_of_equations_ex7.C.

131  {
132  const Real young_modulus = es.parameters.get<Real>("young_modulus");
133  const Real poisson_ratio = es.parameters.get<Real>("poisson_ratio");
134 
135  const MeshBase & mesh = es.get_mesh();
136  const unsigned int dim = mesh.mesh_dimension();
137 
138  NonlinearImplicitSystem & system =
139  es.get_system<NonlinearImplicitSystem>("NonlinearElasticity");
140 
141  const unsigned int u_var = system.variable_number ("u");
142 
143  const DofMap & dof_map = system.get_dof_map();
144 
145  FEType fe_type = dof_map.variable_type(u_var);
146  std::unique_ptr<FEBase> fe (FEBase::build(dim, fe_type));
147  QGauss qrule (dim, fe_type.default_quadrature_order());
148  fe->attach_quadrature_rule (&qrule);
149 
150  std::unique_ptr<FEBase> fe_face (FEBase::build(dim, fe_type));
151  QGauss qface (dim-1, fe_type.default_quadrature_order());
152  fe_face->attach_quadrature_rule (&qface);
153 
154  const std::vector<Real> & JxW = fe->get_JxW();
155  const std::vector<std::vector<Real>> & phi = fe->get_phi();
156  const std::vector<std::vector<RealGradient>> & dphi = fe->get_dphi();
157 
159  DenseSubMatrix<Number> Ke_var[3][3] =
160  {
164  };
165 
166  std::vector<dof_id_type> dof_indices;
167  std::vector<std::vector<dof_id_type>> dof_indices_var(3);
168 
169  jacobian.zero();
170 
171  for (const auto & elem : mesh.active_local_element_ptr_range())
172  {
173  dof_map.dof_indices (elem, dof_indices);
174  for (unsigned int var=0; var<3; var++)
175  dof_map.dof_indices (elem, dof_indices_var[var], var);
176 
177  const unsigned int n_dofs = dof_indices.size();
178  const unsigned int n_var_dofs = dof_indices_var[0].size();
179 
180  fe->reinit (elem);
181 
182  Ke.resize (n_dofs, n_dofs);
183  for (unsigned int var_i=0; var_i<3; var_i++)
184  for (unsigned int var_j=0; var_j<3; var_j++)
185  Ke_var[var_i][var_j].reposition (var_i*n_var_dofs, var_j*n_var_dofs, n_var_dofs, n_var_dofs);
186 
187  for (unsigned int qp=0; qp<qrule.n_points(); qp++)
188  {
189  DenseVector<Number> u_vec(3);
190  DenseMatrix<Number> grad_u(3, 3);
191  for (unsigned int var_i=0; var_i<3; var_i++)
192  {
193  for (unsigned int j=0; j<n_var_dofs; j++)
194  u_vec(var_i) += phi[j][qp]*soln(dof_indices_var[var_i][j]);
195 
196  // Row is variable u1, u2, or u3, column is x, y, or z
197  for (unsigned int var_j=0; var_j<3; var_j++)
198  for (unsigned int j=0; j<n_var_dofs; j++)
199  grad_u(var_i,var_j) += dphi[j][qp](var_j)*soln(dof_indices_var[var_i][j]);
200  }
201 
202  DenseMatrix<Number> strain_tensor(3, 3);
203  for (unsigned int i=0; i<3; i++)
204  for (unsigned int j=0; j<3; j++)
205  {
206  strain_tensor(i,j) += 0.5 * (grad_u(i,j) + grad_u(j,i));
207 
208  for (unsigned int k=0; k<3; k++)
209  strain_tensor(i,j) += 0.5 * grad_u(k,i)*grad_u(k,j);
210  }
211 
212  // Define the deformation gradient
213  DenseMatrix<Number> F(3, 3);
214  F = grad_u;
215  for (unsigned int var=0; var<3; var++)
216  F(var, var) += 1.;
217 
218  DenseMatrix<Number> stress_tensor(3, 3);
219 
220  for (unsigned int i=0; i<3; i++)
221  for (unsigned int j=0; j<3; j++)
222  for (unsigned int k=0; k<3; k++)
223  for (unsigned int l=0; l<3; l++)
224  stress_tensor(i,j) +=
225  elasticity_tensor(young_modulus, poisson_ratio, i, j, k, l) * strain_tensor(k, l);
226 
227  for (unsigned int dof_i=0; dof_i<n_var_dofs; dof_i++)
228  for (unsigned int dof_j=0; dof_j<n_var_dofs; dof_j++)
229  {
230  for (unsigned int i=0; i<3; i++)
231  for (unsigned int j=0; j<3; j++)
232  for (unsigned int m=0; m<3; m++)
233  Ke_var[i][i](dof_i,dof_j) += JxW[qp] *
234  (-dphi[dof_j][qp](m) * stress_tensor(m,j) * dphi[dof_i][qp](j));
235 
236  for (unsigned int i=0; i<3; i++)
237  for (unsigned int j=0; j<3; j++)
238  for (unsigned int k=0; k<3; k++)
239  for (unsigned int l=0; l<3; l++)
240  {
241  Number FxC_ijkl = 0.;
242  for (unsigned int m=0; m<3; m++)
243  FxC_ijkl += F(i,m) * elasticity_tensor(young_modulus, poisson_ratio, m, j, k, l);
244 
245  Ke_var[i][k](dof_i,dof_j) += JxW[qp] *
246  (-0.5 * FxC_ijkl * dphi[dof_j][qp](l) * dphi[dof_i][qp](j));
247 
248  Ke_var[i][l](dof_i,dof_j) += JxW[qp] *
249  (-0.5 * FxC_ijkl * dphi[dof_j][qp](k) * dphi[dof_i][qp](j));
250 
251  for (unsigned int n=0; n<3; n++)
252  Ke_var[i][n](dof_i,dof_j) += JxW[qp] *
253  (-0.5 * FxC_ijkl * (dphi[dof_j][qp](k) * grad_u(n,l) + dphi[dof_j][qp](l) * grad_u(n,k)) * dphi[dof_i][qp](j));
254  }
255  }
256  }
257 
258  dof_map.constrain_element_matrix (Ke, dof_indices);
259  jacobian.add_matrix (Ke, dof_indices);
260  }
261  }

References libMesh::MeshBase::active_local_element_ptr_range(), libMesh::SparseMatrix< T >::add_matrix(), libMesh::FEGenericBase< OutputType >::build(), libMesh::DofMap::constrain_element_matrix(), libMesh::FEType::default_quadrature_order(), dim, libMesh::DofMap::dof_indices(), elasticity_tensor(), libMesh::Parameters::get(), libMesh::System::get_dof_map(), libMesh::EquationSystems::get_mesh(), libMesh::EquationSystems::get_system(), mesh, libMesh::MeshBase::mesh_dimension(), libMesh::EquationSystems::parameters, libMesh::Real, libMesh::DenseMatrix< T >::resize(), libMesh::System::variable_number(), libMesh::DofMap::variable_type(), and libMesh::SparseMatrix< T >::zero().

◆ jacobian() [2/2]

virtual void libMesh::NonlinearImplicitSystem::ComputeJacobian::jacobian ( const NumericVector< Number > &  X,
SparseMatrix< Number > &  J,
sys_type S 
)
pure virtualinherited

Jacobian function.

This function will be called to compute the jacobian and must be implemented by the user in a derived class.

Referenced by libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), and libMesh::libmesh_petsc_snes_jacobian().

◆ kronecker_delta()

Real LargeDeformationElasticity::kronecker_delta ( unsigned int  i,
unsigned int  j 
)
inline

Kronecker delta function.

Definition at line 100 of file systems_of_equations_ex7.C.

102  {
103  return i == j ? 1. : 0.;
104  }

◆ residual() [1/2]

virtual void LargeDeformationElasticity::residual ( const NumericVector< Number > &  soln,
NumericVector< Number > &  residual,
NonlinearImplicitSystem  
)
inlinevirtual

Evaluate the residual of the nonlinear system.

Definition at line 266 of file systems_of_equations_ex7.C.

269  {
270  const Real young_modulus = es.parameters.get<Real>("young_modulus");
271  const Real poisson_ratio = es.parameters.get<Real>("poisson_ratio");
272  const Real forcing_magnitude = es.parameters.get<Real>("forcing_magnitude");
273 
274  const MeshBase & mesh = es.get_mesh();
275  const unsigned int dim = mesh.mesh_dimension();
276 
277  NonlinearImplicitSystem & system =
278  es.get_system<NonlinearImplicitSystem>("NonlinearElasticity");
279 
280  const unsigned int u_var = system.variable_number ("u");
281 
282  const DofMap & dof_map = system.get_dof_map();
283 
284  FEType fe_type = dof_map.variable_type(u_var);
285  std::unique_ptr<FEBase> fe (FEBase::build(dim, fe_type));
286  QGauss qrule (dim, fe_type.default_quadrature_order());
287  fe->attach_quadrature_rule (&qrule);
288 
289  std::unique_ptr<FEBase> fe_face (FEBase::build(dim, fe_type));
290  QGauss qface (dim-1, fe_type.default_quadrature_order());
291  fe_face->attach_quadrature_rule (&qface);
292 
293  const std::vector<Real> & JxW = fe->get_JxW();
294  const std::vector<std::vector<Real>> & phi = fe->get_phi();
295  const std::vector<std::vector<RealGradient>> & dphi = fe->get_dphi();
296 
298 
299  DenseSubVector<Number> Re_var[3] =
303 
304  std::vector<dof_id_type> dof_indices;
305  std::vector<std::vector<dof_id_type>> dof_indices_var(3);
306 
307  residual.zero();
308 
309  for (const auto & elem : mesh.active_local_element_ptr_range())
310  {
311  dof_map.dof_indices (elem, dof_indices);
312  for (unsigned int var=0; var<3; var++)
313  dof_map.dof_indices (elem, dof_indices_var[var], var);
314 
315  const unsigned int n_dofs = dof_indices.size();
316  const unsigned int n_var_dofs = dof_indices_var[0].size();
317 
318  fe->reinit (elem);
319 
320  Re.resize (n_dofs);
321  for (unsigned int var=0; var<3; var++)
322  Re_var[var].reposition (var*n_var_dofs, n_var_dofs);
323 
324  for (unsigned int qp=0; qp<qrule.n_points(); qp++)
325  {
326  DenseVector<Number> u_vec(3);
327  DenseMatrix<Number> grad_u(3, 3);
328  for (unsigned int var_i=0; var_i<3; var_i++)
329  {
330  for (unsigned int j=0; j<n_var_dofs; j++)
331  u_vec(var_i) += phi[j][qp]*soln(dof_indices_var[var_i][j]);
332 
333  // Row is variable u, v, or w column is x, y, or z
334  for (unsigned int var_j=0; var_j<3; var_j++)
335  for (unsigned int j=0; j<n_var_dofs; j++)
336  grad_u(var_i,var_j) += dphi[j][qp](var_j)*soln(dof_indices_var[var_i][j]);
337  }
338 
339  DenseMatrix<Number> strain_tensor(3, 3);
340  for (unsigned int i=0; i<3; i++)
341  for (unsigned int j=0; j<3; j++)
342  {
343  strain_tensor(i,j) += 0.5 * (grad_u(i,j) + grad_u(j,i));
344 
345  for (unsigned int k=0; k<3; k++)
346  strain_tensor(i,j) += 0.5 * grad_u(k,i)*grad_u(k,j);
347  }
348 
349  // Define the deformation gradient
350  DenseMatrix<Number> F(3, 3);
351  F = grad_u;
352  for (unsigned int var=0; var<3; var++)
353  F(var, var) += 1.;
354 
355  DenseMatrix<Number> stress_tensor(3, 3);
356 
357  for (unsigned int i=0; i<3; i++)
358  for (unsigned int j=0; j<3; j++)
359  for (unsigned int k=0; k<3; k++)
360  for (unsigned int l=0; l<3; l++)
361  stress_tensor(i,j) +=
362  elasticity_tensor(young_modulus, poisson_ratio, i, j, k, l) * strain_tensor(k,l);
363 
364  DenseVector<Number> f_vec(3);
365  f_vec(0) = 0.;
366  f_vec(1) = 0.;
367  f_vec(2) = -forcing_magnitude;
368 
369  for (unsigned int dof_i=0; dof_i<n_var_dofs; dof_i++)
370  for (unsigned int i=0; i<3; i++)
371  {
372  for (unsigned int j=0; j<3; j++)
373  {
374  Number FxStress_ij = 0.;
375  for (unsigned int m=0; m<3; m++)
376  FxStress_ij += F(i,m) * stress_tensor(m,j);
377 
378  Re_var[i](dof_i) += JxW[qp] * (-FxStress_ij * dphi[dof_i][qp](j));
379  }
380 
381  Re_var[i](dof_i) += JxW[qp] * (f_vec(i) * phi[dof_i][qp]);
382  }
383  }
384 
385  dof_map.constrain_element_vector (Re, dof_indices);
386  residual.add_vector (Re, dof_indices);
387  }
388  }

References libMesh::MeshBase::active_local_element_ptr_range(), libMesh::NumericVector< T >::add_vector(), libMesh::FEGenericBase< OutputType >::build(), libMesh::DofMap::constrain_element_vector(), libMesh::FEType::default_quadrature_order(), dim, libMesh::DofMap::dof_indices(), elasticity_tensor(), libMesh::Parameters::get(), libMesh::System::get_dof_map(), libMesh::EquationSystems::get_mesh(), libMesh::EquationSystems::get_system(), mesh, libMesh::MeshBase::mesh_dimension(), libMesh::EquationSystems::parameters, libMesh::Real, libMesh::DenseVector< T >::resize(), libMesh::System::variable_number(), libMesh::DofMap::variable_type(), and libMesh::NumericVector< T >::zero().

◆ residual() [2/2]

virtual void libMesh::NonlinearImplicitSystem::ComputeResidual::residual ( const NumericVector< Number > &  X,
NumericVector< Number > &  R,
sys_type S 
)
pure virtualinherited

Residual function.

This function will be called to compute the residual and must be implemented by the user in a derived class.

Referenced by libMesh::Problem_Interface::computeF(), libMesh::libmesh_petsc_snes_fd_residual(), libMesh::libmesh_petsc_snes_mffd_residual(), and libMesh::libmesh_petsc_snes_residual().

Member Data Documentation

◆ es

EquationSystems& LargeDeformationElasticity::es
private

Definition at line 89 of file systems_of_equations_ex7.C.


The documentation for this class was generated from the following file:
libMesh::Number
Real Number
Definition: libmesh_common.h:195
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::System::n_vars
unsigned int n_vars() const
Definition: system.h:2155
libMesh::EquationSystems::get_mesh
const MeshBase & get_mesh() const
Definition: equation_systems.h:637
libMesh::QGauss
This class implements specific orders of Gauss quadrature.
Definition: quadrature_gauss.h:39
libMesh::DofMap::dof_indices
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Fills the vector di with the global degree of freedom indices for the element.
Definition: dof_map.C:1967
libMesh::DofMap::constrain_element_vector
void constrain_element_vector(DenseVector< Number > &rhs, std::vector< dof_id_type > &dofs, bool asymmetric_constraint_rows=true) const
Constrains the element vector.
Definition: dof_map.h:2030
libMesh::MeshBase::active_local_element_ptr_range
virtual SimpleRange< element_iterator > active_local_element_ptr_range()=0
libMesh::DenseSubMatrix
Defines a dense submatrix for use in Finite Element-type computations.
Definition: dense_submatrix.h:45
libMesh::EquationSystems::get_system
const T_sys & get_system(const std::string &name) const
Definition: equation_systems.h:757
libMesh::DenseMatrix< Number >
mesh
MeshBase & mesh
Definition: mesh_communication.C:1257
libMesh::MeshBase::mesh_dimension
unsigned int mesh_dimension() const
Definition: mesh_base.C:135
libMesh::NonlinearImplicitSystem
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and non-linear solv...
Definition: nonlinear_implicit_system.h:54
LargeDeformationElasticity::kronecker_delta
Real kronecker_delta(unsigned int i, unsigned int j)
Kronecker delta function.
Definition: systems_of_equations_ex7.C:100
dim
unsigned int dim
Definition: adaptivity_ex3.C:113
libMesh::DenseMatrix::resize
void resize(const unsigned int new_m, const unsigned int new_n)
Resize the matrix.
Definition: dense_matrix.h:822
libMesh::System::current_solution
Number current_solution(const dof_id_type global_dof_number) const
Definition: system.C:194
LargeDeformationElasticity::es
EquationSystems & es
Definition: systems_of_equations_ex7.C:89
libMesh::MeshBase
This is the MeshBase class.
Definition: mesh_base.h:78
LargeDeformationElasticity::elasticity_tensor
Real elasticity_tensor(Real young_modulus, Real poisson_ratio, unsigned int i, unsigned int j, unsigned int k, unsigned int l)
Evaluate the fourth order tensor (C_ijkl) that relates stress to strain.
Definition: systems_of_equations_ex7.C:109
libMesh::DofMap::variable_type
const FEType & variable_type(const unsigned int c) const
Definition: dof_map.h:1924
LargeDeformationElasticity::residual
virtual void residual(const NumericVector< Number > &soln, NumericVector< Number > &residual, NonlinearImplicitSystem &)
Evaluate the residual of the nonlinear system.
Definition: systems_of_equations_ex7.C:266
libMesh::DenseSubVector< Number >
libMesh::ExplicitSystem
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems.
Definition: explicit_system.h:48
libMesh::DenseVector::resize
void resize(const unsigned int n)
Resize the vector.
Definition: dense_vector.h:355
libMesh::DofMap::constrain_element_matrix
void constrain_element_matrix(DenseMatrix< Number > &matrix, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const
Constrains the element matrix.
Definition: dof_map.h:2021
libMesh::System::solution
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
Definition: system.h:1539
libMesh::FEType
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition: fe_type.h:178
libMesh::DofMap
This class handles the numbering of degrees of freedom on a mesh.
Definition: dof_map.h:176
libMesh::System::variable_number
unsigned short int variable_number(const std::string &var) const
Definition: system.C:1232
libMesh::System::get_dof_map
const DofMap & get_dof_map() const
Definition: system.h:2099
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::FEType::default_quadrature_order
Order default_quadrature_order() const
Definition: fe_type.h:353
LargeDeformationElasticity::jacobian
virtual void jacobian(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, NonlinearImplicitSystem &)
Evaluate the Jacobian of the nonlinear system.
Definition: systems_of_equations_ex7.C:128
libMesh::Parameters::get
const T & get(const std::string &) const
Definition: parameters.h:421
libMesh::System::update
virtual void update()
Update the local values to reflect the solution on neighboring processors.
Definition: system.C:408
libMesh::DenseVector< Number >
libMesh::EquationSystems::parameters
Parameters parameters
Data structure holding arbitrary parameters.
Definition: equation_systems.h:557