https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
15namespace Moose::MFEM
16{
23class NLCurlCurlJacMatrixCoefficient : public mfem::MatrixCoefficient
24{
25public:
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
36protected:
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
48class NLCurlCurlIntegrator : public mfem::NonlinearFormIntegrator
49{
50public:
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
66protected:
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
NLCurlCurlJacMatrixCoefficient _curlcurl_jac_matrix_coef
mfem::CurlCurlIntegrator _curlcurl_jac_integ
mfem::CurlCurlIntegrator _curlcurl_res_integ
virtual void AssembleElementGrad(const mfem::FiniteElement &el, mfem::ElementTransformation &Tr, const mfem::Vector &elfun, mfem::DenseMatrix &elmat) override
virtual void AssembleElementVector(const mfem::FiniteElement &el, mfem::ElementTransformation &Tr, const mfem::Vector &elfun, mfem::Vector &elvect) override
Matrix coefficient for the Jacobian of NLCurlCurlIntegrator.
mfem::NormalizedVectorCoefficient _curlu_hat_coef
void Eval(mfem::DenseMatrix &K, mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).