Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
<tt>basis_option</tt>

finite element method options

Description

The basis_option class is used to manage options for the basis constructor of the finite element method. There are two main options: Lagrange nodes and raw polynomial basis.

String representation

The is_option(string) and set(string) members leads to easy setting of combined options at run time. By this way, options can be specified, together with basis basename, on the command line or from a file.

The stamp() member returns an unique string. This string is used for specifying basis options, e.g. on command line or in files. This string is empty when all options are set to default values. Otherwise, it returns a comma separated list of options, enclosed by braces, specifying only non-default options. For instance, combining Warburton node set and Dubiner raw polynomials leads to "[warburton]"}. Also, combining Warburton node set and Bernstein raw polynomials leads to"[warburton,bernstein]"`.

Note that the continuous or discontinuous feature is not specified by the stamp() string: it will be specified into the basis basename, by appending a "d" letter, as in "P6d[warburton]".

Notes

There are two distinct kind of polynomial basis: the raw basis and the finite element one. (see basis and basis). When using the Pk Lagrange finite element basis, these options are used to transform from one raw (initial) polynomial basis to the Lagrange one, based on a node set. When using an alternative finite element basis, e.g. the spectral Sk or the Bernstein Bk, these options do not have any effect.

Implementation

This documentation has been generated from file fem/lib/basis_option.h

class basis_option {
public:
// typedefs:
typedef size_t size_type;
typedef enum {
warburton = 1,
fekete = 2,
} node_type; // update also node_name[]
typedef enum {
monomial = 0,
bernstein = 1,
dubiner = 2,
} raw_polynomial_type; // update also raw_polynomial_name[]
// allocators:
basis_option (const basis_option& sopt);
basis_option& operator= (const basis_option& sopt);
// accessors & modifiers:
std::string get_node_name() const;
std::string get_raw_polynomial_name() const;
bool is_continuous() const;
bool is_discontinuous() const;
bool is_trace_n() const;
const std::string& valued() const;
size_type dimension() const { return _dimension; }
void set_node (node_type type);
void set (std::string option_name);
void set_node (std::string node_name);
void set_raw_polynomial (std::string raw_polynomial_name);
void set_continuous (bool c = true);
void set_discontinuous (bool d = true);
void set_trace_n (bool r = true);
bool is_node_name (std::string name) const;
bool is_raw_polynomial_name (std::string name) const;
bool is_option_name (std::string name) const;
std::string stamp() const;
field::size_type size_type
Definition branch.cc:430
bool is_continuous() const
space_constant::coordinate_type coordinate_type
bool is_raw_polynomial_name(std::string name) const
bool is_trace_n() const
coordinate_type coordinate_system() const
std::string get_raw_polynomial_name() const
static const node_type default_node
basis_option & operator=(const basis_option &sopt)
void set_coordinate_system(coordinate_type sc)
bool is_discontinuous() const
void set_trace_n(bool r=true)
coordinate_type _sys_coord
std::string get_node_name() const
static const raw_polynomial_type default_raw_polynomial
bool is_option_name(std::string name) const
void set_dimension(size_type d)
space_constant::valued_type valued_type
size_type dimension() const
std::string stamp() const
valued_type valued_tag() const
void set(std::string option_name)
void set_continuous(bool c=true)
void set_node(node_type type)
bool is_node_name(std::string name) const
void set_raw_polynomial(raw_polynomial_type type)
void set_discontinuous(bool d=true)
const std::string & valued() const
raw_polynomial_type get_raw_polynomial() const
basis_option(node_type nt=default_node, raw_polynomial_type pt=default_raw_polynomial)
void set_valued_tag(valued_type v)
node_type get_node() const
};