Loading...
Searching...
No Matches
volunstructured.hpp
1/*---------------------------------------------------------------------------*\
2 *
3 * bitpit
4 *
5 * Copyright (C) 2015-2021 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_VOLUNSTRUCTURED_HPP__
26#define __BITPIT_VOLUNSTRUCTURED_HPP__
27
28#include <array>
29#include <vector>
30
31#include "bitpit_patchkernel.hpp"
32
33namespace bitpit {
34
36
37public:
40
41#if BITPIT_ENABLE_MPI==1
42 VolUnstructured(MPI_Comm communicator, std::size_t haloSize = 1);
43 VolUnstructured(int dimension, MPI_Comm communicator, std::size_t haloSize = 1);
44 VolUnstructured(int id, int dimension, MPI_Comm communicator, std::size_t haloSize = 1);
45#else
47 VolUnstructured(int dimension);
48 VolUnstructured(int id, int dimension);
49#endif
50
51 std::unique_ptr<PatchKernel> clone() const override;
52
54
55 double evalCellVolume(long id) const override;
56 double evalCellSize(long id) const override;
57
58 double evalInterfaceArea(long id) const override;
59 std::array<double, 3> evalInterfaceNormal(long id) const override;
60
61 bool isPointInside(const std::array<double, 3> &point) const override;
62 bool isPointInside(long id, const std::array<double, 3> &point) const override;
63 long locatePoint(const std::array<double, 3> &point) const override;
64
65protected:
66 int _getDumpVersion() const override;
67 void _dump(std::ostream &stream) const override;
68 void _restore(std::istream &stream) override;
69
70#if BITPIT_ENABLE_MPI==1
71 std::size_t _getMaxHaloSize() override;
72#endif
73
74private:
75
76};
77
78}
79
80#endif
void setExpert(bool expert)
long locatePoint(double x, double y, double z) const
The VolUnstructured class defines a dummy unstructured volume patch.
std::array< double, 3 > evalInterfaceNormal(long id) const override
std::unique_ptr< PatchKernel > clone() const override
double evalInterfaceArea(long id) const override
std::size_t _getMaxHaloSize() override
double evalCellSize(long id) const override
bool isPointInside(const std::array< double, 3 > &point) const override
double evalCellVolume(long id) const override
void _dump(std::ostream &stream) const override
void _restore(std::istream &stream) override
VolUnstructured(MPI_Comm communicator, std::size_t haloSize=1)
long locatePoint(const std::array< double, 3 > &point) const override
int _getDumpVersion() const override
The VolumeKernel class provides an interface for defining volume patches.
bool isPointInside(double x, double y, double z) const
--- layout: doxygen_footer ---