libMesh
curl_curl_system.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 // DiffSystem framework files
19 #include "libmesh/fem_system.h"
20 #include "libmesh/vector_value.h"
21 #include "libmesh/tensor_value.h"
22 #include "libmesh/dirichlet_boundaries.h"
23 
24 #include "curl_curl_exact_solution.h"
25 
26 using namespace libMesh;
27 
28 #ifndef CURL_CURL_SYSTEM_H
29 #define CURL_CURL_SYSTEM_H
30 
31 // FEMSystem, TimeSolver and NewtonSolver will handle most tasks,
32 // but we must specify element residuals
33 class CurlCurlSystem : public FEMSystem
34 {
35 public:
36  // Constructor
38  const std::string & name,
39  const unsigned int number);
40 
41  // System initialization
42  virtual void init_data ();
43 
44  // Context initialization
45  virtual void init_context(DiffContext & context);
46 
47  // Element residual and jacobian calculations
48  // Time dependent parts
49  virtual bool element_time_derivative (bool request_jacobian,
50  DiffContext & context);
51 
52  virtual bool side_time_derivative(bool request_jacobian,
53  DiffContext & context);
54 
55 protected:
56  // Indices for each variable;
57  unsigned int u_var;
58 
59  void init_dirichlet_bcs();
60 
61  // Returns the value of a forcing function at point p.
62  RealGradient forcing(const Point & p);
63 
64  // Returns the value of the exact solution for this model problem.
66 
68 };
69 
70 #endif // CURL_CURL_SYSTEM_H
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:39
This is the EquationSystems class.
This class provides all data required for a physics package (e.g.
Definition: diff_context.h:54
Number(* exact_solution)(const Point &p, const Parameters &, const std::string &, const std::string &)
The libMesh namespace provides an interface to certain functionality in the library.
This class provides a specific system class.
Definition: fem_system.h:53
FEMSystem, TimeSolver and NewtonSolver will handle most tasks, but we must specify element residuals...
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38