field_evaluate.h
Go to the documentation of this file.
#ifndef _RHEOLEF_FIELD_EVALUATE_H
#define _RHEOLEF_FIELD_EVALUATE_H
//
// evaluate a field on a predefined point set: hat_x[q], q=0..nq
// See also piola_transformation.h
//
#include "rheolef/field.h"
#include "rheolef/fem_on_pointset.h"
namespace rheolef {
// -----------------------------------------------------
// scalar-valued case:
// -----------------------------------------------------
template<class T, class M>
void
field_evaluate (
const field_basic<T,M>& uh,
const basis_on_pointset<T>& bops,
reference_element hat_K,
const std::vector<size_t>& dis_idof,
Eigen::Matrix<T,Eigen::Dynamic,1>& value);
// -----------------------------------------------------
// vector-valued case:
// -----------------------------------------------------
template<class T, class M>
void
vector_field_evaluate (
const field_basic<T,M>& uh,
const basis_on_pointset<T>& bops,
reference_element hat_K,
const std::vector<size_t>& dis_idof_tab,
const basis_on_pointset<T>& piola_on_geo_basis,
std::vector<size_t>& dis_inod_geo,
Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& value);
// -----------------------------------------------------
// tensor-valued case:
// -----------------------------------------------------
template<class T, class M>
void
tensor_field_evaluate (
const field_basic<T,M>& uh,
const basis_on_pointset<T>& bops,
reference_element hat_K,
const std::vector<size_t>& dis_idof_tab,
Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,1>& value);
// -----------------------------------------------------
// homogeneous multi-component case: get the i-th value
// -----------------------------------------------------
template<class T, class M>
void
field_component_evaluate (
const field_basic<T,M>& uh,
const basis_on_pointset<T>& bops,
reference_element hat_K,
const std::vector<size_t>& dis_idof_tab,
size_t k_comp,
Eigen::Matrix<T,Eigen::Dynamic,1>& value);
// -----------------------------------------------------
// generic interface
// -----------------------------------------------------
template<class T, class M>
inline
void
general_field_evaluate (
const field_basic<T,M>& uh,
const basis_on_pointset<T>& bops,
reference_element hat_K,
const std::vector<size_t>& dis_idof,
const basis_on_pointset<T>& piola_on_geo_basis,
std::vector<size_t>& dis_inod_geo,
Eigen::Matrix<T,Eigen::Dynamic,1>& value)
{
field_evaluate (uh, bops, hat_K, dis_idof, value);
}
template<class T, class M>
inline
void
general_field_evaluate (
const field_basic<T,M>& uh,
const basis_on_pointset<T>& bops,
reference_element hat_K,
const std::vector<size_t>& dis_idof,
const basis_on_pointset<T>& piola_on_geo_basis,
std::vector<size_t>& dis_inod_geo,
Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& value)
{
vector_field_evaluate (uh, bops, hat_K, dis_idof, piola_on_geo_basis, dis_inod_geo, value);
}
template<class T, class M>
inline
void
general_field_evaluate (
const field_basic<T,M>& uh,
const basis_on_pointset<T>& bops,
reference_element hat_K,
const std::vector<size_t>& dis_idof,
const basis_on_pointset<T>& piola_on_geo_basis,
std::vector<size_t>& dis_inod_geo,
Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,1>& value)
{
tensor_field_evaluate (uh, bops, hat_K, dis_idof, value);
}
template<class T, class M>
inline
void
general_field_evaluate (
const field_basic<T,M>& uh,
const basis_on_pointset<T>& bops,
reference_element hat_K,
const std::vector<size_t>& dis_idof,
const basis_on_pointset<T>& piola_on_geo_basis,
std::vector<size_t>& dis_inod_geo,
Eigen::Matrix<tensor3_basic<T>,Eigen::Dynamic,1>& value)
{
fatal_macro ("tensor3: not yet");
#ifdef TODO
value = tensor3_field_evaluate (uh, bops, hat_K, dis_idof, q);
#endif // TODO
}
template<class T, class M>
inline
void
general_field_evaluate (
const field_basic<T,M>& uh,
const basis_on_pointset<T>& bops,
reference_element hat_K,
const std::vector<size_t>& dis_idof,
const basis_on_pointset<T>& piola_on_geo_basis,
std::vector<size_t>& dis_inod_geo,
Eigen::Matrix<tensor4_basic<T>,Eigen::Dynamic,1>& value)
{
fatal_macro ("tensor4: not yet");
#ifdef TODO
value = tensor4_field_evaluate (uh, bops, hat_K, dis_idof, q);
#endif // TODO
}
// -----------------------------------------------------
// new basis interface
// -----------------------------------------------------
template<class T, class M, class Value>
void
field_evaluate_continued (
const field_basic<T,M>& uh,
const geo_basic<T,M>& omega_K,
const geo_element& K,
const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& phij_xi,
Eigen::Matrix<Value,Eigen::Dynamic,1>& value);
template<class T, class M, class Value>
void
field_evaluate (
const field_basic<T,M>& uh,
const fem_on_pointset<T>& fops,
const geo_basic<T,M>& omega_K,
const geo_element& K,
Eigen::Matrix<Value,Eigen::Dynamic,1>& value);
}// namespace rheolef
#endif // _RHEOLEF_FIELD_EVALUATE_H
rheolef::basis_on_pointset
Definition: basis_on_pointset.h:192
rheolef::field_basic< T, M >
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::tensor3_basic
Definition: tensor3.h:73
rheolef::tensor4_basic
Definition: tensor4.h:80
rheolef::tensor_basic
Definition: tensor.h:90
rheolef::point_basic< T >
point_basic< T >
Definition: piola_fem.h:135
rheolef::value
rheolef::std value
fatal_macro
#define fatal_macro(message)
Definition: dis_macros.h:33
rheolef::space_numbering::dis_idof
void dis_idof(const basis_basic< T > &b, const geo_size &gs, const geo_element &K, typename std::vector< size_type >::iterator dis_idof_tab)
Definition: space_numbering.cc:187
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::general_field_evaluate
void general_field_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof, const basis_on_pointset< T > &piola_on_geo_basis, std::vector< size_t > &dis_inod_geo, Eigen::Matrix< T, Eigen::Dynamic, 1 > &value)
Definition: field_evaluate.h:84
rheolef::vector_field_evaluate
void vector_field_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof_tab, const basis_on_pointset< T > &piola_on_geo_basis, std::vector< size_t > &dis_inod_geo, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &value)
Definition: field_evaluate.cc:64
rheolef::field_component_evaluate
void field_component_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof_tab, size_t k_comp, Eigen::Matrix< T, Eigen::Dynamic, 1 > &value)
Definition: field_evaluate.cc:181
rheolef::tensor_field_evaluate
void tensor_field_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof_tab, Eigen::Matrix< tensor_basic< T >, Eigen::Dynamic, 1 > &value)
Definition: field_evaluate.cc:137
rheolef::field_evaluate
void field_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof, Eigen::Matrix< T, Eigen::Dynamic, 1 > &value)
Definition: field_evaluate.cc:39
rheolef::field_evaluate_continued
void field_evaluate_continued(const field_basic< T, M > &uh, const geo_basic< T, M > &omega_K, const geo_element &K, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &phij_xi, Eigen::Matrix< Value, Eigen::Dynamic, 1 > &value)
Definition: field_evaluate.cc:217