Nektar++
Loading...
Searching...
No Matches
PhysInterp1DScaledOpImpl.hpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: PhysInterp1DScaledOpImpl.hpp
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description:
32//
33///////////////////////////////////////////////////////////////////////////////
34
35/**
36 * @file PhysInterp1DScaledOpImpl.hpp
37 * @brief Factory-registered whole-field implementation of the scaled
38 * physical-space interpolation operator.
39 *
40 * @note CMake includes this header into the registration translation
41 * units it generates for this operator, one per execution space and
42 * data type; it should not normally be included by any other
43 * translation unit. Other code goes through PhysInterp1DScaledOp.hpp and the
44 * operator factory.
45 */
46
47#pragma once
48
50
52{
53
54/**
55 * @brief Whole-field implementation of PhysInterp1DScaledOp, registered
56 * with the operator factory once per execution space.
57 *
58 * The class adds no behaviour of its own: the whole-field stage of the
59 * interpolation is execution-space independent (the block loops of
60 * PhysInterp1DScaledOp::v_Apply and PhysInterp1DScaledOp::SetScaleFactor),
61 * and all numerical work happens in the per-block
62 * detail::PhysInterp1DScaledBlockOpImpl objects created alongside it by
63 * ElmtOp::Create. The ExecSpace template parameter exists so that the
64 * CMake-generated factory declaration code can register a separate entry
65 * ("PhysInterp1DScaledSerial", "PhysInterp1DScaledAVX",
66 * "PhysInterp1DScaledDevice") for each execution space enabled in the
67 * build.
68 *
69 * @tparam ExecSpace Execution space the factory entry is registered for.
70 * @tparam TData Floating-point type of the field data.
71 */
72template <typename ExecSpace, typename TData>
74{
75public:
76 /// @brief Construct the operator for @p expansionList and
77 /// @p components; forwards to PhysInterp1DScaledOp.
79 const MultiRegions::ExpListSharedPtr &expansionList,
80 const std::vector<std::string> &components)
81 : PhysInterp1DScaledOp<TData>(expansionList, components)
82 {
83 }
84
85 /// Operator class name; defined by the generated factory code.
86 static std::string className;
87
88 /// Creator function registered with OperatorFactory.
89 static std::unique_ptr<Operator<TData>> Instantiate(
90 const MultiRegions::ExpListSharedPtr &expansionList,
91 const std::vector<std::string> &components)
92 {
93 return std::make_unique<PhysInterp1DScaledOpImpl<ExecSpace, TData>>(
94 expansionList, components);
95 }
96};
97
98} // namespace Nektar::MultiRegions::detail
Whole-field interface of the PhysInterp1DScaled element operator, which re-evaluates a physical-space...
Whole-field interface of the scaled physical-space interpolation: re-evaluates a physical-space field...
Whole-field implementation of PhysInterp1DScaledOp, registered with the operator factory once per exe...
PhysInterp1DScaledOpImpl(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
Construct the operator for expansionList and components; forwards to PhysInterp1DScaledOp.
static std::string className
Operator class name; defined by the generated factory code.
static std::unique_ptr< Operator< TData > > Instantiate(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
Creator function registered with OperatorFactory.
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.