Trait rusty_green_kernel::evaluators::base::ComplexDirectEvaluator [−][src]
pub trait ComplexDirectEvaluator: DirectEvaluatorAccessor { fn assemble_in_place(
&self,
result: ArrayViewMut2<'_, Complex<Self::FloatingPointType>>,
threading_type: ThreadingType
); fn evaluate_in_place(
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
result: ArrayViewMut3<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
); fn assemble(
&self,
threading_type: ThreadingType
) -> Array2<Complex<Self::FloatingPointType>>; fn evaluate(
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
) -> Array3<Complex<Self::FloatingPointType>>; }
Assemblers and evaluators for complex kernels.
Required methods
fn assemble_in_place(
&self,
result: ArrayViewMut2<'_, Complex<Self::FloatingPointType>>,
threading_type: ThreadingType
)
[src]
&self,
result: ArrayViewMut2<'_, Complex<Self::FloatingPointType>>,
threading_type: ThreadingType
)
Assemble the kernel matrix in-place.
Arguments
result
- A complex array of dimension(ntargets, nsources)
that contains the Green’s function evaluations between sources and targets. Note. The array must already have the right shape upon calling the function.threading_type
- Determines whether the routine should use multithreadingThreadingType::Parallel
or serial exectutionThreadingType::Serial
.
fn evaluate_in_place(
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
result: ArrayViewMut3<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
)
[src]
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
result: ArrayViewMut3<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
)
Evaluate for each target the potential sum across all sources with given charges.
Arguments
charges
- A complex array of dimension(ncharge_vecs, nsources)
that containsncharge_vec
vectors of charges in the rows, each of which hasnsources
entries.result
- A complex array of shape(ncharge_vecs, ntargets, 1)
if only Greens fct. values are requested or of shape(ncharge_vecs, ntargets, 4)
if function values and gradients are requested. The valueresult[i][j][0]
contains the potential sum evaluated at the jth target, using the ith charge vector. The valuesresult[i][j][k]
for k=1,..,3 contain the corresponding gradient in the x, y, and z coordinate direction.eval_mode
- EitherEvalMode::Value
to only return function values orEvalMode::ValueGrad
to return function values and derivatives.threading_type
- EitherThreadingType::Parallel
for parallel execution orThreadingType::Serial
for serial execution. The enumThreadingType
is defined in the packagerusty-kernel-tools
.
fn assemble(
&self,
threading_type: ThreadingType
) -> Array2<Complex<Self::FloatingPointType>>
[src]
&self,
threading_type: ThreadingType
) -> Array2<Complex<Self::FloatingPointType>>
Like assemble_in_place
, but creates and returns a new result array.
fn evaluate(
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
) -> Array3<Complex<Self::FloatingPointType>>
[src]
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
) -> Array3<Complex<Self::FloatingPointType>>
Like evaluate_in_place
but creates and returns a new result array.
Implementors
impl<P: ParticleContainerAccessor> ComplexDirectEvaluator for DirectEvaluator<P, Complex<P::FloatingPointType>>
[src]
impl<P: ParticleContainerAccessor> ComplexDirectEvaluator for DirectEvaluator<P, Complex<P::FloatingPointType>>
[src]fn assemble_in_place(
&self,
result: ArrayViewMut2<'_, Complex<Self::FloatingPointType>>,
threading_type: ThreadingType
)
[src]
&self,
result: ArrayViewMut2<'_, Complex<Self::FloatingPointType>>,
threading_type: ThreadingType
)
fn evaluate_in_place(
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
result: ArrayViewMut3<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
)
[src]
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
result: ArrayViewMut3<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
)
fn assemble(
&self,
threading_type: ThreadingType
) -> Array2<Complex<Self::FloatingPointType>>
[src]
&self,
threading_type: ThreadingType
) -> Array2<Complex<Self::FloatingPointType>>
fn evaluate(
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
) -> Array3<Complex<Self::FloatingPointType>>
[src]
&self,
charges: ArrayView2<'_, Complex<Self::FloatingPointType>>,
eval_mode: &EvalMode,
threading_type: ThreadingType
) -> Array3<Complex<Self::FloatingPointType>>