minimc 0.5.1
Loading...
Searching...
No Matches
LinearField Class Reference

A field where the value is only a linear function of Point. More...

#include <ScalarField.hpp>

Inheritance diagram for LinearField:
Collaboration diagram for LinearField:

Public Member Functions

 LinearField (const pugi::xml_node &scalar_field_node) noexcept
 Constructs a linear field from a linear scalar field node.
 
bool IsConstant () const noexcept override
 Returns true iff the gradient of the linear field is zero. More...
 
Real at (const Point &p) const noexcept override
 Returns the linearly dependent value. More...
 
- Public Member Functions inherited from ScalarField
 ScalarField (Real upper_bound, Real lower_bound) noexcept
 Constructs a ScalarField from by assigning member directly.
 
virtual ~ScalarField () noexcept
 Virtual destructor (C++ Core Guidelines C.127)
 
virtual bool IsConstant () const noexcept=0
 Returns true if the field is constant. More...
 
virtual Real at (const Point &p) const noexcept=0
 Returns the value at a given Point. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ScalarField
static std::unique_ptr< const ScalarFieldCreate (const pugi::xml_node &scalar_field_node) noexcept
 Factory method to create new ScalarField from an XML document.
 
- Public Attributes inherited from ScalarField
const Real upper_bound
 Upper bound on values that will be encountered (C++ Core Guidelines C.131)
 
const Real lower_bound
 Lower bound on values that will be encountered (C++ Core Guidelines C.131)
 

Detailed Description

A field where the value is only a linear function of Point.

The value of the function \( f(\boldsymbol{p}) \) at some point is just

\[ f(\boldsymbol{p}) = \boldsymbol{g}^{T} \boldsymbol{p} + b \]

Member Function Documentation

◆ at()

Real LinearField::at ( const Point p) const
overridevirtualnoexcept

Returns the linearly dependent value.

Implements ScalarField.

◆ IsConstant()

bool LinearField::IsConstant ( ) const
overridevirtualnoexcept

Returns true iff the gradient of the linear field is zero.

Implements ScalarField.


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