Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
basis_option.h
Go to the documentation of this file.
1#ifndef _RHEO_BASIS_OPTION_H
2#define _RHEO_BASIS_OPTION_H
3//
4// This file is part of Rheolef.
5//
6// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
7//
8// Rheolef is free software; you can redistribute it and/or modify
9// it under the terms of the GNU General Public License as published by
10// the Free Software Foundation; either version 2 of the License, or
11// (at your option) any later version.
12//
13// Rheolef is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with Rheolef; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// =========================================================================
23// author: Pierre.Saramito@imag.fr
24// date: 2 september 2017
25
26namespace rheolef {
84} // namespace rheolef
85
86#include "rheolef/smart_pointer.h"
87#include "rheolef/reference_element.h"
88#include "rheolef/space_constant.h"
89
90namespace rheolef {
91
92// [verbatim_basis_option]
94public:
95// typedefs:
96
97 typedef size_t size_type;
100
101 typedef enum {
105 max_node = 3
106 } node_type; // update also node_name[]
107
108 typedef enum {
113 } raw_polynomial_type; // update also raw_polynomial_name[]
114
117
118// allocators:
119
123
124 basis_option (const basis_option& sopt);
126
127// accessors & modifiers:
128
129 node_type get_node() const;
131 std::string get_node_name() const;
132 std::string get_raw_polynomial_name() const;
133 bool is_continuous() const;
134 bool is_discontinuous() const;
135 bool is_trace_n() const;
136 valued_type valued_tag() const;
137 const std::string& valued() const;
138 size_type dimension() const { return _dimension; }
140
141 void set_node (node_type type);
143 void set (std::string option_name);
144 void set_node (std::string node_name);
145 void set_raw_polynomial (std::string raw_polynomial_name);
146 void set_continuous (bool c = true);
147 void set_discontinuous (bool d = true);
148 void set_trace_n (bool r = true);
152
153 bool is_node_name (std::string name) const;
154 bool is_raw_polynomial_name (std::string name) const;
155 bool is_option_name (std::string name) const;
156
157 std::string stamp() const;
158// [verbatim_basis_option]
159
160// data:
161protected:
169// [verbatim_basis_option_cont]
170};
171// [verbatim_basis_option_cont]
172// ------------------------------------------------------------
173// ------------------------------------------------------------
174// inlined
175// ------------------------------------------------------------
176inline
178 node_type nt,
180 : _node(nt),
181 _poly(pt),
182 _is_continuous(true),
183 _is_trace_n(false),
184 _valued_tag(space_constant::scalar),
185 _dimension(std::numeric_limits<size_type>::max()),
186 _sys_coord(space_constant::cartesian)
187{
188}
189inline
191 : _node(sopt._node),
192 _poly(sopt._poly),
193 _is_continuous(sopt._is_continuous),
194 _is_trace_n(sopt._is_trace_n),
195 _valued_tag(sopt._valued_tag),
196 _dimension(sopt._dimension),
197 _sys_coord(sopt._sys_coord)
198{
199}
200inline
203{
204 _node = sopt._node;
205 _poly = sopt._poly;
209 _dimension = sopt._dimension;
210 _sys_coord = sopt._sys_coord;
211 return *this;
212}
213inline
216{
217 return _node;
218}
219inline
222{
223 return _poly;
224}
225inline
226bool
228{
229 return _is_continuous;
230}
231inline
232bool
234{
235 return !_is_continuous;
236}
237inline
238bool
240{
241 return _is_trace_n;
242}
243inline
246{
247 return _valued_tag;
248}
249inline
250const std::string&
255inline
256void
258{
259 _node = nt;
260}
261inline
262void
267inline
268void
273inline
274void
279inline
280void
282{
283 _is_trace_n = r;
284}
285
286}// namespace rheolef
287#endif // _RHEO_BASIS_OPTION_H
see the basis_option page for the full documentation
bool is_continuous() const
raw_polynomial_type _poly
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_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
const std::string & valued_name(valued_type valued_tag)
This file is part of Rheolef.
STL namespace.