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)
60int main(
int argc,
char * argv[])
64#if !defined(LIBMESH_TRILINOS_HAVE_DTK)
67 libmesh_example_requires(
false,
"--enable-trilinos");
71 Mesh from_mesh(init.comm());
72 MeshTools::Generation::build_cube(from_mesh, 4, 4, 4, 0, 1, 0, 1, 0, 1,
HEX8);
82 Mesh to_mesh(init.comm());
83 MeshTools::Generation::build_cube(to_mesh, 5, 5, 5, 0, 1, 0, 1, 0, 1,
TET4);
Implementation of a SolutionTransfer object that uses the DataTransferKit (https://github....
virtual void transfer(const Variable &from_var, const Variable &to_var) override
Transfer the values of a variable to another.
This is the EquationSystems class.
void update()
Updates local values for all the systems.
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.
const T_sys & get_system(std::string_view name) const
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
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 for explicit systems.
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
void print_info(std::ostream &os=libMesh::out, const unsigned int verbosity=0, const bool global=true) const
Prints relevant information about the mesh.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
This class provides the ability to map between arbitrary, user-defined strings and several data types...
T & set(const std::string &)
A Point defines a location in LIBMESH_DIM dimensional Real space.
Manages consistently variables, degrees of freedom, and coefficient vectors.
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, std::optional< ConstElemRange > active_local_range=std::nullopt, std::optional< std::vector< unsigned int > > variable_numbers=std::nullopt) const
Projects arbitrary functions onto the current solution.
const Variable & variable(unsigned int var) const
Return a constant reference to Variable var.
void attach_init_function(void fptr(EquationSystems &es, const std::string &name))
Register a user function to use in initializing the system.
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.
Real time
For time-dependent problems, this is the time t at the beginning of the current timestep.
Number initial_value(const Point &p, const Parameters &, const std::string &, const std::string &)
void initialize(EquationSystems &es, const std::string &system_name)
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real