11#include "utils/ObserverBase.h"
21 SDOPT_BY_NUM_SLABS = 1,
22 SDOPT_BY_SLAB_WIDTH = 2,
43 unsigned short GetID() {
return _nID;}
44 int GetType() {
return _nType;}
46 virtual void Print(std::ostream& os) = 0;
66 double GetLowerCorner(
const uint16_t& nDim) {
return _dLowerCorner.at(nDim);}
67 double GetUpperCorner(
const uint16_t& nDim) {
return _dUpperCorner.at(nDim);}
68 void GetLowerCorner(
double* dLC) {dLC = _dLowerCorner.data();}
69 void GetUpperCorner(
double* dUC) {dUC = _dUpperCorner.data();}
70 double* GetLowerCorner() {
return _dLowerCorner.data();}
71 double* GetUpperCorner() {
return _dUpperCorner.data();}
72 void SetLowerCorner(
const uint16_t& nDim,
const double& dVal) {_dLowerCorner.at(nDim) = dVal;}
73 void SetUpperCorner(
const uint16_t& nDim,
const double& dVal) {_dUpperCorner.at(nDim) = dVal;}
74 double GetWidth(
const uint16_t& nDim) {
return _dUpperCorner[nDim] - _dLowerCorner[nDim];}
75 void GetRange(
const uint16_t& nDim,
double& dRangeBegin,
double& dRangeEnd) {dRangeBegin = _dLowerCorner.at(nDim); dRangeEnd = _dUpperCorner.at(nDim);}
76 bool PositionIsInside(
const uint16_t& nDim,
const double& dPos) {
return (dPos > _dLowerCorner.at(nDim) ) && (dPos < _dUpperCorner.at(nDim) );}
77 bool PositionIsInside(
double* dPos) {
78 if ( !(dPos[0] > _dLowerCorner.at(0) && dPos[0] < _dUpperCorner.at(0) ) )
return false;
79 else if ( !(dPos[1] > _dLowerCorner.at(1) && dPos[1] < _dUpperCorner.at(1) ) )
return false;
80 else if ( !(dPos[2] > _dLowerCorner.at(2) && dPos[2] < _dUpperCorner.at(2) ) )
return false;
83 virtual void Print(std::ostream& os)
85 os <<
"----------------------------------------------------------------" << std::endl;
86 os <<
"ID: " << _nID << std::endl;
87 os <<
"width: " << this->GetWidth(0) <<
" " << this->GetWidth(1) <<
" " << this->GetWidth(2) << std::endl;
88 double* lc = this->GetLowerCorner();
89 double* uc = this->GetUpperCorner();
90 os <<
"lowerCorner: " << lc[0] <<
" " << lc[1] <<
" " << lc[2] << std::endl;
91 os <<
"upperCorner: " << uc[0] <<
" " << uc[1] <<
" " << uc[2] << std::endl;
92 os <<
"----------------------------------------------------------------" << std::endl;
97 for(uint8_t dim=0; dim<3; ++dim)
98 dVolume *= this->GetWidth(dim);
103 std::array<double,3> _dLowerCorner;
104 std::array<double,3> _dUpperCorner;
106 int _nSubdivisionOpt;
121 void PrepareAsObserver(
const std::vector<uint32_t>& refCoords);
125 std::array<double,6> _dDistToRefCoords;
126 std::array<bool,6> _bMaskMidpointLeft;
127 std::array<bool,6> _bMaskMidpointRight;
131std::ostream& operator<<( std::ostream& os,
Region& region);
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
Definition: ObserverBase.h:13
Definition: ObserverBase.h:20
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270