34 #include "libmesh/libmesh.h"    35 #include "libmesh/mesh.h"    36 #include "libmesh/linear_implicit_system.h"    37 #include "libmesh/equation_systems.h"    38 #include "libmesh/fe.h"    39 #include "libmesh/quadrature.h"    40 #include "libmesh/node.h"    41 #include "libmesh/elem.h"    42 #include "libmesh/dof_map.h"    43 #include "libmesh/quadrature_gauss.h"    44 #include "libmesh/vector_value.h"    45 #include "libmesh/tensor_value.h"    46 #include "libmesh/dense_matrix.h"    47 #include "libmesh/dense_submatrix.h"    48 #include "libmesh/dense_vector.h"    49 #include "libmesh/dense_subvector.h"    50 #include "libmesh/sparse_matrix.h"    51 #include "libmesh/numeric_vector.h"    52 #include "libmesh/exodusII_io.h"    53 #include "libmesh/dirichlet_boundaries.h"    54 #include "libmesh/zero_function.h"    55 #include "libmesh/linear_solver.h"    56 #include "libmesh/getpot.h"    57 #include "libmesh/enum_solver_package.h"    58 #include "libmesh/enum_solver_type.h"    59 #include "libmesh/parallel.h"    60 #include "libmesh/mesh_refinement.h"    63 #ifdef LIBMESH_HAVE_EIGEN    64 #include "libmesh/ignore_warnings.h"    65 # include <Eigen/Dense>    66 #include "libmesh/restore_warnings.h"    73 typedef Eigen::Matrix<libMesh::Real, Eigen::Dynamic, Eigen::Dynamic> 
MyMatrixXd;
    83                      const std::string & system_name);
    86 int main (
int argc, 
char ** argv)
    92   libmesh_example_requires (3 == LIBMESH_DIM, 
"3D support");
    95 #ifndef LIBMESH_ENABLE_DIRICHLET    96   libmesh_example_requires(
false, 
"--enable-dirichlet");
   100 #ifndef LIBMESH_HAVE_EXODUS_API   101   libmesh_example_requires (
false, 
"ExodusII support");
   104 #ifndef LIBMESH_ENABLE_SECOND_DERIVATIVES   105   libmesh_example_requires (
false, 
"second derivatives enabled");
   110 #ifndef LIBMESH_HAVE_EIGEN   111   libmesh_example_requires(
false, 
"--enable-eigen");
   116 #ifndef LIBMESH_HAVE_XDR   117   libmesh_example_requires (
false, 
"XDR support");
   122 #ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION   123   libmesh_example_requires (
false, 
"--disable-quadruple-precision");
   127   const int distributed_load =
   144   const int n_refinements =
   149 #ifndef LIBMESH_ENABLE_AMR   150   libmesh_example_requires(n_refinements==0, 
"--enable-amr");
   191   equation_systems.
parameters.
set<
bool>(
"distributed load")  = (distributed_load != 0);
   201 #ifdef LIBMESH_ENABLE_DIRICHLET   230 #endif // LIBMESH_ENABLE_DIRICHLET   233   equation_systems.
init();
   247   if (distributed_load==0)
   250       Node * node_C = 
nullptr;
   251       Point point_C(0, 3, 3);
   253         Real nearest_dist_sq = std::numeric_limits<Real>::max();
   258         for (
auto & node : 
mesh.local_node_ptr_range())
   261             if (dist_sq < nearest_dist_sq)
   263                 nearest_dist_sq = dist_sq;
   269         unsigned int minrank = 0;
   270         system.
comm().
minloc(nearest_dist_sq, minrank);
   276           nearest_node_id = node_C->
id();
   297       Number w_C_bar = -E*h*w/q;
   298       const Real w_C_bar_analytic = 164.24;
   302       libMesh::out << 
"z-displacement of the point C: " << w_C_bar << std::endl;
   303       libMesh::out << 
"Analytic solution: " << w_C_bar_analytic << std::endl;
   307       Point point_D(0, 0, 3);
   312       const Real v_D_bar_analytic = 4.114;
   316       libMesh::out << 
"y-displacement of the point D: " << v_D_bar << std::endl;
   317       libMesh::out << 
"Analytic solution: " << v_D_bar_analytic << std::endl;
   329                      const std::string & system_name)
   336 #if defined(LIBMESH_HAVE_EIGEN) && defined(LIBMESH_ENABLE_SECOND_DERIVATIVES)   339   libmesh_assert_equal_to (system_name, 
"Shell");
   353   const bool distributed_load  = es.
parameters.
get<
bool> (
"distributed load");
   360     0., 0., 0.5 * (1-nu);
   361   Hm *= h * E/(1-nu*nu);
   368     0., 0., 0.5 * (1-nu);
   369   Hf *= h*h*h/12 * E/(1-nu*nu);
   373   Hc0 *= h * 5./6*E/(2*(1+nu));
   376   Hc1 *= h*h*h/12 * 5./6*E/(2*(1+nu));
   384   fe->attach_quadrature_rule (&qrule);
   387   const std::vector<Real> & JxW = fe->get_JxW();
   391   const std::vector<RealGradient> & dxyzdxi = fe->get_dxyzdxi();
   392   const std::vector<RealGradient> & dxyzdeta = fe->get_dxyzdeta();
   394   const std::vector<RealGradient> & d2xyzdxi2 = fe->get_d2xyzdxi2();
   395   const std::vector<RealGradient> & d2xyzdeta2 = fe->get_d2xyzdeta2();
   396   const std::vector<RealGradient> & d2xyzdxideta = fe->get_d2xyzdxideta();
   397   const std::vector<std::vector<Real>> & dphidxi = fe->get_dphidxi();
   398   const std::vector<std::vector<Real>> & dphideta = fe->get_dphideta();
   399   const std::vector<std::vector<Real>> & phi = fe->get_phi();
   431   std::vector<dof_id_type> dof_indices;
   432   std::vector<std::vector<dof_id_type>> dof_indices_var(6);
   436   for (
const auto & elem : 
mesh.active_local_element_ptr_range())
   439       for (
unsigned int var=0; var<6; var++)
   440         dof_map.
dof_indices (elem, dof_indices_var[var], var);
   442       const unsigned int n_dofs   = dof_indices.size();
   443       const unsigned int n_var_dofs = dof_indices_var[0].size();
   446       std::vector<Point> nodes;
   447       for (
auto i : elem->node_index_range())
   448         nodes.push_back(elem->reference_elem()->node_ref(i));
   449       fe->reinit (elem, &nodes);
   452       MyVector3d X1(elem->node_ref(0)(0), elem->node_ref(0)(1), elem->node_ref(0)(2));
   453       MyVector3d X2(elem->node_ref(1)(0), elem->node_ref(1)(1), elem->node_ref(1)(2));
   454       MyVector3d X3(elem->node_ref(2)(0), elem->node_ref(2)(1), elem->node_ref(2)(2));
   455       MyVector3d X4(elem->node_ref(3)(0), elem->node_ref(3)(1), elem->node_ref(3)(2));
   458       std::vector<MyMatrix3d> F0node;
   459       std::vector<MyMatrix3d> Qnode;
   460       for (
auto i : elem->node_index_range())
   463           a1 << dxyzdxi[i](0), dxyzdxi[i](1), dxyzdxi[i](2);
   465           a2 << dxyzdeta[i](0), dxyzdeta[i](1), dxyzdeta[i](2);
   474           F0node.push_back(
F0);
   479           if (std::abs(1.+C)<1e-6)
   492                 C+1./(1+C)*ny*ny, -1./(1+C)*nx*ny, nx,
   493                 -1./(1+C)*nx*ny, C+1./(1+C)*nx*nx, ny,
   499       Ke.
resize (n_dofs, n_dofs);
   500       for (
unsigned int var_i=0; var_i<6; var_i++)
   501         for (
unsigned int var_j=0; var_j<6; var_j++)
   502           Ke_var[var_i][var_j].reposition (var_i*n_var_dofs, var_j*n_var_dofs, n_var_dofs, n_var_dofs);
   511       for (
unsigned int qp=0; qp<qrule.n_points(); ++qp)
   516           a1 << dxyzdxi[qp](0), dxyzdxi[qp](1), dxyzdxi[qp](2);
   518           a2 << dxyzdeta[qp](0), dxyzdeta[qp](1), dxyzdeta[qp](2);
   530           F0it = 
F0.inverse().transpose();
   537           if (std::abs(1.+C) < 1e-6)
   547                 C+1./(1+C)*ny*ny, -1./(1+C)*nx*ny, nx,
   548                 -1./(1+C)*nx*ny, C+1./(1+C)*nx*nx, ny,
   553           C0 = F0it.block<3,2>(0,0).transpose()*Q.block<3,2>(0,0);
   556           MyVector3d d2Xdxi2(d2xyzdxi2[qp](0), d2xyzdxi2[qp](1), d2xyzdxi2[qp](2));
   557           MyVector3d d2Xdeta2(d2xyzdeta2[qp](0), d2xyzdeta2[qp](1), d2xyzdeta2[qp](2));
   558           MyVector3d d2Xdxideta(d2xyzdxideta[qp](0), d2xyzdxideta[qp](1), d2xyzdxideta[qp](2));
   563             n.dot(d2Xdxi2), n.dot(d2Xdxideta),
   564             n.dot(d2Xdxideta), n.dot(d2Xdeta2);
   566           MyVector3d dndxi = -b(0,0)*F0it.col(0) - b(0,1)*F0it.col(1);
   567           MyVector3d dndeta = -b(1,0)*F0it.col(0) - b(1,1)*F0it.col(1);
   571             F0it.col(1).dot(dndeta), -F0it.col(0).dot(dndeta),
   572             -F0it.col(1).dot(dndxi), F0it.col(0).dot(dndxi);
   578           Real H = 0.5*(dndxi.dot(F0it.col(0))+dndeta.dot(F0it.col(1)));
   581           Real xi = qrule.qp(qp)(0);
   582           Real eta = qrule.qp(qp)(1);
   592           MyVector3d nA1 = 0.5*(Qnode[0].col(2)+Qnode[1].col(2));
   595           MyVector3d nB2 = 0.5*(Qnode[1].col(2)+Qnode[2].col(2));
   598           MyVector3d nA2 = 0.5*(Qnode[2].col(2)+Qnode[3].col(2));
   601           MyVector3d nB1 = 0.5*(Qnode[3].col(2)+Qnode[0].col(2));
   612           MyVector2d AS1A1(-aA1.dot(Qnode[0].col(1)), aA1.dot(Qnode[0].col(0)));
   613           MyVector2d AS2A1(-aA1.dot(Qnode[1].col(1)), aA1.dot(Qnode[1].col(0)));
   617           MyVector2d AS1A2(-aA2.dot(Qnode[3].col(1)), aA2.dot(Qnode[3].col(0)));
   618           MyVector2d AS2A2(-aA2.dot(Qnode[2].col(1)), aA2.dot(Qnode[2].col(0)));
   622           MyVector2d AS1B1(-aB1.dot(Qnode[0].col(1)), aB1.dot(Qnode[0].col(0)));
   623           MyVector2d AS2B1(-aB1.dot(Qnode[3].col(1)), aB1.dot(Qnode[3].col(0)));
   627           MyVector2d AS1B2(-aB2.dot(Qnode[1].col(1)), aB2.dot(Qnode[1].col(0)));
   628           MyVector2d AS2B2(-aB2.dot(Qnode[2].col(1)), aB2.dot(Qnode[2].col(0)));
   633           std::vector<MyMatrixXd> Bcnode;
   636           Bc.block<1,3>(0,0) = -nA1.transpose();
   637           Bc.block<1,2>(0,3) = AS1A1.transpose();
   638           Bc.block<1,3>(1,0) = -nB1.transpose();
   639           Bc.block<1,2>(1,3) = AS1B1.transpose();
   640           Bcnode.push_back(Bc);
   642           Bc.block<1,3>(0,0) = nA1.transpose();
   643           Bc.block<1,2>(0,3) = AS2A1.transpose();
   644           Bc.block<1,3>(1,0) = -nB2.transpose();
   645           Bc.block<1,2>(1,3) = AS1B2.transpose();
   646           Bcnode.push_back(Bc);
   648           Bc.block<1,3>(0,0) = nA2.transpose();
   649           Bc.block<1,2>(0,3) = AS2A2.transpose();
   650           Bc.block<1,3>(1,0) = nB2.transpose();
   651           Bc.block<1,2>(1,3) = AS2B2.transpose();
   652           Bcnode.push_back(Bc);
   654           Bc.block<1,3>(0,0) = -nA2.transpose();
   655           Bc.block<1,2>(0,3) = AS1A2.transpose();
   656           Bc.block<1,3>(1,0) = nB1.transpose();
   657           Bc.block<1,2>(1,3) = AS2B1.transpose();
   658           Bcnode.push_back(Bc);
   661           for (
unsigned int i=0; i<n_var_dofs; ++i)
   664               Real C1i = dphidxi[i][qp]*C0(0,0) + dphideta[i][qp]*C0(1,0);
   665               Real C2i = dphidxi[i][qp]*C0(0,1) + dphideta[i][qp]*C0(1,1);
   668               B0I = MyMatrixXd::Zero(3, 5);
   669               B0I.block<1,3>(0,0) = C1i*Q.col(0).transpose();
   670               B0I.block<1,3>(1,0) = C2i*Q.col(1).transpose();
   671               B0I.block<1,3>(2,0) = C2i*Q.col(0).transpose()+C1i*Q.col(1).transpose();
   674               Real bc1i = dphidxi[i][qp]*bc(0,0) + dphideta[i][qp]*bc(1,0);
   675               Real bc2i = dphidxi[i][qp]*bc(0,1) + dphideta[i][qp]*bc(1,1);
   677               MyVector2d V1i(-Q.col(0).dot(Qnode[i].col(1)),
   678                              Q.col(0).dot(Qnode[i].col(0)));
   680               MyVector2d V2i(-Q.col(1).dot(Qnode[i].col(1)),
   681                              Q.col(1).dot(Qnode[i].col(0)));
   684               B1I = MyMatrixXd::Zero(3,5);
   685               B1I.block<1,3>(0,0) = bc1i*Q.col(0).transpose();
   686               B1I.block<1,3>(1,0) = bc2i*Q.col(1).transpose();
   687               B1I.block<1,3>(2,0) = bc2i*Q.col(0).transpose()+bc1i*Q.col(1).transpose();
   689               B1I.block<1,2>(0,3) = C1i*V1i.transpose();
   690               B1I.block<1,2>(1,3) = C2i*V2i.transpose();
   691               B1I.block<1,2>(2,3) = C2i*V1i.transpose()+C1i*V2i.transpose();
   695               B2I = MyMatrixXd::Zero(3,5);
   697               B2I.block<1,2>(0,3) = bc1i*V1i.transpose();
   698               B2I.block<1,2>(1,3) = bc2i*V2i.transpose();
   699               B2I.block<1,2>(2,3) = bc2i*V1i.transpose()+bc1i*V2i.transpose();
   703               Bc0I = C0.transpose()*Bcnode[i];
   707               Bc1I = bc.transpose()*Bcnode[i];
   710               MyVector2d BdxiI(dphidxi[i][qp],dphideta[i][qp]);
   713               for (
unsigned int j=0; j<n_var_dofs; ++j)
   717                   Real C1j = dphidxi[j][qp]*C0(0,0) + dphideta[j][qp]*C0(1,0);
   718                   Real C2j = dphidxi[j][qp]*C0(0,1) + dphideta[j][qp]*C0(1,1);
   721                   B0J = MyMatrixXd::Zero(3,5);
   722                   B0J.block<1,3>(0,0) = C1j*Q.col(0).transpose();
   723                   B0J.block<1,3>(1,0) = C2j*Q.col(1).transpose();
   724                   B0J.block<1,3>(2,0) = C2j*Q.col(0).transpose()+C1j*Q.col(1).transpose();
   727                   Real bc1j = dphidxi[j][qp]*bc(0,0) + dphideta[j][qp]*bc(1,0);
   728                   Real bc2j = dphidxi[j][qp]*bc(0,1) + dphideta[j][qp]*bc(1,1);
   730                   MyVector2d V1j(-Q.col(0).dot(Qnode[j].col(1)),
   731                                  Q.col(0).dot(Qnode[j].col(0)));
   733                   MyVector2d V2j(-Q.col(1).dot(Qnode[j].col(1)),
   734                                  Q.col(1).dot(Qnode[j].col(0)));
   737                   B1J = MyMatrixXd::Zero(3,5);
   738                   B1J.block<1,3>(0,0) = bc1j*Q.col(0).transpose();
   739                   B1J.block<1,3>(1,0) = bc2j*Q.col(1).transpose();
   740                   B1J.block<1,3>(2,0) = bc2j*Q.col(0).transpose()+bc1j*Q.col(1).transpose();
   742                   B1J.block<1,2>(0,3) = C1j*V1j.transpose();
   743                   B1J.block<1,2>(1,3) = C2j*V2j.transpose();
   744                   B1J.block<1,2>(2,3) = C2j*V1j.transpose()+C1j*V2j.transpose();
   748                   B2J = MyMatrixXd::Zero(3,5);
   750                   B2J.block<1,2>(0,3) = bc1j*V1j.transpose();
   751                   B2J.block<1,2>(1,3) = bc2j*V2j.transpose();
   752                   B2J.block<1,2>(2,3) = bc2j*V1j.transpose()+bc1j*V2j.transpose();
   756                   Bc0J = C0.transpose()*Bcnode[j];
   760                   Bc1J = bc.transpose()*Bcnode[j];
   763                   MyVector2d BdxiJ(dphidxi[j][qp], dphideta[j][qp]);
   769                   local_KIJ = JxW[qp] * (
   770                                          B0I.transpose() * Hm * B0J
   771                                          +  B2I.transpose() * Hf * B0J
   772                                          +  B0I.transpose() * Hf * B2J
   773                                          +  B1I.transpose() * Hf * B1J
   774                                          +  2*H * B0I.transpose() * Hf * B1J
   775                                          +  2*H * B1I.transpose() * Hf * B0J
   776                                          +  Bc0I.transpose() * Hc0 * Bc0J
   777                                          +  Bc1I.transpose() * Hc1 * Bc1J
   778                                          +  2*H * Bc0I.transpose() * Hc1 * Bc1J
   779                                          +  2*H * Bc1I.transpose() * Hc1 * Bc0J
   784                   full_local_KIJ = MyMatrixXd::Zero(6, 6);
   785                   full_local_KIJ.block<5,5>(0,0)=local_KIJ;
   796                   full_local_KIJ(5,5) = 
Real(Hf(0,0)*JxW[qp]*BdI.transpose()*BdJ);
   801                   TI = MyMatrixXd::Identity(6,6);
   802                   TI.block<3,3>(3,3) = Qnode[i].transpose();
   804                   TJ = MyMatrixXd::Identity(6,6);
   805                   TJ.block<3,3>(3,3) = Qnode[j].transpose();
   806                   global_KIJ = TI.transpose()*full_local_KIJ*TJ;
   811                   for (
unsigned int k=0;k<6;k++)
   812                     for (
unsigned int l=0;l<6;l++)
   813                       Ke_var[k][l](i,j) += global_KIJ(k,l);
   819       if (distributed_load)
   822           for (
unsigned int shellface=0; shellface<2; shellface++)
   824               std::vector<boundary_id_type> bids;
   827               for (std::size_t k=0; k<bids.size(); k++)
   829                   for (
unsigned int qp=0; qp<qrule.n_points(); ++qp)
   830                     for (
unsigned int i=0; i<n_var_dofs; ++i)
   831                       Fe_w(i) -= JxW[qp] * phi[i][qp];
   845   if (!distributed_load)
   855       for (
const auto & node : 
mesh.node_ptr_range())
   856         if (((*node) - C).norm() < 1e-3)
   857           system.
rhs->
set(node->dof_number(0, 2, 0), -q/4);
   863 #endif // defined(LIBMESH_HAVE_EIGEN) && defined(LIBMESH_ENABLE_SECOND_DERIVATIVES) class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
T command_line_next(std::string name, T default_value)
Use GetPot's search()/next() functions to get following arguments from the command line...
dof_id_type end_dof(const processor_id_type proc) const
This is the EquationSystems class. 
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. 
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
A Node is like a Point, but with more information. 
ConstFunction that simply returns 0. 
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. 
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
void minloc(T &r, unsigned int &min_id) const
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
void resize(const unsigned int n)
Resize the 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]...
Eigen::Matrix< libMesh::Real, Eigen::Dynamic, Eigen::Dynamic > MyMatrixXd
void print_info(std::ostream &os=libMesh::out) const
Prints information about the equation systems, by default to libMesh::out. 
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
NumericVector< Number > * rhs
The system matrix. 
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids an...
const Parallel::Communicator & comm() const
Order default_quadrature_order() const
void shellface_boundary_ids(const Elem *const elem, const unsigned short int shellface, std::vector< boundary_id_type > &vec_to_fill) const
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g. 
The libMesh namespace provides an interface to certain functionality in the library. 
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh. 
virtual void solve() override
Assembles & solves the linear system A*x=b. 
const T_sys & get_system(std::string_view name) const
Eigen::Matrix< libMesh::Real, 3, 3 > MyMatrix3d
This is the MeshBase class. 
Number current_solution(const dof_id_type global_dof_number) const
unsigned int variable_number(std::string_view var) const
Defines a dense subvector for use in finite element computations. 
This class handles the numbering of degrees of freedom on a mesh. 
void reposition(const unsigned int ioff, const unsigned int n)
Changes the location of the subvector in the parent vector. 
void libmesh_ignore(const Args &...)
unsigned int number() const
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. 
const T & get(std::string_view) const
Implements (adaptive) mesh refinement algorithms for a MeshBase. 
virtual void write_equation_systems(const std::string &fname, const EquationSystems &es, const std::set< std::string > *system_names=nullptr) override
Writes out the solution for no specific time or timestep. 
void print_info(std::ostream &os=libMesh::out, const unsigned int verbosity=0, const bool global=true) const
Prints relevant information about the mesh. 
Defines a dense submatrix for use in Finite Element-type computations. 
virtual const Node * query_node_ptr(const dof_id_type i) const =0
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary. 
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type. 
unsigned int add_variable(std::string_view 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. 
void attach_assemble_function(void fptr(EquationSystems &es, const std::string &name))
Register a user function to use in assembling the system matrix and RHS. 
void assemble_shell(EquationSystems &es, const std::string &system_name)
Eigen::Matrix< libMesh::Real, 2, 2 > MyMatrix2d
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
virtual void close()=0
Calls the NumericVector's internal assembly routines, ensuring that the values are consistent across ...
virtual void write(const std::string &name) const =0
int main(int argc, char **argv)
const FEType & variable_type(const unsigned int i) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
T & set(const std::string &)
const MeshBase & get_mesh() const
void resize(const unsigned int new_m, const unsigned int new_n)
Resizes the matrix to the specified size and calls zero(). 
This class implements specific orders of Gauss quadrature. 
unsigned int mesh_dimension() const
Parameters parameters
Data structure holding arbitrary parameters. 
void add_dirichlet_boundary(const DirichletBoundary &dirichlet_boundary)
Adds a copy of the specified Dirichlet boundary to the system. 
virtual void set(const numeric_index_type i, const T value)=0
Sets v(i) = value. 
virtual void init()
Initialize all the systems. 
dof_id_type first_dof(const processor_id_type proc) const
virtual System & add_system(std::string_view system_type, std::string_view name)
Add the system of type system_type named name to the systems array. 
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default. 
processor_id_type processor_id() const
Eigen::Matrix< libMesh::Real, 2, 1 > MyVector2d
const DofMap & get_dof_map() const
A Point defines a location in LIBMESH_DIM dimensional Real space. 
const SparseMatrix< Number > & get_system_matrix() const
Eigen::Matrix< libMesh::Real, 3, 1 > MyVector3d
void uniformly_refine(unsigned int n=1)
Uniformly refines the mesh n times.