342 "--enable-petsc, --enable-trilinos, or --enable-eigen");
344 #ifndef LIBMESH_HAVE_EXODUS_API 346 libmesh_example_requires(
false,
"--enable-exodus");
350 #ifndef LIBMESH_ENABLE_DIRICHLET 351 libmesh_example_requires(
false,
"--enable-dirichlet");
353 #ifndef LIBMESH_ENABLE_PERIODIC 354 libmesh_example_requires(
false,
"--enable-periodic");
358 const unsigned int dim = 3;
361 libmesh_example_requires(
dim == LIBMESH_DIM,
"3D support");
364 libmesh_example_requires(
sizeof(
boundary_id_type) > 1,
"boundary_id_size > 1");
366 #if LIBMESH_BOUNDARY_ID_BYTES > 1 378 #ifdef LIBMESH_ENABLE_PERIODIC 390 Point center(0., 0., 0.);
391 Point axis(0., 0., 1.);
394 periodic_bc.myboundary = 301;
395 periodic_bc.pairedboundary = 302;
399 Point center(0., 0., 0.);
400 Point axis(0., 0., 1.);
403 periodic_bc.myboundary = 401;
404 periodic_bc.pairedboundary = 402;
407 #endif // LIBMESH_ENABLE_PERIODIC 409 mesh.
read(
"systems_of_equations_ex9.exo");
411 GetPot input(argc, argv);
412 const unsigned int n_refinements = input(
"n_refinements", 0);
414 #ifndef LIBMESH_ENABLE_AMR 415 libmesh_example_requires(n_refinements==0,
"--enable-amr");
418 mesh_refinement.uniformly_refine(n_refinements);
434 #ifdef LIBMESH_ENABLE_DIRICHLET 440 equation_systems.init();
443 equation_systems.print_info();
449 #ifdef LIBMESH_HAVE_EXODUS_API 454 #endif // #ifdef LIBMESH_HAVE_EXODUS_API 455 #endif // #if LIBMESH_BOUNDARY_ID_BYTES > 1
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.
void add_periodic_boundary(const PeriodicBoundaryBase &periodic_boundary)
Adds a copy of the specified periodic boundary to the system.
ConstFunction that simply returns 0.
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 ...
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids an...
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
virtual void solve() override
Assembles & solves the linear system A*x=b.
SolverPackage default_solver_package()
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.
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
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_object(Assembly &assemble)
Register a user object to use in assembling the system matrix and RHS.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void add_dirichlet_boundary(const DirichletBoundary &dirichlet_boundary)
Adds a copy of the specified Dirichlet boundary to the system.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
const DofMap & get_dof_map() const
A Point defines a location in LIBMESH_DIM dimensional Real space.