libMesh
L2system.h
Go to the documentation of this file.
1 #include "libmesh/enum_fe_family.h"
2 #include "libmesh/fem_function_base.h"
3 #include "libmesh/fem_system.h"
4 
5 #include <map>
6 
7 // FEMSystem, TimeSolver and NewtonSolver will handle most tasks,
8 // but we must specify element residuals
10 {
11 public:
12  // Constructor
14  const std::string & name,
15  const unsigned int number)
16  : libMesh::FEMSystem(es, name, number),
17  input_system(NULL),
18  _fe_family("LAGRANGE"),
19  _fe_order(1) {}
20 
21  // Destructor; deletes extra context objects
22  ~L2System();
23 
24  std::string & fe_family() { return _fe_family; }
25  unsigned int & fe_order() { return _fe_order; }
26 
27  // We want to be able to project functions based on *other* systems'
28  // values. For that we need not only a FEMFunction but also a
29  // reference to the system where it applies and a separate context
30  // object (or multiple separate context objects, in the threaded
31  // case) for that system.
33 
35 
36  std::map<libMesh::FEMContext *, libMesh::FEMContext *>
38 
39 protected:
40  // System initialization
41  virtual void init_data ();
42 
43  // Context initialization
44  virtual void init_context (libMesh::DiffContext & context);
45 
46  // Element residual and jacobian calculations
47  // Time dependent parts
48  virtual bool element_time_derivative (bool request_jacobian,
49  libMesh::DiffContext & context);
50 
51  // The FE type to use
52  std::string _fe_family;
53  unsigned int _fe_order;
54 };
This is the EquationSystems class.
virtual void init_data()
Initializes the member data fields associated with the system, so that, e.g., assemble() may be used...
Definition: L2system.C:41
unsigned int & fe_order()
Definition: L2system.h:25
This class provides all data required for a physics package (e.g.
Definition: diff_context.h:54
libMesh::System * input_system
Definition: L2system.h:34
std::map< libMesh::FEMContext *, libMesh::FEMContext * > input_contexts
Definition: L2system.h:37
std::string & fe_family()
Definition: L2system.h:24
The libMesh namespace provides an interface to certain functionality in the library.
virtual bool element_time_derivative(bool request_jacobian, libMesh::DiffContext &context)
Adds the time derivative contribution on elem to elem_residual.
Definition: L2system.C:78
This class provides a specific system class.
Definition: fem_system.h:53
const std::string & name() const
Definition: system.h:1998
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
libMesh::UniquePtr< libMesh::FEMFunctionBase< libMesh::Number > > goal_func
Definition: L2system.h:32
This is the base class for classes which contain information related to any physical process that mig...
Definition: system.h:76
unsigned int _fe_order
Definition: L2system.h:53
FEMSystem(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
Definition: fem_system.C:828
L2System(libMesh::EquationSystems &es, const std::string &name, const unsigned int number)
Definition: L2system.h:13
std::string _fe_family
Definition: L2system.h:52
unsigned int number() const
Definition: system.h:2006
~L2System()
Definition: L2system.C:30
virtual void init_context(libMesh::DiffContext &context)
Definition: L2system.C:52