Loading...
Searching...
No Matches
lineunstructured.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_LINEUNSTRUCTURED_HPP__
26#define __BITPIT_LINEUNSTRUCTURED_HPP__
27
28#include <array>
29#include <vector>
30
31#include "bitpit_IO.hpp"
32#include "bitpit_patchkernel.hpp"
33
34namespace bitpit {
35
37
38public:
40
41 // Constructors
42#if BITPIT_ENABLE_MPI==1
43 LineUnstructured(MPI_Comm communicator);
44 LineUnstructured(int dimension, MPI_Comm communicator);
45 LineUnstructured(int id, int dimension, MPI_Comm communicator);
46 LineUnstructured(std::istream &stream, MPI_Comm communicator);
47#else
49 LineUnstructured(int dimension);
50 LineUnstructured(int id, int dimension);
51 LineUnstructured(std::istream &stream);
52#endif
53
54 // Clone
55 std::unique_ptr<PatchKernel> clone() const override;
56
57 // Setters
59
60 // Search algorithms
61 long locatePoint(const std::array<double, 3> &point) const override;
62
63 // I/O routines
64 unsigned short importDGF(const std::string &, int PIDOffset = 0, bool PIDSquash = false);
65 unsigned short exportDGF(const std::string &);
66
67protected:
68 LineUnstructured(const LineUnstructured &other) = default;
69
70 int _getDumpVersion() const override;
71 void _dump(std::ostream &stream) const override;
72 void _restore(std::istream &stream) override;
73
74 static ElementType getDGFFacetType(int nFacetVertices);
75
76};
77
78}
79
80#endif
The LineUnstructured class defines an unstructured line tasselation.
int _getDumpVersion() const override
void _dump(std::ostream &stream) const override
unsigned short exportDGF(const std::string &)
static ElementType getDGFFacetType(int nFacetVertices)
unsigned short importDGF(const std::string &, int PIDOffset=0, bool PIDSquash=false)
std::unique_ptr< PatchKernel > clone() const override
LineUnstructured(MPI_Comm communicator)
void _restore(std::istream &stream) override
long locatePoint(const std::array< double, 3 > &point) const override
void setExpert(bool expert)
long locatePoint(double x, double y, double z) const
--- layout: doxygen_footer ---