omega_h
Reliable mesh adaptation
Omega_h_affine.hpp
1 #ifndef OMEGA_H_AFFINE_HPP
2 #define OMEGA_H_AFFINE_HPP
3 
4 #include <Omega_h_matrix.hpp>
5 
6 namespace Omega_h {
7 
8 template <Int dim>
9 struct Affine {
10  Tensor<dim> r;
11  Vector<dim> t;
12 };
13 
14 template <Int dim>
15 OMEGA_H_INLINE Vector<dim> operator*(Affine<dim> a, Vector<dim> v) {
16  return (a.r * v) + a.t;
17 }
18 
19 template <Int dim>
20 OMEGA_H_INLINE Affine<dim> invert(Affine<dim> a) {
21  Affine<dim> ai;
22  ai.r = invert(a.r);
23  ai.t = -(ai.r * a.t);
24  return ai;
25 }
26 
27 } // namespace Omega_h
28 
29 #endif
Definition: Omega_h_few.hpp:61
Definition: amr_mpi_test.cpp:6
Definition: Omega_h_affine.hpp:9