MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mass.cpp
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#include "mass.hpp"
13
15#ifdef MFEM_USE_CEED
16#include "mass_qf.h"
17#endif
18
19namespace mfem
20{
21
22namespace ceed
23{
24
25#ifdef MFEM_USE_CEED
26struct MassOperatorInfo : public OperatorInfo
27{
28 MassContext ctx;
29 MassOperatorInfo()
30 {
31 header = "/integrators/mass/mass_qf.h";
32 build_func_const = ":f_build_mass_const";
33 build_qf_const = &f_build_mass_const;
34 build_func_quad = ":f_build_mass_quad";
35 build_qf_quad = &f_build_mass_quad;
36 apply_func = ":f_apply_mass";
37 apply_qf = &f_apply_mass;
38 apply_func_mf_const = ":f_apply_mass_mf_const";
39 apply_qf_mf_const = &f_apply_mass_mf_const;
40 apply_func_mf_quad = ":f_apply_mass_mf_quad";
41 apply_qf_mf_quad = &f_apply_mass_mf_quad;
44 qdatasize = 1;
45 }
46};
47#endif
48
50 const mfem::IntegrationRule &irm,
52 : PAIntegrator()
53{
54#ifdef MFEM_USE_CEED
55 MassOperatorInfo info;
56 Assemble(info, fes, irm, Q);
57#else
58 MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
59#endif
60}
61
63 const mfem::FiniteElementSpace &fes,
65{
66#ifdef MFEM_USE_CEED
67 MassOperatorInfo info;
68 Assemble(integ, info, fes, Q);
69#else
70 MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
71#endif
72}
73
75 const mfem::FiniteElementSpace &fes,
77{
78#ifdef MFEM_USE_CEED
79 MassOperatorInfo info;
80 Assemble(integ, info, fes, Q);
81#else
82 MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
83#endif
84}
85
87 const mfem::IntegrationRule &irm,
89 : MFIntegrator()
90{
91#ifdef MFEM_USE_CEED
92 MassOperatorInfo info;
93 Assemble(info, fes, irm, Q);
94#else
95 MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
96#endif
97}
98
100 const mfem::FiniteElementSpace &fes,
102{
103#ifdef MFEM_USE_CEED
104 MassOperatorInfo info;
105 Assemble(integ, info, fes, Q);
106#else
107 MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
108#endif
109}
110
112 const mfem::FiniteElementSpace &fes,
114{
115#ifdef MFEM_USE_CEED
116 MassOperatorInfo info;
117 Assemble(integ, info, fes, Q);
118#else
119 MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
120#endif
121}
122
123} // namespace ceed
124
125} // namespace mfem
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Definition fespace.hpp:220
Class for an integration rule - an Array of IntegrationPoint.
Definition intrules.hpp:100
void Assemble(CeedOperatorInfo &info, const mfem::FiniteElementSpace &fes, const mfem::IntegrationRule &ir, CoeffType *Q)
This method assembles the MFIntegrator with the given CeedOperatorInfo info, an mfem::FiniteElementSp...
MFMassIntegrator(const mfem::FiniteElementSpace &fes, const mfem::IntegrationRule &ir, mfem::Coefficient *Q)
Definition mass.cpp:86
void Assemble(const Integrator &integ, CeedOperatorInfo &info, const mfem::FiniteElementSpace &fes, CoeffType *Q)
MixedMFMassIntegrator(const MassIntegrator &integ, const mfem::FiniteElementSpace &fes, mfem::Coefficient *Q)
Definition mass.cpp:99
MixedPAMassIntegrator(const MassIntegrator &integ, const mfem::FiniteElementSpace &fes, mfem::Coefficient *Q)
Definition mass.cpp:62
void Assemble(CeedOperatorInfo &info, const mfem::FiniteElementSpace &fes, const mfem::IntegrationRule &ir, CoeffType *Q)
This method assembles the PAIntegrator with the given CeedOperatorInfo info, an mfem::FiniteElementSp...
PAMassIntegrator(const mfem::FiniteElementSpace &fes, const mfem::IntegrationRule &ir, mfem::Coefficient *Q)
Definition mass.cpp:49
CeedQFunctionUser apply_qf_mf_const
const char * apply_func_mf_quad
const char * apply_func_mf_const
CeedQFunctionUser build_qf_const
CeedQFunctionUser apply_qf
CeedQFunctionUser build_qf_quad
CeedQFunctionUser apply_qf_mf_quad
const char * build_func_const
const char * build_func_quad