basis_fem_empty.h
Go to the documentation of this file.
#ifndef _RHEOLEF_BASIS_FEM_EMPTY_H
#define _RHEOLEF_BASIS_FEM_EMPTY_H
/*Class:sherwin
NAME: @code{empty} - the empty finite element
@cindex polynomial basis
@clindex space
@clindex basis
@clindex reference_element
SYNOPSIS:
space Zh (omega,"empty");
DESCRIPTION:
@noindent
This polynomial @code{basis} is used when an empty
finite element set should be declared.
This could be useful when product of space
are considered and a special empty set is required, e.g.:
@example
string approx = (k > 0) ? "P"+itos(k-1)+"d" : "empty";
space Xh (omega, approx);
@end example
In this example, it represents the "P_{-1}" polynomial
space that is empty by convention.
AUTHOR: Pierre.Saramito@imag.fr
DATE: 2 january 2019
End:
*/
#include "rheolef/basis.h"
namespace rheolef {
template<class T>
class basis_fem_empty: public basis_rep<T> {
public:
typedef basis_rep<T> base;
typedef typename base::size_type size_type;
basis_fem_empty();
~basis_fem_empty();
std::string name() const { return family_name(); }
bool have_index_parameter() const { return false; }
std::string family_name() const { return "empty"; }
size_type degree () const { return 0; }
bool have_compact_support_inside_element() const { return true; }
bool is_nodal() const { return true; }
void evaluate (
reference_element hat_K,
const point_basic<T>& hat_x,
Eigen::Matrix<T,Eigen::Dynamic,1>& values) const;
void grad_evaluate (
reference_element hat_K,
const point_basic<T>& hat_x,
Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& values) const;
void _compute_dofs (
reference_element hat_K,
const Eigen::Matrix<T,Eigen::Dynamic,1>& f_xnod,
Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const;
void _initialize_cstor_sizes() const;
void _initialize_data (reference_element hat_K) const;
const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& hat_node(reference_element hat_K) const {
base::_initialize_data_guard(hat_K);
return _dummy_hat_node;
}
protected:
static const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1> _dummy_hat_node;
};
} // namespace rheolef
#endif // _RHEOLEF_BASIS_FEM_EMPTY_H
rheolef::basis_fem_empty
Definition: basis_fem_empty.h:51
rheolef::basis_fem_empty::base
basis_rep< T > base
Definition: basis_fem_empty.h:53
rheolef::basis_fem_empty::name
std::string name() const
Definition: basis_fem_empty.h:57
rheolef::basis_fem_empty::have_compact_support_inside_element
bool have_compact_support_inside_element() const
Definition: basis_fem_empty.h:61
rheolef::basis_fem_empty::~basis_fem_empty
~basis_fem_empty()
Definition: basis_fem_empty.cc:40
rheolef::basis_fem_empty::basis_fem_empty
basis_fem_empty()
Definition: basis_fem_empty.cc:31
rheolef::basis_fem_empty::size_type
base::size_type size_type
Definition: basis_fem_empty.h:54
rheolef::basis_fem_empty::degree
size_type degree() const
Definition: basis_fem_empty.h:60
rheolef::basis_fem_empty::_initialize_cstor_sizes
void _initialize_cstor_sizes() const
Definition: basis_fem_empty.cc:72
rheolef::basis_fem_empty::hat_node
const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > & hat_node(reference_element hat_K) const
Definition: basis_fem_empty.h:77
rheolef::basis_fem_empty::_dummy_hat_node
static const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > _dummy_hat_node
Definition: basis_fem_empty.h:82
rheolef::basis_fem_empty::_compute_dofs
void _compute_dofs(reference_element hat_K, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &f_xnod, Eigen::Matrix< T, Eigen::Dynamic, 1 > &dof) const
Definition: basis_fem_empty.cc:63
rheolef::basis_fem_empty::is_nodal
bool is_nodal() const
Definition: basis_fem_empty.h:62
rheolef::basis_fem_empty::evaluate
void evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< T, Eigen::Dynamic, 1 > &values) const
Definition: basis_fem_empty.cc:45
rheolef::basis_fem_empty::family_name
std::string family_name() const
Definition: basis_fem_empty.h:59
rheolef::basis_fem_empty::have_index_parameter
bool have_index_parameter() const
Definition: basis_fem_empty.h:58
rheolef::basis_fem_empty::grad_evaluate
void grad_evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &values) const
Definition: basis_fem_empty.cc:54
rheolef::basis_fem_empty::_initialize_data
void _initialize_data(reference_element hat_K) const
Definition: basis_fem_empty.cc:84
rheolef::basis_rep
Definition: basis.h:209
rheolef::basis_rep::size_type
reference_element::size_type size_type
Definition: basis.h:214
rheolef::basis_rep::_initialize_data_guard
void _initialize_data_guard(reference_element hat_K) const
Definition: basis_rep.cc:126
rheolef::point_basic
Definition: point.h:87
rheolef::reference_element
see the reference_element page for the full documentation
Definition: reference_element.h:66
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37