-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved types that are not actual parameters to be varied into a new pr…
…imitives file.
- Loading branch information
Showing
2 changed files
with
28 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
#include <Eigen/Eigen> | ||
|
||
static constexpr int d = 2; // number of spatial dimensions | ||
using Scalar = double; // type for numeric data | ||
|
||
using Field = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>; | ||
using FieldRef = Eigen::Ref<const Field>; | ||
|
||
using HostField = Field; | ||
using HostFieldRef = FieldRef; | ||
using DeviceField = Scalar*; | ||
|
||
using Gradient = std::array<Field, d>; | ||
using HostGradient = Gradient; | ||
using DeviceGradient = std::array<Scalar*, d>; | ||
|
||
using Current = Gradient; | ||
using HostCurrent = HostGradient; | ||
using DeviceCurrent = DeviceGradient; | ||
|
||
// Direction of index offset when derivatives are taken on staggered grids. | ||
// See `StaggeredDerivative` in finite_differences.cuh for more info. | ||
enum StaggeredGridDirection { Left, Central, Right }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters