DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
ArrayDOF.hpp File Reference

Degree-of-freedom array with vector-space operations (MPI-collective). More...

Include dependency graph for ArrayDOF.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DNDS::ArrayDofDeviceView< B, n_m, n_n >
 Mutable device view of an ArrayDof father/son pair. More...
 
class  DNDS::ArrayDofDeviceViewConst< B, n_m, n_n >
 Const device view of an ArrayDof father/son pair. More...
 
class  DNDS::ArrayDofOp< DeviceBackend::Host, n_m, n_n >
 Host-side static dispatcher: implements every vector-space operation declared in DNDS_ARRAY_DOF_OP_FUNC_LIST for CPU execution. More...
 
class  DNDS::ArrayDof< n_m, n_n >
 Primary solver state container: an ArrayEigenMatrix pair with MPI-collective vector-space operations. More...
 

Namespaces

namespace  DNDS
 the host side operators are provided as implemented
 

Macros

#define DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n)
 
#define DNDS_ARRAY_DOF_OP_FUNC_LIST(B, n_m, n_n, spec)
 
#define DNDS_ARRAY_OP_SWITCH_CUDA_CASE(expr)
 
#define DNDS_ARRAY_OP_SWITCHER(Backend, expr)
 
#define DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n)   ArrayDofOp<B, n_m, n_n>::
 
#define DNDS_ARRAY_DOF_OP_FUNC_SEQ_INST(B, offset, exttmp)
 

Detailed Description

Degree-of-freedom array with vector-space operations (MPI-collective).

Unit Test Coverage (test_ArrayDOF.cpp, MPI np=1,2,4)
  • setConstant (scalar and Eigen::Matrix)
  • operator+= (scalar, ArrayDof, Eigen::Matrix), operator-=, operator*= (scalar, ArrayDof element-wise, Eigen::Matrix), operator/=
  • addTo(other, scale)
  • norm2, norm2(other) (L2 distance), dot (MPI-collective)
  • min, max, sum (MPI-collective reductions)
  • componentWiseNorm1, componentWiseNorm1(other)
  • operator= (value copy), clone (deep copy)
  • Scalar-array multiply: ArrayDof<N,1> *= ArrayDof<1,1>
  • Mathematical identity: dot(x,x) == norm2(x)^2
Not Yet Tested
  • Multi-column DOFs (n_n > 1, i.e. matrix-valued DOFs)
  • Ghost communication through ArrayDof (all tests use son->Resize(0))
  • ArrayDofOp<DeviceBackend::CUDA>
  • ArrayDofSinglePack::BuildResizeFatherSon

Definition in file ArrayDOF.hpp.

Macro Definition Documentation

◆ DNDS_ARRAY_DOF_OP_FUNC_LIST

#define DNDS_ARRAY_DOF_OP_FUNC_LIST (   B,
  n_m,
  n_n,
  spec 
)
Value:
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) setConstant(t_self &self, real R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) setConstant(t_self &self, const Eigen::Ref<const t_element_mat> &R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_plus_assign(t_self &self, const t_self &R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_plus_assign(t_self &self, real R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_plus_assign(t_self &self, const Eigen::Ref<const t_element_mat> &R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_minus_assign(t_self &self, const t_self &R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_mult_assign(t_self &self, real R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_mult_assign_scalar_arr(t_self &self, const ArrayDof<1, 1> &R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_mult_assign(t_self &self, const Eigen::Ref<const t_element_mat> &R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_mult_assign(t_self &self, const t_self &R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_div_assign(t_self &self, const t_self &R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) operator_assign(t_self &self, const t_self &R); \
spec void DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) addTo(t_self &self, const t_self &R, real r); \
spec real DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) norm2(t_self &self); \
spec real DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) norm2(t_self &self, const t_self &R); \
spec real DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) reduction(t_self &self, const std::string &op); \
spec ArrayDofOp<B, n_m, n_n>::t_element_mat DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) componentWiseNorm1(t_self &self); \
spec ArrayDofOp<B, n_m, n_n>::t_element_mat DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) componentWiseNorm1(t_self &self, const t_self &R); \
spec real DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n) dot(t_self &self, const t_self &R);
#define DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE(B, n_m, n_n)
Definition ArrayDOF.hpp:65
dof1 setConstant(0.0)
tVec r(NCells)

Definition at line 66 of file ArrayDOF.hpp.

◆ DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE [1/2]

#define DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE (   B,
  n_m,
  n_n 
)

Definition at line 65 of file ArrayDOF.hpp.

◆ DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE [2/2]

#define DNDS_ARRAY_DOF_OP_FUNC_LIST_SCOPE (   B,
  n_m,
  n_n 
)    ArrayDofOp<B, n_m, n_n>::

Definition at line 65 of file ArrayDOF.hpp.

◆ DNDS_ARRAY_DOF_OP_FUNC_SEQ_INST

#define DNDS_ARRAY_DOF_OP_FUNC_SEQ_INST (   B,
  offset,
  exttmp 
)
Value:
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, 1, 1 + (offset), exttmp); \
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, 2, 1 + (offset), exttmp); \
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, 3, 1 + (offset), exttmp); \
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, 4, 1 + (offset), exttmp); \
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, 5, 1 + (offset), exttmp); \
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, 6, 1 + (offset), exttmp); \
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, 7, 1 + (offset), exttmp); \
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, 8, 1 + (offset), exttmp); \
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, DynamicSize, 1 + (offset), exttmp); \
DNDS_ARRAY_DOF_OP_FUNC_LIST(B, NonUniformSize, 1 + (offset), exttmp);
#define DNDS_ARRAY_DOF_OP_FUNC_LIST(B, n_m, n_n, spec)
Definition ArrayDOF.hpp:66

Definition at line 357 of file ArrayDOF.hpp.

◆ DNDS_ARRAY_OP_SWITCH_CUDA_CASE

#define DNDS_ARRAY_OP_SWITCH_CUDA_CASE (   expr)

Definition at line 128 of file ArrayDOF.hpp.

◆ DNDS_ARRAY_OP_SWITCHER

#define DNDS_ARRAY_OP_SWITCHER (   Backend,
  expr 
)
Value:
switch (Backend) \
{ \
case DeviceBackend::Host: \
case DeviceBackend::Unknown: \
{ \
return (t_ops<DeviceBackend::Host>::expr); \
} \
DNDS_ARRAY_OP_SWITCH_CUDA_CASE(expr) \
default: \
DNDS_assert(false); \
return (t_ops<DeviceBackend::Host>::expr); \
}

Definition at line 131 of file ArrayDOF.hpp.