// ===========================================================================
//
// Filename: rectilinearstructuredgrid.h
//
// Description:
//
// Version: 0.0
// Created: 09/16/2013 01:49:40 PM
// Revision: none
// Compiler: Tested with g++
//
// Author: M. Andy Kass (MAK)
//
// Organisation: US Geological Survey
//
//
// Email: mkass@usgs.gov
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
// ===========================================================================
#ifndef __RECTILINEARSTRUCTUREDGRID_H
#define __RECTILINEARSTRUCTUREDGRID_H
#include "formalhaut.h"
#include "structuredgrid.h"
#include "exceptions.h"
namespace formalhaut {
// ===================================================================
// Class: RectilinearStructuredGrid
/// \brief
/// \details
// ===================================================================
class RectilinearStructuredGrid : public StructuredGrid {
friend std::ostream &operator<<(std::ostream &stream,
const RectilinearStructuredGrid &ob);
public:
// ==================== LIFECYCLE =======================
static RectilinearStructuredGrid* New();
void Delete();
// ==================== OPERATORS =======================
// ==================== OPERATIONS =======================
/// Compute the centroid of each vectorized cell
void ComputeCentroids();
/// Set the dimensions of the cells
void SetCellDims(const std::vector& dx3v);
// ==================== ACCESS =======================
/// Return actors containing the mesh (7 actors returned. 1st is
/// bounding box and the next 6 are prism faces)
std::vector ReturnMeshActor();
// ==================== INQUIRY =======================
/// Return dx,dy,dz
std::vector GetCellDims();
/// Return a particular set of corners
VectorXr GetCorners(const int& vecpos);
/// Display the grid
void DisplayMesh();
protected:
// ==================== LIFECYCLE =======================
/// Default protected constructor.
RectilinearStructuredGrid ();
/// Default protected constructor.
~RectilinearStructuredGrid ();
/// Vectorized cell widths. Not the most memory efficient, but
/// efficient computationally (by that I mean I'm lazy and tired
/// and this seems like the easiest way).
Vector3Xr CW;
// ==================== DATA MEMBERS =========================
private:
}; // ----- end of class RectilinearStructuredGrid -----
} // end of namespace formalhaut
#endif