#include <FloGrid.H>
Definition at line 27 of file FloGrid.H.
FloGridBlock |
( |
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
unsigned int |
k |
|
) |
| |
|
inline |
std::vector<double>& Coords |
( |
| ) |
|
|
inline |
const std::vector<double>& Coords |
( |
| ) |
const |
|
inline |
Definition at line 71 of file FloGrid.H.
References _incoords, and swap().
std::vector< double > _incoords
void swap(int &a, int &b)
Definition at line 91 of file FloGrid.H.
References _incoords, flolayout, i, and NNodes().
95 unsigned int nnodes =
NNodes();
96 std::vector<double> coordcopy(3*nnodes);
97 std::vector<double>::iterator ci =
_incoords.begin();
98 std::vector<double>::iterator cci = coordcopy.begin();
101 for(
int i = 0;
i < nnodes;
i++){
std::vector< double > _incoords
unsigned int NNodes() const
unsigned int isize |
( |
| ) |
const |
|
inline |
unsigned int jsize |
( |
| ) |
const |
|
inline |
unsigned int ksize |
( |
| ) |
const |
|
inline |
Definition at line 109 of file FloGrid.H.
References _incoords, flolayout, i, and NNodes().
113 unsigned int nnodes =
NNodes();
114 std::vector<double> coordcopy(3*nnodes);
115 std::vector<double>::iterator ci =
_incoords.begin();
116 std::vector<double>::iterator cci = coordcopy.begin();
119 for(
int i = 0;
i < nnodes;
i++){
std::vector< double > _incoords
unsigned int NNodes() const
const unsigned int* NCells |
( |
| ) |
const |
|
inline |
unsigned int NGhostLayers |
( |
| ) |
const |
|
inline |
unsigned int NNodes |
( |
| ) |
const |
|
inline |
unsigned int NTotalCells |
( |
| ) |
const |
|
inline |
unsigned int NumCells |
( |
| ) |
const |
|
inline |
Definition at line 128 of file FloGrid.H.
References _incoords, _ncells, flolayout, and ni.
136 std::vector<double>::const_iterator ii = inblock.
_incoords.begin();
137 std::vector<double>::iterator
ni =
_incoords.begin();
std::vector< double > _incoords
void int int REAL REAL REAL *z blockDim dim * ni
int ReadBlock |
( |
std::istream & |
BlockIn | ) |
|
|
inline |
Definition at line 163 of file FloGrid.H.
References _grid_no, _incoords, flolayout, max(), min(), ni, nj, nk, Resize(), CPoint::x(), CPoint::y(), and CPoint::z().
Referenced by FloGrid::BlockCount(), FloGrid::ReadAllBlocks(), and FloGrid::ReadNBlocks().
166 std::getline(BlockIn,line);
169 std::istringstream Istr(line);
174 if((
_grid_no <= 0) || (ni <= 0) || (nj <= 0) || (nk <= 0)){
175 std::cout <<
"FloGridBlock::ReadBlock: Error reading block" << std::endl
176 <<
"FloGridBlock::ReadBlock: line:" << line << std::endl
177 <<
"FloGridBlock::ReadBlock: grid no: " <<
_grid_no <<
"ni = " << ni
178 <<
" nj = " << nj <<
" nk = " << nk << std::endl;
181 unsigned int number_of_nodes = (ni+1)*(nj+1)*(nk+1);
188 std::vector<double>::iterator ici =
_incoords.begin();
191 std::getline(BlockIn,line);
195 unsigned int ncount = 0;
197 double *minval = NULL;
198 double *maxval = NULL;
199 double value = *ici++;
200 if(ncount < number_of_nodes){
204 else if(ncount < 2*number_of_nodes){
std::vector< double > _incoords
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
void int int REAL REAL REAL *z blockDim dim * ni
void Resize(unsigned int i, unsigned int j, unsigned int k)
int ReadBlockSoln |
( |
std::istream & |
BlockSolnIn | ) |
|
|
inline |
Definition at line 224 of file FloGrid.H.
References _grid_no, _soln, ni, nj, nk, NumCells(), and ResizeSoln().
227 std::getline(BlockSolnIn,line);
230 std::istringstream Istr(line);
231 unsigned int grid_no = 0;
236 Istr >> grid_no >> ni >> nj >> nk >> ng;
237 if(
_grid_no != grid_no) std::cout <<
"grid " <<
_grid_no <<
" tried to read soln for block " << grid_no << std::endl;
239 if((grid_no <= 0) || (ni <= 0) || (nj <= 0) || (nk <= 0)){
240 std::cout <<
"FloGridBlock::ReadBlockSoln: Error reading block" << std::endl
241 <<
"FloGridBlock::ReadBlockSoln: line:" << line << std::endl
242 <<
"FloGridBlock::ReadBlockSoln: grid no: " << grid_no <<
"ni = " << ni
243 <<
" nj = " << nj <<
" nk = " << nk << std::endl;
246 unsigned int number_of_total_cells = (ni+(2*ng))*(nj+(2*ng))*(nk+(2*ng));
247 unsigned int number_of_real_cells = (ni*nj*
nk);
248 assert(number_of_real_cells ==
NumCells());
253 std::vector<double>::iterator ici =
_soln.begin();
254 while(ici !=
_soln.end())
255 BlockSolnIn >> *ici++;
256 std::getline(BlockSolnIn,line);
unsigned int NumCells() const
void ResizeSoln(unsigned int i, unsigned int j, unsigned int k, unsigned int ng)
void int int REAL REAL REAL *z blockDim dim * ni
std::vector< double > _soln
void Resize |
( |
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
unsigned int |
k |
|
) |
| |
|
inline |
void ResizeSoln |
( |
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
unsigned int |
k, |
|
|
unsigned int |
ng |
|
) |
| |
|
inline |
void SetGhostLayers |
( |
unsigned int |
n | ) |
|
|
inline |
std::vector<double>& Solution |
( |
| ) |
|
|
inline |
Definition at line 89 of file FloGrid.H.
References _soln.
std::vector< double > _soln
const std::vector<double>& Solution |
( |
| ) |
const |
|
inline |
Definition at line 90 of file FloGrid.H.
References _soln.
std::vector< double > _soln
int WriteBlockSoln |
( |
std::ostream & |
Ouf | ) |
|
|
inline |
Definition at line 259 of file FloGrid.H.
References _grid_no, _ncells, _ng, and _soln.
261 std::ostringstream Ostr;
263 <<
" " <<
_ncells[2] <<
" " <<
_ng << std::endl;
264 std::vector<double>::iterator si =
_soln.begin();
265 while(si !=
_soln.end()){
266 Ostr << std::scientific << std::setprecision(16) << *si++ <<
" ";
270 return(Ostr.str().size());
std::vector< double > _soln
std::vector<double> _incoords |
|
protected |
Definition at line 29 of file FloGrid.H.
Referenced by FloGridBlock(), isize(), jsize(), ksize(), NCells(), NNodes(), NTotalCells(), NumCells(), operator=(), Resize(), ResizeSoln(), and WriteBlockSoln().
std::vector<double> _soln |
|
protected |
The documentation for this class was generated from the following file: