Nektar++
Loading...
Searching...
No Matches
StdMatDataWarehouse.hpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: StdMatDataWarehouse.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#pragma once
36
40
41namespace Nektar::StdRegions
42{
43
45{
68 // Galerkin projection from a fine physical grid to the native grid.
71 // Projection of physical-space inner products onto the expansion,
72 // B M^{-1} B^T, nqTot x nqTot; symmetric, so it is its own transpose.
74 // The diagonal of the standard inverse mass, nmTot values: all of it
75 // that the operators read where the standard mass is diagonal.
77};
78
79class StdMatDataCreator;
80
81template <typename TData> class StdMatKey : public LibUtilities::BaseKey
82{
83 friend class StdMatDataCreator;
84
85public:
87 typedef TData value_type;
88
89 ~StdMatKey() override = default;
90
92 const std::vector<LibUtilities::BasisKey> basisKeys,
93 const LibUtilities::ShapeType shapeType, const StdMatType stdMatType,
95 const std::vector<unsigned int> nq = std::vector<unsigned int>(3, 1))
96 : m_basisKeys(basisKeys), m_shapeType(shapeType),
97 m_stdMatType(stdMatType), m_nodalType(nodalType), m_nq(nq)
98 {
99 if (m_basisKeys.size() > 2)
100 {
101 hash_combine(m_hash, m_basisKeys[2].GetNumModes(),
102 m_basisKeys[2].GetBasisType(),
103 m_basisKeys[2].GetPointsKey().GetNumPoints(),
104 m_basisKeys[2].GetPointsKey().GetPointsType(),
105 m_basisKeys[2].GetPointsKey().GetFactor(), m_nq[2]);
106 }
107 if (m_basisKeys.size() > 1)
108 {
109 hash_combine(m_hash, m_basisKeys[1].GetNumModes(),
110 m_basisKeys[1].GetBasisType(),
111 m_basisKeys[1].GetPointsKey().GetNumPoints(),
112 m_basisKeys[1].GetPointsKey().GetPointsType(),
113 m_basisKeys[1].GetPointsKey().GetFactor(), m_nq[1]);
114 }
116 m_hash, m_basisKeys[0].GetNumModes(), m_basisKeys[0].GetBasisType(),
117 m_basisKeys[0].GetPointsKey().GetNumPoints(),
118 m_basisKeys[0].GetPointsKey().GetPointsType(),
119 m_basisKeys[0].GetPointsKey().GetFactor(), m_nq[0], m_shapeType,
120 m_stdMatType, m_nodalType, typeid(value_type).name(), "StdMatKey");
121 }
122
123private:
124 std::vector<LibUtilities::BasisKey> m_basisKeys;
128 std::vector<unsigned int> m_nq;
129};
130
132{
133public:
134 ~StdMatDataCreator() override = default;
135
136 template <typename MemSpace, typename TData>
138
139 inline static const std::string m_name = "StdMatDataCreator";
140};
141
142} // namespace Nektar::StdRegions
A MemoryRegion represents a memory region.
LibUtilities::MemoryRegion< TData > Create(const StdMatKey< TData > &stdMatKey)
LibUtilities::ShapeType m_shapeType
std::vector< LibUtilities::BasisKey > m_basisKeys
~StdMatKey() override=default
StdMatKey(const std::vector< LibUtilities::BasisKey > basisKeys, const LibUtilities::ShapeType shapeType, const StdMatType stdMatType, const LibUtilities::PointsType nodalType=LibUtilities::eNoPointsType, const std::vector< unsigned int > nq=std::vector< unsigned int >(3, 1))
std::vector< unsigned int > m_nq
LibUtilities::PointsType m_nodalType
void hash_combine(std::size_t &seed)
Definition HashUtils.hpp:45