FlowSieve  3.4.0
FlowSieve Coarse-Graining Documentation
differentiation_tools.hpp
Go to the documentation of this file.
1 #ifndef DIFFERENTIATION_TOOLS_HPP
2 #define DIFFERENTIATION_TOOLS_HPP 1
3 
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <vector>
7 #include <string>
8 #include "constants.hpp"
9 #include "functions.hpp"
10 
38  std::vector<double> & diff_array,
39  const double delta,
40  const int index,
41  const int order_of_deriv = 1,
42  const int diff_ord = constants::DiffOrd);
43 
44 
45 
69  std::vector<double> & diff_array,
70  const std::vector<double> & grid,
71  const int Iref,
72  const int LB,
73  const int UB,
74  const int diff_ord = constants::DiffOrd);
75 
76 
92  const std::vector<double*> & deriv_vals,
93  const std::vector<const std::vector<double>*> & fields,
94  const std::vector<double> & grid,
95  const std::string & dim,
96  const int Itime, const int Idepth, const int Ilat, const int Ilon,
97  const int Ntime, const int Ndepth, const int Nlat, const int Nlon,
98  const std::vector<bool> & mask,
99  const int order_of_deriv = 1,
100  const int diff_ord = constants::DiffOrd);
101 
102 
103 
125  const std::vector<double*> & x_deriv_vals,
126  const std::vector<double*> & y_deriv_vals,
127  const std::vector<double*> & z_deriv_vals,
128  const std::vector<const std::vector<double>*> & fields,
129  const dataset & source_data,
130  const int Itime, const int Idepth, const int Ilat, const int Ilon,
131  const int order_of_deriv = 1,
132  const int diff_ord = constants::DiffOrd,
133  const bool include_depth_derivs = false);
134 
135 
136 
155 void get_diff_vector(
156  std::vector<double> & diff_vector,
157  int & LB_ret,
158  const std::vector<double> & grid,
159  const std::string & dim,
160  const int Itime,
161  const int Idepth,
162  const int Ilat,
163  const int Ilon,
164  const int Ntime,
165  const int Ndepth,
166  const int Nlat,
167  const int Nlon,
168  const std::vector<bool> & mask,
169  const int order_of_deriv,
170  const int diff_ord = constants::DiffOrd
171  );
172 
173 #endif
void spher_derivative_at_point(const std::vector< double *> &deriv_vals, const std::vector< const std::vector< double > *> &fields, const std::vector< double > &grid, const std::string &dim, const int Itime, const int Idepth, const int Ilat, const int Ilon, const int Ntime, const int Ndepth, const int Nlat, const int Nlon, const std::vector< bool > &mask, const int order_of_deriv=1, const int diff_ord=constants::DiffOrd)
Computes latitudinal derivative at a specific point.
Definition: spher_derivative_at_point.cpp:8
const int DiffOrd
Differentiation order for finite differencing (currently must be 2, 4, or 6).
Definition: constants.hpp:90
void Cart_derivatives_at_point(const std::vector< double *> &x_deriv_vals, const std::vector< double *> &y_deriv_vals, const std::vector< double *> &z_deriv_vals, const std::vector< const std::vector< double > *> &fields, const dataset &source_data, const int Itime, const int Idepth, const int Ilat, const int Ilon, const int order_of_deriv=1, const int diff_ord=constants::DiffOrd, const bool include_depth_derivs=false)
Computes all Cartesian derivative at a specific point.
Definition: Cart_derivs_at_point.cpp:9
Class to store main variables.
Definition: functions.hpp:24
Collection of all computation-related functions.
void get_diff_vector(std::vector< double > &diff_vector, int &LB_ret, const std::vector< double > &grid, const std::string &dim, const int Itime, const int Idepth, const int Ilat, const int Ilon, const int Ntime, const int Ndepth, const int Nlat, const int Nlon, const std::vector< bool > &mask, const int order_of_deriv, const int diff_ord=constants::DiffOrd)
Function to return coefficients for differentiation at a target point in space.
Definition: get_diff_vector.cpp:9
void non_uniform_diff_vector(std::vector< double > &diff_array, const std::vector< double > &grid, const int Iref, const int LB, const int UB, const int diff_ord=constants::DiffOrd)
Assign appropriate differentiation vector.
Definition: non_uniform_diff_vector.cpp:9
Provide namespace for global constants (physical and computational).
void differentiation_vector(std::vector< double > &diff_array, const double delta, const int index, const int order_of_deriv=1, const int diff_ord=constants::DiffOrd)
Assign appropriate differentiation vector.
Definition: differentiation_vector.cpp:7