MFEM
v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
fem
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
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
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
45
public
:
46
47
/// \brief Create a LinearForm extension of @a lf.
48
LinearFormExtension
(
LinearForm
*lf);
49
50
~LinearFormExtension
() { }
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
array.hpp
mfem::Array
Definition
array.hpp:46
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:163
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:50
mfem::LinearFormExtension::Update
void Update()
Update the linear form extension.
Definition
linearform_ext.cpp:113
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:80
mfem
Definition
CodeDocumentation.dox:1
vector.hpp
1.11.0