MFEM  v4.5.2
Finite element discretization library
nlconvection.cpp
Go to the documentation of this file.
1 // Copyright (c) 2010-2023, 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 "nlconvection.hpp"
13 
14 #include "../../../../config/config.hpp"
15 #ifdef MFEM_USE_CEED
16 #include "nlconvection_qf.h"
17 #endif
18 
19 namespace mfem
20 {
21 
22 namespace ceed
23 {
24 
25 #ifdef MFEM_USE_CEED
26 struct NLConvectionOperatorInfo : public OperatorInfo
27 {
28  NLConvectionContext ctx;
29  NLConvectionOperatorInfo(int dim)
30  {
31  header = "/integrators/nlconvection/nlconvection_qf.h";
32  build_func_const = ":f_build_conv_const";
33  build_qf_const = &f_build_conv_const;
34  build_func_quad = ":f_build_conv_quad";
35  build_qf_quad = &f_build_conv_quad;
36  apply_func = ":f_apply_conv";
37  apply_qf = &f_apply_conv;
38  apply_func_mf_const = ":f_apply_conv_mf_const";
39  apply_qf_mf_const = &f_apply_conv_mf_const;
40  apply_func_mf_quad = ":f_apply_conv_mf_quad";
41  apply_qf_mf_quad = &f_apply_conv_mf_quad;
44  qdatasize = dim * dim;
45  }
46 };
47 #endif
48 
50  const mfem::FiniteElementSpace &fes,
51  const mfem::IntegrationRule &irm,
53  : PAIntegrator()
54 {
55 #ifdef MFEM_USE_CEED
56  NLConvectionOperatorInfo info(fes.GetMesh()->Dimension());
57  Assemble(info, fes, irm, Q);
58 #else
59  MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
60 #endif
61 }
62 
64  const VectorConvectionNLFIntegrator &integ,
65  const mfem::FiniteElementSpace &fes,
67 {
68 #ifdef MFEM_USE_CEED
69  NLConvectionOperatorInfo info(fes.GetMesh()->Dimension());
70  Assemble(integ, info, fes, Q);
71 #else
72  MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
73 #endif
74 }
75 
77  const mfem::FiniteElementSpace &fes,
78  const mfem::IntegrationRule &irm,
80  : MFIntegrator()
81 {
82 #ifdef MFEM_USE_CEED
83  NLConvectionOperatorInfo info(fes.GetMesh()->Dimension());
84  Assemble(info, fes, irm, Q);
85 #else
86  MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
87 #endif
88 }
89 
91  const VectorConvectionNLFIntegrator &integ,
92  const mfem::FiniteElementSpace &fes,
94 {
95 #ifdef MFEM_USE_CEED
96  NLConvectionOperatorInfo info(fes.GetMesh()->Dimension());
97  Assemble(integ, info, fes, Q);
98 #else
99  MFEM_ABORT("MFEM must be built with MFEM_USE_CEED=YES to use libCEED.");
100 #endif
101 }
102 
103 } // namespace ceed
104 
105 } // namespace mfem
Class for an integration rule - an Array of IntegrationPoint.
Definition: intrules.hpp:90
int Dimension() const
Definition: mesh.hpp:1047
MFVectorConvectionNLFIntegrator(const mfem::FiniteElementSpace &fes, const mfem::IntegrationRule &irm, mfem::Coefficient *coeff)
CeedQFunctionUser build_qf_quad
Definition: integrator.hpp:51
MixedMFVectorConvectionNLIntegrator(const VectorConvectionNLFIntegrator &integ, const mfem::FiniteElementSpace &fes, mfem::Coefficient *Q)
CeedQFunctionUser build_qf_const
Definition: integrator.hpp:45
const char * build_func_const
Definition: integrator.hpp:42
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...
Definition: integrator.hpp:112
MixedPAVectorConvectionNLIntegrator(const VectorConvectionNLFIntegrator &integ, const mfem::FiniteElementSpace &fes, mfem::Coefficient *Q)
CeedQFunctionUser apply_qf_mf_const
Definition: integrator.hpp:61
const char * apply_func_mf_quad
Definition: integrator.hpp:64
CeedQFunctionUser apply_qf_mf_quad
Definition: integrator.hpp:67
const char * apply_func_mf_const
Definition: integrator.hpp:58
void Assemble(const Integrator &integ, CeedOperatorInfo &info, const mfem::FiniteElementSpace &fes, CoeffType *Q)
Mesh * GetMesh() const
Returns the mesh.
Definition: fespace.hpp:441
const char * build_func_quad
Definition: integrator.hpp:48
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Definition: fespace.hpp:96
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...
Definition: integrator.hpp:468
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
Definition: coefficient.hpp:41
PAVectorConvectionNLFIntegrator(const mfem::FiniteElementSpace &fes, const mfem::IntegrationRule &irm, mfem::Coefficient *coeff)
int dim
Definition: ex24.cpp:53
CeedQFunctionUser apply_qf
Definition: integrator.hpp:55