piola_fem_hdiv.cc
Go to the documentation of this file.
//
// Piola transformation for H(div,omega) approximations
//
// author: Pierre.Saramito@imag.fr
//
// date: 9 may 2019
//
// references:
// [1] P.-A. Raviart and J.-M. Thomas.
// A mixed finite element method for 2-nd order elliptic problems.
// in "Mathematical aspects of finite element methods",
// pages 292--315, Springer, 1977.
// [2] J. E. Roberts and J.-M. Thomas,
// Mixed and hybrid methods,
// In "Handbook of numerical analysis. Volume 2.
// Finite element methods (part 1)",
// chapter 4, Elsevier, 1991.
// see page 554
//
#include "piola_fem_hdiv.h"
#include "piola_fem_grad_post.icc"
namespace rheolef {
template<class T>
void
piola_fem_hdiv<T>::transform (
const piola<T>& p,
const point_basic<T>& hat_u_in,
point_basic<T>& u) const
{
point_basic<T> hat_u = hat_u_in; // avoid the aliasing problem (u,hat_u)
u = (1/p.detDF)*(p.DF*hat_u); // TODO: DVT_OPTIM_2D
}
template<class T>
void
piola_fem_hdiv<T>::inv_transform (
const piola<T>& p,
const point_basic<T>& u_in,
point_basic<T>& hat_u) const
{
point_basic<T> u = u_in; // avoid the aliasing problem (u,hat_u)
hat_u = p.detDF*(p.invDF*u); // TODO: DVT_OPTIM_2D
}
template<class T>
void
piola_fem_hdiv<T>::grad_transform (
const piola<T>& p,
const point_basic<T>& hat_u_in,
const tensor_basic<T>& hat_grad_u_in,
const details::differentiate_option& gopt,
tensor_basic<T>& grad_u) const
{
point_basic<T> hat_u = hat_u_in; // avoid the aliasing problem (u,hat_u)
tensor_basic<T> hat_grad_u = hat_grad_u_in;
grad_u = (1/p.detDF)*p.DF*hat_grad_u*p.invDF; // TODO: DVT_OPTIM_2D
point_basic<T> u;
transform (p, hat_u, u); // TODO: used only in the axi case: could be optimized
grad_post (p, gopt, u, grad_u);
}
// ----------------------------------------------------------------------------
// instanciation in library
// ----------------------------------------------------------------------------
#define _RHEOLEF_instanciation(T) \
template class piola_fem_hdiv<T>; \
_RHEOLEF_instanciation(Float)
}// namespace rheolef
rheolef::point_basic
Definition: point.h:87
rheolef::_RHEOLEF_instanciation
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
rheolef::tensor_basic
Definition: tensor.h:90
rheolef::piola_fem_hdiv::transform
void transform(const piola< T > &p, const point_basic< T > &hat_u, point_basic< T > &u) const
Definition: piola_fem_hdiv.cc:46
p
Definition: sphere.icc:25
piola_fem_hdiv.h
rheolef::details::differentiate_option
Definition: piola.h:41
rheolef::piola_fem_hdiv::grad_transform
void grad_transform(const piola< T > &p, const point_basic< T > &hat_u, const tensor_basic< T > &hat_grad_u, const details::differentiate_option &gopt, tensor_basic< T > &grad_u) const
Definition: piola_fem_hdiv.cc:66
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
u
Definition: leveque.h:25
piola_fem_grad_post.icc
Float
see the Float page for the full documentation
u
Float u(const point &x)
Definition: transmission_error.cc:26
rheolef::piola_fem_hdiv::inv_transform
void inv_transform(const piola< T > &p, const point_basic< T > &u, point_basic< T > &hat_u) const
Definition: piola_fem_hdiv.cc:56
grad_u
Definition: combustion_exact.icc:34
rheolef::piola
Definition: piola.h:67