libMesh
examples
vector_fe
vector_fe_ex3
curl_curl_system.h
Go to the documentation of this file.
1
// The libMesh Finite Element Library.
2
// Copyright (C) 2002-2025 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
#ifndef CURL_CURL_SYSTEM_H
19
#define CURL_CURL_SYSTEM_H
20
21
// DiffSystem framework files
22
#include "libmesh/fem_system.h"
23
#include "libmesh/vector_value.h"
24
#include "libmesh/tensor_value.h"
25
#include "libmesh/dirichlet_boundaries.h"
26
27
#include "curl_curl_exact_solution.h"
28
29
using namespace
libMesh
;
30
35
class
CurlCurlSystem
:
public
FEMSystem
36
{
37
public
:
38
// Constructor
39
CurlCurlSystem
(
EquationSystems
& es,
40
const
std::string &
name
,
41
const
unsigned
int
number);
42
43
// Setter for the FE approximation order.
44
void
order
(
const
Order
& order) {u_order =
order
;};
45
46
// System initialization
47
virtual
void
init_data ();
48
49
// Context initialization
50
virtual
void
init_context(
DiffContext
& context);
51
52
// Element residual and jacobian calculations
53
// Time dependent parts
54
virtual
bool
element_time_derivative (
bool
request_jacobian,
55
DiffContext
& context);
56
57
virtual
bool
side_time_derivative(
bool
request_jacobian,
58
DiffContext
& context);
59
60
protected
:
61
// Indices for each variable;
62
unsigned
int
u_var
;
63
64
// FE approximation order.
65
Order
u_order
;
66
67
void
init_dirichlet_bcs();
68
69
// Returns the value of a forcing function at point p.
70
RealGradient
forcing(
const
Point
& p);
71
72
// Returns the value of the exact solution for this model problem.
73
RealGradient
exact_solution
(
const
Point
& p);
74
75
CurlCurlExactSolution
soln
;
76
};
77
78
#endif // CURL_CURL_SYSTEM_H
libMesh::Quality::name
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition:
elem_quality.C:42
libMesh::EquationSystems
This is the EquationSystems class.
Definition:
equation_systems.h:68
libMesh::Order
Order
defines an enum for polynomial orders.
Definition:
enum_order.h:40
libMesh::DiffContext
This class provides all data required for a physics package (e.g.
Definition:
diff_context.h:55
exact_solution
Number(* exact_solution)(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition:
adaptivity_ex4.C:137
libMesh::VectorValue< Real >
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
libMesh::FEMSystem
This class provides a specific system class.
Definition:
fem_system.h:53
CurlCurlSystem::u_var
unsigned int u_var
Definition:
curl_curl_system.h:62
CurlCurlSystem::soln
CurlCurlExactSolution soln
Definition:
curl_curl_system.h:75
CurlCurlSystem
FEMSystem, TimeSolver and NewtonSolver will handle most tasks, but we must specify element residuals...
Definition:
curl_curl_system.h:35
CurlCurlExactSolution
Definition:
curl_curl_exact_solution.h:26
CurlCurlSystem::u_order
Order u_order
Definition:
curl_curl_system.h:65
libMesh::Point
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition:
point.h:39
CurlCurlSystem::order
void order(const Order &order)
Definition:
curl_curl_system.h:44
Generated on Thu Jul 17 2025 01:29:03 for libMesh by
1.8.14