IgANet
IGAnets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
unittest_blocktensor.cxx File Reference
#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)
 

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   
)