Solver< DeviceType > Struct Template Reference

Kynema API: kynema::Solver< DeviceType > Struct Template Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
kynema::Solver< DeviceType > Struct Template Reference

This object manages the assembly and solution of linear system arising from the generalized-alpha based time integration of the dynamic structural problem. More...

#include <solver.hpp>

Public Types

using ValueType = double
 
using HandleType = dss::Handle< algorithm >
 
using IndexType = int
 
using CrsMatrixType = KokkosSparse::CrsMatrix< ValueType, IndexType, DeviceType, void, IndexType >
 
using MultiVectorType = Kokkos::View< ValueType *[1], Kokkos::LayoutLeft, DeviceType >
 
template<typename value_type >
using View = Kokkos::View< value_type, DeviceType >
 
template<typename value_type >
using ConstView = typename View< value_type >::const_type
 

Public Member Functions

 Solver (const ConstView< size_t * > &node_IDs, const ConstView< size_t * > &active_dofs, const ConstView< size_t * > &node_freedom_map_table, const ConstView< size_t * > &num_nodes_per_element, const ConstView< size_t ** > &node_state_indices, size_t num_constraint_dofs, const ConstView< size_t * > &base_active_dofs, const ConstView< size_t * > &target_active_dofs, const ConstView< size_t *[6]> &constraint_base_node_freedom_table, const ConstView< size_t *[6]> &constraint_target_node_freedom_table, const ConstView< Kokkos::pair< size_t, size_t > * > &constraint_row_range)
 Constructs the sparse matrix structure for the provided connectivity information and performs the sparse direct solver's symbolic factorization step, which initializes its internal data structures.
 

Public Attributes

size_t num_system_nodes
 
size_t num_system_dofs
 
size_t num_dofs
 
CrsMatrixType A
 
MultiVectorType b
 
MultiVectorType x
 
HandleType handle
 
std::vector< doubleconvergence_err
 

Static Public Attributes

static constexpr bool use_device = false
 
static constexpr dss::Algorithm algorithm_device = dss::Algorithm::NONE
 
static constexpr dss::Algorithm algorithm_host = dss::Algorithm::NONE
 
static constexpr dss::Algorithm algorithm
 

Detailed Description

template<typename DeviceType>
struct kynema::Solver< DeviceType >

This object manages the assembly and solution of linear system arising from the generalized-alpha based time integration of the dynamic structural problem.

Member Typedef Documentation

◆ ConstView

template<typename DeviceType >
template<typename value_type >
using kynema::Solver< DeviceType >::ConstView = typename View<value_type>::const_type

◆ CrsMatrixType

template<typename DeviceType >
using kynema::Solver< DeviceType >::CrsMatrixType = KokkosSparse::CrsMatrix<ValueType, IndexType, DeviceType, void, IndexType>

◆ HandleType

template<typename DeviceType >
using kynema::Solver< DeviceType >::HandleType = dss::Handle<algorithm>

◆ IndexType

template<typename DeviceType >
using kynema::Solver< DeviceType >::IndexType = int

◆ MultiVectorType

template<typename DeviceType >
using kynema::Solver< DeviceType >::MultiVectorType = Kokkos::View<ValueType* [1], Kokkos::LayoutLeft, DeviceType>

◆ ValueType

template<typename DeviceType >
using kynema::Solver< DeviceType >::ValueType = double

◆ View

template<typename DeviceType >
template<typename value_type >
using kynema::Solver< DeviceType >::View = Kokkos::View<value_type, DeviceType>

Constructor & Destructor Documentation

◆ Solver()

template<typename DeviceType >
kynema::Solver< DeviceType >::Solver ( const ConstView< size_t * > &  node_IDs,
const ConstView< size_t * > &  active_dofs,
const ConstView< size_t * > &  node_freedom_map_table,
const ConstView< size_t * > &  num_nodes_per_element,
const ConstView< size_t ** > &  node_state_indices,
size_t  num_constraint_dofs,
const ConstView< size_t * > &  base_active_dofs,
const ConstView< size_t * > &  target_active_dofs,
const ConstView< size_t *[6]> &  constraint_base_node_freedom_table,
const ConstView< size_t *[6]> &  constraint_target_node_freedom_table,
const ConstView< Kokkos::pair< size_t, size_t > * > &  constraint_row_range 
)
inline

Constructs the sparse matrix structure for the provided connectivity information and performs the sparse direct solver's symbolic factorization step, which initializes its internal data structures.

Parameters
node_IDsView containing the global IDs for each node
active_dofsView containing the number of active DoFs for each node
node_freedom_map_tableView mapping node indices to DOF indices
num_nodes_per_elementView containing number of nodes per element
node_state_indicesView containing element-to-node connectivity
num_constraint_dofsNumber of constraint degrees of freedom
base_active_dofsView containing the number of DoFs at the base node
target_active_dofsView containing the number of DoFs at the target node
constraint_base_node_freedom_tableView containing base node DOFs for constraints
constraint_target_node_freedom_tableView containing target node DOFs for constraints
constraint_row_rangeView containing row ranges for each constraint

Member Data Documentation

◆ A

template<typename DeviceType >
CrsMatrixType kynema::Solver< DeviceType >::A

◆ algorithm

template<typename DeviceType >
constexpr dss::Algorithm kynema::Solver< DeviceType >::algorithm
staticconstexpr
Initial value:
=
static constexpr dss::Algorithm algorithm_host
Definition solver.hpp:50
static constexpr dss::Algorithm algorithm_device
Definition solver.hpp:36
static constexpr bool use_device
Definition solver.hpp:35

◆ algorithm_device

template<typename DeviceType >
constexpr dss::Algorithm kynema::Solver< DeviceType >::algorithm_device = dss::Algorithm::NONE
staticconstexpr

◆ algorithm_host

template<typename DeviceType >
constexpr dss::Algorithm kynema::Solver< DeviceType >::algorithm_host = dss::Algorithm::NONE
staticconstexpr

◆ b

template<typename DeviceType >
MultiVectorType kynema::Solver< DeviceType >::b

◆ convergence_err

template<typename DeviceType >
std::vector<double> kynema::Solver< DeviceType >::convergence_err

◆ handle

template<typename DeviceType >
HandleType kynema::Solver< DeviceType >::handle

◆ num_dofs

template<typename DeviceType >
size_t kynema::Solver< DeviceType >::num_dofs

◆ num_system_dofs

template<typename DeviceType >
size_t kynema::Solver< DeviceType >::num_system_dofs

◆ num_system_nodes

template<typename DeviceType >
size_t kynema::Solver< DeviceType >::num_system_nodes

◆ use_device

template<typename DeviceType >
constexpr bool kynema::Solver< DeviceType >::use_device = false
staticconstexpr

◆ x

template<typename DeviceType >
MultiVectorType kynema::Solver< DeviceType >::x

The documentation for this struct was generated from the following file:
  • /home/runner/work/kynema/kynema/kynema/src/solver/solver.hpp