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"
9
10#include <cmath>
11#include <sstream>
12
13/* Represents the face boundaries of a 3D block */
14
15namespace toolbox {
16 namespace curvi {
18
19 public:
20 enum BlockFace { LEFT = 0, RIGHT = 1, BOTTOM = 2, TOP = 3, FRONT = 4, BACK = 5 };
21
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]);
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]);
46
47 void getIndexSize(int a_index_size[3]);
49
50 void getBoundingBox(double offset[3], double size[3]);
51
52 void toNetCDF(std::string prefix);
53
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
66
67 private:
74
76 int index_size[3];
78 };
79 } // namespace curvi
80} // namespace toolbox
int getIndexOffset(Coordinate coord)
void getIndexSize(int a_index_size[3])
BlockBoundary(Coordinate c0, Coordinate c1, Coordinate c2)
std::string toString(int depth=0)
void setIndexOffset(int a_index_offset[3])
void getBoundingBox(double offset[3], double size[3])
void setFace(Coordinate coord, bool upper, Face other)
int getIndexSize(Coordinate coord)
const Face & getFace(Coordinate coord, bool upper)
FaceBoundary setupSplittingFace(Coordinate cycx[2], int fault_index, double fault_position, int indexOffset_fault[3])
BlockBoundary(Face topography, bool top, int n_depth, double depth)
const Face & getFace(BlockFace face)
void toNetCDF(std::string prefix)
void setIndexSize(int a_index_size[3])
void setFace(BlockFace face, const Face &other)
void split(Face &face, BlockBoundary &left, BlockBoundary &right)
void getIndexOffset(int a_index_offset[3])
double & operator()(BlockFace face, Coordinate coord, int j, int i)
BlockBoundary(Coordinate a_coords[3])
void setCoord(Coordinate a_coords[3])
Coordinate getCoord(int i)
void getCoord(Coordinate a_coords[3])