-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathline_kernel.hpp
65 lines (53 loc) · 2.23 KB
/
line_kernel.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*---------------------------------------------------------------------------*\
*
* bitpit
*
* Copyright (C) 2015-2021 OPTIMAD engineering Srl
*
* -------------------------------------------------------------------------
* License
* This file is part of bitpit.
*
* bitpit is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License v3 (LGPL)
* as published by the Free Software Foundation.
*
* bitpit is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with bitpit. If not, see <http://www.gnu.org/licenses/>.
*
\*---------------------------------------------------------------------------*/
#ifndef __BITPIT_LINE_KERNEL_HPP__
#define __BITPIT_LINE_KERNEL_HPP__
#include "patch_kernel.hpp"
#include "point_kernel.hpp"
namespace bitpit {
class LineKernel : public PatchKernel {
public:
int getVolumeCodimension() const override;
int getSurfaceCodimension() const override;
int getLineCodimension() const override;
int getPointCodimension() const override;
void extractEnvelope(PointKernel &envelope) const;
virtual double evalCellLength(long id) const;
double evalCellSize(long id) const override;
virtual std::array<double, 3> evalCellNormal(long id, const std::array<double, 3> &orientation = {{0., 0., 1.}}) const;
private:
void initialize();
protected:
#if BITPIT_ENABLE_MPI==1
LineKernel(MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode);
LineKernel(int dimension, MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode);
LineKernel(int id, int dimension, MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode);
#else
LineKernel(AdaptionMode adaptionMode);
LineKernel(int dimension, AdaptionMode adaptionMode);
LineKernel(int id, int dimension, AdaptionMode adaptionMode);
#endif
};
}
#endif