https://mooseframework.inl.gov
NLCurlCurlIntegrator.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #ifdef MOOSE_MFEM_ENABLED
11 
12 #pragma once
14 
15 namespace Moose::MFEM
16 {
23 class NLCurlCurlJacMatrixCoefficient : public mfem::MatrixCoefficient
24 {
25 public:
26  NLCurlCurlJacMatrixCoefficient(mfem::Coefficient & k,
27  mfem::Coefficient & curlu_dk_dcurlu,
28  mfem::VectorCoefficient & curlu_vec,
29  mfem::real_t curlu_zero_tol);
30 
31  void Eval(mfem::DenseMatrix & K,
32  mfem::ElementTransformation & T,
33  const mfem::IntegrationPoint & ip) override;
34  void SetTime(mfem::real_t t) override;
35 
36 protected:
37  mfem::Coefficient & _k_coef;
38  mfem::Coefficient & _curlu_dk_dcurlu_coef;
39  const mfem::real_t _curlu_zero_tol;
40  mfem::NormalizedVectorCoefficient _curlu_hat_coef;
41 };
42 
48 class NLCurlCurlIntegrator : public mfem::NonlinearFormIntegrator
49 {
50 public:
51  NLCurlCurlIntegrator(mfem::Coefficient & k,
52  mfem::Coefficient & curlu_dk_dcurlu,
53  mfem::VectorCoefficient & curlu_vec,
54  mfem::real_t curlu_zero_tol = 1e-32,
55  const mfem::IntegrationRule * ir = nullptr);
56 
57  virtual void AssembleElementVector(const mfem::FiniteElement & el,
58  mfem::ElementTransformation & Tr,
59  const mfem::Vector & elfun,
60  mfem::Vector & elvect) override;
61  virtual void AssembleElementGrad(const mfem::FiniteElement & el,
62  mfem::ElementTransformation & Tr,
63  const mfem::Vector & elfun,
64  mfem::DenseMatrix & elmat) override;
65 
66 protected:
67  mfem::CurlCurlIntegrator _curlcurl_res_integ; // (k(|curl u|) curl u, curl phi_j)
69  mfem::CurlCurlIntegrator _curlcurl_jac_integ;
70 };
71 }
72 
73 #endif
mfem::CurlCurlIntegrator _curlcurl_res_integ
virtual void AssembleElementVector(const mfem::FiniteElement &el, mfem::ElementTransformation &Tr, const mfem::Vector &elfun, mfem::Vector &elvect) override
virtual void AssembleElementGrad(const mfem::FiniteElement &el, mfem::ElementTransformation &Tr, const mfem::Vector &elfun, mfem::DenseMatrix &elmat) override
Matrix coefficient for the Jacobian of NLCurlCurlIntegrator.
NLCurlCurlJacMatrixCoefficient(mfem::Coefficient &k, mfem::Coefficient &curlu_dk_dcurlu, mfem::VectorCoefficient &curlu_vec, mfem::real_t curlu_zero_tol)
mfem::CurlCurlIntegrator _curlcurl_jac_integ
mfem::NormalizedVectorCoefficient _curlu_hat_coef
NLCurlCurlIntegrator(mfem::Coefficient &k, mfem::Coefficient &curlu_dk_dcurlu, mfem::VectorCoefficient &curlu_vec, mfem::real_t curlu_zero_tol=1e-32, const mfem::IntegrationRule *ir=nullptr)
void Eval(mfem::DenseMatrix &K, mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override
NLCurlCurlJacMatrixCoefficient _curlcurl_jac_matrix_coef
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).