123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- // ===========================================================================
- //
- // 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 <http://www.gnu.org/licenses/>.
- //
- // ===========================================================================
-
- #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<VectorXr>& dx3v);
-
- // ==================== ACCESS =======================
-
- /// Return actors containing the mesh (7 actors returned. 1st is
- /// bounding box and the next 6 are prism faces)
- std::vector<vtkActor*> ReturnMeshActor();
-
- // ==================== INQUIRY =======================
-
- /// Return dx,dy,dz
- std::vector<VectorXr> 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
|