Peano
Loading...
Searching...
No Matches
FaceBoundary.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
8
9#include <algorithm>
10#include <vector>
11
12/* Represents the boundaries of a 2D face */
13/* ^ */
14/* | */
15/* | offset(xi)+ top_edge */
16/* | size(xi) -------------- */
17/* | | | */
18/* | | | */
19/*xi | left_edge | | right_edge */
20/* | | | */
21/* | offset(xi) | | */
22/* | -------------- */
23/* | offset(eta) bottom_edge offset(eta)+ */
24/* | size(eta) */
25/* 0------------------- eta------------------->*/
26
27namespace toolbox {
28 namespace curvi {
29 class Face;
30 } // namespace curvi
31} // namespace toolbox
32
33namespace toolbox {
34 namespace curvi {
36
37 public:
38 // enum Edge{ LEFT, RIGHT, BOTTOM, TOP };
39
40 // FaceBoundary();
42
43 FaceBoundary(const Face& face);
44
47
48 FaceBoundary(double a_offset[3], double a_size[3], int a_range[3], Coordinate a_coords[2]);
49
50 FaceBoundary(Coordinate a_coords[2], double a_position, Edge& a_left, Edge& a_right, Edge& a_bottom, Edge& a_top);
51
52
53 Coordinate getCoord(int i) const;
54 void getCoord(Coordinate a_coord[2]) const;
55
56 int getIndexSize(int i) const;
57 void getIndexSize(int a_index_size[3]) const;
58
59 double getPosition() const;
60
61 Edge& getEdge(Coordinate coord, bool upper);
62
63 void getIndexRange(Coordinate coord, std::vector<int>& a_range) const;
64
65 void setEdge(Coordinate coord, bool upper, const Edge& other);
66
67 void split(Coordinate c, int intersection_index, Edge intersection_path, FaceBoundary& left, FaceBoundary& right);
68
70
71 friend std::ostream& operator<<(std::ostream& ss, const FaceBoundary& f);
72 std::string printNodes();
73
74
75 private:
80
82 int index_size[3];
83 double position;
84 };
85 } // namespace curvi
86} // namespace toolbox
void getCoord(Coordinate a_coord[2]) const
FaceBoundary(double a_offset[3], double a_size[3], int a_range[3], Coordinate a_coords[2])
FaceBoundary(const Face &face)
friend std::ostream & operator<<(std::ostream &ss, const FaceBoundary &f)
void setEdge(Coordinate coord, bool upper, const Edge &other)
void getIndexRange(Coordinate coord, std::vector< int > &a_range) const
Coordinate getCoord(int i) const
FaceBoundary(Coordinate a_coords[2], double a_position, Edge &a_left, Edge &a_right, Edge &a_bottom, Edge &a_top)
Edge & getEdge(Coordinate coord, bool upper)
FaceBoundary(const FaceBoundary &other)
void getIndexSize(int a_index_size[3]) const
void split(Coordinate c, int intersection_index, Edge intersection_path, FaceBoundary &left, FaceBoundary &right)
FaceBoundary & operator=(FaceBoundary other)
int getIndexSize(int i) const