6#include <kernel/voxel_assembly/defo_assembler.hpp> 
    7#include <kernel/lafem/matrix_gather_scatter_helper.hpp> 
   11  namespace VoxelAssembly
 
   16      template<
typename Space_, 
typename DT_, 
typename IT_, FEAT::Intern::MatrixGatherScatterPolicy pol_ = FEAT::Intern::MatrixGatherScatterPolicy::useLocalOps>
 
   17      void defo_assembler_matrix1_csr_host(DT_*  matrix_data,
 
   18                const IT_*  matrix_row_ptr, 
const IT_*  matrix_col_idx, 
Index matrix_num_rows, 
Index matrix_num_cols,
 
   20                const DT_*  cub_wg, 
int num_cubs, DT_ alpha,
 
   21                const IT_*  cell_to_dof, [[maybe_unused]] 
Index cell_num,
 
   23                const int*  coloring_map, 
Index coloring_size,
 
   24                const IT_* cell_to_dof_sorter, DT_ nu)
 
   27        typedef Space_ SpaceType;
 
   29        typedef IT_ IndexType;
 
   33        constexpr int dim = SpaceHelp::dim;
 
   36        constexpr int num_loc_dofs = SpaceType::DofMappingType::dof_count;
 
   38        constexpr int num_loc_verts = SpaceType::MeshType::template IndexSet<dim, 0>::Type::num_indices;
 
   47        FEAT_PRAGMA_OMP(parallel 
for)
 
   48        for(
Index idx = 0; idx < coloring_size; ++idx)
 
   53          LocalMatrixType loc_mat;
 
   55          IndexType cell = IndexType(coloring_map[idx]);
 
   58          const IndexType* local_dofs = cell_to_dof + cell*num_loc_dofs;
 
   59          const IndexType* local_dof_sorter = cell_to_dof_sorter + cell*num_loc_dofs;
 
   61          SpaceHelp::set_coefficients(local_coeffs, local_dofs_w, nodes, cell);
 
   64          VoxelAssembly::Kernel::defo_assembly_kernel<SpaceHelp, LocalMatrixType>(loc_mat, local_coeffs, cub_pt, cub_wg, num_cubs, nu);
 
   67          LAFEM::template MatrixGatherScatterHelper<SpaceType, DataType, IndexType, pol_>::scatter_matrix_csr(loc_mat, (MatValueType*)matrix_data, local_dofs, local_dofs, IndexType(matrix_num_rows), IndexType(matrix_num_cols), matrix_row_ptr, matrix_col_idx, alpha, local_dof_sorter);
 
   74      template<
typename Space_, 
typename DT_, 
typename IT_>
 
   75      void assemble_defo_csr_host([[maybe_unused]] 
const Space_& space,
 
   79              const std::vector<int*>& coloring_maps,
 
   80              const std::vector<Index>& coloring_map_sizes,
 
   83        for(
Index col = 0; col < 
Index(coloring_maps.size()); ++col)
 
   85          VoxelAssembly::Kernel::template defo_assembler_matrix1_csr_host<Space_, DT_, IT_, FEAT::Intern::MatrixGatherScatterPolicy::useLocalSortHelper>(
 
   86            matrix_data.data, matrix_data.row_ptr, matrix_data.col_idx, matrix_data.num_rows, matrix_data.num_cols,
 
   90            (
const int*) coloring_maps[col], coloring_map_sizes[col], dof_mapping.
cell_to_dof_sorter, nu
 
  105                                          const std::vector<int*>&, 
const std::vector<Index>&, 
double, 
double);
 
  107                                          const std::vector<int*>&, 
const std::vector<Index>&, 
float, 
float);
 
  109                                          const std::vector<int*>&, 
const std::vector<Index>&, 
double, 
double);
 
  111                                          const std::vector<int*>&, 
const std::vector<Index>&, 
float, 
float);
 
  116                                          const std::vector<int*>&, 
const std::vector<Index>&, 
double, 
double);
 
  118                                          const std::vector<int*>&, 
const std::vector<Index>&, 
float, 
float);
 
  120                                          const std::vector<int*>&, 
const std::vector<Index>&, 
double, 
double);
 
  122                                          const std::vector<int*>&, 
const std::vector<Index>&, 
float, 
float);
 
Standard Lagrange-2 Finite-Element space class template.
Tiny Matrix class template.
Tiny Vector class template.
Namespace for different voxel based assembly methods.
std::uint64_t Index
Index data type.
A data field for a cubature rule.
const DT_ * cub_wg
The cubature weights.
int num_cubs
Number of cubtaure points.
const void * cub_pt
The cubature point data array.
A data field for all necessary values that define the dof mapping for assembly.
Index cell_num
The number of cells.
const IT_ * cell_to_dof
The cell to dof, where cell_to_dof[i],..., cell_to_dof[i+cell_dofs-1] are the dofs of one cell.
Index node_size
The number of nodes.
const IT_ * cell_to_dof_sorter
Array of sortingindices of cell_to_dof.
const void * nodes
An array of the nodes fitting to the cell_to_dof mapping.