Reference documentation for deal.II version GIT relicensing-216-gcda843ca70 2024-03-28 12:20:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Functions
LocalIntegrators::Maxwell Namespace Reference

Local integrators related to curl operators and their traces. More...

Functions

template<int dim>
Tensor< 1, dim > curl_curl (const Tensor< 2, dim > &h0, const Tensor< 2, dim > &h1, const Tensor< 2, dim > &h2)
 
template<int dim>
Tensor< 1, dim > tangential_curl (const Tensor< 1, dim > &g0, const Tensor< 1, dim > &g1, const Tensor< 1, dim > &g2, const Tensor< 1, dim > &normal)
 
template<int dim>
void curl_curl_matrix (FullMatrix< double > &M, const FEValuesBase< dim > &fe, const double factor=1.)
 
template<int dim>
void curl_matrix (FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
 
template<int dim>
void nitsche_curl_matrix (FullMatrix< double > &M, const FEValuesBase< dim > &fe, const unsigned int face_no, double penalty, double factor=1.)
 
template<int dim>
void tangential_trace_matrix (FullMatrix< double > &M, const FEValuesBase< dim > &fe, double factor=1.)
 
template<int dim>
void ip_curl_matrix (FullMatrix< double > &M11, FullMatrix< double > &M12, FullMatrix< double > &M21, FullMatrix< double > &M22, const FEValuesBase< dim > &fe1, const FEValuesBase< dim > &fe2, const double pen, const double factor1=1., const double factor2=-1.)
 

Detailed Description

Local integrators related to curl operators and their traces.

We use the following conventions for curl operators. First, in three space dimensions

\[ \nabla\times \mathbf u = \begin{pmatrix} \partial_2 u_3 - \partial_3 u_2 \\ \partial_3 u_1 - \partial_1 u_3 \\ \partial_1 u_2 - \partial_2 u_1 \end{pmatrix}. \]

In two space dimensions, the curl is obtained by extending a vector u to \((u_1, u_2, 0)^T\) and a scalar p to \((0,0,p)^T\). Computing the nonzero components, we obtain the scalar curl of a vector function and the vector curl of a scalar function. The current implementation exchanges the sign and we have:

\[ \nabla \times \mathbf u = \partial_1 u_2 - \partial_2 u_1, \qquad \nabla \times p = \begin{pmatrix} \partial_2 p \\ -\partial_1 p \end{pmatrix} \]

Function Documentation

◆ curl_curl()

template<int dim>
Tensor< 1, dim > LocalIntegrators::Maxwell::curl_curl ( const Tensor< 2, dim > &  h0,
const Tensor< 2, dim > &  h1,
const Tensor< 2, dim > &  h2 
)

Auxiliary function. Given the tensors of dim second derivatives, compute the curl of the curl of a vector function. The result in two and three dimensions is:

\[ \nabla\times\nabla\times \mathbf u = \begin{pmatrix} \partial_1\partial_2 u_2 - \partial_2^2 u_1 \\ \partial_1\partial_2 u_1 - \partial_1^2 u_2 \end{pmatrix} \nabla\times\nabla\times \mathbf u = \begin{pmatrix} \partial_1\partial_2 u_2 + \partial_1\partial_3 u_3 - (\partial_2^2+\partial_3^2) u_1 \\ \partial_2\partial_3 u_3 + \partial_2\partial_1 u_1 - (\partial_3^2+\partial_1^2) u_2 \\ \partial_3\partial_1 u_1 + \partial_3\partial_2 u_2 - (\partial_1^2+\partial_2^2) u_3 \end{pmatrix} \]

Note
The third tensor argument is not used in two dimensions and can for instance duplicate one of the previous.

Definition at line 91 of file maxwell.h.

◆ tangential_curl()

template<int dim>
Tensor< 1, dim > LocalIntegrators::Maxwell::tangential_curl ( const Tensor< 1, dim > &  g0,
const Tensor< 1, dim > &  g1,
const Tensor< 1, dim > &  g2,
const Tensor< 1, dim > &  normal 
)

Auxiliary function. Given dim tensors of first derivatives and a normal vector, compute the tangential curl

\[ \mathbf n \times \nabla \times u. \]

Note
The third tensor argument is not used in two dimensions and can for instance duplicate one of the previous.

Definition at line 125 of file maxwell.h.

◆ curl_curl_matrix()

template<int dim>
void LocalIntegrators::Maxwell::curl_curl_matrix ( FullMatrix< double > &  M,
const FEValuesBase< dim > &  fe,
const double  factor = 1. 
)

The curl-curl operator

\[ \int_Z \nabla\times u \cdot \nabla \times v \,dx \]

in weak form.

Definition at line 162 of file maxwell.h.

◆ curl_matrix()

template<int dim>
void LocalIntegrators::Maxwell::curl_matrix ( FullMatrix< double > &  M,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest,
double  factor = 1. 
)

The matrix for the curl operator

\[ \int_Z \nabla \times u \cdot v \,dx. \]

This is the standard curl operator in 3d and the scalar curl in 2d. The vector curl operator can be obtained by exchanging test and trial functions.

Definition at line 215 of file maxwell.h.

◆ nitsche_curl_matrix()

template<int dim>
void LocalIntegrators::Maxwell::nitsche_curl_matrix ( FullMatrix< double > &  M,
const FEValuesBase< dim > &  fe,
const unsigned int  face_no,
double  penalty,
double  factor = 1. 
)

The matrix for weak boundary condition of Nitsche type for the tangential component in Maxwell systems.

\[ \int_F \biggl( 2\gamma (u\times n) (v\times n) - (u\times n)(\nu \nabla\times v) - (v\times n)(\nu \nabla\times u) \biggr) \]

Definition at line 264 of file maxwell.h.

◆ tangential_trace_matrix()

template<int dim>
void LocalIntegrators::Maxwell::tangential_trace_matrix ( FullMatrix< double > &  M,
const FEValuesBase< dim > &  fe,
double  factor = 1. 
)

The product of two tangential traces,

\[ \int_F (u\times n)(v\times n) \, ds. \]

Definition at line 327 of file maxwell.h.

◆ ip_curl_matrix()

template<int dim>
void LocalIntegrators::Maxwell::ip_curl_matrix ( FullMatrix< double > &  M11,
FullMatrix< double > &  M12,
FullMatrix< double > &  M21,
FullMatrix< double > &  M22,
const FEValuesBase< dim > &  fe1,
const FEValuesBase< dim > &  fe2,
const double  pen,
const double  factor1 = 1.,
const double  factor2 = -1. 
)
inline

The interior penalty fluxes for Maxwell systems.

\[ \int_F \biggl( \gamma \{u\times n\}\{v\times n\} - \{u\times n\}\{\nu \nabla\times v\}- \{v\times n\}\{\nu \nabla\times u\} \biggr)\;dx \]

Definition at line 384 of file maxwell.h.