Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c0eb1d1
ReadMe change try
Feb 20, 2024
628a817
Merge branch 'playground'
Feb 20, 2024
e55d782
Merge branch 'master' of https://github.com/IgANets/iganet
Mar 11, 2024
253c833
Merge branch 'master' of https://github.com/IgANets/iganet
Mar 20, 2024
4c9e31c
Merge branch 'master' of https://github.com/IgANets/iganet
Mar 22, 2024
c3af52d
Merge branch 'master' of https://github.com/IgANets/iganet
Mar 26, 2024
df8b015
Merge branch 'master' of https://github.com/IgANets/iganet
Apr 3, 2024
e3335fe
Merge branch 'master' of https://github.com/IgANets/iganet
Apr 29, 2024
b838a1a
Merge branch 'master' of https://github.com/IgANets/iganet
May 21, 2024
9982d89
Unittests for NURBS
May 22, 2024
3604ecc
Unittest BsplineLib extended for NURBS
May 22, 2024
3255515
Nurbs up to 1st deriv, not memory optimized, not precomputed
May 22, 2024
ac09a4b
geoDim == 4 and stricter tolerances in NURBS unittests
May 23, 2024
05f8051
Load from .dat-file added
May 24, 2024
e0a44d1
Merge branch 'master' of https://github.com/IgANets/iganet
May 28, 2024
29dc380
Merge branch 'master' into nurbs
May 28, 2024
d4a75dc
Merge branch 'master' into nurbs (2/2)
May 28, 2024
8ec3148
NURBS adapted for dimension independent implementation
May 28, 2024
bbd8e28
Memory-optimized avoided and error for eval_from_precomputed
May 28, 2024
f5cef2b
Clean Up (1/2)
May 28, 2024
0e37bc5
Clean up (2/2)
May 28, 2024
49eff97
Merge branch master into nurbs 3
May 28, 2024
e6ac201
NURBS finalized, not yet memory optimized and eval_from_precomputed e…
May 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions include/boundary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ class BoundaryCore<Spline, /* parDim */ 1> : public utils::Serializable,
inline auto &from_full_tensor(const torch::Tensor &tensor) {

if (tensor.dim() > 1) {
auto tensor_view = tensor.view({Spline::geoDim(), -1, tensor.size(-1)});
auto tensor_view = tensor.view({Spline::controlPointDim(), -1, tensor.size(-1)});

side<west>().from_tensor(tensor_view.index({torch::indexing::Slice(), 0})
.reshape({-1, tensor.size(-1)}));
side<east>().from_tensor(tensor_view.index({torch::indexing::Slice(), -1})
.reshape({-1, tensor.size(-1)}));
} else {
auto tensor_view = tensor.view({Spline::geoDim(), -1});
auto tensor_view = tensor.view({Spline::controlPointDim(), -1});

side<west>().from_tensor(
tensor_view.index({torch::indexing::Slice(), 0}).flatten());
Expand Down Expand Up @@ -319,7 +319,7 @@ class BoundaryCore<Spline, /* parDim */ 2> : public utils::Serializable,

if (tensor.dim() > 1) {
auto tensor_view =
tensor.view({Spline::geoDim(), side<west>().ncoeffs(0),
tensor.view({Spline::controlPointDim(), side<west>().ncoeffs(0),
side<south>().ncoeffs(0), tensor.size(-1)});

side<west>().from_tensor(
Expand All @@ -339,7 +339,7 @@ class BoundaryCore<Spline, /* parDim */ 2> : public utils::Serializable,
.index({torch::indexing::Slice(), -1, torch::indexing::Slice()})
.reshape({-1, tensor.size(-1)}));
} else {
auto tensor_view = tensor.view({Spline::geoDim(), side<west>().ncoeffs(0),
auto tensor_view = tensor.view({Spline::controlPointDim(), side<west>().ncoeffs(0),
side<south>().ncoeffs(0)});

side<west>().from_tensor(
Expand Down Expand Up @@ -584,7 +584,7 @@ class BoundaryCore<Spline, /* parDim */ 3> : public utils::Serializable,

if (tensor.dim() > 1) {
auto tensor_view = tensor.view(
{Spline::geoDim(), side<west>().ncoeffs(1), side<west>().ncoeffs(0),
{Spline::controlPointDim(), side<west>().ncoeffs(1), side<west>().ncoeffs(0),
side<south>().ncoeffs(0), tensor.size(-1)});

side<west>().from_tensor(
Expand Down Expand Up @@ -619,7 +619,7 @@ class BoundaryCore<Spline, /* parDim */ 3> : public utils::Serializable,
.reshape({-1, tensor.size(-1)}));
} else {
auto tensor_view =
tensor.view({Spline::geoDim(), side<west>().ncoeffs(1),
tensor.view({Spline::controlPointDim(), side<west>().ncoeffs(1),
side<west>().ncoeffs(0), side<south>().ncoeffs(0)});

side<west>().from_tensor(
Expand Down Expand Up @@ -919,7 +919,7 @@ class BoundaryCore<Spline, /* parDim */ 4> : public utils::Serializable,

if (tensor.dim() > 1) {
auto tensor_view = tensor.view(
{Spline::geoDim(), side<west>().ncoeffs(2), side<west>().ncoeffs(1),
{Spline::controlPointDim(), side<west>().ncoeffs(2), side<west>().ncoeffs(1),
side<west>().ncoeffs(0), side<south>().ncoeffs(0), tensor.size(-1)});

side<west>().from_tensor(
Expand Down Expand Up @@ -964,7 +964,7 @@ class BoundaryCore<Spline, /* parDim */ 4> : public utils::Serializable,
.reshape({-1, tensor.size(-1)}));
} else {
auto tensor_view = tensor.view(
{Spline::geoDim(), side<west>().ncoeffs(2), side<west>().ncoeffs(1),
{Spline::controlPointDim(), side<west>().ncoeffs(2), side<west>().ncoeffs(1),
side<west>().ncoeffs(0), side<south>().ncoeffs(0)});

side<west>().from_tensor(
Expand Down Expand Up @@ -1172,7 +1172,7 @@ template <typename BoundaryCore> class BoundaryCommon : public BoundaryCore {
(std::get<Is>(BoundaryCore::bdr_)
.from_tensor(tensor.index({torch::indexing::Slice(
start, end(std::get<Is>(BoundaryCore::bdr_).ncumcoeffs() *
std::get<Is>(BoundaryCore::bdr_).geoDim()))})),
std::get<Is>(BoundaryCore::bdr_).controlPointDim()))})),
...);

return *this;
Expand Down
Loading