libMesh
heatsystem.h
Go to the documentation of this file.
1 #include "libmesh/enum_fe_family.h"
2 #include "libmesh/fem_system.h"
3 
4 // FEMSystem, TimeSolver and NewtonSolver will handle most tasks,
5 // but we must specify element residuals
6 class HeatSystem : public libMesh::FEMSystem
7 {
8 public:
9  // Constructor
11  const std::string & name,
12  const unsigned int number) :
14  _fe_family("LAGRANGE"), _fe_order(1)
15  {
16  // Get the conductivity ratios right for both 2D and 3D
17  // benchmarks
19  _k[2] = 1;
21  }
22 
23  std::string & fe_family() { return _fe_family; }
24  unsigned int & fe_order() { return _fe_order; }
25 
26 protected:
27  // System initialization
28  virtual void init_data ();
29 
30  // Context initialization
31  virtual void init_context (libMesh::DiffContext & context);
32 
33  // Element residual and jacobian calculations
34  // Time dependent parts
35  virtual bool element_time_derivative (bool request_jacobian,
36  libMesh::DiffContext & context);
37 
38  // The conductivity for the various dimensional elements, indexed by
39  // dim (with _k[0] unused) for simplicity
41 
42  // The FE type to use
43  std::string _fe_family;
44  unsigned int _fe_order;
45 
46  // The variable index (yes, this will be 0...)
47  unsigned int T_var;
48 };
libMesh::pi
const Real pi
.
Definition: libmesh.h:237
HeatSystem::init_context
virtual void init_context(DiffContext &context)
Definition: heatsystem.C:79
HeatSystem::_fe_order
unsigned int _fe_order
Definition: heatsystem.h:122
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
std::sqrt
MetaPhysicL::DualNumber< T, D > sqrt(const MetaPhysicL::DualNumber< T, D > &in)
libMesh::System::number
unsigned int number() const
Definition: system.h:2075
HeatSystem::fe_order
unsigned int & fe_order()
Definition: heatsystem.h:24
libMesh::FEMSystem::FEMSystem
FEMSystem(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
Definition: fem_system.C:826
libMesh::FEMSystem
This class provides a specific system class.
Definition: fem_system.h:53
HeatSystem::fe_family
std::string & fe_family()
Definition: heatsystem.h:23
HeatSystem::_fe_family
std::string _fe_family
Definition: heatsystem.h:121
HeatSystem
Definition: heatsystem.h:30
HeatSystem::init_data
virtual void init_data()
Initializes the member data fields associated with the system, so that, e.g., assemble() may be used.
Definition: heatsystem.C:36
HeatSystem::element_time_derivative
virtual bool element_time_derivative(bool request_jacobian, DiffContext &context)
Adds the time derivative contribution on elem to elem_residual.
Definition: heatsystem.C:112
libMesh::DiffContext
This class provides all data required for a physics package (e.g.
Definition: diff_context.h:55
libMesh::EquationSystems
This is the EquationSystems class.
Definition: equation_systems.h:74
HeatSystem::HeatSystem
HeatSystem(libMesh::EquationSystems &es, const std::string &name, const unsigned int number)
Definition: heatsystem.h:10
HeatSystem::_k
Real _k
Definition: heatsystem.h:112
libMesh::System::name
const std::string & name() const
Definition: system.h:2067
HeatSystem::T_var
unsigned int T_var
Definition: heatsystem.h:125
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121