Peano
Loading...
Searching...
No Matches
BlockBoundary.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
5
#include "
Face.h
"
6
#include "
FaceBoundary.h
"
7
#include "
toolbox/curvi/Coordinate.h
"
8
#include "
toolbox/curvi/Index.h
"
9
10
#include <cmath>
11
#include <sstream>
12
13
/* Represents the face boundaries of a 3D block */
14
15
namespace
toolbox
{
16
namespace
curvi {
17
class
BlockBoundary
{
18
19
public
:
20
enum
BlockFace
{
LEFT
= 0,
RIGHT
= 1,
BOTTOM
= 2,
TOP
= 3,
FRONT
= 4,
BACK
= 5 };
21
22
BlockBoundary
(
Coordinate
a_coords[3]);
23
BlockBoundary
(
Coordinate
c0,
Coordinate
c1,
Coordinate
c2);
24
BlockBoundary
(
Face
topography,
bool
top,
int
n_depth,
double
depth);
25
26
double
&
operator()
(
BlockFace
face,
Coordinate
coord,
int
j,
int
i);
27
28
const
Face
&
getFace
(
BlockFace
face);
29
const
Face
&
getFace
(
Coordinate
coord,
bool
upper);
30
31
void
setFace
(
BlockFace
face,
const
Face
& other);
32
void
setFace
(
Coordinate
coord,
bool
upper,
Face
other);
33
34
void
split
(
Face
& face,
BlockBoundary
& left,
BlockBoundary
& right);
35
36
void
setCoord
(
Coordinate
a_coords[3]);
37
38
void
getCoord
(
Coordinate
a_coords[3]);
39
Coordinate
getCoord
(
int
i);
40
41
void
setIndexOffset
(
int
a_index_offset[3]);
42
void
setIndexSize
(
int
a_index_size[3]);
43
44
void
getIndexOffset
(
int
a_index_offset[3]);
45
int
getIndexOffset
(
Coordinate
coord);
46
47
void
getIndexSize
(
int
a_index_size[3]);
48
int
getIndexSize
(
Coordinate
coord);
49
50
void
getBoundingBox
(
double
offset[3],
double
size[3]);
51
52
void
toNetCDF
(std::string prefix);
53
54
FaceBoundary
setupSplittingFace
(
55
Coordinate
cycx[2],
56
int
fault_index,
57
double
fault_position,
58
int
indexOffset_fault[3]
59
);
60
61
std::string
toString
(
int
depth = 0);
62
63
std::string
printFaces
();
64
65
void
checkConformity
();
66
67
private
:
68
Face
left_face
;
69
Face
right_face
;
70
Face
bottom_face
;
71
Face
top_face
;
72
Face
front_face
;
73
Face
back_face
;
74
75
int
index_offset
[3];
76
int
index_size
[3];
77
Coordinate
coords
[3];
78
};
79
}
// namespace curvi
80
}
// namespace toolbox
Coordinate.h
FaceBoundary.h
Face.h
Index.h
toolbox::curvi::BlockBoundary
Definition
BlockBoundary.h:17
toolbox::curvi::BlockBoundary::getIndexOffset
int getIndexOffset(Coordinate coord)
toolbox::curvi::BlockBoundary::getIndexSize
void getIndexSize(int a_index_size[3])
toolbox::curvi::BlockBoundary::BlockBoundary
BlockBoundary(Coordinate c0, Coordinate c1, Coordinate c2)
toolbox::curvi::BlockBoundary::top_face
Face top_face
Definition
BlockBoundary.h:71
toolbox::curvi::BlockBoundary::right_face
Face right_face
Definition
BlockBoundary.h:69
toolbox::curvi::BlockBoundary::coords
Coordinate coords[3]
Definition
BlockBoundary.h:77
toolbox::curvi::BlockBoundary::toString
std::string toString(int depth=0)
toolbox::curvi::BlockBoundary::setIndexOffset
void setIndexOffset(int a_index_offset[3])
toolbox::curvi::BlockBoundary::getBoundingBox
void getBoundingBox(double offset[3], double size[3])
toolbox::curvi::BlockBoundary::setFace
void setFace(Coordinate coord, bool upper, Face other)
toolbox::curvi::BlockBoundary::getIndexSize
int getIndexSize(Coordinate coord)
toolbox::curvi::BlockBoundary::left_face
Face left_face
Definition
BlockBoundary.h:68
toolbox::curvi::BlockBoundary::checkConformity
void checkConformity()
toolbox::curvi::BlockBoundary::getFace
const Face & getFace(Coordinate coord, bool upper)
toolbox::curvi::BlockBoundary::back_face
Face back_face
Definition
BlockBoundary.h:73
toolbox::curvi::BlockBoundary::setupSplittingFace
FaceBoundary setupSplittingFace(Coordinate cycx[2], int fault_index, double fault_position, int indexOffset_fault[3])
toolbox::curvi::BlockBoundary::BlockBoundary
BlockBoundary(Face topography, bool top, int n_depth, double depth)
toolbox::curvi::BlockBoundary::getFace
const Face & getFace(BlockFace face)
toolbox::curvi::BlockBoundary::bottom_face
Face bottom_face
Definition
BlockBoundary.h:70
toolbox::curvi::BlockBoundary::index_size
int index_size[3]
Definition
BlockBoundary.h:76
toolbox::curvi::BlockBoundary::toNetCDF
void toNetCDF(std::string prefix)
toolbox::curvi::BlockBoundary::front_face
Face front_face
Definition
BlockBoundary.h:72
toolbox::curvi::BlockBoundary::setIndexSize
void setIndexSize(int a_index_size[3])
toolbox::curvi::BlockBoundary::setFace
void setFace(BlockFace face, const Face &other)
toolbox::curvi::BlockBoundary::printFaces
std::string printFaces()
toolbox::curvi::BlockBoundary::BlockFace
BlockFace
Definition
BlockBoundary.h:20
toolbox::curvi::BlockBoundary::FRONT
@ FRONT
Definition
BlockBoundary.h:20
toolbox::curvi::BlockBoundary::BOTTOM
@ BOTTOM
Definition
BlockBoundary.h:20
toolbox::curvi::BlockBoundary::TOP
@ TOP
Definition
BlockBoundary.h:20
toolbox::curvi::BlockBoundary::BACK
@ BACK
Definition
BlockBoundary.h:20
toolbox::curvi::BlockBoundary::RIGHT
@ RIGHT
Definition
BlockBoundary.h:20
toolbox::curvi::BlockBoundary::LEFT
@ LEFT
Definition
BlockBoundary.h:20
toolbox::curvi::BlockBoundary::split
void split(Face &face, BlockBoundary &left, BlockBoundary &right)
toolbox::curvi::BlockBoundary::getIndexOffset
void getIndexOffset(int a_index_offset[3])
toolbox::curvi::BlockBoundary::operator()
double & operator()(BlockFace face, Coordinate coord, int j, int i)
toolbox::curvi::BlockBoundary::BlockBoundary
BlockBoundary(Coordinate a_coords[3])
toolbox::curvi::BlockBoundary::setCoord
void setCoord(Coordinate a_coords[3])
toolbox::curvi::BlockBoundary::index_offset
int index_offset[3]
Definition
BlockBoundary.h:75
toolbox::curvi::BlockBoundary::getCoord
Coordinate getCoord(int i)
toolbox::curvi::BlockBoundary::getCoord
void getCoord(Coordinate a_coords[3])
toolbox::curvi::FaceBoundary
Definition
FaceBoundary.h:35
toolbox::curvi::Face
Definition
Face.h:31
toolbox::curvi::Coordinate
Coordinate
Definition
Coordinate.h:10
toolbox
Definition
InterpolationRestriction.h:10
src
toolbox
curvi
geometry
BlockBoundary.h
Generated on Wed Nov 4 2026 08:20:47 for Peano by
1.9.8