basis.h
Go to the documentation of this file.
#ifndef _RHEO_BASIS_H
#define _RHEO_BASIS_H
//
// This file is part of Rheolef.
//
// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
//
// Rheolef is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Rheolef is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rheolef; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// =========================================================================
// AUTHOR: Pierre.Saramito@imag.fr
// DATE: 7 january 2004, update 11 september 2017
namespace rheolef {
} // namespace rheolef
#include "rheolef/reference_element.h"
#include "rheolef/reference_element_face_transformation.h"
#include "rheolef/point.h"
#include "rheolef/tensor.h"
#include "rheolef/persistent_table.h"
#include "rheolef/space_constant.h"
#include "rheolef/basis_raw.h"
#include "rheolef/basis_option.h"
#include "rheolef/piola_fem.h"
#include <unordered_map>
namespace rheolef {
template<class T> class basis_basic; // forward declaration
template<class T>
class basis_rep {
public:
// typedefs:
typedef reference_element::size_type size_type;
typedef T value_type;
typedef space_constant::valued_type valued_type;
// allocators:
basis_rep (const basis_option& sopt);
virtual ~basis_rep();
// numbering accessors:
virtual size_type degree() const = 0;
virtual size_type family_index() const { return degree(); }
virtual std::string family_name() const = 0;
std::string name() const { return _name; }
virtual valued_type valued_tag() const { return space_constant::scalar; }
virtual bool is_nodal() const = 0;
virtual bool have_index_parameter() const { return true; }
virtual bool have_continuous_feature() const { return true; }
virtual bool is_hierarchical() const { return false; }
virtual size_type size() const { return 1; }
virtual const class basis_basic<T>& operator[] (size_type i_comp) const;
virtual bool have_compact_support_inside_element() const { return ! option().is_continuous(); }
const basis_option& option() const { return _sopt; }
const std::string& valued() const { return space_constant::valued_name (valued_tag()); }
bool is_continuous() const { return option().is_continuous(); }
bool is_discontinuous() const { return ! is_continuous(); }
// accessors to ndof and nnod
size_type ndof (reference_element hat_K) const {
return _first_idof_by_dimension [hat_K.variant()][hat_K.dimension()+1];
}
size_type nnod (reference_element hat_K) const {
return _first_inod_by_dimension [hat_K.variant()][hat_K.dimension()+1];
}
// accessors to subgeo ndof & nnod by dimension (not available for basis_sides)
size_type ndof_on_subgeo (size_type map_dim, size_type subgeo_variant) const {
return _ndof_on_subgeo [map_dim][subgeo_variant];
}
size_type nnod_on_subgeo (size_type map_dim, size_type subgeo_variant) const {
return _nnod_on_subgeo [map_dim][subgeo_variant];
}
size_type first_idof_by_dimension (reference_element hat_K, size_type dim) const {
return _first_idof_by_dimension [hat_K.variant()][dim];
}
size_type first_inod_by_dimension (reference_element hat_K, size_type dim) const {
return _first_inod_by_dimension [hat_K.variant()][dim];
}
// used by DG, HDG:
virtual size_type local_ndof_on_side (
reference_element hat_K,
const side_information_type& sid) const;
virtual void local_idof_on_side (
reference_element hat_K,
const side_information_type& sid,
Eigen::Matrix<size_type,Eigen::Dynamic,1>& loc_idof) const;
virtual const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& hat_node (reference_element hat_K) const;
virtual const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& vdm (reference_element hat_K) const;
virtual const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& inv_vdm (reference_element hat_K) const;
// valued accessors :
const piola_fem<T>& get_piola_fem() const { return _piola_fem; }
// evaluation and compute_dofs:
// the abstract class provide a rich interface, for each valued
// case because the valued type is run-time dependent.
// For each concrete basis, only one of the valued case is implemented.
#define _RHEOLEF_evaluate(MEMBER,VALUED,VALUE) \
virtual \
void \
MEMBER ( \
reference_element hat_K, \
const point_basic<T>& hat_x, \
Eigen::Matrix<VALUE,Eigen::Dynamic,1>& value) const \
{ \
error_macro ("basis \""<<name()<<"\": " \
<< VALUED << "-valued " << #MEMBER \
<< "() member not implemented"); \
} \
_RHEOLEF_evaluate(evaluate,"scalar",T)
_RHEOLEF_evaluate(evaluate,"vector",point_basic<T>)
_RHEOLEF_evaluate(evaluate,"tensor",tensor_basic<T>)
_RHEOLEF_evaluate(evaluate,"tensor3",tensor3_basic<T>)
_RHEOLEF_evaluate(evaluate,"tensor4",tensor4_basic<T>)
_RHEOLEF_evaluate(grad_evaluate,"scalar",T)
_RHEOLEF_evaluate(grad_evaluate,"vector",point_basic<T>)
_RHEOLEF_evaluate(grad_evaluate,"tensor",tensor_basic<T>)
_RHEOLEF_evaluate(grad_evaluate,"tensor3",tensor3_basic<T>)
_RHEOLEF_evaluate(grad_evaluate,"tensor4",tensor4_basic<T>)
#undef _RHEOLEF_evaluate
#define _RHEOLEF_evaluate_on_side(VALUED,VALUE) \
virtual \
void \
evaluate_on_side ( \
reference_element tilde_K, \
const side_information_type& sid, \
const point_basic<T>& hat_x, \
Eigen::Matrix<VALUE,Eigen::Dynamic,1>& value) const \
{ \
error_macro ("basis \""<<name()<<"\": " \
<< VALUED << "-valued evaluate_on_side() member not implemented"); \
}
_RHEOLEF_evaluate_on_side("scalar",T)
_RHEOLEF_evaluate_on_side("vector",point_basic<T>)
#undef _RHEOLEF_evaluate_on_side
#define _RHEOLEF_compute_dofs(VALUED,VALUE) \
virtual \
void \
_compute_dofs ( \
reference_element hat_K, \
const Eigen::Matrix<VALUE,Eigen::Dynamic,1>& f_xnod, \
Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const \
{ \
error_macro ("basis \"" << name() << "\": " \
<< VALUED << "-valued _compute_dofs() member not implemented"); \
}
_RHEOLEF_compute_dofs("scalar",T)
_RHEOLEF_compute_dofs("vector",point_basic<T>)
_RHEOLEF_compute_dofs("tensor",tensor_basic<T>)
#undef _RHEOLEF_compute_dofs
// internals:
void put (std::ostream& os, reference_element hat_K) const;
virtual void put_scalar_valued (std::ostream& os, reference_element hat_K) const;
virtual void put_vector_valued (std::ostream& os, reference_element hat_K) const;
void put_hat_node (std::ostream& os, reference_element hat_K) const;
void put_hat_node_on_side (std::ostream& os, reference_element hat_K,
const side_information_type& sid) const;
// helper for building class:
static basis_rep* make_ptr (const std::string& name);
static std::string standard_naming (std::string family_name, size_t degree, const basis_option& sopt);
static bool have_index_parameter (std::string family_name);
static bool have_continuous_feature (std::string family_name);
virtual void _initialize_cstor_sizes () const = 0;
void _initialize_data_guard (reference_element hat_K) const;
virtual void _initialize_data (reference_element hat_K) const = 0;
// internals:
void _clear() const;
// internal helper:
// 1) automatically deduce _first_ixxx_by_dimension from _nxxx_on_subgeo
// where xxx = dof or nod
static void _helper_initialize_first_ixxx_by_dimension_from_nxxx_on_subgeo (
const std::array<
std::array<
size_type
,reference_element::max_variant>
,4>& _nxxx_on_subgeo,
std::array<
std::array<
size_type
,5>
,reference_element::max_variant>& _first_ixxx_by_dimension);
// 2) inplace change nxxx_on_subgeo for discontinuous elements
static void _helper_discontinuous_ndof_on_subgeo_inplace_change (
bool is_continuous,
std::array<
std::array<
size_type
,reference_element::max_variant>
,4>& nxxx_on_subgeo);
protected:
// data:
std::string _name;
basis_option _sopt;
piola_fem<T> _piola_fem;
mutable std::array<bool,
reference_element::max_variant> _have_initialize_data;
// nodes and dofs are organized by variant and dimension=0..3 of subgeos, for each hat_K:
mutable std::array<
std::array<
size_type
,reference_element::max_variant>
,4> _ndof_on_subgeo,
_nnod_on_subgeo;
mutable std::array<
std::array<
size_type
,5>
,reference_element::max_variant> _first_idof_by_dimension,
_first_inod_by_dimension;
};
// -----------------------------------------------------------
// inlined
// -----------------------------------------------------------
template<class T>
inline
const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>&
basis_rep<T>::hat_node (reference_element hat_K) const
{
error_macro ("basis \""<<name()<<"\": hat_node() member not implemented");
static const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1> _dummy;
return _dummy;
}
template<class T>
inline
const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>&
basis_rep<T>::vdm (reference_element hat_K) const
{
error_macro ("basis \""<<name()<<"\": vdm() member not implemented");
static const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> _dummy;
return _dummy;
}
template<class T>
inline
const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>&
basis_rep<T>::inv_vdm (reference_element hat_K) const
{
error_macro ("basis \""<<name()<<"\": inv_vdm() member not implemented");
static const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> _dummy;
return _dummy;
}
// extract local dof-indexes on a side
template<class T>
inline
typename basis_rep<T>::size_type
basis_rep<T>::local_ndof_on_side (
reference_element hat_K,
const side_information_type& sid) const
{
error_macro ("basis \""<<name()<<"\": local_ndof_on_side() member not implemented"); return 0;
}
template<class T>
inline
void
basis_rep<T>::local_idof_on_side (
reference_element hat_K,
const side_information_type& sid,
Eigen::Matrix<size_type,Eigen::Dynamic,1>& loc_idof) const
{
error_macro ("basis \""<<name()<<"\": local_idof_on_side() member not implemented");
}
// ---------------------------------------------------------
// compute_dof
// ---------------------------------------------------------
// implementation note:
// b.compute_dof (f,&dof)
// is impossible with base_rep
// because template functions cannot be virtual
// cannot call a "b.compute_dof(f,&dof)" template-virtual member
// so we have to write at top level basis_rep a general
// compute_dof (b,f,&dof)
// and switch on all nodal/modal and valued variants
//
// for vector-valued RTk, it is problematic, because we
// only require f.n on the boundary and not all f components
//
namespace details {
template <class T, class Function>
typename
std::enable_if<
is_scalar<typename function_traits<Function>::result_type>::value
,void
>::type
compute_dof (
const basis_rep<T>& b,
reference_element hat_K,
const Function& f,
Eigen::Matrix<T,Eigen::Dynamic,1>& dof)
{
typedef reference_element::size_type size_type;
check_macro (b.valued_tag() == space_constant::scalar,
"interpolate: incompatible scalar-valued function and "<<b.valued()<<"-valued basis");
const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& hat_node = b.hat_node (hat_K);
// modal basis:
Eigen::Matrix<T,Eigen::Dynamic,1> f_xnod (hat_node.size());
for (size_type loc_inod = 0, loc_nnod = hat_node.size(); loc_inod < loc_nnod; ++loc_inod) {
f_xnod [loc_inod] = f (hat_node [loc_inod]);
}
b._compute_dofs (hat_K, f_xnod, dof);
}
template <class T, class Function>
typename
std::enable_if<
is_point<typename function_traits<Function>::result_type>::value
,void
>::type
compute_dof (
const basis_rep<T>& b,
reference_element hat_K,
const Function& f,
Eigen::Matrix<T,Eigen::Dynamic,1>& dof)
{
typedef reference_element::size_type size_type;
check_macro (b.valued_tag() == space_constant::vector,
"interpolate: incompatible vector-valued function and "<<b.valued()<<"-valued basis");
const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& hat_node = b.hat_node (hat_K);
// modal basis:
Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1> f_xnod (hat_node.size());
for (size_type loc_inod = 0, loc_nnod = hat_node.size(); loc_inod < loc_nnod; ++loc_inod) {
f_xnod [loc_inod] = f (hat_node [loc_inod]);
}
b._compute_dofs (hat_K, f_xnod, dof);
}
} // namespace details
// [verbatim_basis_basic]
template<class T>
class basis_basic : public smart_pointer_nocopy<basis_rep<T> >,
public persistent_table<basis_basic<T> > {
public:
// typedefs:
typedef basis_rep<T> rep;
typedef smart_pointer_nocopy<rep> base;
typedef typename rep::size_type size_type;
typedef typename rep::value_type value_type;
typedef typename rep::valued_type valued_type;
// allocators:
basis_basic (std::string name = "");
void reset (std::string& name);
void reset_family_index (size_type k);
// accessors:
bool is_initialized() const { return base::operator->() != 0; }
size_type degree() const;
size_type family_index() const;
std::string family_name() const;
std::string name() const;
size_type ndof (reference_element hat_K) const;
size_type nnod (reference_element hat_K) const;
bool is_continuous() const;
bool is_discontinuous() const;
bool is_nodal() const;
bool have_continuous_feature() const;
bool have_compact_support_inside_element() const;
bool is_hierarchical() const;
size_type size() const;
const basis_basic<T>& operator[] (size_type i_comp) const;
bool have_index_parameter() const;
const basis_option& option() const;
valued_type valued_tag() const;
const std::string& valued() const;
const piola_fem<T>& get_piola_fem() const;
// [verbatim_basis_basic]
size_type local_ndof_on_side (
reference_element hat_K,
const side_information_type& sid) const;
void local_idof_on_side (
reference_element hat_K,
const side_information_type& sid,
Eigen::Matrix<size_type,Eigen::Dynamic,1>& loc_idof) const;
size_type ndof_on_subgeo (size_type map_dim, size_type subgeo_variant) const;
size_type nnod_on_subgeo (size_type map_dim, size_type subgeo_variant) const;
size_type first_inod_by_dimension (reference_element hat_K, size_type dim) const;
size_type first_idof_by_dimension (reference_element hat_K, size_type dim) const;
// evaluate the basis:
template<class Value>
void evaluate (
reference_element hat_K,
const point_basic<T>& hat_x,
Eigen::Matrix<Value,Eigen::Dynamic,1>& value) const;
// evaluation restricted to a side:
template<class Value>
void evaluate_on_side (
reference_element tilde_K,
const side_information_type& sid,
const point_basic<T>& hat_x,
Eigen::Matrix<Value,Eigen::Dynamic,1>& value) const;
// evaluate the gradient of the basis:
template<class Value>
void grad_evaluate (
reference_element hat_K,
const point_basic<T>& hat_x,
Eigen::Matrix<Value,Eigen::Dynamic,1>& value) const;
// interpolation nodes:
const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& hat_node (reference_element hat_K) const;
// compute_dof:
template <class Function>
void compute_dof (
reference_element hat_K,
const Function& f,
Eigen::Matrix<T,Eigen::Dynamic,1>& dofs) const;
template <class Value>
void compute_dofs (
reference_element hat_K,
const Eigen::Matrix<Value,Eigen::Dynamic,1>& f_xnod, // scalar-valued case:
Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const;
const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& vdm (reference_element hat_K) const;
const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& inv_vdm (reference_element hat_K) const;
// output:
void put (std::ostream& os, reference_element hat_K) const;
void put_hat_node (std::ostream& os, reference_element hat_K) const;
void put_hat_node_on_side (
std::ostream& os,
reference_element hat_K,
const side_information_type& sid) const;
protected:
// internals:
void _clear() const;
// [verbatim_basis_basic_cont]
};
// [verbatim_basis_basic_cont]
// [verbatim_basis]
typedef basis_basic<Float> basis;
// [verbatim_basis]
// -----------------------------------------------------------
// inlined
// -----------------------------------------------------------
template<class T>
inline
basis_basic<T>::basis_basic(std::string name)
: base(),
persistent_table<basis_basic<T>>()
{
reset (name);
}
template<class T>
inline
void
basis_basic<T>::_clear() const
{
return base::data()._clear();
}
template<class T>
inline
std::string
basis_basic<T>::family_name() const
{
return base::data().family_name();
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::family_index() const
{
return base::data().family_index();
}
template<class T>
inline
std::string
basis_basic<T>::name() const
{
return base::data().name();
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::degree() const
{
return base::data().degree();
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::ndof (reference_element hat_K) const
{
return base::data().ndof (hat_K);
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::nnod (reference_element hat_K) const
{
return base::data().nnod (hat_K);
}
template<class T>
inline
const basis_option&
basis_basic<T>::option() const
{
return base::data().option();
}
template<class T>
inline
bool
basis_basic<T>::is_continuous() const
{
return base::data().is_continuous();
}
template<class T>
inline
bool
basis_basic<T>::is_discontinuous() const
{
return base::data().is_discontinuous();
}
template<class T>
inline
bool
basis_basic<T>::is_nodal() const
{
return base::data().is_nodal();
}
template<class T>
inline
bool
basis_basic<T>::have_continuous_feature() const
{
return base::data().have_continuous_feature();
}
template<class T>
inline
bool
basis_basic<T>::have_compact_support_inside_element() const
{
return base::data().have_compact_support_inside_element();
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::size() const
{
return base::data().size();
}
template<class T>
inline
bool
basis_basic<T>::is_hierarchical() const
{
return base::data().is_hierarchical();
}
template<class T>
inline
const basis_basic<T>&
basis_rep<T>::operator[] (size_type i_comp) const
{
error_macro ("basis \""<<name()<<"\": invalid basis indexation [i_comp]");
static const basis_basic<T> dummy; return dummy;
}
template<class T>
inline
const basis_basic<T>&
basis_basic<T>::operator[] (size_type i_comp) const
{
return base::data().operator[] (i_comp);
}
template<class T>
inline
bool
basis_basic<T>::have_index_parameter() const
{
return base::data().have_index_parameter();
}
template<class T>
inline
typename basis_basic<T>::valued_type
basis_basic<T>::valued_tag() const
{
return base::data().valued_tag();
}
template<class T>
inline
const piola_fem<T>&
basis_basic<T>::get_piola_fem() const
{
return base::data().get_piola_fem();
}
template<class T>
inline
const std::string&
basis_basic<T>::valued() const
{
return base::data().valued();
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::ndof_on_subgeo (size_type map_dim, size_type subgeo_variant) const
{
return base::data().ndof_on_subgeo (map_dim, subgeo_variant);
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::nnod_on_subgeo (size_type map_dim, size_type subgeo_variant) const
{
return base::data().nnod_on_subgeo (map_dim, subgeo_variant);
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::first_idof_by_dimension (reference_element hat_K, size_type dim) const
{
return base::data().first_idof_by_dimension (hat_K, dim);
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::first_inod_by_dimension (reference_element hat_K, size_type dim) const
{
return base::data().first_inod_by_dimension (hat_K, dim);
}
template<class T>
inline
const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>&
basis_basic<T>::vdm (reference_element hat_K) const
{
return base::data().vdm(hat_K);
}
template<class T>
inline
const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>&
basis_basic<T>::inv_vdm (reference_element hat_K) const
{
return base::data().inv_vdm(hat_K);
}
template<class T>
template<class Value>
inline
void
basis_basic<T>::evaluate (
reference_element hat_K,
const point_basic<T>& hat_x,
Eigen::Matrix<Value,Eigen::Dynamic,1>& value) const
{
base::data().evaluate (hat_K, hat_x, value);
}
template<class T>
template<class Value>
inline
void
basis_basic<T>::evaluate_on_side (
reference_element tilde_K,
const side_information_type& sid,
const point_basic<T>& hat_x,
Eigen::Matrix<Value,Eigen::Dynamic,1>& value) const
{
base::data().evaluate_on_side (tilde_K, sid, hat_x, value);
}
template<class T>
template<class Value>
inline
void
basis_basic<T>::grad_evaluate (
reference_element hat_K,
const point_basic<T>& hat_x,
Eigen::Matrix<Value,Eigen::Dynamic,1>& value) const
{
base::data().grad_evaluate (hat_K, hat_x, value);
}
template<class T>
template <class Function>
inline
void
basis_basic<T>::compute_dof (
reference_element hat_K,
const Function& f,
Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const
{
return details::compute_dof (base::data(), hat_K, f, dof);
}
template<class T>
template<class Value>
inline
void
basis_basic<T>::compute_dofs (
reference_element hat_K,
const Eigen::Matrix<Value,Eigen::Dynamic,1>& f_xnod,
Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const
{
base::data()._compute_dofs (hat_K, f_xnod, dof);
}
template<class T>
inline
const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>&
basis_basic<T>::hat_node (reference_element hat_K) const
{
return base::data().hat_node (hat_K);
}
template<class T>
inline
void
basis_basic<T>::put (std::ostream& os, reference_element hat_K) const
{
base::data().put (os, hat_K);
}
template<class T>
inline
void
basis_basic<T>::put_hat_node (std::ostream& os, reference_element hat_K) const
{
base::data().put_hat_node (os, hat_K);
}
template<class T>
inline
typename basis_basic<T>::size_type
basis_basic<T>::local_ndof_on_side (
reference_element hat_K,
const side_information_type& sid) const
{
return base::data().local_ndof_on_side (hat_K, sid);
}
template<class T>
inline
void
basis_basic<T>::local_idof_on_side (
reference_element hat_K,
const side_information_type& sid,
Eigen::Matrix<size_type,Eigen::Dynamic,1>& loc_idof) const
{
base::data().local_idof_on_side (hat_K, sid, loc_idof);
}
template<class T>
inline
void
basis_basic<T>::put_hat_node_on_side (
std::ostream& os,
reference_element hat_K,
const side_information_type& sid) const
{
base::data().put_hat_node_on_side (os, hat_K, sid);
}
}// namespace rheolef
#endif // _RHEO_BASIS_H
size_type
field::size_type size_type
Definition: branch.cc:425
rheolef::basis_basic
Definition: basis.h:532
rheolef::basis_basic::is_continuous
bool is_continuous() const
Definition: basis.h:717
rheolef::basis_basic::get_piola_fem
const piola_fem< T > & get_piola_fem() const
Definition: basis.h:795
rheolef::basis_basic::ndof
size_type ndof(reference_element hat_K) const
Definition: basis.h:696
rheolef::basis_basic::size
size_type size() const
Definition: basis.h:752
rheolef::basis_basic::name
std::string name() const
Definition: basis.h:682
rheolef::basis_basic::have_compact_support_inside_element
bool have_compact_support_inside_element() const
Definition: basis.h:745
rheolef::basis_basic::rep
basis_rep< T > rep
Definition: basis.h:537
rheolef::basis_basic::compute_dofs
void compute_dofs(reference_element hat_K, const Eigen::Matrix< Value, Eigen::Dynamic, 1 > &f_xnod, Eigen::Matrix< T, Eigen::Dynamic, 1 > &dof) const
Definition: basis.h:897
rheolef::basis_basic::value_type
rep::value_type value_type
Definition: basis.h:540
rheolef::basis_basic::have_continuous_feature
bool have_continuous_feature() const
Definition: basis.h:738
rheolef::basis_basic::evaluate_on_side
void evaluate_on_side(reference_element tilde_K, const side_information_type &sid, const point_basic< T > &hat_x, Eigen::Matrix< Value, Eigen::Dynamic, 1 > &value) const
Definition: basis.h:863
rheolef::basis_basic::is_discontinuous
bool is_discontinuous() const
Definition: basis.h:724
rheolef::basis_basic::nnod
size_type nnod(reference_element hat_K) const
Definition: basis.h:703
rheolef::basis_basic::local_ndof_on_side
size_type local_ndof_on_side(reference_element hat_K, const side_information_type &sid) const
Definition: basis.h:928
rheolef::basis_basic::vdm
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & vdm(reference_element hat_K) const
Definition: basis.h:837
rheolef::basis_basic::family_index
size_type family_index() const
Definition: basis.h:675
rheolef::basis_basic::local_idof_on_side
void local_idof_on_side(reference_element hat_K, const side_information_type &sid, Eigen::Matrix< size_type, Eigen::Dynamic, 1 > &loc_idof) const
Definition: basis.h:937
rheolef::basis_basic::option
const basis_option & option() const
Definition: basis.h:710
rheolef::basis_basic::valued_tag
valued_type valued_tag() const
Definition: basis.h:788
rheolef::basis_basic::is_initialized
bool is_initialized() const
Definition: basis.h:551
rheolef::basis_basic::put_hat_node_on_side
void put_hat_node_on_side(std::ostream &os, reference_element hat_K, const side_information_type &sid) const
Definition: basis.h:947
rheolef::basis_basic::first_inod_by_dimension
size_type first_inod_by_dimension(reference_element hat_K, size_type dim) const
Definition: basis.h:830
rheolef::basis_basic::degree
size_type degree() const
Definition: basis.h:689
rheolef::basis_basic::basis_basic
basis_basic(std::string name="")
Definition: basis.h:652
rheolef::basis_basic::valued_type
rep::valued_type valued_type
Definition: basis.h:541
rheolef::basis_basic::compute_dof
void compute_dof(reference_element hat_K, const Function &f, Eigen::Matrix< T, Eigen::Dynamic, 1 > &dofs) const
Definition: basis.h:886
rheolef::basis_basic::put
void put(std::ostream &os, reference_element hat_K) const
Definition: basis.h:914
rheolef::basis_basic::first_idof_by_dimension
size_type first_idof_by_dimension(reference_element hat_K, size_type dim) const
Definition: basis.h:823
rheolef::basis_basic::put_hat_node
void put_hat_node(std::ostream &os, reference_element hat_K) const
Definition: basis.h:921
rheolef::basis_basic::is_hierarchical
bool is_hierarchical() const
Definition: basis.h:759
rheolef::basis_basic::hat_node
const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > & hat_node(reference_element hat_K) const
Definition: basis.h:907
rheolef::basis_basic::size_type
rep::size_type size_type
Definition: basis.h:539
rheolef::basis_basic::operator[]
const basis_basic< T > & operator[](size_type i_comp) const
Definition: basis.h:774
rheolef::basis_basic::nnod_on_subgeo
size_type nnod_on_subgeo(size_type map_dim, size_type subgeo_variant) const
Definition: basis.h:816
rheolef::basis_basic::is_nodal
bool is_nodal() const
Definition: basis.h:731
rheolef::basis_basic::valued
const std::string & valued() const
Definition: basis.h:802
rheolef::basis_basic::base
smart_pointer_nocopy< rep > base
Definition: basis.h:538
rheolef::basis_basic::family_name
std::string family_name() const
Definition: basis.h:668
rheolef::basis_basic::grad_evaluate
void grad_evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< Value, Eigen::Dynamic, 1 > &value) const
Definition: basis.h:875
rheolef::basis_basic::reset_family_index
void reset_family_index(size_type k)
Definition: basis_rep.cc:93
rheolef::basis_basic::have_index_parameter
bool have_index_parameter() const
Definition: basis.h:781
rheolef::basis_basic::ndof_on_subgeo
size_type ndof_on_subgeo(size_type map_dim, size_type subgeo_variant) const
Definition: basis.h:809
rheolef::basis_basic::reset
void reset(std::string &name)
Definition: basis_rep.cc:78
rheolef::basis_basic::evaluate
void evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< Value, Eigen::Dynamic, 1 > &value) const
Definition: basis.h:852
rheolef::basis_basic::_clear
void _clear() const
Definition: basis.h:661
rheolef::basis_basic::inv_vdm
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & inv_vdm(reference_element hat_K) const
Definition: basis.h:844
rheolef::basis_option
see the basis_option page for the full documentation
Definition: basis_option.h:93
rheolef::basis_option::is_continuous
bool is_continuous() const
Definition: basis_option.h:227
rheolef::basis_rep
Definition: basis.h:209
rheolef::basis_rep::is_continuous
bool is_continuous() const
Definition: basis.h:240
rheolef::basis_rep::_nnod_on_subgeo
std::array< std::array< size_type,reference_element::max_variant >,4 > _nnod_on_subgeo
Definition: basis.h:405
rheolef::basis_rep::get_piola_fem
const piola_fem< T > & get_piola_fem() const
Definition: basis.h:278
rheolef::basis_rep::local_ndof_on_side
virtual size_type local_ndof_on_side(reference_element hat_K, const side_information_type &sid) const
Definition: basis.h:447
rheolef::basis_rep::_first_idof_by_dimension
std::array< std::array< size_type,5 >,reference_element::max_variant > _first_idof_by_dimension
Definition: basis.h:410
rheolef::basis_rep::ndof
size_type ndof(reference_element hat_K) const
Definition: basis.h:244
rheolef::basis_rep::_helper_discontinuous_ndof_on_subgeo_inplace_change
static void _helper_discontinuous_ndof_on_subgeo_inplace_change(bool is_continuous, std::array< std::array< size_type, reference_element::max_variant >, 4 > &nxxx_on_subgeo)
Definition: basis_rep.cc:135
rheolef::basis_rep::scalar
point_basic< T > tensor3_basic< T > scalar
Definition: basis.h:303
rheolef::basis_rep::family_name
virtual std::string family_name() const =0
rheolef::basis_rep::name
std::string name() const
Definition: basis.h:228
rheolef::basis_rep::~basis_rep
virtual ~basis_rep()
Definition: basis_rep.cc:101
rheolef::basis_rep::have_continuous_feature
virtual bool have_continuous_feature() const
Definition: basis.h:233
rheolef::basis_rep::value_type
T value_type
Definition: basis.h:215
rheolef::basis_rep::_RHEOLEF_evaluate
_RHEOLEF_evaluate(evaluate,"scalar", T) _RHEOLEF_evaluate(evaluate
rheolef::basis_rep::_first_inod_by_dimension
std::array< std::array< size_type,5 >,reference_element::max_variant > _first_inod_by_dimension
Definition: basis.h:411
rheolef::basis_rep::size
virtual size_type size() const
Definition: basis.h:235
rheolef::basis_rep::basis_rep
basis_rep(const basis_option &sopt)
Definition: basis_rep.cc:106
rheolef::basis_rep::have_index_parameter
virtual bool have_index_parameter() const
Definition: basis.h:232
rheolef::basis_rep::_initialize_data
virtual void _initialize_data(reference_element hat_K) const =0
rheolef::basis_rep::_RHEOLEF_compute_dofs
_RHEOLEF_compute_dofs("scalar", T) _RHEOLEF_compute_dofs("vector"
rheolef::basis_rep::valued_tag
virtual valued_type valued_tag() const
Definition: basis.h:230
rheolef::basis_rep::is_discontinuous
bool is_discontinuous() const
Definition: basis.h:241
rheolef::basis_rep::vdm
virtual const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & vdm(reference_element hat_K) const
Definition: basis.h:428
rheolef::basis_rep::size_type
reference_element::size_type size_type
Definition: basis.h:214
rheolef::basis_rep::local_idof_on_side
virtual void local_idof_on_side(reference_element hat_K, const side_information_type &sid, Eigen::Matrix< size_type, Eigen::Dynamic, 1 > &loc_idof) const
Definition: basis.h:456
rheolef::basis_rep::_piola_fem
piola_fem< T > _piola_fem
Definition: basis.h:394
rheolef::basis_rep::valued
const std::string & valued() const
Definition: basis.h:239
rheolef::basis_rep::_initialize_data_guard
void _initialize_data_guard(reference_element hat_K) const
Definition: basis_rep.cc:126
rheolef::basis_rep::_sopt
basis_option _sopt
Definition: basis.h:393
rheolef::basis_rep::_have_initialize_data
std::array< bool, reference_element::max_variant > _have_initialize_data
Definition: basis.h:397
rheolef::basis_rep::valued_type
space_constant::valued_type valued_type
Definition: basis.h:216
rheolef::basis_rep::put_hat_node_on_side
void put_hat_node_on_side(std::ostream &os, reference_element hat_K, const side_information_type &sid) const
Definition: basis_fem_visu_gnuplot.cc:434
rheolef::basis_rep::vector
vector
Definition: basis.h:299
rheolef::basis_rep::first_idof_by_dimension
size_type first_idof_by_dimension(reference_element hat_K, size_type dim) const
Definition: basis.h:257
rheolef::basis_rep::is_nodal
virtual bool is_nodal() const =0
rheolef::basis_rep::_ndof_on_subgeo
std::array< std::array< size_type,reference_element::max_variant >,4 > _ndof_on_subgeo
Definition: basis.h:404
rheolef::basis_rep::nnod_on_subgeo
size_type nnod_on_subgeo(size_type map_dim, size_type subgeo_variant) const
Definition: basis.h:254
rheolef::basis_rep::option
const basis_option & option() const
Definition: basis.h:238
rheolef::basis_rep::have_compact_support_inside_element
virtual bool have_compact_support_inside_element() const
Definition: basis.h:237
rheolef::basis_rep::nnod
size_type nnod(reference_element hat_K) const
Definition: basis.h:247
rheolef::basis_rep::ndof_on_subgeo
size_type ndof_on_subgeo(size_type map_dim, size_type subgeo_variant) const
Definition: basis.h:251
rheolef::basis_rep::first_inod_by_dimension
size_type first_inod_by_dimension(reference_element hat_K, size_type dim) const
Definition: basis.h:260
rheolef::basis_rep::standard_naming
static std::string standard_naming(std::string family_name, size_t degree, const basis_option &sopt)
Definition: basis_rep.cc:44
rheolef::basis_rep::_name
std::string _name
Definition: basis.h:392
rheolef::basis_rep::make_ptr
static basis_rep * make_ptr(const std::string &name)
Definition: basis_list.cc:56
rheolef::basis_rep::put_hat_node
void put_hat_node(std::ostream &os, reference_element hat_K) const
Definition: basis_fem_visu_gnuplot.cc:331
rheolef::basis_rep::family_index
virtual size_type family_index() const
Definition: basis.h:226
rheolef::basis_rep::hat_node
virtual const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > & hat_node(reference_element hat_K) const
Definition: basis.h:419
rheolef::basis_rep::operator[]
virtual const class basis_basic< T > & operator[](size_type i_comp) const
Definition: basis.h:766
rheolef::basis_rep::put_vector_valued
virtual void put_vector_valued(std::ostream &os, reference_element hat_K) const
Definition: basis_fem_visu_gnuplot.cc:51
rheolef::basis_rep::_RHEOLEF_evaluate_on_side
_RHEOLEF_evaluate_on_side("scalar", T) _RHEOLEF_evaluate_on_side("vector"
rheolef::basis_rep::is_hierarchical
virtual bool is_hierarchical() const
Definition: basis.h:234
rheolef::basis_rep::_initialize_cstor_sizes
virtual void _initialize_cstor_sizes() const =0
rheolef::basis_rep::degree
virtual size_type degree() const =0
rheolef::basis_rep::_clear
void _clear() const
Definition: basis_rep.cc:120
rheolef::basis_rep::inv_vdm
virtual const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & inv_vdm(reference_element hat_K) const
Definition: basis.h:437
rheolef::basis_rep::_helper_initialize_first_ixxx_by_dimension_from_nxxx_on_subgeo
static void _helper_initialize_first_ixxx_by_dimension_from_nxxx_on_subgeo(const std::array< std::array< size_type, reference_element::max_variant >, 4 > &_nxxx_on_subgeo, std::array< std::array< size_type, 5 >, reference_element::max_variant > &_first_ixxx_by_dimension)
Definition: basis_rep.cc:173
rheolef::persistent_table
see the persistent_table page for the full documentation
Definition: persistent_table.h:84
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::reference_element::max_variant
static const variant_type max_variant
Definition: reference_element.h:82
rheolef::reference_element::dimension
size_type dimension() const
Definition: reference_element.h:101
rheolef::reference_element::variant
variant_type variant() const
Definition: reference_element.h:99
rheolef::reference_element::size_type
std::vector< int >::size_type size_type
Definition: reference_element.h:71
rheolef::smart_pointer_base< T, details::no_copy< T > >::operator->
const T * operator->() const
Definition: smart_pointer.h:273
rheolef::smart_pointer_nocopy
Definition: smart_pointer.h:389
rheolef::tensor3_basic
Definition: tensor3.h:73
rheolef::tensor4_basic
Definition: tensor4.h:80
rheolef::tensor_basic
Definition: tensor.h:90
rheolef::basis
basis_basic< Float > basis
Definition: basis.h:644
rheolef::type
rheolef::std type
rheolef::size_type
size_t size_type
Definition: basis_get.cc:76
rheolef::value
rheolef::std value
rheolef::Function
rheolef::std Function
rheolef::dummy
static iorheo::force_initialization dummy
Definition: iorheo.cc:147
tensor3
see the tensor3 page for the full documentation
tensor4
see the tensor4 page for the full documentation
tensor
see the tensor page for the full documentation
error_macro
#define error_macro(message)
Definition: dis_macros.h:49
T
Expr1::float_type T
Definition: field_expr.h:261
check_macro
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
mkgeo_ball.b
int b
Definition: mkgeo_ball.sh:152
mkgeo_ball.f
int f
Definition: mkgeo_ball.sh:221
mkgeo_ball.map_dim
map_dim
Definition: mkgeo_ball.sh:337
mkgeo_ball.dim
int dim
Definition: mkgeo_ball.sh:307
mkgeo_contraction.name
string name
Definition: mkgeo_contraction.sh:133
rheolef::details::compute_dof
std::enable_if< is_scalar< typename function_traits< Function >::result_type >::value,void >::type compute_dof(const basis_rep< T > &b, reference_element hat_K, const Function &f, Eigen::Matrix< T, Eigen::Dynamic, 1 > &dof)
Definition: basis.h:486
rheolef::space_constant::valued_type
valued_type
Definition: space_constant.h:135
rheolef::space_constant::scalar
@ scalar
Definition: space_constant.h:136
rheolef::space_constant::vector
@ vector
Definition: space_constant.h:137
rheolef::space_constant::valued_name
const std::string & valued_name(valued_type valued_tag)
Definition: space_constant.cc:43
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::put
void put(std::ostream &out, std::string name, const tiny_matrix< T > &a)
Definition: tiny_lu.h:155
rheolef::evaluate
void evaluate(const geo_basic< float_type, M > &omega_K, const geo_element &K, Eigen::Matrix< Result, Eigen::Dynamic, 1 > &value) const
Definition: field_expr_recursive.h:873
f
Definition: cavity_dg.h:29
rheolef::side_information_type
Definition: reference_element_face_transformation.h:37