IgANet
IGAnets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
matrix.hpp File Reference

Matrix utility functions. More...

#include <core/core.hpp>
#include <utils/tensorarray.hpp>

Go to the source code of this file.

Namespaces

namespace  iganet
 
namespace  iganet::utils
 

Functions

torch::Tensor iganet::utils::to_sparseCsrTensor (const torch::Tensor &col_indices, const torch::Tensor &values, const torch::IntArrayRef &size)
 Constructs a sparse-CSR matrix from the column indices, matrix values and the matrix size.
 
template<std::size_t N>
torch::Tensor iganet::utils::to_sparseCsrTensor (const utils::TensorArray< N > &col_indices, const std::array< int64_t, N > &nbasfuncs, const torch::Tensor &values, const torch::IntArrayRef &size)
 Constructs a sparse-CSR matrix from the column indices, matrix values and the matrix size.
 
template<std::size_t N>
torch::Tensor iganet::utils::to_sparseCsrTensor (const utils::TensorArray< N > &knot_indices, const std::array< short, N > &degrees, const std::array< int64_t, N > &nbasfuncs, const torch::Tensor &values, const torch::IntArrayRef &size)
 Constructs a sparse-CSR matrix from the B-spline basis function values evaluated at discrete points (e.g., the Greville abscissae), the corresponding knot_indices (i.e. the list of knot indices that mark the start of the knot span the discrete points fall into), the B-spline degrees and the matrix size.
 

Detailed Description

Matrix utility functions.

Author
Matthias Moller

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.