ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
coordinate_transformation.hpp File Reference

Convert coordinates from the Cartesian system to the cylindrical system. More...

#include "utils/Vector.hpp"
#include "utils/math/vec_rotate.hpp"
#include "utils/matrix.hpp"
#include <cassert>
#include <cmath>
+ Include dependency graph for coordinate_transformation.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Utils
 

Functions

Vector3d Utils::basis_change (Vector3d const &b1, Vector3d const &b2, Vector3d const &b3, Vector3d const &v, bool reverse=false)
 Basis change.
 
Vector3d Utils::transform_coordinate_cartesian_to_cylinder (Vector3d const &pos)
 Coordinate transformation from Cartesian to cylindrical coordinates.
 
Vector3d Utils::transform_coordinate_cartesian_to_cylinder (Vector3d const &pos, Vector3d const &axis, Vector3d const &orientation)
 Coordinate transformation from Cartesian to cylindrical coordinates with change of basis.
 
Vector3d Utils::transform_coordinate_cylinder_to_cartesian (Vector3d const &pos)
 Coordinate transformation from cylindrical to Cartesian coordinates.
 
Vector3d Utils::transform_coordinate_cylinder_to_cartesian (Vector3d const &pos, Vector3d const &axis, Vector3d const &orientation)
 Coordinate transformation from cylindrical to Cartesian coordinates with change of basis.
 
Vector3d Utils::transform_vector_cartesian_to_cylinder (Vector3d const &vec, Vector3d const &axis, Vector3d const &pos)
 Vector transformation from Cartesian to cylindrical coordinates.
 

Detailed Description

Convert coordinates from the Cartesian system to the cylindrical system.

The transformation functions are provided with three overloads:

  • one function for the trivial Cartesian <-> cylindrical transformation
  • one function to transform from/to a cylindrical system with custom axis (extra axis argument, keep in mind the angle phi is under-defined)
  • one function to transform from/to an oriented cylindrical system with custom axis (extra orientation argument, the angle phi is well-defined)

Definition in file coordinate_transformation.hpp.