ViennaGrid - The Vienna Grid Library  2.1.0
Namespaces | Functions
viennagrid/algorithm/centroid.hpp File Reference

Computes the centroid (center of mass) for different cell types. More...

#include <iostream>
#include <sstream>
#include <string>
#include <stdexcept>
#include "viennagrid/forwards.hpp"
#include "viennagrid/topology/all.hpp"
#include "viennagrid/algorithm/volume.hpp"
#include "viennagrid/accessor.hpp"

Go to the source code of this file.

Namespaces

namespace  viennagrid
 

The main ViennaGrid namespace. Most user functionality resides directly in this namespace rather than in sub-namespaces.


namespace  viennagrid::detail
 

Namespace for implementation details. Not intended to be used directly by a library user.


Functions

template<typename PointAccessorT , typename ElementT >
PointAccessorT::value_type centroid (PointAccessorT const accessor, ElementT const &cell, viennagrid::triangle_tag)
 Implementation of the calculation of a centroid for a triangle.
template<typename PointAccessorT , typename ElementT >
PointAccessorT::value_type centroid (PointAccessorT const accessor, ElementT const &cell, viennagrid::quadrilateral_tag)
 Implementation of the calculation of a centroid for a quadrilateral.
template<typename PointAccessorT , typename ElementT >
PointAccessorT::value_type centroid (PointAccessorT const accessor, ElementT const &cell, viennagrid::hexahedron_tag)
 Implementation of the calculation of a centroid for a hexahedron.
template<typename PointAccessorT , typename ElementT >
PointAccessorT::value_type centroid (PointAccessorT const accessor, ElementT const &cell, viennagrid::simplex_tag< 1 >)
 Implementation of the calculation of a centroid for a line (1-simplex)
template<typename PointAccessorT , typename ElementT >
PointAccessorT::value_type centroid (PointAccessorT const accessor, ElementT const &cell, viennagrid::hypercube_tag< 1 >)
 Implementation of the calculation of a centroid for a line (1-hypercube)
template<typename PointAccessorT , typename ElementT >
PointAccessorT::value_type centroid (PointAccessorT const accessor, ElementT const &cell, viennagrid::vertex_tag)
 Implementation of the calculation of a centroid for a point.
template<typename PointAccessorT , typename ElementT >
PointAccessorT::value_type centroid (PointAccessorT const accessor, ElementT const &element)
 The public interface function for the computation of a centroid of an element with explicit point accessor.
template<typename ElementTag , typename WrappedConfigT >
viennagrid::result_of::point
< viennagrid::element
< ElementTag, WrappedConfigT >
>::type 
centroid (viennagrid::element< ElementTag, WrappedConfigT > const &element)
 The public interface function for the computation of a centroid of an element.
template<typename ElementTOrTagT , typename WrappedConfigT , typename PointAccessorT >
viennagrid::result_of::point
< mesh< WrappedConfigT >
>::type 
centroid (mesh< WrappedConfigT > const &mesh_obj, PointAccessorT const point_accessor)
 The public interface function for the computation of a centroid of a mesh with explicit point accessor.
template<typename WrappedConfigT , typename PointAccessorT >
viennagrid::result_of::point
< mesh< WrappedConfigT >
>::type 
centroid (mesh< WrappedConfigT > const &mesh_obj, PointAccessorT const point_accessor)
 The public interface function for the computation of a centroid of a mesh with explicit point accessor. Cells are used for centroid calculation, will fail if there is more than one cell type.
template<typename ElementTOrTagT , typename WrappedConfigT >
viennagrid::result_of::point
< mesh< WrappedConfigT >
>::type 
centroid (mesh< WrappedConfigT > const &mesh_obj)
 The public interface function for the computation of a centroid of a mesh.
template<typename WrappedConfigT >
viennagrid::result_of::point
< mesh< WrappedConfigT >
>::type 
centroid (mesh< WrappedConfigT > const &mesh_obj)
 The public interface function for the computation of a centroid of a mesh. Cells are used for centroid calculation, will fail if there is more than one cell type.
template<typename ElementTOrTagT , typename SegmentationT , typename PointAccessorT >
viennagrid::result_of::point
< segment_handle
< SegmentationT > >::type 
centroid (segment_handle< SegmentationT > const &segment, PointAccessorT const point_accessor)
 The public interface function for the computation of a centroid of a segment with explicit point accessor.
template<typename SegmentationT , typename PointAccessorT >
viennagrid::result_of::point
< segment_handle
< SegmentationT > >::type 
centroid (segment_handle< SegmentationT > const &segment, PointAccessorT const point_accessor)
 The public interface function for the computation of a centroid of a segment with explicit point accessor. Cells are used for centroid calculation, will fail if there is more than one cell type.
template<typename ElementTOrTagT , typename SegmentationT >
viennagrid::result_of::point
< segment_handle
< SegmentationT > >::type 
centroid (segment_handle< SegmentationT > const &segment)
 The public interface function for the computation of a centroid of a segment.
template<typename SegmentationT >
viennagrid::result_of::point
< segment_handle
< SegmentationT > >::type 
centroid (segment_handle< SegmentationT > const &segment)
 The public interface function for the computation of a centroid of a segment. Cells are used for centroid calculation, will fail if there is more than one cell type.
template<typename ElementTOrTag , typename MeshSegmentHandleType , typename PointAccessorT >
viennagrid::result_of::point
< MeshSegmentHandleType >
::type 
centroid_mesh (MeshSegmentHandleType const &mesh_obj, PointAccessorT const point_accessor)
 Implementation of the calculation of a centroid for a mesh/segment.

Detailed Description

Computes the centroid (center of mass) for different cell types.