https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMConstraintUtils.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
13
14#include "libmesh/ignore_warnings.h"
15#include "mfem/miniapps/common/mfem-common.hpp"
16#include "libmesh/restore_warnings.h"
17
18namespace Moose::MFEM
19{
33void subdomainTDofs(mfem::ParFiniteElementSpace & pfes,
34 const mfem::Array<int> & subdomain_markers,
35 bool include_boundary,
36 mfem::Array<int> & ldof_marker,
37 mfem::Array<int> & tdofs);
38
50void projectCoefficientOnSubdomains(mfem::ParGridFunction & gf,
51 mfem::Coefficient & coef,
52 const mfem::Array<int> & subdomain_markers,
53 const mfem::Array<int> & ldof_marker);
54void projectCoefficientOnSubdomains(mfem::ParGridFunction & gf,
55 mfem::VectorCoefficient & coef,
56 const mfem::Array<int> & subdomain_markers,
57 const mfem::Array<int> & ldof_marker);
58
63void zeroTrueDofs(mfem::ParGridFunction & gf, const mfem::Array<int> & tdofs);
64}
65
66#endif
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
void projectCoefficientOnSubdomains(mfem::ParGridFunction &gf, mfem::Coefficient &coef, const mfem::Array< int > &subdomain_markers, const mfem::Array< int > &ldof_marker)
Overwrite the degrees of freedom of grid function gf marked in the local dof marker ldof_marker with ...
void subdomainTDofs(mfem::ParFiniteElementSpace &pfes, const mfem::Array< int > &subdomain_markers, bool include_boundary, mfem::Array< int > &ldof_marker, mfem::Array< int > &tdofs)
Degrees of freedom of pfes belonging to elements whose mesh attribute is set in the attribute marker ...
void zeroTrueDofs(mfem::ParGridFunction &gf, const mfem::Array< int > &tdofs)
Strongly set the true dofs listed in tdofs of grid function gf to zero, leaving its local vector cons...