libMesh
miscellaneous_ex1.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>Miscellaneous Example 1 - Infinite Elements for the Wave Equation</h1>
21 // \author Daniel Dreyer
22 // \date 2003
23 //
24 // This is the sixth example program. It builds on
25 // the previous examples, and introduces the Infinite
26 // Element class. Note that the library must be compiled
27 // with Infinite Elements enabled. Otherwise, this
28 // example will abort.
29 // This example intends to demonstrate the similarities
30 // between the FE and the InfFE classes in libMesh.
31 // The matrices are assembled according to the wave equation.
32 // However, for practical applications a time integration
33 // scheme (as introduced in subsequent examples) should be
34 // used.
35 
36 // C++ include files that we need
37 #include <iostream>
38 #include <algorithm>
39 #include <math.h>
40 
41 // Basic include files needed for the mesh functionality.
42 #include "libmesh/exodusII_io.h"
43 #include "libmesh/libmesh.h"
44 #include "libmesh/mesh.h"
45 #include "libmesh/mesh_generation.h"
46 #include "libmesh/linear_implicit_system.h"
47 #include "libmesh/equation_systems.h"
48 #include "libmesh/enum_xdr_mode.h"
49 
50 // Define the Finite and Infinite Element object.
51 #include "libmesh/fe.h"
52 #include "libmesh/inf_fe.h"
53 #include "libmesh/inf_elem_builder.h"
54 
55 // Define Gauss quadrature rules.
56 #include "libmesh/quadrature_gauss.h"
57 
58 // Define useful datatypes for finite element
59 // matrix and vector components.
60 #include "libmesh/sparse_matrix.h"
61 #include "libmesh/numeric_vector.h"
62 #include "libmesh/dense_matrix.h"
63 #include "libmesh/dense_vector.h"
64 
65 // Define the DofMap, which handles degree of freedom
66 // indexing.
67 #include "libmesh/dof_map.h"
68 
69 // The definition of a vertex associated with a Mesh.
70 #include "libmesh/node.h"
71 
72 // The definition of a geometric element
73 #include "libmesh/elem.h"
74 
75 // Bring in everything from the libMesh namespace
76 using namespace libMesh;
77 
78 // Function prototype. This is similar to the Poisson
79 // assemble function of example 4.
81  const std::string & system_name);
82 
83 // Begin the main program.
84 int main (int argc, char ** argv)
85 {
86  // Initialize libMesh, like in example 2.
87  LibMeshInit init (argc, argv);
88 
89  // This example requires Infinite Elements
90 #ifndef LIBMESH_ENABLE_INFINITE_ELEMENTS
91  libmesh_example_requires(false, "--enable-ifem");
92 #else
93 
94  // Skip this 3D example if libMesh was compiled as 1D/2D-only.
95  libmesh_example_requires(3 <= LIBMESH_DIM, "3D support");
96 
97  // Tell the user what we are doing.
98  libMesh::out << "Running ex6 with dim = 3" << std::endl << std::endl;
99 
100  // Create a serialized mesh, distributed across the default MPI
101  // communicator.
102  Mesh mesh(init.comm());
103 
104  // Use the internal mesh generator to create elements
105  // on the square [-1,1]^3, of type Hex8.
107  4, 4, 4,
108  -1., 1.,
109  -1., 1.,
110  -1., 1.,
111  HEX8);
112 
113  // Print information about the mesh to the screen.
114  mesh.print_info();
115 
116  // Write the mesh before the infinite elements are added
117 #ifdef LIBMESH_HAVE_EXODUS_API
118  ExodusII_IO(mesh).write ("orig_mesh.e");
119 #endif
120 
121  // Normally, when a mesh is imported or created in
122  // libMesh, only conventional elements exist. The infinite
123  // elements used here, however, require prescribed
124  // nodal locations (with specified distances from an imaginary
125  // origin) and configurations that a conventional mesh creator
126  // in general does not offer. Therefore, an efficient method
127  // for building infinite elements is offered. It can account
128  // for symmetry planes and creates infinite elements in a fully
129  // automatic way.
130  //
131  // Right now, the simplified interface is used, automatically
132  // determining the origin. Check MeshBase for a generalized
133  // method that can even return the element faces of interior
134  // vibrating surfaces. The bool determines whether to be
135  // verbose.
136  InfElemBuilder builder(mesh);
137  builder.build_inf_elem(true);
138 
139  // Reassign subdomain_id() of all infinite elements.
140  // Otherwise, the exodus-api will fail on the mesh.
141  for (auto & elem : mesh.element_ptr_range())
142  if (elem->infinite())
143  elem->subdomain_id() = 1;
144 
145  // Print information about the mesh to the screen.
146  mesh.print_info();
147 
148  // Write the mesh with the infinite elements added.
149  // Compare this to the original mesh.
150 #ifdef LIBMESH_HAVE_EXODUS_API
151  ExodusII_IO(mesh).write ("ifems_added.e");
152 #endif
153 
154  // After building infinite elements, we have to let
155  // the elements find their neighbors again.
157 
158  // Create an equation systems object, where ThinSystem
159  // offers only the crucial functionality for solving a
160  // system. Use ThinSystem when you want the sleekest
161  // system possible.
162  EquationSystems equation_systems (mesh);
163 
164  // Declare the system and its variables.
165  // Create a system named "Wave". This can
166  // be a simple, steady system
167  equation_systems.add_system<LinearImplicitSystem> ("Wave");
168 
169  // Create an FEType describing the approximation
170  // characteristics of the InfFE object. Note that
171  // the constructor automatically defaults to some
172  // sensible values. But use FIRST order
173  // approximation.
174  FEType fe_type(FIRST);
175 
176  // Add the variable "p" to "Wave". Note that there exist
177  // various approaches in adding variables. In example 3,
178  // add_variable took the order of approximation and used
179  // default values for the FEFamily, while here the FEType
180  // is used.
181  equation_systems.get_system("Wave").add_variable("p", fe_type);
182 
183  // Give the system a pointer to the matrix assembly
184  // function.
185  equation_systems.get_system("Wave").attach_assemble_function (assemble_wave);
186 
187  // Set the speed of sound and fluid density
188  // as EquationSystems parameter,
189  // so that assemble_wave() can access it.
190  equation_systems.parameters.set<Real>("speed") = 1.;
191  equation_systems.parameters.set<Real>("fluid density") = 1.;
192 
193  // Initialize the data structures for the equation system.
194  equation_systems.init();
195 
196  // Prints information about the system to the screen.
197  equation_systems.print_info();
198 
199  // Solve the system "Wave".
200  equation_systems.get_system("Wave").solve();
201 
202  libMesh::out << "Wave system solved" << std::endl;
203 
204  // Write the whole EquationSystems object to file.
205  // For infinite elements, the concept of nodal_soln()
206  // is not applicable. Therefore, writing the mesh in
207  // some format @e always gives all-zero results at
208  // the nodes of the infinite elements. Instead,
209  // use the FEInterface::compute_data() methods to
210  // determine physically correct results within an
211  // infinite element.
212  equation_systems.write ("eqn_sys.dat", WRITE);
213 
214  libMesh::out << "eqn_sys.dat written" << std::endl;
215 
216  // All done.
217  return 0;
218 
219 #endif // else part of ifndef LIBMESH_ENABLE_INFINITE_ELEMENTS
220 }
221 
222 // This function assembles the system matrix and right-hand-side
223 // for the discrete form of our wave equation.
225  const std::string & libmesh_dbg_var(system_name))
226 {
227  // It is a good idea to make sure we are assembling
228  // the proper system.
229  libmesh_assert_equal_to (system_name, "Wave");
230 
231  // Avoid unused variable warnings when compiling without infinite
232  // elements enabled.
233  libmesh_ignore(es);
234 
235 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
236 
237  // Get a constant reference to the mesh object.
238  const MeshBase & mesh = es.get_mesh();
239 
240  // Get a reference to the system we are solving.
242 
243  // A reference to the DofMap object for this system. The DofMap
244  // object handles the index translation from node and element numbers
245  // to degree of freedom numbers.
246  const DofMap & dof_map = system.get_dof_map();
247 
248  // The dimension that we are running.
249  const unsigned int dim = mesh.mesh_dimension();
250 
251  // Copy the speed of sound to a local variable.
252  const Real speed = es.parameters.get<Real>("speed");
253 
254  // Get a constant reference to the Finite Element type
255  // for the first (and only) variable in the system.
256  const FEType & fe_type = dof_map.variable_type(0);
257 
258  // Build a Finite Element object of the specified type. Since the
259  // FEBase::build() member dynamically creates memory we will
260  // store the object as a std::unique_ptr<FEBase>.
261  std::unique_ptr<FEBase> fe (FEBase::build(dim, fe_type));
262 
263  // Do the same for an infinite element.
264  std::unique_ptr<FEBase> inf_fe (FEBase::build_InfFE(dim, fe_type));
265 
266  // A 2nd order Gauss quadrature rule for numerical integration.
267  QGauss qrule (dim, SECOND);
268 
269  // Tell the finite element object to use our quadrature rule.
270  fe->attach_quadrature_rule (&qrule);
271 
272  // Due to its internal structure, the infinite element handles
273  // quadrature rules differently. It takes the quadrature
274  // rule which has been initialized for the FE object, but
275  // creates suitable quadrature rules by @e itself. The user
276  // need not worry about this.
277  inf_fe->attach_quadrature_rule (&qrule);
278 
279  // Define data structures to contain the element matrix
280  // and right-hand-side vector contribution. Following
281  // basic finite element terminology we will denote these
282  // "Ke", "Ce", "Me", and "Fe" for the stiffness, damping
283  // and mass matrices, and the load vector. Note that in
284  // Acoustics, these descriptors though do @e not match the
285  // true physical meaning of the projectors. The final
286  // overall system, however, resembles the conventional
287  // notation again.
292 
293  // This vector will hold the degree of freedom indices for
294  // the element. These define where in the global system
295  // the element degrees of freedom get mapped.
296  std::vector<dof_id_type> dof_indices;
297 
298  // Now we will loop over all the elements in the mesh.
299  // We will compute the element matrix and right-hand-side
300  // contribution.
301  for (const auto & elem : mesh.active_local_element_ptr_range())
302  {
303  // Get the degree of freedom indices for the
304  // current element. These define where in the global
305  // matrix and right-hand-side this element will
306  // contribute to.
307  dof_map.dof_indices (elem, dof_indices);
308 
309  const unsigned int n_dofs =
310  cast_int<unsigned int>(dof_indices.size());
311 
312  // The mesh contains both finite and infinite elements. These
313  // elements are handled through different classes, namely
314  // FE and InfFE, respectively. However, since both
315  // are derived from FEBase, they share the same interface,
316  // and overall burden of coding is @e greatly reduced through
317  // using a pointer, which is adjusted appropriately to the
318  // current element type.
319  FEBase * cfe = nullptr;
320 
321  // This here is almost the only place where we need to
322  // distinguish between finite and infinite elements.
323  // For faster computation, however, different approaches
324  // may be feasible.
325  //
326  // Up to now, we do not know what kind of element we
327  // have. Aske the element of what type it is:
328  if (elem->infinite())
329  {
330  // We have an infinite element. Let cfe point
331  // to our InfFE object. This is handled through
332  // a std::unique_ptr. Through the std::unique_ptr::get() we "borrow"
333  // the pointer, while the std::unique_ptr inf_fe is
334  // still in charge of memory management.
335  cfe = inf_fe.get();
336  }
337  else
338  {
339  // This is a conventional finite element. Let fe handle it.
340  cfe = fe.get();
341 
342  // Boundary conditions.
343  // Here we just zero the rhs-vector. For natural boundary
344  // conditions check e.g. previous examples.
345  {
346  // Zero the RHS for this element.
347  Fe.resize (n_dofs);
348 
349  system.rhs->add_vector (Fe, dof_indices);
350  } // end boundary condition section
351  } // else if (elem->infinite())
352 
353  // This is slightly different from the Poisson solver:
354  // Since the finite element object may change, we have to
355  // initialize the constant references to the data fields
356  // each time again, when a new element is processed.
357  //
358  // The element Jacobian * quadrature weight at each integration point.
359  const std::vector<Real> & JxW = cfe->get_JxW();
360 
361  // The element shape functions evaluated at the quadrature points.
362  const std::vector<std::vector<Real>> & phi = cfe->get_phi();
363 
364  // The element shape function gradients evaluated at the quadrature
365  // points.
366  const std::vector<std::vector<RealGradient>> & dphi = cfe->get_dphi();
367 
368  // The infinite elements need more data fields than conventional FE.
369  // These are the gradients of the phase term dphase, an additional
370  // radial weight for the test functions Sobolev_weight, and its
371  // gradient.
372  //
373  // Note that these data fields are also initialized appropriately by
374  // the FE method, so that the weak form (below) is valid for @e both
375  // finite and infinite elements.
376  const std::vector<RealGradient> & dphase = cfe->get_dphase();
377  const std::vector<Real> & weight = cfe->get_Sobolev_weight();
378  const std::vector<RealGradient> & dweight = cfe->get_Sobolev_dweight();
379 
380  // Now this is all independent of whether we use an FE
381  // or an InfFE. Nice, hm? ;-)
382  //
383  // Compute the element-specific data, as described
384  // in previous examples.
385  cfe->reinit (elem);
386 
387  // Zero the element matrices. Boundary conditions were already
388  // processed in the FE-only section, see above.
389  Ke.resize (n_dofs, n_dofs);
390  Ce.resize (n_dofs, n_dofs);
391  Me.resize (n_dofs, n_dofs);
392 
393  // The total number of quadrature points for infinite elements
394  // @e has to be determined in a different way, compared to
395  // conventional finite elements. This type of access is also
396  // valid for finite elements, so this can safely be used
397  // anytime, instead of asking the quadrature rule, as
398  // seen in previous examples.
399  unsigned int max_qp = cfe->n_quadrature_points();
400 
401  // Loop over the quadrature points.
402  for (unsigned int qp=0; qp<max_qp; qp++)
403  {
404  // Similar to the modified access to the number of quadrature
405  // points, the number of shape functions may also be obtained
406  // in a different manner. This offers the great advantage
407  // of being valid for both finite and infinite elements.
408  const unsigned int n_sf = cfe->n_shape_functions();
409 
410  // Now we will build the element matrices. Since the infinite
411  // elements are based on a Petrov-Galerkin scheme, the
412  // resulting system matrices are non-symmetric. The additional
413  // weight, described before, is part of the trial space.
414  //
415  // For the finite elements, though, these matrices are symmetric
416  // just as we know them, since the additional fields dphase,
417  // weight, and dweight are initialized appropriately.
418  //
419  // test functions: weight[qp]*phi[i][qp]
420  // trial functions: phi[j][qp]
421  // phase term: phase[qp]
422  //
423  // derivatives are similar, but note that these are of type
424  // Point, not of type Real.
425  for (unsigned int i=0; i<n_sf; i++)
426  for (unsigned int j=0; j<n_sf; j++)
427  {
428  // (ndt*Ht + nHt*d) * nH
429  Ke(i,j) +=
430  (
431  (dweight[qp] * phi[i][qp] // Point * Real = Point
432  + // +
433  dphi[i][qp] * weight[qp] // Point * Real = Point
434  ) * dphi[j][qp]
435  ) * JxW[qp];
436 
437  // (d*Ht*nmut*nH - ndt*nmu*Ht*H - d*nHt*nmu*H)
438  Ce(i,j) +=
439  (
440  (dphase[qp] * dphi[j][qp]) // (Point * Point) = Real
441  * weight[qp] * phi[i][qp] // * Real * Real = Real
442  - // -
443  (dweight[qp] * dphase[qp]) // (Point * Point) = Real
444  * phi[i][qp] * phi[j][qp] // * Real * Real = Real
445  - // -
446  (dphi[i][qp] * dphase[qp]) // (Point * Point) = Real
447  * weight[qp] * phi[j][qp] // * Real * Real = Real
448  ) * JxW[qp];
449 
450  // (d*Ht*H * (1 - nmut*nmu))
451  Me(i,j) +=
452  (
453  (1. - (dphase[qp] * dphase[qp])) // (Real - (Point * Point)) = Real
454  * phi[i][qp] * phi[j][qp] * weight[qp] // * Real * Real * Real = Real
455  ) * JxW[qp];
456 
457  } // end of the matrix summation loop
458  } // end of quadrature point loop
459 
460  // The element matrices are now built for this element.
461  // Collect them in Ke, and then add them to the global matrix.
462  // The SparseMatrix::add_matrix() member does this for us.
463  Ke.add(1./speed , Ce);
464  Ke.add(1./(speed*speed), Me);
465 
466  // If this assembly program were to be used on an adaptive mesh,
467  // we would have to apply any hanging node constraint equations
468  dof_map.constrain_element_matrix(Ke, dof_indices);
469 
470  system.matrix->add_matrix (Ke, dof_indices);
471  } // end of element loop
472 
473  // Note that we have not applied any boundary conditions so far.
474  // Here we apply a unit load at the node located at (0,0,0).
475  for (const auto & node : mesh.local_node_ptr_range())
476  if (std::abs((*node)(0)) < TOLERANCE &&
477  std::abs((*node)(1)) < TOLERANCE &&
478  std::abs((*node)(2)) < TOLERANCE)
479  {
480  // The global number of the respective degree of freedom.
481  unsigned int dn = node->dof_number(0,0,0);
482 
483  system.rhs->add (dn, 1.);
484  }
485 
486 #else
487 
488  // dummy assert
489  libmesh_assert_not_equal_to (es.get_mesh().mesh_dimension(), 1);
490 
491 #endif //ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
492 }
libMesh::InfElemBuilder::build_inf_elem
const Point build_inf_elem(const bool be_verbose=false)
Build infinite elements atop a volume-based mesh, determine origin automatically.
Definition: inf_elem_builder.C:41
libMesh::NumericVector::add
virtual void add(const numeric_index_type i, const T value)=0
Adds value to each entry of the vector.
libMesh::Mesh
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
libMesh::EquationSystems::add_system
virtual System & add_system(const std::string &system_type, const std::string &name)
Add the system of type system_type named name to the systems array.
Definition: equation_systems.C:345
libMesh::EquationSystems::get_mesh
const MeshBase & get_mesh() const
Definition: equation_systems.h:637
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::HEX8
Definition: enum_elem_type.h:47
libMesh::MeshBase::active_local_element_ptr_range
virtual SimpleRange< element_iterator > active_local_element_ptr_range()=0
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::DenseMatrix::add
boostcopy::enable_if_c< ScalarTraits< T2 >::value, void >::type add(const T2 factor, const DenseMatrix< T3 > &mat)
Adds factor times mat to this matrix.
Definition: dense_matrix.h:945
libMesh::FEGenericBase
This class forms the foundation from which generic finite elements may be derived.
Definition: exact_error_estimator.h:39
libMesh::EquationSystems::get_system
const T_sys & get_system(const std::string &name) const
Definition: equation_systems.h:757
libMesh::MeshTools::Generation::build_cube
void build_cube(UnstructuredMesh &mesh, const unsigned int nx=0, const unsigned int ny=0, const unsigned int nz=0, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const Real zmin=0., const Real zmax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
Builds a (elements) cube.
Definition: mesh_generation.C:298
libMesh::TOLERANCE
static const Real TOLERANCE
Definition: libmesh_common.h:128
libMesh::DenseMatrix< Number >
assemble_wave
void assemble_wave(EquationSystems &es, const std::string &system_name)
Definition: transient_ex2.C:323
libMesh::WRITE
Definition: enum_xdr_mode.h:40
mesh
MeshBase & mesh
Definition: mesh_communication.C:1257
libMesh::MeshBase::mesh_dimension
unsigned int mesh_dimension() const
Definition: mesh_base.C:135
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::SECOND
Definition: enum_order.h:43
libMesh::FEGenericBase::build_InfFE
static std::unique_ptr< FEGenericBase > build_InfFE(const unsigned int dim, const FEType &type)
Builds a specific infinite element type.
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::TriangleWrapper::init
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
libMesh::MeshBase::element_ptr_range
virtual SimpleRange< element_iterator > element_ptr_range()=0
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
std::abs
MetaPhysicL::DualNumber< T, D > abs(const MetaPhysicL::DualNumber< T, D > &in)
libMesh::libmesh_ignore
void libmesh_ignore(const Args &...)
Definition: libmesh_common.h:526
libMesh::FEGenericBase::build
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
libMesh::MeshBase::local_node_ptr_range
virtual SimpleRange< node_iterator > local_node_ptr_range()=0
main
int main(int argc, char **argv)
Definition: miscellaneous_ex1.C:84
libMesh::EquationSystems::init
virtual void init()
Initialize all the systems.
Definition: equation_systems.C:96
libMesh::InfElemBuilder
This class is used to build infinite elements on top of an existing mesh.
Definition: inf_elem_builder.h:53
libMesh::ImplicitSystem::matrix
SparseMatrix< Number > * matrix
The system matrix.
Definition: implicit_system.h:393
libMesh::LibMeshInit
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
Definition: libmesh.h:83
libMesh::EquationSystems::print_info
void print_info(std::ostream &os=libMesh::out) const
Prints information about the equation systems, by default to libMesh::out.
Definition: equation_systems.C:1314
libMesh::EquationSystems
This is the EquationSystems class.
Definition: equation_systems.h:74
libMesh::Parameters::set
T & set(const std::string &)
Definition: parameters.h:460
libMesh::DenseVector::resize
void resize(const unsigned int n)
Resize the vector.
Definition: dense_vector.h:355
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::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::EquationSystems::write
void write(const std::string &name, const XdrMODE, const unsigned int write_flags=(WRITE_DATA), bool partition_agnostic=true) const
Write the systems to disk using the XDR data format.
Definition: equation_systems_io.C:378
libMesh::ExodusII_IO::write
virtual void write(const std::string &fname) override
This method implements writing a mesh to a specified file.
Definition: exodusII_io.C:1338
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::LinearImplicitSystem
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
Definition: linear_implicit_system.h:55
libMesh::MeshTools::weight
dof_id_type weight(const MeshBase &mesh, const processor_id_type pid)
Definition: mesh_tools.C:236
libMesh::Parameters::get
const T & get(const std::string &) const
Definition: parameters.h:421
libMesh::out
OStreamProxy out
libMesh::MeshBase::find_neighbors
virtual void find_neighbors(const bool reset_remote_elements=false, const bool reset_current_list=true)=0
Locate element face (edge in 2D) neighbors.
libMesh::FIRST
Definition: enum_order.h:42
libMesh::DenseVector< Number >
libMesh::EquationSystems::parameters
Parameters parameters
Data structure holding arbitrary parameters.
Definition: equation_systems.h:557