libMesh
Loading...
Searching...
No Matches
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
7{
8public:
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
18 _k[1] = 1/libMesh::pi/std::sqrt(libMesh::Real(3));
19 _k[2] = 1;
20 _k[3] = 2*libMesh::pi*std::sqrt(libMesh::Real(3));
21 }
22
23 std::string & fe_family() { return _fe_family; }
24 unsigned int & fe_order() { return _fe_order; }
25
26protected:
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};
unsigned int _fe_order
Definition heatsystem.h:130
unsigned int & fe_order()
Definition heatsystem.h:24
virtual void init_data()
Initializes the member data fields associated with the system, so that, e.g., assemble() may be used.
virtual bool element_time_derivative(bool request_jacobian, libMesh::DiffContext &context)
Adds the time derivative contribution on elem to elem_residual.
std::string _fe_family
Definition heatsystem.h:129
HeatSystem(libMesh::EquationSystems &es, const std::string &name, const unsigned int number)
Definition heatsystem.h:10
std::string & fe_family()
Definition heatsystem.h:23
virtual void init_context(libMesh::DiffContext &context)
unsigned int T_var
Definition heatsystem.h:133
This class provides all data required for a physics package (e.g.
This is the EquationSystems class.
This class provides a specific system class.
Definition fem_system.h:55
FEMSystem(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
Definition fem_system.C:853
const std::string & name() const
Definition system.h:2385
unsigned int number() const
Definition system.h:2393
The libMesh namespace provides an interface to certain functionality in the library.
const Real pi
.
Definition libmesh.h:292
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real