IgANet
IgANets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
unittest_blocktensor.cxx File Reference

Compile-time block-tensor unittests. More...

#include <iganet.h>
#include <iostream>
#include <gtest/gtest.h>

Macros

#define test_binary_op(op, A, B, ...)
 
#define test_binary_special_op(op, A, B, ...)
 
#define test_ternary_op(op, A, B, C, ...)
 
#define test_ternary_special_op(op, A, B, C, ...)
 
#define test_unary_op(op, A, ...)
 
#define test_unary_special_op(op, A, ...)
 

Functions

int main (int argc, char **argv)
 
 TEST (BlockTensor, BlockTensor)
 
 TEST (BlockTensor, BlockTensor_ops)
 

Detailed Description

Compile-time block-tensor unittests.

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/.

Macro Definition Documentation

◆ test_binary_op

#define test_binary_op (   op,
  A,
  B,
  ... 
)
Value:
EXPECT_TRUE(torch::equal(iganet::utils::op((A), (B), ##__VA_ARGS__)(0, 0), \
torch::op((A)(0, 0), (B)(0, 0), ##__VA_ARGS__)))

◆ test_binary_special_op

#define test_binary_special_op (   op,
  A,
  B,
  ... 
)
Value:
EXPECT_TRUE( \
torch::equal(iganet::utils::op((A), (B), ##__VA_ARGS__)(0, 0), \
torch::special::op((A)(0, 0), (B)(0, 0), ##__VA_ARGS__)))

◆ test_ternary_op

#define test_ternary_op (   op,
  A,
  B,
  C,
  ... 
)
Value:
EXPECT_TRUE( \
torch::equal(iganet::utils::op((A), (B), (C), ##__VA_ARGS__)(0, 0), \
torch::op((A)(0, 0), (B)(0, 0), (C)(0, 0), ##__VA_ARGS__)))

◆ test_ternary_special_op

#define test_ternary_special_op (   op,
  A,
  B,
  C,
  ... 
)
Value:
EXPECT_TRUE(torch::equal( \
iganet::utils::op((A), (B), (C), ##__VA_ARGS__)(0, 0), \
torch::special::op((A)(0, 0), (B)(0, 0), (C)(0, 0), ##__VA_ARGS__)))

◆ test_unary_op

#define test_unary_op (   op,
  A,
  ... 
)
Value:
EXPECT_TRUE(torch::equal(iganet::utils::op((A), ##__VA_ARGS__)(0, 0), \
torch::op((A)(0, 0), ##__VA_ARGS__)))

◆ test_unary_special_op

#define test_unary_special_op (   op,
  A,
  ... 
)
Value:
EXPECT_TRUE(torch::equal(iganet::utils::op((A), ##__VA_ARGS__)(0, 0), \
torch::special::op((A)(0, 0), ##__VA_ARGS__)))

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ TEST() [1/2]

TEST ( BlockTensor  ,
BlockTensor   
)

◆ TEST() [2/2]

TEST ( BlockTensor  ,
BlockTensor_ops   
)