Loading...
Searching...
No Matches
piola_fem_lagrange.cc
Go to the documentation of this file.
#include "piola_fem_lagrange.h"
#include "piola_fem_grad_post.icc"
namespace rheolef {
// --------------------------------------------------------------------------
// scalar-valued case
// --------------------------------------------------------------------------
template<class T>
void
piola_fem_lagrange<T>::transform (
const piola<T>& p,
const T& hat_u,
T& u) const
{
u = hat_u;
}
template<class T>
void
piola_fem_lagrange<T>::inv_transform (
const piola<T>& p,
const T& u,
T& hat_u) const
{
hat_u = u;
}
template<class T>
void
piola_fem_lagrange<T>::grad_transform (
const piola<T>& p,
const T& hat_u,
const point_basic<T>& hat_grad_u,
const details::differentiate_option& gopt,
point_basic<T>& grad_u) const
{
// grad_u = DF^{-T}*grad_hat_u
grad_u = p.invDF.trans_mult (hat_grad_u); // TODO: DVT_OPTIM_2D
const T& u = hat_u;
grad_post (p, gopt, u, grad_u);
}
// --------------------------------------------------------------------------
// vector-valued case
// --------------------------------------------------------------------------
template<class T>
void
piola_fem_lagrange<T>::transform (
const piola<T>& p,
const point_basic<T>& hat_u,
point_basic<T>& u) const
{
u = hat_u;
}
template<class T>
void
piola_fem_lagrange<T>::inv_transform (
const piola<T>& p,
const point_basic<T>& u,
point_basic<T>& hat_u) const
{
hat_u = u;
}
template<class T>
void
piola_fem_lagrange<T>::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
{
// grad_u = grad_hat_u*DF^{-1}
grad_u = hat_grad_u*p.invDF; // TODO: DVT_OPTIM_2D
const point_basic<T>& u = hat_u;
grad_post (p, gopt, u, grad_u);
}
// --------------------------------------------------------------------------
// tensor-valued case
// --------------------------------------------------------------------------
template<class T>
void
piola_fem_lagrange<T>::transform (
const piola<T>& p,
const tensor_basic<T>& hat_u,
tensor_basic<T>& u) const
{
u = hat_u;
}
template<class T>
void
piola_fem_lagrange<T>::inv_transform (
const piola<T>& p,
const tensor_basic<T>& u,
tensor_basic<T>& hat_u) const
{
hat_u = u;
}
template<class T>
void
piola_fem_lagrange<T>::grad_transform (
const piola<T>& p,
const tensor_basic<T>& hat_u,
const tensor3_basic<T>& hat_grad_u,
const details::differentiate_option& gopt,
tensor3_basic<T>& grad_u) const
{
// grad_u_{ijk} = grad_hat_u_{ijl}*DF^{-1}_{lk}
grad_u = hat_grad_u*p.invDF; // TODO: DVT_OPTIM_2D
const tensor_basic<T>& u = hat_u;
grad_post (p, gopt, u, grad_u);
}
// ----------------------------------------------------------------------------
// instanciation in library
// ----------------------------------------------------------------------------
#define _RHEOLEF_instanciation(T) \
template class piola_fem_lagrange<T>; \
_RHEOLEF_instanciation(Float)
}// namespace rheolef
_RHEOLEF_instanciation
#define _RHEOLEF_instanciation(T, M, A)
Definition asr.cc:223
Float
see the Float page for the full documentation
rheolef::piola_fem_rep::transform
virtual void transform(const piola< T > &p, const T &hat_u, T &u) const
rheolef::piola_fem_rep::inv_transform
virtual void inv_transform(const piola< T > &p, const T &u, T &hat_u) const
rheolef::piola_fem_rep::grad_transform
virtual void grad_transform(const piola< T > &p, const T &hat_u, const point_basic< T > &hat_grad_u, const details::differentiate_option &gopt, point_basic< T > &grad_u) const
T
Expr1::float_type T
Definition field_expr.h:230
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
piola_fem_grad_post.icc
piola_fem_lagrange.h
grad_u
Definition combustion_exact.icc:34
p
Definition sphere.icc:25
u
Definition leveque.h:25