Container to encapsulate various operations for linear equation of the forms with real coefficients: More...
#include <linearEqn.H>


Public Types | |
| enum | components { A , B } |
| Component labeling enumeration. More... | |
| Public Types inherited from VectorSpace< linearEqn, scalar, 2 > | |
| typedef VectorSpace< linearEqn, scalar, Ncmpts > | vsType |
| VectorSpace type. | |
| typedef scalar | cmptType |
| Component type. | |
| typedef scalar | magType |
| Magnitude type. | |
| typedef direction | size_type |
| The type to represent the size of a VectorSpace. | |
| typedef scalar * | iterator |
| Random access iterator for traversing VectorSpace. | |
| typedef const scalar * | const_iterator |
| Random access iterator for traversing VectorSpace. | |
Public Member Functions | |
| linearEqn ()=default | |
| Default construct. | |
| linearEqn (const Foam::zero) | |
| Construct initialized to zero. | |
| linearEqn (const scalar a, const scalar b) | |
| Construct from components. | |
| scalar | a () const noexcept |
| scalar | b () const noexcept |
| scalar & | a () noexcept |
| scalar & | b () noexcept |
| scalar | value (const scalar x) const |
| Evaluate the linear equation at x. | |
| scalar | derivative (const scalar x) const |
| Evaluate the derivative of the linear equation at x. | |
| scalar | error (const scalar x) const |
| Estimate the error of evaluation of the linear equation at x. | |
| Roots< 1 > | roots () const |
| Return the real root of the linear equation. | |
| Public Member Functions inherited from VectorSpace< linearEqn, scalar, 2 > | |
| const Foam::VectorSpace< linearEqn, scalar, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
| VectorSpace ()=default | |
| Default construct. | |
| const scalar & | component (const direction) const |
| void | replace (const direction, const scalar &) |
| const scalar * | cdata () const noexcept |
| Return const pointer to the first data element. | |
| scalar * | data () noexcept |
| Return pointer to the first data element. | |
| void | fill (const scalar &s) |
| Assign all components to given value. | |
| const scalar & | operator[] (const direction) const |
| void | operator= (const VectorSpace< linearEqn, scalar, Ncmpts > &) |
| void | operator+= (const VectorSpace< linearEqn, scalar, Ncmpts > &) |
| void | operator-= (const VectorSpace< linearEqn, scalar, Ncmpts > &) |
| void | operator*= (const scalar) |
| void | operator/= (const scalar) |
| iterator | begin () noexcept |
| Return an iterator (pointer) to begin of VectorSpace. | |
| const_iterator | cbegin () const noexcept |
| Return const_iterator (const pointer) to begin of VectorSpace. | |
| iterator | end () noexcept |
| Return an iterator (pointer) to end of VectorSpace. | |
| const_iterator | cend () const noexcept |
| Return const_iterator (const pointer) to end of VectorSpace. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from VectorSpace< linearEqn, scalar, 2 > | |
| static constexpr direction | size () noexcept |
| The number of elements in the VectorSpace = Ncmpts. | |
| static linearEqn | uniform (const scalar &s) |
| Return a VectorSpace with all elements = s. | |
| Public Attributes inherited from VectorSpace< linearEqn, scalar, 2 > | |
| scalar | v_ [Ncmpts] |
| The components of this vector space. | |
| Static Public Attributes inherited from VectorSpace< linearEqn, scalar, 2 > | |
| static constexpr direction | dim |
| Dimensionality of space. | |
| static constexpr direction | nComponents |
| Number of components in this vector space. | |
| static constexpr direction | mRows |
| static constexpr direction | nCols |
| static const char *const | typeName |
| static const char *const | componentNames [] |
| static const linearEqn | zero |
| static const linearEqn | one |
| static const linearEqn | max |
| static const linearEqn | min |
| static const linearEqn | rootMax |
| static const linearEqn | rootMin |
Container to encapsulate various operations for linear equation of the forms with real coefficients:
![\[ a*x + b = 0
x + B = 0
\]](form_717.png)
Definition at line 56 of file linearEqn.H.
| enum components |
|
default |
Default construct.
Referenced by linearEqn().


|
inline |
Construct initialized to zero.
Definition at line 24 of file linearEqnI.H.
References linearEqn(), VectorSpace< linearEqn, scalar, 2 >::VectorSpace(), and VectorSpace< linearEqn, scalar, 2 >::zero.

|
inline |
Construct from components.
Definition at line 30 of file linearEqnI.H.
References A, a(), B, b(), and VectorSpace< linearEqn, scalar, 2 >::v_.

|
inlinenoexcept |
Definition at line 90 of file linearEqn.H.
References A, Foam::noexcept, and VectorSpace< linearEqn, scalar, 2 >::v_.
Referenced by derivative(), error(), linearEqn(), linearEqn(), roots(), and value().

|
inlinenoexcept |
Definition at line 91 of file linearEqn.H.
References B, Foam::noexcept, and VectorSpace< linearEqn, scalar, 2 >::v_.
Referenced by linearEqn(), linearEqn(), and roots().

|
inlinenoexcept |
Definition at line 93 of file linearEqn.H.
References A, Foam::noexcept, and VectorSpace< linearEqn, scalar, 2 >::v_.
|
inlinenoexcept |
Definition at line 94 of file linearEqn.H.
References B, Foam::noexcept, and VectorSpace< linearEqn, scalar, 2 >::v_.
|
inline |
Evaluate the linear equation at x.
Definition at line 39 of file linearEqnI.H.

|
inline |
Evaluate the derivative of the linear equation at x.
Definition at line 45 of file linearEqnI.H.

|
inline |
Estimate the error of evaluation of the linear equation at x.
Definition at line 51 of file linearEqnI.H.
References a(), b, Foam::mag(), and x.

|
inline |
Return the real root of the linear equation.
Definition at line 57 of file linearEqnI.H.
References a(), b, b(), Foam::mag(), Foam::roots::nan, Foam::roots::negInf, Foam::roots::posInf, Foam::roots::real, and Foam::sign().
