Peano
curvilinearRoutines.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace Numerics{
4  template <class Shortcuts, typename T>
5  inline void getNormals(const T* Q, int direction, T& norm, T* n){
6  T v_x = Q[Shortcuts::metric_derivative + 0 + direction * 3];
7  T v_y = Q[Shortcuts::metric_derivative + 1 + direction * 3];
8  T v_z = Q[Shortcuts::metric_derivative + 2 + direction * 3];
9 
10  norm = std::sqrt(v_x*v_x + v_y*v_y + v_z*v_z);
11  n[0] = v_x/norm;
12  n[1] = v_y/norm;
13  n[2] = v_z/norm;
14  }
15 }
void getNormals(const T *Q, int direction, T &norm, T *n)