BELFEM
0.9.4
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
fn_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
21
29
30
#ifndef BELFEM_FN_INV_HPP
31
#define BELFEM_FN_INV_HPP
32
33
#include "
assert.hpp
"
34
#ifdef BELFEM_ARMADILLO
35
#include "
fn_AR_inv.hpp
"
36
#elif BELFEM_BLAZE
37
#include "
fn_BZ_inv.hpp
"
38
#endif
39
40
namespace
belfem
41
{
42
43
//------------------------------------------------------------------------------
44
template
<
typename
T >
45
auto
46
inv
(
const
Matrix< T >
& aA )
47
->
decltype
(
inv
( aA.matrix_data()))
const
48
{
49
BELFEM_ASSERT
( aA.n_rows() == aA.n_cols(),
50
"inv(): matrix must be square ( %lu x %lu )"
,
51
(
unsigned
long
) aA.n_rows(), (
unsigned
long
) aA.n_cols() );
52
return
inv
( aA.matrix_data());
53
}
54
55
//------------------------------------------------------------------------------
56
57
template
<
typename
T >
58
auto
59
inv
(
Matrix< T >
& aA )
60
->
decltype
(
inv
( aA.matrix_data() ) )
61
{
62
BELFEM_ASSERT
( aA.n_rows() == aA.n_cols(),
63
"inv(): matrix must be square ( %lu x %lu )"
,
64
(
unsigned
long
) aA.n_rows(), (
unsigned
long
) aA.n_cols() );
65
return
inv
( aA.matrix_data() );
66
}
67
68
//------------------------------------------------------------------------------
69
}
70
71
#endif
//BELFEM_FN_INV_HPP
assert.hpp
BELFEM_ASSERT
#define BELFEM_ASSERT(aCheck,...)
Definition
assert.hpp:244
belfem::Matrix
Dense column-major matrix.
Definition
cl_BZ_Matrix.hpp:28
fn_AR_inv.hpp
fn_BZ_inv.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
fn_inv.hpp
Generated by
1.18.0