Loading...
Searching...
No Matches
levelSetUnstructuredKernel.hpp
1/*---------------------------------------------------------------------------*\
2 *
3 * bitpit
4 *
5 * Copyright (C) 2015-2022 OPTIMAD engineering Srl
6 *
7 * -------------------------------------------------------------------------
8 * License
9 * This file is part of bitpit.
10 *
11 * bitpit is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License v3 (LGPL)
13 * as published by the Free Software Foundation.
14 *
15 * bitpit is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with bitpit. If not, see <http://www.gnu.org/licenses/>.
22 *
23\*---------------------------------------------------------------------------*/
24
25# ifndef __BITPIT_LEVELSET_UNSTRUCTURED_KERNEL_HPP__
26# define __BITPIT_LEVELSET_UNSTRUCTURED_KERNEL_HPP__
27
28#include "levelSetKernel.hpp"
29#include "levelSetCache.hpp"
30
31# include "bitpit_volunstructured.hpp"
32
33#include <memory>
34#include <vector>
35
36namespace bitpit{
37
39
40 private:
41 std::size_t m_cellCentroidCacheId;
42 std::size_t m_cellTangentRadiusCacheId;
43 std::size_t m_cellBoundingRadiusCacheId;
44
45 public:
46 template<typename value_t>
47 using CellSparseCacheContainer = std::unordered_map<long, value_t>;
48 template<typename value_t>
50
52
53 VolUnstructured * getMesh() const override;
54
55 std::array<double, 3> computeCellCentroid(long) const override;
56 double computeCellTangentRadius(long) const override;
57 double computeCellBoundingRadius(long) const override;
58
59};
60
61// Typdefs for compatibility with older versions
63
64}
65
66// Include template implementations
67#include "levelSetUnstructuredKernel.tpp"
68
69#endif
Base class for defining kernels that need to cache data.
Implements LevelSetKernel for unstructured meshes.
std::array< double, 3 > computeCellCentroid(long) const override
double computeCellBoundingRadius(long) const override
double computeCellTangentRadius(long) const override
LevelSetUnstructuredKernel(VolUnstructured &patch, LevelSetFillIn fillIn)
VolUnstructured * getMesh() const override
The VolUnstructured class defines a dummy unstructured volume patch.
--- layout: doxygen_footer ---