DOLFIN
DOLFIN C++ interface
Static Public Member Functions | List of all members
dolfin::MeshTransformation Class Reference

#include <MeshTransformation.h>

Static Public Member Functions

static void scale (Mesh &mesh, double factor)
 
static void translate (Mesh &mesh, const Point &point)
 
static void rescale (Mesh &mesh, const double scale, const Point &center)
 
static void rotate (Mesh &mesh, double angle, std::size_t axis)
 
static void rotate (Mesh &mesh, double angle, std::size_t axis, const Point &p)
 

Detailed Description

This class implements various transformations of the coordinates of a mesh.

Member Function Documentation

◆ rescale()

void MeshTransformation::rescale ( Mesh mesh,
const double  scale,
const Point center 
)
static

Rescale mesh by a given scaling factor with respect to a center point.

Parameters
mesh(Mesh) The mesh
scale(double) The scaling factor.
center(Point) The center of the scaling.

◆ rotate() [1/2]

void MeshTransformation::rotate ( Mesh mesh,
double  angle,
std::size_t  axis 
)
static

Rotate mesh around a coordinate axis through center of mass of all mesh vertices

Parameters
mesh(Mesh) The mesh.
angle(double) The number of degrees (0-360) of rotation.
axis(std::size_t) The coordinate axis around which to rotate the mesh.

◆ rotate() [2/2]

void MeshTransformation::rotate ( Mesh mesh,
double  angle,
std::size_t  axis,
const Point p 
)
static

Rotate mesh around a coordinate axis through a given point

Parameters
mesh(Mesh) The mesh.
angle(double) The number of degrees (0-360) of rotation.
axis(std::size_t) The coordinate axis around which to rotate the mesh.
p(Point) The point around which to rotate the mesh.

◆ scale()

void MeshTransformation::scale ( Mesh mesh,
double  factor 
)
static

Scale mesh coordinates with given factor.

Arguments mesh (Mesh) The mesh factor (double) The factor defining the scaling.

◆ translate()

void MeshTransformation::translate ( Mesh mesh,
const Point point 
)
static

Translate mesh according to a given vector.

Parameters
mesh(Mesh) The mesh
point(Point) The vector defining the translation.

The documentation for this class was generated from the following files: