preCICE
v3.1.2
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
Typedefs
b
d
e
g
l
m
p
r
s
t
u
v
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
i
k
m
n
o
p
r
s
t
v
w
Enumerations
Enumerator
c
d
e
i
l
m
n
o
r
s
u
v
w
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
j
m
n
o
p
r
s
t
v
Functions
a
b
c
g
m
p
r
s
t
v
Variables
Typedefs
Macros
b
d
f
m
n
p
t
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
src
utils
fmtEigen.hpp
Go to the documentation of this file.
1
#include <Eigen/Core>
2
#include <
algorithm
>
3
#include <fmt/format.h>
4
#include <
sstream
>
5
#include <
utils/EigenIO.hpp
>
6
7
// Register the result of EigenDenseBase::format() as usable type
8
template
<
typename
ExpressionType>
9
struct
fmt::formatter<Eigen::WithFormat<ExpressionType>> : ostream_formatter {
10
};
9
struct
fmt::formatter<Eigen::WithFormat<ExpressionType>> : ostream_formatter {
…
};
11
12
// Register Eigen::Matrix as formattable type.
13
// We should use Eigen::DenseBase here, but this doesn't seem to work as expected.
14
// Maybe C++17 deduction guides will help with this?
15
template
<
typename
Scalar,
int
RowsAtCompileTime,
int
ColsAtCompileTime>
16
struct
fmt::formatter<Eigen::Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime>> : formatter<string_view> {
17
template
<
typename
FormatContext>
18
auto
format
(
const
Eigen::Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime> &v, FormatContext &ctx)
const
19
{
20
return
format_to(ctx.out(),
"{}"
, v.format(
precice::utils::eigenio::wkt
()));
21
}
18
auto
format
(
const
Eigen::Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime> &v, FormatContext &ctx)
const
{
…
}
22
};
16
struct
fmt::formatter<Eigen::Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime>> : formatter<string_view> {
…
};
EigenIO.hpp
algorithm
precice::utils::eigenio::wkt
Eigen::IOFormat wkt()
Definition
EigenIO.hpp:9
sstream
fmt::formatter< Eigen::Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > >::format
auto format(const Eigen::Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > &v, FormatContext &ctx) const
Definition
fmtEigen.hpp:18