MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
linearform_ext.hpp
Go to the documentation of this file.
1// Copyright (c) 2010-2024, 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
18namespace mfem
19{
20
21class Operator;
22class LinearForm;
23
24/// Class extending the LinearForm class to support assembly on devices.
26{
27 /// Attributes of all mesh elements.
28 Array<int> attributes, bdr_attributes;
29
30 /// Temporary markers for device kernels.
31 Array<int> markers, bdr_markers;
32
33 /// Linear form from which this extension depends. Not owned.
34 LinearForm *lf;
35
36 /// Operator that converts FiniteElementSpace L-vectors to E-vectors.
37 const ElementRestrictionOperator *elem_restrict_lex; // Not owned
38
39 /// Operator that converts L-vectors to boundary E-vectors.
40 const FaceRestriction *bdr_restrict_lex; // Not owned
41
42 /// Internal E-vectors.
43 mutable Vector b, bdr_b;
44
45public:
46
47 /// \brief Create a LinearForm extension of @a lf.
49
51
52 /// Assemble the linear form, compatible with device execution.
53 /// Only integrators added with AddDomainIntegrator are supported for now.
54 void Assemble();
55
56 /// Update the linear form extension.
57 void Update();
58};
59
60} // namespace mfem
61
62#endif // MFEM_LINEARFORM_EXT
Abstract base class that defines an interface for element restrictions.
Base class for operators that extracts Face degrees of freedom.
Class extending the LinearForm class to support assembly on devices.
void Update()
Update the linear form extension.
LinearFormExtension(LinearForm *lf)
Create a LinearForm extension of lf.
Vector with associated FE space and LinearFormIntegrators.
Vector data type.
Definition vector.hpp:80