MFEM
v4.9.0
Finite element discretization library
Loading...
Searching...
No Matches
fem
linearform_ext.hpp
Go to the documentation of this file.
1
// Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
2
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3
// LICENSE and NOTICE for details. LLNL-CODE-806117.
4
//
5
// This file is part of the MFEM library. For more information and source code
6
// availability visit https://mfem.org.
7
//
8
// MFEM is free software; you can redistribute it and/or modify it under the
9
// terms of the BSD-3 license. We welcome feedback and contributions, see file
10
// CONTRIBUTING.md for details.
11
12
#ifndef MFEM_LINEARFORM_EXT
13
#define MFEM_LINEARFORM_EXT
14
15
#include "
../general/array.hpp
"
16
#include "
../linalg/vector.hpp
"
17
18
namespace
mfem
19
{
20
21
class
Operator;
22
class
LinearForm;
23
24
/// Class extending the LinearForm class to support assembly on devices.
25
class
LinearFormExtension
26
{
27
/// Attributes of all mesh elements.
28
const
Array<int>
*attributes;
// Not owned
29
const
Array<int>
*bdr_face_attributes;
// Not owned
30
31
/// Temporary markers for device kernels.
32
Array<int>
markers, bdr_markers;
33
34
/// Linear form from which this extension depends. Not owned.
35
LinearForm
*lf;
36
37
/// Operator that converts FiniteElementSpace L-vectors to E-vectors.
38
const
ElementRestrictionOperator
*elem_restrict_lex;
// Not owned
39
40
/// Operator that converts L-vectors to boundary E-vectors.
41
const
FaceRestriction
*bdr_restrict_lex;
// Not owned
42
43
/// Internal E-vectors.
44
mutable
Vector
b, bdr_b;
45
46
public
:
47
48
/// \brief Create a LinearForm extension of @a lf.
49
LinearFormExtension
(
LinearForm
*lf);
50
51
~LinearFormExtension
() { }
52
53
/// Assemble the linear form, compatible with device execution.
54
/// Only integrators added with AddDomainIntegrator are supported for now.
55
void
Assemble
();
56
57
/// Update the linear form extension.
58
void
Update
();
59
};
60
61
}
// namespace mfem
62
63
#endif
// MFEM_LINEARFORM_EXT
array.hpp
mfem::Array
Definition
array.hpp:48
mfem::ElementRestrictionOperator
Abstract base class that defines an interface for element restrictions.
Definition
restriction.hpp:29
mfem::FaceRestriction
Base class for operators that extracts Face degrees of freedom.
Definition
restriction.hpp:167
mfem::LinearFormExtension
Class extending the LinearForm class to support assembly on devices.
Definition
linearform_ext.hpp:26
mfem::LinearFormExtension::~LinearFormExtension
~LinearFormExtension()
Definition
linearform_ext.hpp:51
mfem::LinearFormExtension::Update
void Update()
Update the linear form extension.
Definition
linearform_ext.cpp:114
mfem::LinearFormExtension::LinearFormExtension
LinearFormExtension(LinearForm *lf)
Create a LinearForm extension of lf.
Definition
linearform_ext.cpp:18
mfem::LinearFormExtension::Assemble
void Assemble()
Definition
linearform_ext.cpp:20
mfem::LinearForm
Vector with associated FE space and LinearFormIntegrators.
Definition
linearform.hpp:25
mfem::Vector
Vector data type.
Definition
vector.hpp:82
mfem
Definition
CodeDocumentation.dox:1
vector.hpp
Generated on Thu Dec 11 2025 11:52:54 for MFEM by
1.11.0