https://mooseframework.inl.gov
Public Member Functions | Protected Attributes | List of all members
Moose::MFEM::NLCurlCurlJacMatrixCoefficient Class Reference

Matrix coefficient for the Jacobian of NLCurlCurlIntegrator. More...

#include <NLCurlCurlIntegrator.h>

Inheritance diagram for Moose::MFEM::NLCurlCurlJacMatrixCoefficient:
[legend]

Public Member Functions

 NLCurlCurlJacMatrixCoefficient (mfem::Coefficient &k, mfem::Coefficient &curlu_dk_dcurlu, mfem::VectorCoefficient &curlu_vec, mfem::real_t curlu_zero_tol)
 
void Eval (mfem::DenseMatrix &K, mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override
 
void SetTime (mfem::real_t t) override
 

Protected Attributes

mfem::Coefficient & _k_coef
 
mfem::Coefficient & _curlu_dk_dcurlu_coef
 
const mfem::real_t _curlu_zero_tol
 
mfem::NormalizedVectorCoefficient _curlu_hat_coef
 

Detailed Description

Matrix coefficient for the Jacobian of NLCurlCurlIntegrator.

Produces the matrix k(|curl u|) I + |curl u| dk/d|curl u| (curl u_hat curl u_hat)

Definition at line 23 of file NLCurlCurlIntegrator.h.

Constructor & Destructor Documentation

◆ NLCurlCurlJacMatrixCoefficient()

Moose::MFEM::NLCurlCurlJacMatrixCoefficient::NLCurlCurlJacMatrixCoefficient ( mfem::Coefficient &  k,
mfem::Coefficient &  curlu_dk_dcurlu,
mfem::VectorCoefficient &  curlu_vec,
mfem::real_t  curlu_zero_tol 
)

Definition at line 17 of file NLCurlCurlIntegrator.C.

21  : mfem::MatrixCoefficient(curlu_vec.GetVDim()),
22  _k_coef(k),
23  _curlu_dk_dcurlu_coef(curlu_dk_dcurlu),
24  _curlu_zero_tol(curlu_zero_tol),
26 {
27 }
mfem::NormalizedVectorCoefficient _curlu_hat_coef

Member Function Documentation

◆ Eval()

void Moose::MFEM::NLCurlCurlJacMatrixCoefficient::Eval ( mfem::DenseMatrix &  K,
mfem::ElementTransformation &  T,
const mfem::IntegrationPoint &  ip 
)
override

Definition at line 39 of file NLCurlCurlIntegrator.C.

42 {
43  const int dim = GetHeight();
44  mfem::Vector curlu_hat(dim);
45 
46  _curlu_hat_coef.Eval(curlu_hat, T, ip);
47  const mfem::real_t k = _k_coef.Eval(T, ip);
48  const mfem::real_t curlu_dk_dcurlu = _curlu_dk_dcurlu_coef.Eval(T, ip);
49 
50  K.Diag(k, dim);
51  for (int i = 0; i < dim; ++i)
52  for (int j = 0; j < dim; ++j)
53  K(i, j) += curlu_dk_dcurlu * curlu_hat(i) * curlu_hat(j);
54 }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:163
mfem::NormalizedVectorCoefficient _curlu_hat_coef

◆ SetTime()

void Moose::MFEM::NLCurlCurlJacMatrixCoefficient::SetTime ( mfem::real_t  t)
override

Definition at line 30 of file NLCurlCurlIntegrator.C.

31 {
32  MatrixCoefficient::SetTime(t);
33  _k_coef.SetTime(t);
34  _curlu_dk_dcurlu_coef.SetTime(t);
35  _curlu_hat_coef.SetTime(t);
36 }
mfem::NormalizedVectorCoefficient _curlu_hat_coef

Member Data Documentation

◆ _curlu_dk_dcurlu_coef

mfem::Coefficient& Moose::MFEM::NLCurlCurlJacMatrixCoefficient::_curlu_dk_dcurlu_coef
protected

Definition at line 38 of file NLCurlCurlIntegrator.h.

Referenced by Eval(), and SetTime().

◆ _curlu_hat_coef

mfem::NormalizedVectorCoefficient Moose::MFEM::NLCurlCurlJacMatrixCoefficient::_curlu_hat_coef
protected

Definition at line 40 of file NLCurlCurlIntegrator.h.

Referenced by Eval(), and SetTime().

◆ _curlu_zero_tol

const mfem::real_t Moose::MFEM::NLCurlCurlJacMatrixCoefficient::_curlu_zero_tol
protected

Definition at line 39 of file NLCurlCurlIntegrator.h.

◆ _k_coef

mfem::Coefficient& Moose::MFEM::NLCurlCurlJacMatrixCoefficient::_k_coef
protected

Definition at line 37 of file NLCurlCurlIntegrator.h.

Referenced by Eval(), and SetTime().


The documentation for this class was generated from the following files: