libMesh
systems_of_equations_ex9.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 // <h1> Systems Example 9 - Linear elasticity problem with periodic constraints </h1>
21 //
22 // In this example we illustrate periodic constraints with a linear elasticity example.
23 // We consider a sector of a circular domain, and hence we must impose an "azimuthal"
24 // periodic condition, which entails a dof-transformation between the two periodic
25 // boundaries to account for the rotation of the coordinate system.
26 //
27 // The baseline code is from systems_of_equations_ex6, and we edit to use a different mesh
28 // and to impose the periodic boundary condition.
29 
30 
31 // C++ include files that we need
32 #include <iostream>
33 #include <algorithm>
34 #include <math.h>
35 
36 // libMesh includes
37 #include "libmesh/libmesh_config.h"
38 #include "libmesh/libmesh.h"
39 #include "libmesh/mesh.h"
40 #include "libmesh/mesh_generation.h"
41 #include "libmesh/exodusII_io.h"
42 #include "libmesh/gnuplot_io.h"
43 #include "libmesh/linear_implicit_system.h"
44 #include "libmesh/equation_systems.h"
45 #include "libmesh/fe.h"
46 #include "libmesh/quadrature_gauss.h"
47 #include "libmesh/dof_map.h"
48 #include "libmesh/sparse_matrix.h"
49 #include "libmesh/numeric_vector.h"
50 #include "libmesh/dense_matrix.h"
51 #include "libmesh/dense_submatrix.h"
52 #include "libmesh/dense_vector.h"
53 #include "libmesh/dense_subvector.h"
54 #include "libmesh/perf_log.h"
55 #include "libmesh/elem.h"
56 #include "libmesh/boundary_info.h"
57 #include "libmesh/zero_function.h"
58 #include "libmesh/dirichlet_boundaries.h"
59 #include "libmesh/string_to_enum.h"
60 #include "libmesh/getpot.h"
61 #include "libmesh/solver_configuration.h"
62 #include "libmesh/petsc_linear_solver.h"
63 #include "libmesh/petsc_macro.h"
64 #include "libmesh/periodic_boundaries.h"
65 #include "libmesh/periodic_boundary.h"
66 #include "libmesh/enum_solver_package.h"
67 
68 // Bring in everything from the libMesh namespace
69 using namespace libMesh;
70 
71 #ifdef LIBMESH_ENABLE_PERIODIC
72 // Here we define the azimuthal periodic boundary condition class.
73 // This class assumes that (u,v,w) are variables 0, 1, and 2 in
74 // the System, but this could be made more general if needed.
76 {
77 public:
82  Point center,
83  Point axis,
84  Real angle)
85  :
87  _center(center),
88  _axis(axis),
89  _theta(angle)
90  {
91  set_variable(0);
92  set_variable(1);
93  set_variable(2);
94  set_transformation_matrix(get_rotation_matrix());
95  }
96 
101  :
103  _center(o._center),
104  _axis(o._axis),
105  _theta(o._theta)
106  {
107  if (t == INVERSE)
108  {
109  std::swap(myboundary, pairedboundary);
110  _theta *= -1.0;
111  }
112 
113  set_variable(0);
114  set_variable(1);
115  set_variable(2);
116  set_transformation_matrix(get_rotation_matrix());
117  }
118 
123 
128  {
129  // Formula for rotation matrix about an axis is given on wikipedia:
130  // en.wikipedia.org/wiki/Rotation_matrix
131  // We rotate by angle theta about the axis defined by u, which is a
132  // unit vector in the direction of _axis.
133  Point u = _axis.unit();
134  Real u_x = u(0);
135  Real u_y = u(1);
136  Real u_z = u(2);
137  DenseMatrix<Real> R(3,3);
138  R(0,0) = cos(_theta) + u_x*u_x*(1.0 - cos(_theta));
139  R(0,1) = u_x*u_y*(1.0 - cos(_theta)) - u_z*sin(_theta);
140  R(0,2) = u_x*u_z*(1.0 - cos(_theta)) + u_y*sin(_theta);
141  R(1,0) = u_y*u_x*(1.0 - cos(_theta)) + u_z*sin(_theta);
142  R(1,1) = cos(_theta) + u_y*u_y*(1.0 - cos(_theta));
143  R(1,2) = u_y*u_z*(1.0 - cos(_theta)) - u_x*sin(_theta);
144  R(2,0) = u_z*u_x*(1.0 - cos(_theta)) - u_y*sin(_theta);
145  R(2,1) = u_z*u_y*(1.0 - cos(_theta)) + u_x*sin(_theta);
146  R(2,2) = cos(_theta) + u_z*u_z*(1.0 - cos(_theta));
147 
148  return R;
149  }
150 
156  virtual Point get_corresponding_pos(const Point & pt) const override
157  {
158  DenseVector<Real> translated_pt(3);
159  for(unsigned int i=0; i<3; i++)
160  {
161  translated_pt(i) = pt(i) - _center(i);
162  }
163 
164  // Note that since _theta defines the angle from "paired boundary" to
165  // "my boundary", and we want the inverse of that here, we must use
166  // vector_mult_transpose below.
167  DenseVector<Real> rotated_pt;
168  get_transformation_matrix().vector_mult_transpose(rotated_pt, translated_pt);
169 
170  Point corresponding_pos;
171  for(unsigned int i=0; i<3; i++)
172  {
173  corresponding_pos(i) = rotated_pt(i) + _center(i);
174  }
175  return corresponding_pos;
176  }
177 
183  virtual std::unique_ptr<PeriodicBoundaryBase> clone(TransformationType t = FORWARD) const override
184  {
185  return libmesh_make_unique<AzimuthalPeriodicBoundary>(*this, t);
186  }
187 
188 private:
189 
190  // Define the properties needed for the azimuthal periodic boundary.
191  // Note that _theta specifies the angle from "paired boundary" to
192  // "my boundary".
196 };
197 #endif // LIBMESH_ENABLE_PERIODIC
198 
199 class LinearElasticity : public System::Assembly
200 {
201 private:
202  EquationSystems & es;
203 
204 public:
205 
207  es(es_in)
208  {}
209 
213  Real kronecker_delta(unsigned int i,
214  unsigned int j)
215  {
216  return i == j ? 1. : 0.;
217  }
218 
222  Real elasticity_tensor(unsigned int i,
223  unsigned int j,
224  unsigned int k,
225  unsigned int l)
226  {
227  // Hard code material parameters for the sake of simplicity
228  const Real poisson_ratio = 0.3;
229  const Real young_modulus = 1.;
230 
231  // Define the Lame constants
232  const Real lambda_1 = (young_modulus*poisson_ratio)/((1.+poisson_ratio)*(1.-2.*poisson_ratio));
233  const Real lambda_2 = young_modulus/(2.*(1.+poisson_ratio));
234 
235  return lambda_1 * kronecker_delta(i, j) * kronecker_delta(k, l) +
236  lambda_2 * (kronecker_delta(i, k) * kronecker_delta(j, l) + kronecker_delta(i, l) * kronecker_delta(j, k));
237  }
238 
242  void assemble()
243  {
244  const MeshBase & mesh = es.get_mesh();
245 
246  const unsigned int dim = mesh.mesh_dimension();
247 
248  LinearImplicitSystem & system = es.get_system<LinearImplicitSystem>("Elasticity");
249 
250  const unsigned int u_var = system.variable_number ("u");
251 
252  const DofMap & dof_map = system.get_dof_map();
253  FEType fe_type = dof_map.variable_type(u_var);
254  std::unique_ptr<FEBase> fe (FEBase::build(dim, fe_type));
255  QGauss qrule (dim, fe_type.default_quadrature_order());
256  fe->attach_quadrature_rule (&qrule);
257 
258  std::unique_ptr<FEBase> fe_face (FEBase::build(dim, fe_type));
259  QGauss qface(dim-1, fe_type.default_quadrature_order());
260  fe_face->attach_quadrature_rule (&qface);
261 
262  const std::vector<Real> & JxW = fe->get_JxW();
263  const std::vector<std::vector<Real>> & phi = fe->get_phi();
264  const std::vector<std::vector<RealGradient>> & dphi = fe->get_dphi();
265 
267  DenseSubMatrix<Number> Ke_var[3][3] =
268  {
272  };
273 
275 
276  DenseSubVector<Number> Fe_var[3] =
280 
281  std::vector<dof_id_type> dof_indices;
282  std::vector<std::vector<dof_id_type>> dof_indices_var(3);
283 
284  for (const auto & elem : mesh.active_local_element_ptr_range())
285  {
286  dof_map.dof_indices (elem, dof_indices);
287  for (unsigned int var=0; var<3; var++)
288  dof_map.dof_indices (elem, dof_indices_var[var], var);
289 
290  const unsigned int n_dofs = dof_indices.size();
291  const unsigned int n_var_dofs = dof_indices_var[0].size();
292 
293  fe->reinit (elem);
294 
295  Ke.resize (n_dofs, n_dofs);
296  for (unsigned int var_i=0; var_i<3; var_i++)
297  for (unsigned int var_j=0; var_j<3; var_j++)
298  Ke_var[var_i][var_j].reposition (var_i*n_var_dofs, var_j*n_var_dofs, n_var_dofs, n_var_dofs);
299 
300  Fe.resize (n_dofs);
301  for (unsigned int var=0; var<3; var++)
302  Fe_var[var].reposition (var*n_var_dofs, n_var_dofs);
303 
304  for (unsigned int qp=0; qp<qrule.n_points(); qp++)
305  {
306  // assemble \int_Omega C_ijkl u_k,l v_i,j \dx
307  for (unsigned int dof_i=0; dof_i<n_var_dofs; dof_i++)
308  for (unsigned int dof_j=0; dof_j<n_var_dofs; dof_j++)
309  for (unsigned int i=0; i<3; i++)
310  for (unsigned int j=0; j<3; j++)
311  for (unsigned int k=0; k<3; k++)
312  for (unsigned int l=0; l<3; l++)
313  Ke_var[i][k](dof_i,dof_j) +=
314  JxW[qp] * elasticity_tensor(i,j,k,l) * dphi[dof_j][qp](l) * dphi[dof_i][qp](j);
315 
316  // assemble \int_Omega f_i v_i \dx
317  DenseVector<Number> f_vec(3);
318  if(elem->subdomain_id() == 101)
319  {
320  f_vec(0) = 1.;
321  f_vec(1) = 1.;
322  f_vec(2) = 0.;
323  }
324  else if(elem->subdomain_id() == 1)
325  {
326  f_vec(0) = 0.36603;
327  f_vec(1) = 1.36603;
328  f_vec(2) = 0.;
329  }
330  for (unsigned int dof_i=0; dof_i<n_var_dofs; dof_i++)
331  for (unsigned int i=0; i<3; i++)
332  Fe_var[i](dof_i) += JxW[qp] * (f_vec(i) * phi[dof_i][qp]);
333  }
334 
335  dof_map.constrain_element_matrix_and_vector (Ke, Fe, dof_indices);
336 
337  system.matrix->add_matrix (Ke, dof_indices);
338  system.rhs->add_vector (Fe, dof_indices);
339  }
340  }
341 };
342 
343 
344 // Begin the main program.
345 int main (int argc, char ** argv)
346 {
347  // Initialize libMesh and any dependent libraries
348  LibMeshInit init (argc, argv);
349 
350  // This example requires a linear solver package.
351  libmesh_example_requires(libMesh::default_solver_package() != INVALID_SOLVER_PACKAGE,
352  "--enable-petsc, --enable-trilinos, or --enable-eigen");
353 
354 #ifndef LIBMESH_HAVE_EXODUS_API
355  // example requires ExodusII to load the mesh
356  libmesh_example_requires(false, "--enable-exodus");
357 #endif
358 
359  // We use Dirichlet and Periodic boundary conditions here
360 #ifndef LIBMESH_ENABLE_DIRICHLET
361  libmesh_example_requires(false, "--enable-dirichlet");
362 #endif
363 #ifndef LIBMESH_ENABLE_PERIODIC
364  libmesh_example_requires(false, "--enable-periodic");
365 #endif
366 
367  // Initialize the cantilever mesh
368  const unsigned int dim = 3;
369 
370  // Make sure libMesh was compiled for 3D
371  libmesh_example_requires(dim == LIBMESH_DIM, "3D support");
372 
373  // Make sure libMesh has normal boundary id sizes
374  libmesh_example_requires(sizeof(boundary_id_type) > 1, "boundary_id_size > 1");
375 
376 #if LIBMESH_BOUNDARY_ID_BYTES > 1
377  // Create a 3D mesh distributed across the default MPI communicator.
378  Mesh mesh(init.comm());
379 
380  // Create an equation systems object.
381  EquationSystems equation_systems (mesh);
382 
383  // Declare the system and its variables.
384  // Create a system named "Elasticity"
385  LinearImplicitSystem & system =
386  equation_systems.add_system<LinearImplicitSystem> ("Elasticity");
387 
388 #ifdef LIBMESH_ENABLE_PERIODIC
389  // Add two azimuthal periodic boundaries on two adjacent domains.
390  // We do this to show that the periodic boundary condition that
391  // we impose leads to a continuous solution across adjacent domains.
392  //
393  // We add the periodic boundaries *before* reading the Mesh, so
394  // that periodic neighbors will be retained when a DistributedMesh
395  // is distributed.
396  //
397  // The angle specified below defines the mapping
398  // from "pairedboundary" to "myboundary".
399  {
400  Point center(0., 0., 0.);
401  Point axis(0., 0., 1.);
402  Real angle = 2*libMesh::pi/12.0;
403  AzimuthalPeriodicBoundary periodic_bc(center, axis, angle);
404  periodic_bc.myboundary = 301;
405  periodic_bc.pairedboundary = 302;
406  system.get_dof_map().add_periodic_boundary(periodic_bc);
407  }
408  {
409  Point center(0., 0., 0.);
410  Point axis(0., 0., 1.);
411  Real angle = 2*libMesh::pi/12.0;
412  AzimuthalPeriodicBoundary periodic_bc(center, axis, angle);
413  periodic_bc.myboundary = 401;
414  periodic_bc.pairedboundary = 402;
415  system.get_dof_map().add_periodic_boundary(periodic_bc);
416  }
417 #endif // LIBMESH_ENABLE_PERIODIC
418 
419  mesh.read("systems_of_equations_ex9.exo");
420 
421  // Print information about the mesh to the screen.
422  mesh.print_info();
423 
424  // Add three displacement variables, u and v, to the system
425  unsigned int u_var = system.add_variable("u", FIRST, LAGRANGE);
426  unsigned int v_var = system.add_variable("v", FIRST, LAGRANGE);
427  unsigned int w_var = system.add_variable("w", FIRST, LAGRANGE);
428 
429  LinearElasticity le(equation_systems);
430  system.attach_assemble_object(le);
431 
432  std::vector<unsigned int> variables;
433  variables.push_back(u_var);
434  variables.push_back(v_var);
435  variables.push_back(w_var);
436  ZeroFunction<> zf;
437  std::set<boundary_id_type> clamped_boundary_ids;
438  clamped_boundary_ids.insert(300);
439  clamped_boundary_ids.insert(400);
440 
441 #ifdef LIBMESH_ENABLE_DIRICHLET
442  DirichletBoundary clamped_bc(clamped_boundary_ids, variables, zf);
443  system.get_dof_map().add_dirichlet_boundary(clamped_bc);
444 #endif
445 
446  // Initialize the data structures for the equation system.
447  equation_systems.init();
448 
449  // Print information about the system to the screen.
450  equation_systems.print_info();
451 
452  // Solve the system
453  system.solve();
454 
455  // Plot the solution
456 #ifdef LIBMESH_HAVE_EXODUS_API
457 
458  ExodusII_IO (mesh).write_equation_systems("solution.exo",
459  equation_systems);
460 
461 #endif // #ifdef LIBMESH_HAVE_EXODUS_API
462 #endif // #if LIBMESH_BOUNDARY_ID_BYTES > 1
463 
464  // All done.
465  return 0;
466 }
elasticity_tensor
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
Definition: assembly.C:40
libMesh::pi
const Real pi
.
Definition: libmesh.h:237
libMesh::Mesh
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
libMesh::EquationSystems::get_mesh
const MeshBase & get_mesh() const
Definition: equation_systems.h:637
libMesh::MeshBase::read
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false)=0
Interfaces for reading/writing a mesh to/from a file.
libMesh::ExplicitSystem::rhs
NumericVector< Number > * rhs
The system matrix.
Definition: explicit_system.h:114
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::add_dirichlet_boundary
void add_dirichlet_boundary(const DirichletBoundary &dirichlet_boundary)
Adds a copy of the specified Dirichlet boundary to the system.
Definition: dof_map_constraints.C:4390
LinearElasticity
Definition: systems_of_equations_ex6.C:114
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::PeriodicBoundaryBase
The base class for defining periodic boundaries.
Definition: periodic_boundary_base.h:48
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::EquationSystems::get_system
const T_sys & get_system(const std::string &name) const
Definition: equation_systems.h:757
AzimuthalPeriodicBoundary::AzimuthalPeriodicBoundary
AzimuthalPeriodicBoundary(Point center, Point axis, Real angle)
Constructor.
Definition: systems_of_equations_ex9.C:81
kronecker_delta
Real kronecker_delta(unsigned int i, unsigned int j)
Definition: assembly.C:34
libMesh::DenseMatrix< Real >
libMesh::LinearImplicitSystem::solve
virtual void solve() override
Assembles & solves the linear system A*x=b.
Definition: linear_implicit_system.C:108
libMesh::default_solver_package
SolverPackage default_solver_package()
Definition: libmesh.C:993
mesh
MeshBase & mesh
Definition: mesh_communication.C:1257
libMesh::MeshBase::mesh_dimension
unsigned int mesh_dimension() const
Definition: mesh_base.C:135
LinearElasticity::elasticity_tensor
Real elasticity_tensor(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_ex9.C:222
libMesh::ExodusII_IO
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
Definition: exodusII_io.h:51
libMesh::boundary_id_type
int8_t boundary_id_type
Definition: id_types.h:51
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::PeriodicBoundaryBase::TransformationType
TransformationType
Definition: periodic_boundary_base.h:51
libMesh::TriangleWrapper::init
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
libMesh::NumericVector::add_vector
virtual void add_vector(const T *v, const std::vector< numeric_index_type > &dof_indices)
Computes , where v is a pointer and each dof_indices[i] specifies where to add value v[i].
Definition: numeric_vector.C:363
libMesh::MeshBase
This is the MeshBase class.
Definition: mesh_base.h:78
LinearElasticity::assemble
void assemble()
Assemble the system matrix and right-hand side vector.
Definition: systems_of_equations_ex9.C:242
libMesh::INVALID_SOLVER_PACKAGE
Definition: enum_solver_package.h:43
AzimuthalPeriodicBoundary::_center
Point _center
Definition: systems_of_equations_ex9.C:193
AzimuthalPeriodicBoundary::_theta
Real _theta
Definition: systems_of_equations_ex9.C:195
libMesh::FEGenericBase::build
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
libMesh::System::add_variable
unsigned int add_variable(const std::string &var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1069
LinearElasticity::LinearElasticity
LinearElasticity(EquationSystems &es_in)
Definition: systems_of_equations_ex9.C:206
libMesh::Point
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
libMesh::ImplicitSystem::matrix
SparseMatrix< Number > * matrix
The system matrix.
Definition: implicit_system.h:393
libMesh::PeriodicBoundaryBase::myboundary
boundary_id_type myboundary
The boundary ID of this boundary and its counterpart.
Definition: periodic_boundary_base.h:58
main
int main(int argc, char **argv)
Definition: systems_of_equations_ex9.C:345
libMesh::DofMap::variable_type
const FEType & variable_type(const unsigned int c) const
Definition: dof_map.h:1924
libMesh::LibMeshInit
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
Definition: libmesh.h:83
AzimuthalPeriodicBoundary::~AzimuthalPeriodicBoundary
virtual ~AzimuthalPeriodicBoundary()
Destructor.
Definition: systems_of_equations_ex9.C:122
libMesh::ZeroFunction
ConstFunction that simply returns 0.
Definition: zero_function.h:36
libMesh::DofMap::add_periodic_boundary
void add_periodic_boundary(const PeriodicBoundaryBase &periodic_boundary)
Adds a copy of the specified periodic boundary to the system.
Definition: dof_map_constraints.C:4510
AzimuthalPeriodicBoundary::clone
virtual std::unique_ptr< PeriodicBoundaryBase > clone(TransformationType t=FORWARD) const override
If we want the DofMap to be able to make copies of references and store them in the underlying map,...
Definition: systems_of_equations_ex9.C:183
libMesh::System::Assembly
Abstract base class to be used for system assembly.
Definition: system.h:143
libMesh::EquationSystems
This is the EquationSystems class.
Definition: equation_systems.h:74
libMesh::DofMap::constrain_element_matrix_and_vector
void constrain_element_matrix_and_vector(DenseMatrix< Number > &matrix, DenseVector< Number > &rhs, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const
Constrains the element matrix and vector.
Definition: dof_map.h:2034
libMesh::DenseSubVector< Number >
libMesh::MeshOutput::write_equation_systems
virtual void write_equation_systems(const std::string &, const EquationSystems &, const std::set< std::string > *system_names=nullptr)
This method implements writing a mesh with data to a specified file where the data is taken from the ...
Definition: mesh_output.C:31
AzimuthalPeriodicBoundary::get_rotation_matrix
DenseMatrix< Real > get_rotation_matrix() const
Get the rotation matrix for this transformation.
Definition: systems_of_equations_ex9.C:127
libMesh::DenseVector::resize
void resize(const unsigned int n)
Resize the vector.
Definition: dense_vector.h:355
swap
void swap(Iterator &lhs, Iterator &rhs)
swap, used to implement op=
Definition: variant_filter_iterator.h:478
libMesh::SparseMatrix::add_matrix
virtual void add_matrix(const DenseMatrix< T > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols)=0
Add the full matrix dm to the SparseMatrix.
libMesh::FEType
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition: fe_type.h:178
libMesh::TypeVector::unit
TypeVector< T > unit() const
Definition: type_vector.h:1158
AzimuthalPeriodicBoundary
Definition: systems_of_equations_ex9.C:75
libMesh::DofMap
This class handles the numbering of degrees of freedom on a mesh.
Definition: dof_map.h:176
libMesh::MeshBase::print_info
void print_info(std::ostream &os=libMesh::out) const
Prints relevant information about the mesh.
Definition: mesh_base.C:585
libMesh::DirichletBoundary
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids an...
Definition: dirichlet_boundaries.h:88
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
AzimuthalPeriodicBoundary::get_corresponding_pos
virtual Point get_corresponding_pos(const Point &pt) const override
This function should be overridden by derived classes to define how one finds corresponding nodes on ...
Definition: systems_of_equations_ex9.C:156
AzimuthalPeriodicBoundary::AzimuthalPeriodicBoundary
AzimuthalPeriodicBoundary(const AzimuthalPeriodicBoundary &o, TransformationType t=FORWARD)
Copy constructor, with option for the copy to represent an inverse transformation.
Definition: systems_of_equations_ex9.C:100
libMesh::System::attach_assemble_object
void attach_assemble_object(Assembly &assemble)
Register a user object to use in assembling the system matrix and RHS.
Definition: system.C:1774
libMesh::LAGRANGE
Definition: enum_fe_family.h:36
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::PeriodicBoundaryBase::pairedboundary
boundary_id_type pairedboundary
Definition: periodic_boundary_base.h:58
libMesh::FEType::default_quadrature_order
Order default_quadrature_order() const
Definition: fe_type.h:353
libMesh::LinearImplicitSystem
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
Definition: linear_implicit_system.h:55
AzimuthalPeriodicBoundary::_axis
Point _axis
Definition: systems_of_equations_ex9.C:194
libMesh::FIRST
Definition: enum_order.h:42
LinearElasticity::kronecker_delta
Real kronecker_delta(unsigned int i, unsigned int j)
Kronecker delta function.
Definition: systems_of_equations_ex9.C:213
libMesh::DenseVector
Defines a dense vector for use in Finite Element-type computations.
Definition: meshless_interpolation_function.h:39