BELFEM
0.9.4
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
fn_BZ_cross.hpp
Go to the documentation of this file.
1
/*
2
* BELFEM -- The Berkeley Lab Finite Element Framework
3
* Copyright (c) 2026, The Regents of the University of California,
4
* through Lawrence Berkeley National Laboratory (subject to receipt of any required
5
* approvals from the U.S. Dept. of Energy). All rights reserved.
6
*
7
* Developers: Christian Messe, Gregory Giard
8
*
9
* See the top-level LICENSE file for the complete license and disclaimer.
10
*/
11
12
#ifndef BELFEM_FN_BZ_CROSS_HPP
13
#define BELFEM_FN_BZ_CROSS_HPP
14
15
#include "
assert.hpp
"
16
#include "
cl_BZ_Vector.hpp
"
17
18
namespace
belfem
19
{
20
//------------------------------------------------------------------------------
21
22
template
<
typename
ET >
23
auto
24
cross
(
const
ET & aA,
const
ET & aB )
25
->
decltype
( blaze::cross( aA, aB ))
26
{
27
return
blaze::cross( aA, aB );
28
}
29
30
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
31
32
template
<
typename
T,
typename
ET >
33
auto
34
cross
(
const
Vector<T>
& aA,
const
ET & aB )
35
->
decltype
( blaze::cross( aA.vector_data(), aB ))
36
{
37
BELFEM_ASSERT
( aA.length() == 3,
"cross(): the vector must have a length of 3"
);
38
return
blaze::cross( aA.vector_data(), aB );
39
}
40
41
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
42
43
template
<
typename
ET,
typename
T >
44
auto
45
cross
(
const
ET & aA,
const
Vector<T>
& aB )
46
->
decltype
( blaze::cross( aA, aB.vector_data()))
47
{
48
BELFEM_ASSERT
( aB.length() == 3,
"cross(): the vector must have a length of 3"
);
49
return
blaze::cross( aA, aB.vector_data() );
50
}
51
52
//------------------------------------------------------------------------------
53
}
54
55
#endif
//BELFEM_FN_BZ_CROSS_HPP
assert.hpp
BELFEM_ASSERT
#define BELFEM_ASSERT(aCheck,...)
Definition
assert.hpp:244
cl_BZ_Vector.hpp
belfem::Vector
Column vector.
Definition
cl_BZ_Vector.hpp:42
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::cross
auto cross(const ET &aA, const ET &aB) -> decltype(arma::cross(aA, aB))
Definition
fn_AR_cross.hpp:24
src
linalg
blaze
fn_BZ_cross.hpp
Generated by
1.18.0