MFEM v4.8.0
Finite element discretization library
Loading...
Searching...
No Matches
nonlininteg_vecconvection_mf.cpp
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#include "../nonlininteg.hpp"
14
15namespace mfem
16{
17
19{
20 MFEM_ASSERT(fes.GetOrdering() == Ordering::byNODES,
21 "PA Only supports Ordering::byNODES!");
22 Mesh *mesh = fes.GetMesh();
23 const FiniteElement &el = *fes.GetTypicalFE();
25 const IntegrationRule *ir = IntRule ? IntRule : &GetRule(el, T);
26 if (DeviceCanUseCeed())
27 {
28 delete ceedOp;
29 const bool mixed = mesh->GetNumGeometries(mesh->Dimension()) > 1 ||
30 fes.IsVariableOrder();
31 if (mixed)
32 {
34 }
35 else
36 {
38 }
39 return;
40 }
41 MFEM_ABORT("Not yet implemented.");
42}
43
45{
46 if (DeviceCanUseCeed())
47 {
48 ceedOp->AddMult(x, y);
49 }
50 else
51 {
52 MFEM_ABORT("Not yet implemented!");
53 }
54}
55
56} // namespace mfem
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Definition fespace.hpp:244
bool IsVariableOrder() const
Returns true if the space contains elements of varying polynomial orders.
Definition fespace.hpp:709
Ordering::Type GetOrdering() const
Return the ordering method.
Definition fespace.hpp:876
Mesh * GetMesh() const
Returns the mesh.
Definition fespace.hpp:679
const FiniteElement * GetTypicalFE() const
Return GetFE(0) if the local mesh is not empty; otherwise return a typical FE based on the Geometry t...
Definition fespace.cpp:3871
Abstract class for all finite elements.
Definition fe_base.hpp:244
Class for an integration rule - an Array of IntegrationPoint.
Definition intrules.hpp:100
const IntegrationRule * IntRule
Mesh data type.
Definition mesh.hpp:64
int Dimension() const
Dimension of the reference space used within the elements.
Definition mesh.hpp:1216
ElementTransformation * GetTypicalElementTransformation()
If the local mesh is not empty return GetElementTransformation(0); otherwise, return the identity tra...
Definition mesh.cpp:390
int GetNumGeometries(int dim) const
Return the number of geometries of the given dimension present in the mesh.
Definition mesh.cpp:7243
void AssembleMF(const FiniteElementSpace &fes) override
Method defining fully unassembled operator.
void AddMultMF(const Vector &x, Vector &y) const override
static const IntegrationRule & GetRule(const FiniteElement &fe, const ElementTransformation &T)
Vector data type.
Definition vector.hpp:82
void AddMult(const mfem::Vector &x, mfem::Vector &y, const real_t a=1.0) const override
Operator application: y+=A(x) (default) or y+=a*A(x).
Definition operator.cpp:72
bool DeviceCanUseCeed()
Function that determines if a CEED kernel should be used, based on the current mfem::Device configura...
Definition util.cpp:33