Go to the source code of this file.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 345 of file systems_of_equations_ex9.C.
352 "--enable-petsc, --enable-trilinos, or --enable-eigen");
354 #ifndef LIBMESH_HAVE_EXODUS_API
356 libmesh_example_requires(
false,
"--enable-exodus");
360 #ifndef LIBMESH_ENABLE_DIRICHLET
361 libmesh_example_requires(
false,
"--enable-dirichlet");
363 #ifndef LIBMESH_ENABLE_PERIODIC
364 libmesh_example_requires(
false,
"--enable-periodic");
368 const unsigned int dim = 3;
371 libmesh_example_requires(
dim == LIBMESH_DIM,
"3D support");
374 libmesh_example_requires(
sizeof(
boundary_id_type) > 1,
"boundary_id_size > 1");
376 #if LIBMESH_BOUNDARY_ID_BYTES > 1
388 #ifdef LIBMESH_ENABLE_PERIODIC
400 Point center(0., 0., 0.);
401 Point axis(0., 0., 1.);
404 periodic_bc.myboundary = 301;
405 periodic_bc.pairedboundary = 302;
409 Point center(0., 0., 0.);
410 Point axis(0., 0., 1.);
413 periodic_bc.myboundary = 401;
414 periodic_bc.pairedboundary = 402;
417 #endif // LIBMESH_ENABLE_PERIODIC
419 mesh.
read(
"systems_of_equations_ex9.exo");
432 std::vector<unsigned int> variables;
433 variables.push_back(u_var);
434 variables.push_back(v_var);
435 variables.push_back(w_var);
437 std::set<boundary_id_type> clamped_boundary_ids;
438 clamped_boundary_ids.insert(300);
439 clamped_boundary_ids.insert(400);
441 #ifdef LIBMESH_ENABLE_DIRICHLET
447 equation_systems.init();
450 equation_systems.print_info();
456 #ifdef LIBMESH_HAVE_EXODUS_API
461 #endif // #ifdef LIBMESH_HAVE_EXODUS_API
462 #endif // #if LIBMESH_BOUNDARY_ID_BYTES > 1
References libMesh::DofMap::add_dirichlet_boundary(), libMesh::DofMap::add_periodic_boundary(), libMesh::System::add_variable(), libMesh::System::attach_assemble_object(), libMesh::default_solver_package(), dim, libMesh::FIRST, libMesh::System::get_dof_map(), libMesh::TriangleWrapper::init(), libMesh::INVALID_SOLVER_PACKAGE, libMesh::LAGRANGE, mesh, libMesh::PeriodicBoundaryBase::myboundary, libMesh::PeriodicBoundaryBase::pairedboundary, libMesh::pi, libMesh::MeshBase::print_info(), libMesh::MeshBase::read(), libMesh::Real, libMesh::LinearImplicitSystem::solve(), and libMesh::MeshOutput< MT >::write_equation_systems().
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
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_dirichlet_boundary(const DirichletBoundary &dirichlet_boundary)
Adds a copy of the specified Dirichlet boundary to the system.
virtual void solve() override
Assembles & solves the linear system A*x=b.
SolverPackage default_solver_package()
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
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.
A Point defines a location in LIBMESH_DIM dimensional Real space.
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
ConstFunction that simply returns 0.
void add_periodic_boundary(const PeriodicBoundaryBase &periodic_boundary)
Adds a copy of the specified periodic boundary to the system.
This is the EquationSystems class.
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 ...
void print_info(std::ostream &os=libMesh::out) const
Prints relevant information about the mesh.
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids an...
const DofMap & get_dof_map() const
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
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...