28 #include "libmesh/libmesh.h" 29 #include "libmesh/mesh.h" 30 #include "libmesh/mesh_generation.h" 31 #include "libmesh/explicit_system.h" 32 #include "libmesh/equation_systems.h" 33 #include "libmesh/exodusII_io.h" 34 #include "libmesh/libmesh_config.h" 36 #ifdef LIBMESH_TRILINOS_HAVE_DTK 37 #include "libmesh/dtk_solution_transfer.h" 53 const std::string & system_name)
60 int main(
int argc,
char * argv[])
64 #if !defined(LIBMESH_TRILINOS_HAVE_DTK) 67 libmesh_example_requires(
false,
"--enable-trilinos");
72 MeshTools::Generation::build_cube(from_mesh, 4, 4, 4, 0, 1, 0, 1, 0, 1,
HEX8);
73 from_mesh.print_info();
83 MeshTools::Generation::build_cube(to_mesh, 5, 5, 5, 0, 1, 0, 1, 0, 1,
TET4);
Real time
For time-dependent problems, this is the time t at the beginning of the current timestep.
This is the EquationSystems class.
const Variable & variable(unsigned int var) const
Return a constant reference to Variable var.
This class provides the ability to map between arbitrary, user-defined strings and several data types...
int main(int argc, char *argv[])
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
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
void initialize(EquationSystems &es, const std::string &system_name)
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
Projects arbitrary functions onto the current solution.
Number initial_value(const Point &p, const Parameters &, const std::string &, const std::string &)
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.
Manages consistently variables, degrees of freedom, and coefficient vectors.
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.
virtual void transfer(const Variable &from_var, const Variable &to_var) override
Transfer the values of a variable to another.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
T & set(const std::string &)
Parameters parameters
Data structure holding arbitrary parameters.
Implementation of a SolutionTransfer object that uses the DataTransferKit (https://github.com/CNERG/DataTransferKit) to transfer variables back and forth between systems.
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.
A Point defines a location in LIBMESH_DIM dimensional Real space.
void update()
Updates local values for all the systems.
void attach_init_function(void fptr(EquationSystems &es, const std::string &name))
Register a user function to use in initializing the system.
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems...