OGS
EigenVector.cpp
Go to the documentation of this file.
1
11
#include "
EigenVector.h
"
12
13
#include "
EigenMapTools.h
"
14
15
#ifndef NDEBUG
16
#include <fstream>
17
#endif
18
19
namespace
MathLib
20
{
21
void
EigenVector::copyValues
(std::vector<double>&
u
)
const
22
{
23
u
.resize(
size
());
24
toVector
(
u
) =
vec_
;
25
}
26
27
#ifndef NDEBUG
28
void
EigenVector::write
(
const
std::string& filename)
const
29
{
30
std::ofstream os(filename);
31
os <<
vec_
;
32
}
33
#endif
34
35
}
// namespace MathLib
EigenMapTools.h
EigenVector.h
MathLib::EigenVector::copyValues
void copyValues(std::vector< double > &u) const
Definition
EigenVector.cpp:21
MathLib::EigenVector::vec_
RawVectorType vec_
Definition
EigenVector.h:117
MathLib::EigenVector::size
IndexType size() const
return a vector length
Definition
EigenVector.h:42
MathLib::EigenVector::write
void write(const std::string &filename) const
write this vector to a file for debugging
Definition
EigenVector.cpp:28
MathLib
Definition
CreateComponent.h:32
MathLib::toVector
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.
Definition
EigenMapTools.h:167
MathLib::u
static const double u
Definition
GaussLegendreTet.cpp:104
MathLib
LinAlg
Eigen
EigenVector.cpp
Generated by
1.11.0