57 Source(
const mxArray *ptr,
int dim1,
int dim2,
const std::string &name);
62 std::complex<double> operator[](
SourceIndex index)
const {
63 return std::complex<double>(
64 real[index.cell_c][index.cell_b][index.split_field_ID],
65 imag[index.cell_c][index.cell_b][index.split_field_ID]);
81 return std::complex<double>(0., 0.);
83 return operator[](index);
Container for {ijk} or {IJK} grouped variables.
The Source class stores values of the Source field across a particular plane.
Definition source.h:48
bool no_data_stored
Definition source.h:51
double *** imag
Imag data for the source term.
Definition source.h:55
std::complex< double > value_or_zero_if_empty(SourceIndex index) const
Return the value at the index provided if the Source is nonempty, otherwise return 0 if the Source is...
Definition source.h:79
bool is_empty() const
Check if the source term is empty (true) or not (false)
Definition source.h:60
double *** real
Real data for the source term.
Definition source.h:54
Includes MATLAB headers for I/O.
Typedef for providing indices to the Source class.
Definition source.h:22
int split_field_ID
Index of the split field.
Definition source.h:23
int cell_c
Index in the major (C-)axis.
Definition source.h:25
int cell_b
Index in the minor (B-)axis.
Definition source.h:24