Peano
Loading...
Searching...
No Matches
routines_curvilinear.h
Go to the documentation of this file.
1namespace Numerics{
2 template <class Shortcuts>
3 inline void get_normals(const double* Q, int direction, double& norm, double* n){
4 Shortcuts s;
5 double v_x = Q[s.metric_derivative + 0 + direction * 3];
6 double v_y = Q[s.metric_derivative + 1 + direction * 3];
7 double v_z = Q[s.metric_derivative + 2 + direction * 3];
8
9 norm = std::sqrt(v_x*v_x + v_y*v_y + v_z*v_z);
10 n[0] = v_x/norm;
11 n[1] = v_y/norm;
12 n[2] = v_z/norm;
13 }
14}
void get_normals(const double *Q, int direction, double &norm, double *n)