Go to the documentation of this file.
51 #include "libmesh/libmesh.h"
52 #include "libmesh/mesh.h"
53 #include "libmesh/enum_xdr_mode.h"
55 #include "libmesh/mesh_generation.h"
57 #include "libmesh/equation_systems.h"
59 #include "libmesh/linear_implicit_system.h"
60 #include "libmesh/transient_system.h"
61 #include "libmesh/explicit_system.h"
62 #include "libmesh/enum_solver_package.h"
69 int main (
int argc,
char ** argv)
74 libmesh_example_requires(2 <= LIBMESH_DIM,
"2D support");
78 "--enable-petsc, --enable-trilinos, or --enable-eigen");
83 for (
int i=1; i<argc; i++)
138 equation_systems.
get_system(
"Complex System").add_variable(
"c",
FIRST);
139 equation_systems.
get_system(
"Complex System").add_variable(
"T",
FIRST);
143 equation_systems.
init();
162 if (argv[1][0] !=
'-')
164 libMesh::out <<
"<<< Writing system to file " << argv[1]
171 equation_systems.
clear ();
173 libMesh::out <<
">>> Reading system from file " << argv[1]
174 << std::endl << std::endl;
178 equation_systems.
read (argv[1],
READ);
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
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.
Manages storage and variables for transient systems.
The libMesh namespace provides an interface to certain functionality in the library.
const T_sys & get_system(const std::string &name) const
SolverPackage default_solver_package()
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
virtual void init()
Initialize all the systems.
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
void read(const std::string &name, const XdrMODE, const unsigned int read_flags=(READ_HEADER|READ_DATA), bool partition_agnostic=true)
Read & initialize the systems from disk using the XDR data format.
void print_info(std::ostream &os=libMesh::out) const
Prints information about the equation systems, by default to libMesh::out.
This is the EquationSystems class.
T & set(const std::string &)
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems.
void print_info(std::ostream &os=libMesh::out) const
Prints relevant information about the mesh.
virtual void clear()
Restores the data structure to a pristine state.
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
int main(int argc, char **argv)
Parameters parameters
Data structure holding arbitrary parameters.