336{
337
339
340
342 "--enable-petsc, --enable-trilinos, or --enable-eigen");
343
344#ifndef LIBMESH_HAVE_EXODUS_API
345
346 libmesh_example_requires(false, "--enable-exodus");
347#endif
348
349
350#ifndef LIBMESH_ENABLE_DIRICHLET
351 libmesh_example_requires(false, "--enable-dirichlet");
352#endif
353#ifndef LIBMESH_ENABLE_PERIODIC
354 libmesh_example_requires(false, "--enable-periodic");
355#endif
356
357
358 const unsigned int dim = 3;
359
360
361 libmesh_example_requires(
dim == LIBMESH_DIM,
"3D support");
362
363
364 libmesh_example_requires(
sizeof(
boundary_id_type) > 1,
"boundary_id_size > 1");
365
366#if LIBMESH_BOUNDARY_ID_BYTES > 1
367
369
370
372
373
374
377
378#ifdef LIBMESH_ENABLE_PERIODIC
379
380
381
382
383
384
385
386
387
388
389 {
390 Point center(0., 0., 0.);
391 Point axis(0., 0., 1.);
394 periodic_bc.myboundary = 301;
395 periodic_bc.pairedboundary = 302;
397 }
398 {
399 Point center(0., 0., 0.);
400 Point axis(0., 0., 1.);
403 periodic_bc.myboundary = 401;
404 periodic_bc.pairedboundary = 402;
406 }
407#endif
408
409 mesh.
read(
"systems_of_equations_ex9.exo");
410
411 GetPot input(argc, argv);
412 const unsigned int n_refinements = input("n_refinements", 0);
413
414#ifndef LIBMESH_ENABLE_AMR
415 libmesh_example_requires(n_refinements==0, "--enable-amr");
416#else
418 mesh_refinement.uniformly_refine(n_refinements);
419#endif
420
421
423
424
428
431
433
434#ifdef LIBMESH_ENABLE_DIRICHLET
437#endif
438
439
440 equation_systems.init();
441
442
443 equation_systems.print_info();
444
445
447
448
449#ifdef LIBMESH_HAVE_EXODUS_API
450
452 equation_systems);
453
454#endif
455#endif
456
457
458 return 0;
459}
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids an...
void add_dirichlet_boundary(const DirichletBoundary &dirichlet_boundary)
Adds a copy of the specified Dirichlet boundary to the system.
void add_periodic_boundary(const PeriodicBoundaryBase &periodic_boundary)
Adds a copy of the specified periodic boundary to the system.
This is the EquationSystems class.
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
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.
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
virtual void solve() override
Assembles & solves the linear system A*x=b.
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false, bool skip_detect_interior_parents=false)=0
Interfaces for reading/writing a mesh to/from a file.
void print_info(std::ostream &os=libMesh::out, const unsigned int verbosity=0, const bool global=true) const
Prints relevant information about the mesh.
Implements (adaptive) mesh refinement algorithms for a MeshBase.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
A Point defines a location in LIBMESH_DIM dimensional Real space.
void attach_assemble_object(Assembly &assemble)
Register a user object to use in assembling the system matrix and RHS.
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.
const DofMap & get_dof_map() const
ConstFunction that simply returns 0.
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
SolverPackage default_solver_package()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real