BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
fn_BZ_inv.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_INV_HPP
13
#define BELFEM_FN_BZ_INV_HPP
14
15
#include "
blaze_config.hpp
"
16
#include <blaze/math/functors/Inv.h>
17
#include <blaze/math/typetraits/IsMatrix.h>
18
#include "
cl_BZ_Matrix.hpp
"
19
20
namespace
belfem
21
{
22
//------------------------------------------------------------------------------
23
24
// blaze::inv() is lazy. Left lazy, blaze restructures B * inv( A ) into
25
// trans( solve( trans( A ), trans( B ) ) ) and writes the result through a
26
// DMatTransposer, whose resize() forwards ( m, n ) unswapped -- so a
27
// non-square B silently transposes the destination. Evaluating here matches
28
// the armadillo backend and keeps the operand shapes honest.
29
//
30
// The IsMatrix_v guard is load bearing: blaze::inv() also has a scalar
31
// overload that accepts anything, so an unconstrained template would
32
// swallow belfem::Matrix and hide the wrappers in fn_inv.hpp.
33
template
<
typename
T,
typename
= blaze::EnableIf_t< blaze::IsMatrix_v< T > > >
34
blaze::DynamicMatrix< blaze::ElementType_t< T >,
BLAZE_DEFAULT_STORAGE_ORDER
>
35
inv
(
const
T & aExpression )
36
{
37
return
blaze::inv( aExpression );
38
}
39
40
//------------------------------------------------------------------------------
41
}
42
43
#endif
//BELFEM_FN_BZ_INV_HPP
blaze_config.hpp
BLAZE_DEFAULT_STORAGE_ORDER
#define BLAZE_DEFAULT_STORAGE_ORDER
Definition
blaze_config.hpp:55
cl_BZ_Matrix.hpp
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::inv
auto inv(const T &aExpression) -> decltype(arma::inv(aExpression))
Definition
fn_AR_inv.hpp:22
src
linalg
blaze
fn_BZ_inv.hpp
Generated by
1.18.0