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++)
137 equation_systems.
get_system(
"Complex System").add_variable(
"c",
FIRST);
138 equation_systems.
get_system(
"Complex System").add_variable(
"T",
FIRST);
142 equation_systems.
init();
161 if (argv[1][0] !=
'-')
163 libMesh::out <<
"<<< Writing system to file " << argv[1]
170 equation_systems.
clear ();
172 libMesh::out <<
">>> Reading system from file " << argv[1]
173 << std::endl << std::endl;
177 equation_systems.
read (argv[1],
READ);
This is the EquationSystems class.
void write(std::string_view 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.
virtual void clear()
Restores the data structure to a pristine state.
void print_info(std::ostream &os=libMesh::out) const
Prints information about the equation systems, by default to libMesh::out.
Manages storage and variables for transient systems.
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
The libMesh namespace provides an interface to certain functionality in the library.
const T_sys & get_system(std::string_view name) const
SolverPackage default_solver_package()
void print_info(std::ostream &os=libMesh::out, const unsigned int verbosity=0, const bool global=true) const
Prints relevant information about the mesh.
int main(int argc, char **argv)
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
void read(std::string_view 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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
T & set(const std::string &)
Parameters parameters
Data structure holding arbitrary parameters.
virtual void init()
Initialize all the systems.
virtual System & add_system(std::string_view system_type, std::string_view name)
Add the system of type system_type named name to the systems array.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems...