19#ifndef CORE_EXTERNAL_FIELD_FIELDS_PLAIN_WAVE_HPP
20#define CORE_EXTERNAL_FIELD_FIELDS_PLAIN_WAVE_HPP
40template <
typename T, std::
size_t codim>
class PlaneWave {
69 return m_amplitude * sin(m_k * x - m_omega * t + m_phase);
86 return tensor_product(m_amplitude, m_k) *
87 cos(m_k * x - m_omega * t + m_phase);
Vector implementation and trait types for boost qvm interoperability.
value_type operator()(const Utils::Vector3d &x, T t=0.) const
brief Evaluate field.
typename Utils::decay_to_scalar< Utils::Vector< T, codim > >::type value_type
bool fits_in_box(const Utils::Vector3d &) const
PlaneWave(const value_type amplitude, const value_type &k, T omega, T phase)
jacobian_type jacobian(const Utils::Vector3d &x, T t=0.) const
brief Evaluate the Jacobian matrix of the field.
detail::jacobian_type< T, codim > jacobian_type
Matrix< T, N, M > tensor_product(const Vector< T, N > &x, const Vector< T, M > &y)
Meta function to turns a Vector<1, T> into T.