MFEM v4.10.0
Finite element discretization library
Loading...
Searching...
No Matches
nonlininteg_vecconvection_pa_diag.cpp
Go to the documentation of this file.
1// Copyright (c) 2010-2026, 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
13#include "./nonlininteg_vecconvection_pa_diag.hpp" // IWYU pragma: keep
14
15namespace mfem
16{
17
19{
20 MFEM_VERIFY(!DeviceCanUseCeed(),
21 "VectorConvectionNLFIntegrator PA gradients are not supported "
22 "with the libCEED backend");
23
24 if (dim == 2)
25 {
26 GradDiagPA2D::Run(d1d, q1d, ne,
27 maps->B.Read(),
28 maps->G.Read(),
29 pa_adj.Read(),
30 pa_u.Read(),
31 de.ReadWrite(),
32 d1d, q1d);
33 }
34 else if (dim == 3)
35 {
36 GradDiagPA3D::Run(d1d, q1d, ne,
37 maps->B.Read(),
38 maps->G.Read(),
39 pa_adj.Read(),
40 pa_u.Read(),
41 de.ReadWrite(),
42 d1d, q1d);
43 }
44 else
45 {
46 MFEM_ABORT("Unsupported dimension");
47 }
48}
49
50} // namespace mfem
const T * Read(bool on_dev=true) const
Shortcut for mfem::Read(a.GetMemory(), a.Size(), on_dev).
Definition array.hpp:410
Array< real_t > G
Gradients/divergences/curls of basis functions evaluated at quadrature points.
Definition fe_base.hpp:222
Array< real_t > B
Basis functions evaluated at quadrature points.
Definition fe_base.hpp:201
void AssembleGradDiagonalPA(Vector &) const override
Method for computing the diagonal of the gradient with partial assembly.
Vector data type.
Definition vector.hpp:82
virtual const real_t * Read(bool on_dev=true) const
Shortcut for mfem::Read(vec.GetMemory(), vec.Size(), on_dev).
Definition vector.hpp:520
virtual real_t * ReadWrite(bool on_dev=true)
Shortcut for mfem::ReadWrite(vec.GetMemory(), vec.Size(), on_dev).
Definition vector.hpp:536
bool DeviceCanUseCeed()
Function that determines if a CEED kernel should be used, based on the current mfem::Device configura...
Definition util.cpp:33