FDMUtils.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: FDMUtils.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Finite Difference Method util functions for CubbyFlow.
6 > Created Time: 2017/07/06
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_FDM_UTILS_H
10 #define CUBBYFLOW_FDM_UTILS_H
11 
14 #include <Core/Vector/Vector2.h>
15 #include <Core/Vector/Vector3.h>
16 
17 namespace CubbyFlow
18 {
21  Vector2D Gradient2(const ConstArrayAccessor2<double>& data,
22  const Vector2D& gridSpacing, size_t i, size_t j);
23 
26  std::array<Vector2D, 2> Gradient2(const ConstArrayAccessor2<Vector2D>& data,
27  const Vector2D& gridSpacing, size_t i, size_t j);
28 
31  Vector3D Gradient3(const ConstArrayAccessor3<double>& data,
32  const Vector3D& gridSpacing, size_t i, size_t j, size_t k);
33 
36  std::array<Vector3D, 3> Gradient3(const ConstArrayAccessor3<Vector3D>& data,
37  const Vector3D& gridSpacing, size_t i, size_t j, size_t k);
38 
41  double Laplacian2(const ConstArrayAccessor2<double>& data,
42  const Vector2D& gridSpacing, size_t i, size_t j);
43 
46  Vector2D Laplacian2(const ConstArrayAccessor2<Vector2D>& data,
47  const Vector2D& gridSpacing, size_t i, size_t j);
48 
51  double Laplacian3(const ConstArrayAccessor3<double>& data,
52  const Vector3D& gridSpacing, size_t i, size_t j, size_t k);
53 
56  Vector3D Laplacian3(const ConstArrayAccessor3<Vector3D>& data,
57  const Vector3D& gridSpacing, size_t i, size_t j, size_t k);
58 }
59 
60 #endif
Vector2D Gradient2(const ConstArrayAccessor2< double > &data, const Vector2D &gridSpacing, size_t i, size_t j)
Returns 2-D gradient vector from given 2-D scalar grid-like array data, gridSpacing, and array index (i, j).
double Laplacian3(const ConstArrayAccessor3< double > &data, const Vector3D &gridSpacing, size_t i, size_t j, size_t k)
Returns Laplacian value from given 3-D scalar grid-like array data, gridSpacing, and array index (i...
double Laplacian2(const ConstArrayAccessor2< double > &data, const Vector2D &gridSpacing, size_t i, size_t j)
Returns Laplacian value from given 2-D scalar grid-like array data, gridSpacing, and array index (i...
Definition: pybind11Utils.h:24
Vector2< double > Vector2D
Double-type 2D vector.
Definition: Vector2.h:341
Vector3D Gradient3(const ConstArrayAccessor3< double > &data, const Vector3D &gridSpacing, size_t i, size_t j, size_t k)
Returns 3-D gradient vector from given 3-D scalar grid-like array data, gridSpacing, and array index (i, j, k).
Vector3< double > Vector3D
Double-type 3D vector.
Definition: Vector3.h:353