Skip to content
Draft
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"recommendations": [
"ms-vscode.cpptools",
"twxs.cmake",
"ms-vscode.cmake-tools",
"ms-python.python",
"codecreator.indent-to-bracket",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@
"__bits": "cpp",
"__verbose_abort": "cpp"
},
"cmake.configureOnOpen": true
"cmake.configureOnOpen": false
}
35 changes: 29 additions & 6 deletions include/flyft/cartesian_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,43 @@
namespace flyft
{

//! Mesh with Cartesian position coordinates.
class CartesianMesh : public Mesh
{
public:
CartesianMesh(double lower_bound,
//! Constructor.
/*!
* \param num_orientation_dim Number of orientation coordinates.
* \param shape Number of cells along each dimension.
* \param lower_bound Lower bound of the mesh.
* \param upper_bound Upper bound of the mesh.
* \param lower_bc Boundary condition at position coordinate lower bound.
* \param upper_bc Boundary condition at position coordinate upper bound.
* \param area Cross-sectional area, tangent to position coordinate.
*/
CartesianMesh(int num_orientation_dim,
int* shape,
double lower_bound,
double upper_bound,
int shape,
BoundaryType lower_bc,
BoundaryType upper_bc,
double area);

double area(int i) const override;
double volume() const override;
double volume(int i) const override;
double gradient(int idx, double f_lo, double f_hi) const override;
//! Copy constructor.
CartesianMesh(const CartesianMesh& other);

//! Copy assignment operator.
CartesianMesh& operator=(const CartesianMesh& other);

//! Move constructor.
CartesianMesh(const CartesianMesh&& other);

//! Move assignment operator.
CartesianMesh& operator=(const CartesianMesh&& other);

// double area(int i) const override;
double cell_position_volume(const int* cell) const override;
// double gradient(int idx, double f_lo, double f_hi) const override;

protected:
std::shared_ptr<Mesh> clone() const override;
Expand Down
20 changes: 20 additions & 0 deletions include/flyft/complex_field.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef FLYFT_COMPLEX_FIELD_H_
#define FLYFT_COMPLEX_FIELD_H_

#include "flyft/data_array.h"

#include <complex>

namespace flyft
{

//! Complex-valued field.
/*!
* A ComplexField represents a complex-valued quantity discretized onto a coordinate space. It is a
* multidimensional DataArray and requires another object to define the coordinates.
*/
using ComplexField = DataArray<std::complex<double>, 4>;

} // namespace flyft

#endif // FLYFT_COMPLEX_FIELD_H_
Loading