File fieldgenerators.hxx¶
These classes are used by FieldFactory
Typedefs
-
using
single_arg_op
= BoutReal (*)(BoutReal)¶ Template class to define generators around a C function.
-
using
double_arg_op
= BoutReal (*)(BoutReal, BoutReal)¶ Template for a FieldGenerator with two input arguments.
-
class
FieldValuePtr
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Creates a Field Generator using a pointer to value WARNING: The value pointed to must remain in scope until this generator is finished
Public Functions
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-
FieldGeneratorPtr
-
class
FieldSin
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Sine function field generator.
Public Functions
-
FieldSin
(FieldGeneratorPtr g)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-
BoutReal
generate
(double x, double y, double z, double t)¶ Generate a value at the given coordinates (x,y,z,t) This should be deterministic, always returning the same value given the same inputs
-
std::string
str
() const¶ Create a string representation of the generator, for debugging output.
Private Members
-
-
class
FieldCos
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Cosine function field generator.
Public Functions
-
FieldCos
(FieldGeneratorPtr g)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-
BoutReal
generate
(double x, double y, double z, double t)¶ Generate a value at the given coordinates (x,y,z,t) This should be deterministic, always returning the same value given the same inputs
-
std::string
str
() const¶ Create a string representation of the generator, for debugging output.
Private Members
-
-
template<single_arg_op
Op
>
classFieldGenOneArg
: public FieldGenerator¶ Public Functions
-
FieldGenOneArg
(FieldGeneratorPtr g)¶ < Template for single-argument function
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-
BoutReal
generate
(double x, double y, double z, double t)¶ Generate a value at the given coordinates (x,y,z,t) This should be deterministic, always returning the same value given the same inputs
-
std::string
str
() const¶ Create a string representation of the generator, for debugging output.
Private Members
-
-
template<double_arg_op
Op
>
classFieldGenTwoArg
: public FieldGenerator¶ Public Functions
-
FieldGenTwoArg
(FieldGeneratorPtr a, FieldGeneratorPtr b)¶ < Template for two-argument function
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-
BoutReal
generate
(double x, double y, double z, double t)¶ Generate a value at the given coordinates (x,y,z,t) This should be deterministic, always returning the same value given the same inputs
-
std::string
str
() const¶ Create a string representation of the generator, for debugging output.
-
-
class
FieldATan
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Arc (Inverse) tangent. Either one or two argument versions.
Public Functions
-
FieldATan
(FieldGeneratorPtr a, FieldGeneratorPtr b = nullptr)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-
-
class
FieldSinh
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Hyperbolic sine function.
Public Functions
-
FieldSinh
(FieldGeneratorPtr g)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Members
-
-
class
FieldCosh
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Hyperbolic cosine.
Public Functions
-
FieldCosh
(FieldGeneratorPtr g)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Members
-
-
class
FieldTanh
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Hyperbolic tangent.
Public Functions
-
FieldTanh
(FieldGeneratorPtr g = nullptr)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Members
-
-
class
FieldGaussian
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Gaussian distribution, taking mean and width arguments.
Public Functions
-
FieldGaussian
(FieldGeneratorPtr xin, FieldGeneratorPtr sin)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-
-
class
FieldAbs
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Absolute value.
Public Functions
-
FieldAbs
(FieldGeneratorPtr g)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Members
-
-
class
FieldSqrt
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Square root function.
Public Functions
-
FieldSqrt
(FieldGeneratorPtr g)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Members
-
-
class
FieldHeaviside
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Heaviside function, switches between 0 and 1.
Public Functions
-
FieldHeaviside
(FieldGeneratorPtr g)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-
BoutReal
generate
(double x, double y, double z, double t)¶ Generate a value at the given coordinates (x,y,z,t) This should be deterministic, always returning the same value given the same inputs
-
std::string
str
() const¶ Create a string representation of the generator, for debugging output.
Private Members
-
-
class
FieldErf
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Generator for the error function erf.
Public Functions
-
FieldErf
(FieldGeneratorPtr g)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Members
-
-
class
FieldMin
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Minimum.
Public Functions
-
FieldMin
()¶
-
FieldMin
(const std::list<FieldGeneratorPtr> args)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Members
-
std::list<FieldGeneratorPtr>
input
¶
-
-
class
FieldMax
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Maximum.
Public Functions
-
FieldMax
()¶
-
FieldMax
(const std::list<FieldGeneratorPtr> args)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Members
-
std::list<FieldGeneratorPtr>
input
¶
-
-
class
FieldRound
: public FieldGenerator¶ - #include <fieldgenerators.hxx>
Generator to round to the nearest integer.
Public Functions
-
FieldRound
(FieldGeneratorPtr g)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Members
-
-
class
FieldBallooning
: public FieldGenerator¶ Public Functions
-
FieldBallooning
(Mesh *m, FieldGeneratorPtr a = nullptr, int n = 3)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-
-
class
FieldMixmode
: public FieldGenerator¶ Public Functions
-
FieldMixmode
(FieldGeneratorPtr a = nullptr, BoutReal seed = 0.5)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
Private Functions
-
-
class
FieldTanhHat
: public FieldGenerator¶ Public Functions
-
FieldTanhHat
(FieldGeneratorPtr xin, FieldGeneratorPtr widthin, FieldGeneratorPtr centerin, FieldGeneratorPtr steepnessin)¶
-
FieldGeneratorPtr
clone
(const std::list<FieldGeneratorPtr> args)¶ Virtual constructor. Makes a copy of this FieldGenerator, initialised with the given list of arguments. It is up to the implementations to test whether the correct number of arguments is passed.
- Parameters
args
: A (possibly empty) list of arguments to the generator function
-