| 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 "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; |
| 42 |
trial_op = EvalMode::InterpAndGrad; |
| 43 |
test_op = EvalMode::Interp; |
| 44 |
qdatasize = dim * dim; |
| 45 |
} |
| 46 |
}; |
| 47 |
#endif |
| 48 |
|
| 49 |
PAVectorConvectionNLFIntegrator::PAVectorConvectionNLFIntegrator( |
| 50 |
const mfem::FiniteElementSpace &fes, |
| 51 |
const mfem::IntegrationRule &irm, |
| 52 |
mfem::Coefficient *Q) |
| 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 |
|
| 63 |
MixedPAVectorConvectionNLIntegrator::MixedPAVectorConvectionNLIntegrator( |
| 64 |
const VectorConvectionNLFIntegrator &integ, |
| 65 |
const mfem::FiniteElementSpace &fes, |
| 66 |
mfem::Coefficient *Q) |
| 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 |
|
| 76 |
MFVectorConvectionNLFIntegrator::MFVectorConvectionNLFIntegrator( |
| 77 |
const mfem::FiniteElementSpace &fes, |
| 78 |
const mfem::IntegrationRule &irm, |
| 79 |
mfem::Coefficient *Q) |
| 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 |
|
| 90 |
MixedMFVectorConvectionNLIntegrator::MixedMFVectorConvectionNLIntegrator( |
| 91 |
const VectorConvectionNLFIntegrator &integ, |
| 92 |
const mfem::FiniteElementSpace &fes, |
| 93 |
mfem::Coefficient *Q) |
| 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 |