This class represents a chord in a polar coordinate system. More...
#include <chord.h>
Public Member Functions | |
| chord (double rs, double rf, double fs, double ff) | |
| Makes a chord with specified polar coordinates of endpoints. | |
| chord (const chord &c0, const chord &c1, const chord &c2, const chord &c3) | |
| Makes a chord, representing diagonal of the specified rectangle. | |
| chord (const std::vector< int > &idx, const std::vector< chord > &chords) | |
| Makes a chord, representing diagonal of the rectangle. | |
| chord (const chord &another, double p) | |
| Makes a chord, consisting of a specified part of another chord. | |
| bool | isVertical () const |
| Tells if this chord is "vertical" (at constant polar angle). | |
| bool | isHorizontal () const |
| Tells if this chord is "horizontal" (at constant radial coordinate). | |
| double | getRS () const |
| Gives the value of radial coordinate at the edge start. | |
| double | getRF () const |
| Gives the value of radial coordinate at the edge end. | |
| double | getFS () const |
| Gives the value of polar angle at the edge start. | |
| double | getFF () const |
| Gives the value of polar angle at the edge end. | |
| dcmplx | getS () const |
| Gives start of the chord as a complex number. | |
| dcmplx | getF () const |
| Gives end of the chord as a complex number. | |
| dcmplx | getCenter (const conftrans &ct) const |
| Gives the center of the chord as a complex number. | |
| dcmplx | getRandom (const conftrans &ct, MTRand &mt) const |
| Gives a random point inside a rectangle with a diagonal, given by this chord. | |
| double | getRadius (const conftrans &CT) const |
| Gives the radius of the group, assuming that it is a diagonal of the rectangle. | |
| double | getIntR (double p) const |
| Calculates angular coordinate of an intermediate point along the chord, given parametrically. | |
| double | getIntF (double p) const |
| Calculates radial coordinate of an intermediate point along the chord, given parametrically. | |
| dcmplx | getIntZ (double p) const |
| Calculates intermediate point along the chord, given parametrically. | |
| dcmplx | getIntZJac (double p) const |
| Calculates the Jacobian of the parametrization, employed by getIntZ. | |
| double | getVHLength () const |
| Calculates the chord length as a zero-based chord. | |
| double | getLength () const |
| Calculates the chord length. | |
| chord & | shiftS (double amt) |
| Shifts the start of the chord by the specified amount. The amount is either angular or radial coordinate, depending on whether the chord is horizontal of vertical. | |
| chord & | shiftF (double amt) |
| Shifts the end of the chord by the specified amount. The amount is either angular or radial coordinate, depending on whether the chord is horizontal of vertical. | |
| const chord | shiftedS (double amt) const |
| Returns another chord, whose start is shifted by the specified amount. The amount is either angular or radial coordinate, depending on whether the chord is horizontal of vertical. | |
| const chord | shiftedF (double amt) const |
| Returns another chord, whose end is shifted by the specified amount. The amount is aither angular or radial coordinate, depending on whether the chord is horizontal of vertical. | |
| bool | equal (const chord &another) const |
| Tests if this chord is equal to another. The equality is tested by tolerantly comparing coordinates of endpoints. | |
| void | printChord () const |
| Prints chord to stdout. | |
| virtual int | getStorage () |
| Returns the amount of RAM, occupied by this object. | |
| ~chord () | |
| Frees resources, associated with the chord. | |
This class represents a chord in a polar coordinate system.
| chord::chord | ( | double | rs, | |
| double | rf, | |||
| double | fs, | |||
| double | ff | |||
| ) |
Makes a chord with specified polar coordinates of endpoints.
| rs | value of the radius vector at the chord start, must be <=1; | |
| rf | value of the radius vector at the chord end, must be <=1; | |
| fs | value of the polar angle at the chord start (radians). | |
| ff | value of the polar angle at the chord end (radians). |
Referenced by chord(), shiftedF(), and shiftedS().
Makes a chord, representing diagonal of the specified rectangle.
| c0 | left chord of the rectangle | |
| c1 | top chord of the rectangle | |
| c2 | right chord of the rectangle | |
| c3 | bottom chord of the rectangle |
References isHorizontal(), and isVertical().
| chord::chord | ( | const std::vector< int > & | idx, | |
| const std::vector< chord > & | chords | |||
| ) |
Makes a chord, representing diagonal of the rectangle.
Here the rectagle is represented by vetor of 4 indices into array of chords.
| idx | four element vector of indices. | |
| chords | array of chords. |
References chord().
| chord::chord | ( | const chord & | another, | |
| double | p = 1.0 | |||
| ) |
Makes a chord, consisting of a specified part of another chord.
| another | another chord. | |
| p | part specification. |
References getIntF(), getIntR(), isHorizontal(), and isVertical().
| bool chord::equal | ( | const chord & | another | ) | const |
Tests if this chord is equal to another. The equality is tested by tolerantly comparing coordinates of endpoints.
| another | another chord to compare with. |
Gives the center of the chord as a complex number.
| ct | is the conformal transform to use. |
References conftrans::T().
Referenced by nanomagn::group::group().
| dcmplx chord::getF | ( | ) | const [inline] |
| double chord::getFF | ( | ) | const [inline] |
Gives the value of polar angle at the edge end.
Referenced by sideenergyintegrand::eval(), fmm::fillCharges(), and nanomagn::mesh::printMesh().
| double chord::getFS | ( | ) | const [inline] |
Gives the value of polar angle at the edge start.
Referenced by sideenergyintegrand::eval(), fmm::fillCharges(), and nanomagn::mesh::printMesh().
| double chord::getIntF | ( | double | p | ) | const [inline] |
Calculates radial coordinate of an intermediate point along the chord, given parametrically.
Currently implemented parametrization corresponds to simultaneous linear interpolation in r and f. The parametrization might change in future, but the contract is that it is smooth, the range of parameter is the same, and that Jacobian is also provided by the function getIntZJac().
| p | specifies the point |p|<=1 (p=-1.0 is the chord start, p=1.0 is the chord end) |
| double chord::getIntR | ( | double | p | ) | const [inline] |
Calculates angular coordinate of an intermediate point along the chord, given parametrically.
Currently implemented parametrization corresponds to simultaneous linear interpolation in r and f. The parametrization might change in future, but the contract is that it is smooth, the range of parameter is the same, and that Jacobian is also provided by the function getIntZJac().
| p | specifies the point |p|<=1 (p=-1.0 is the chord start, p=1.0 is the chord end) |
| dcmplx chord::getIntZ | ( | double | p | ) | const |
Calculates intermediate point along the chord, given parametrically.
Currently implemented parametrization corresponds to simultaneous linear interpolation in r and f. The parametrization might change in future, but the contract is that it is smooth, the range of parameter is the same, and that Jacobian is also provided by the function getIntZJac().
| p | specifies the point |p|<=1 (p=-1.0 is the chord start, p=1.0 is the chord end) |
| dcmplx chord::getIntZJac | ( | double | p | ) | const |
Calculates the Jacobian of the parametrization, employed by getIntZ.
| p | specifies the point |p|<=1 (p=-1.0 is the chord start, p=1.0 is the chord end) |
| double chord::getLength | ( | ) | const [inline] |
| double chord::getRadius | ( | const conftrans & | CT | ) | const |
Gives the radius of the group, assuming that it is a diagonal of the rectangle.
| CT | is the conformal transform to use. |
References getF(), getS(), and conftrans::T().
Referenced by nanomagn::group::group().
Gives a random point inside a rectangle with a diagonal, given by this chord.
| ct | is the conformal transform to use. | |
| mt | is the random number generator to use. |
References conftrans::T().
| double chord::getRF | ( | ) | const [inline] |
Gives the value of radial coordinate at the edge end.
Referenced by edge::isOuterBoundary(), nanomagn::mesh::printMesh(), and sideenergyintegrand::sideenergyintegrand().
| double chord::getRS | ( | ) | const [inline] |
Gives the value of radial coordinate at the edge start.
Referenced by edge::getLength(), edge::isOuterBoundary(), nanomagn::mesh::printMesh(), and sideenergyintegrand::sideenergyintegrand().
| dcmplx chord::getS | ( | ) | const [inline] |
| int chord::getStorage | ( | ) | [virtual] |
Returns the amount of RAM, occupied by this object.
Reimplemented in edge, and integrablechord.
| double chord::getVHLength | ( | ) | const [inline] |
Calculates the chord length as a zero-based chord.
References isHorizontal(), and isVertical().
Referenced by edge::breakInHalves(), and edge::getLength().
| bool chord::isHorizontal | ( | ) | const [inline] |
Tells if this chord is "horizontal" (at constant radial coordinate).
Referenced by chord(), edge::getLength(), getLength(), getVHLength(), shiftedF(), shiftedS(), shiftF(), and shiftS().
| bool chord::isVertical | ( | ) | const [inline] |
Tells if this chord is "vertical" (at constant polar angle).
Referenced by chord(), getLength(), getVHLength(), printChord(), shiftedF(), shiftedS(), shiftF(), and shiftS().
| const chord chord::shiftedF | ( | double | amt | ) | const [inline] |
Returns another chord, whose end is shifted by the specified amount. The amount is aither angular or radial coordinate, depending on whether the chord is horizontal of vertical.
| amt | is the amount. |
References chord(), isHorizontal(), and isVertical().
| const chord chord::shiftedS | ( | double | amt | ) | const [inline] |
Returns another chord, whose start is shifted by the specified amount. The amount is either angular or radial coordinate, depending on whether the chord is horizontal of vertical.
| amt | is the amount. |
References chord(), isHorizontal(), and isVertical().
Referenced by edge::breakInHalves().
| chord & chord::shiftF | ( | double | amt | ) |
Shifts the end of the chord by the specified amount. The amount is either angular or radial coordinate, depending on whether the chord is horizontal of vertical.
| amt | is the amount. |
References isHorizontal(), and isVertical().
| chord & chord::shiftS | ( | double | amt | ) |
Shifts the start of the chord by the specified amount. The amount is either angular or radial coordinate, depending on whether the chord is horizontal of vertical.
| amt | is the amount. |
References isHorizontal(), and isVertical().
1.6.3