LCOV - code coverage report
Current view: top level - include/mfem/auxkernels - MFEMCrossProductAux.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #31613 (c7d555) with base 7323e9 Lines: 1 1 100.0 %
Date: 2025-11-06 14:13:52 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #pragma once
      12             : 
      13             : #include "MFEMAuxKernel.h"
      14             : #include "mfem.hpp"
      15             : 
      16             : /**
      17             :  * Project s(x) * (U x V) onto a vector MFEM auxvariable.
      18             :  *
      19             :  * Notes:
      20             :  *   - Currently supports only interior DOFs (no shared/constrained DOFs).
      21             :  *   - Enforces 3D: mesh dimension and all involved vdim must be 3.
      22             :  */
      23             : class MFEMCrossProductAux : public MFEMAuxKernel
      24             : {
      25             : public:
      26             :   static InputParameters validParams();
      27             : 
      28             :   MFEMCrossProductAux(const InputParameters & parameters);
      29           7 :   ~MFEMCrossProductAux() override = default;
      30             : 
      31             :   void execute() override;
      32             : 
      33             : protected:
      34             :   /// Names of vector sources
      35             :   const VariableName _u_var_name;
      36             :   const VariableName _v_var_name;
      37             : 
      38             :   /// References to the vector ParGridFunctions
      39             :   const mfem::ParGridFunction & _u_var;
      40             :   const mfem::ParGridFunction & _v_var;
      41             :   /// Scaling factor applied on the resulting field
      42             :   const mfem::real_t _scale_factor;
      43             : 
      44             :   /// Coefficient wrappers
      45             :   mfem::VectorGridFunctionCoefficient _u_coef;
      46             :   mfem::VectorGridFunctionCoefficient _v_coef;
      47             :   mfem::VectorCrossProductCoefficient _cross_uv;
      48             :   mfem::ConstantCoefficient _scale_c;
      49             : 
      50             :   ///Final coefficient that applies the scale factor to the crossproduct
      51             :   mfem::ScalarVectorProductCoefficient _final_coef;
      52             : };
      53             : 
      54             : #endif // MOOSE_MFEM_ENABLED

Generated by: LCOV version 1.14