Loading...
Searching...
No Matches
line_kernel.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_LINE_KERNEL_HPP__
26#define __BITPIT_LINE_KERNEL_HPP__
27
28#include "patch_kernel.hpp"
29#include "point_kernel.hpp"
30
31namespace bitpit {
32
33class LineKernel : public PatchKernel {
34
35public:
36 int getVolumeCodimension() const override;
37 int getSurfaceCodimension() const override;
38 int getLineCodimension() const override;
39 int getPointCodimension() const override;
40
41 void extractEnvelope(PointKernel &envelope) const;
42
43 virtual double evalCellLength(long id) const;
44 double evalCellSize(long id) const override;
45 virtual std::array<double, 3> evalCellNormal(long id, const std::array<double, 3> &orientation = {{0., 0., 1.}}) const;
46 void evalBarycentricCoordinates(long id, const std::array<double, 3> &point, double *lambda) const;
47
48private:
49 void initialize();
50
51protected:
52#if BITPIT_ENABLE_MPI==1
53 LineKernel(MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode);
54 LineKernel(int dimension, MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode);
55 LineKernel(int id, int dimension, MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode);
56#else
57 LineKernel(AdaptionMode adaptionMode);
58 LineKernel(int dimension, AdaptionMode adaptionMode);
59 LineKernel(int id, int dimension, AdaptionMode adaptionMode);
60#endif
61
62};
63
64}
65
66#endif
int getVolumeCodimension() const override
int getPointCodimension() const override
void evalBarycentricCoordinates(long id, const std::array< double, 3 > &point, double *lambda) const
virtual double evalCellLength(long id) const
double evalCellSize(long id) const override
int getLineCodimension() const override
LineKernel(MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode)
void extractEnvelope(PointKernel &envelope) const
virtual std::array< double, 3 > evalCellNormal(long id, const std::array< double, 3 > &orientation={{0., 0., 1.}}) const
int getSurfaceCodimension() const override
The PatchKernel class provides an interface for defining patches.
--- layout: doxygen_footer ---