ViennaGrid - The Vienna Grid Library
2.1.0
|
Defines and implements the geometric point type and coordinate systems. More...
#include <cmath>
#include <assert.h>
#include <stdexcept>
#include <cstddef>
#include <sstream>
#include "viennagrid/forwards.hpp"
#include "viennagrid/storage/static_array.hpp"
Go to the source code of this file.
Data Structures | |
struct | cartesian_cs< d > |
Provides the basic operations in a cartesian coordinate system. More... | |
struct | cartesian_point< PointType > |
Convenience metafunction for the conversion to Cartesian coordinates. More... | |
class | coordinate_converter< FromPointType, ToPointType, FromCoordinateSystem, ToCoordinateSystem > |
A conversion facility for transformations between coordinate systems. More... | |
class | coordinate_converter< FromPointType, ToPointType, cartesian_cs< 2 >, polar_cs > |
A functor for the transformation from two-dimensional Cartesian coordinates to polar coodinates. More... | |
class | coordinate_converter< FromPointType, ToPointType, cartesian_cs< 3 >, cylindrical_cs > |
A functor for the transformation from three-dimensional Cartesian coordinates to cylindrical coodinates. More... | |
class | coordinate_converter< FromPointType, ToPointType, cartesian_cs< 3 >, spherical_cs > |
A functor for the transformation from three-dimensional Cartesian coordinates to spherical coodinates. More... | |
class | coordinate_converter< FromPointType, ToPointType, cylindrical_cs, cartesian_cs< 3 > > |
A functor for the transformation from cylindrical coodinates to three-dimensional Cartesian coordinates. More... | |
class | coordinate_converter< FromPointType, ToPointType, cylindrical_cs, spherical_cs > |
A functor for the transformation from cylindrical coordinates to spherical coodinates. More... | |
class | coordinate_converter< FromPointType, ToPointType, polar_cs, cartesian_cs< 2 > > |
A functor for the transformation from polar coordinates to two-dimensional Cartesian coordinates. More... | |
class | coordinate_converter< FromPointType, ToPointType, spherical_cs, cartesian_cs< 3 > > |
A functor for the transformation from spherical coodinates to three-dimensional Cartesian coordinates. More... | |
class | coordinate_converter< FromPointType, ToPointType, spherical_cs, cylindrical_cs > |
A functor for the transformation from spherical coodinates to cylindrical coordinates. More... | |
struct | coordinate_system< PointType > |
Returns the coordinate system of a point. Must be specialized for a user-provided point type. More... | |
struct | coordinate_system< spatial_point< CoordType, CoordinateSystem > > |
Returns the coordinate system of a point. Specialization for a ViennaGrid point. More... | |
struct | cs_base< CSystem > |
Common base for all non-cartesian coordinate systems. More... | |
struct | cylindrical_cs |
Provides the basic operations in a cylindrical coordinate system (rho, theta, z) More... | |
struct | dimension< spatial_point< CoordType, CoordinateSystem > > |
Returns the geometric dimension of a point. Specialization for a ViennaGrid point. More... | |
struct | point_filler< CoordType, d > |
A helper class for filling point coordinates with values. More... | |
struct | point_filler< CoordType, 1 > |
A helper class for filling point coordinates with values. Specialization for one dimension. More... | |
struct | point_filler< CoordType, 2 > |
A helper class for filling point coordinates with values. Specialization for two dimensions. More... | |
struct | point_filler< CoordType, 3 > |
A helper class for filling point coordinates with values. Specialization for three dimensions. More... | |
class | point_index_out_of_bounds_exception |
An exception class for invalid point indices. More... | |
struct | point_less |
This class provides a less-than comparison for points. Entries are checked for inequality, starting from the first and continuing only in the case of equality. More... | |
struct | polar_cs |
Provides the basic operations in a polar coordinate system (r, phi) More... | |
class | spatial_point< CoordType, CoordinateSystem > |
Main point class of ViennaGrid. Represents a geometric location inside the respective Euclidian space. More... | |
struct | spherical_cs |
Provides the basic operations in a spherical coordinate system (r, theta, phi) with theta denoting the elevation angle. More... | |
struct | static_size< spatial_point< CoordType, CoordinateSystem > > |
Returns the static (compile time) size of a point. Specialization for a ViennaGrid point. More... | |
Namespaces | |
namespace | viennagrid |
The main ViennaGrid namespace. Most user functionality resides directly in this namespace rather than in sub-namespaces. | |
namespace | viennagrid::result_of |
The metafunction layer. Provides type generators that derive the respective type from the mesh configuration. | |
Functions | |
template<typename PointType > | |
std::size_t | dynamic_size (PointType const &p) |
Returns the dynamic (run time) size of a point. Assumes a .size() member. Other cases must be provided with overloads. | |
template<typename CoordType , typename CoordinateSystem > | |
spatial_point< CoordType, CoordinateSystem > | max (const spatial_point< CoordType, CoordinateSystem > &p1, const spatial_point< CoordType, CoordinateSystem > &p2) |
Returns the pointwise maximum point of two points, i.e. result[i] = max(x[i], y[i]) for all i. | |
template<typename CoordType , typename CoordinateSystem > | |
spatial_point< CoordType, CoordinateSystem > | min (const spatial_point< CoordType, CoordinateSystem > &p1, const spatial_point< CoordType, CoordinateSystem > &p2) |
Returns the pointwise minimum point of two points, i.e. result[i] = min(x[i], y[i]) for all i. | |
template<typename CoordType , typename CoordinateSystem > | |
spatial_point< CoordType, CoordinateSystem > | operator* (double val, spatial_point< CoordType, CoordinateSystem > const &p) |
Overload for stretching a vector from the left. | |
template<typename CoordType , typename CoordinateSystem > | |
std::ostream & | operator<< (std::ostream &os, spatial_point< CoordType, CoordinateSystem > const &p) |
Overload of the output stream operator. Allows simple printing to screen or streaming to file. | |
template<typename PointType > | |
result_of::cartesian_point < PointType >::type | to_cartesian (PointType const &p) |
Convenience function for converting a point to Cartesian coordinates. | |
template<typename PointType , typename CoordinateSystem > | |
result_of::cartesian_point < PointType >::type | to_cartesian_impl (PointType const &p, CoordinateSystem const &) |
Helper function for the conversion to Cartesian coordinates. Should not be called directly. Use to_cartesian() instead. | |
template<typename PointType , int d> | |
PointType const & | to_cartesian_impl (PointType const &p, cartesian_cs< d >) |
Helper function for the transformation of any point to Cartesian coordinates. Should not be called directly - use to_cartesian() instead. | |
template<typename PointType , int d> | |
PointType & | to_cartesian_impl (PointType &p, cartesian_cs< d >) |
Helper function for the transformation of any point to Cartesian coordinates. Should not be called directly - use to_cartesian() instead. |
Defines and implements the geometric point type and coordinate systems.