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

A field where the value is independent of the Point. More...

#include <ScalarField.hpp>

Inheritance diagram for ConstantField:
Collaboration diagram for ConstantField:

Public Member Functions

 ConstantField (const pugi::xml_node &scalar_field_node) noexcept
 Constructs a constant field from a constant scalar field node.
 
 ConstantField (const Real c) noexcept
 Constructs a constant field from a given constant.
 
bool IsConstant () const noexcept override
 Returns true because a ConstantField is constant. More...
 
Real at (const Point &) const noexcept override
 Returns the constant value (C++ Core Guidelines F.9) 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 independent of the Point.

Member Function Documentation

◆ at()

Real ConstantField::at ( const Point ) const
overridevirtualnoexcept

Returns the constant value (C++ Core Guidelines F.9)

Implements ScalarField.

◆ IsConstant()

bool ConstantField::IsConstant ( ) const
overridevirtualnoexcept

Returns true because a ConstantField is constant.

Implements ScalarField.


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