OGS
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace 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
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
z
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
l
m
n
p
r
s
t
v
y
Classes
Class List
Class Index
Class Hierarchy
Files
File List
File Members
All
a
b
c
d
e
f
g
i
k
m
n
o
p
r
s
t
v
w
x
Functions
a
c
d
e
f
g
i
m
o
p
r
s
t
v
w
Variables
Typedefs
Enumerations
Macros
b
c
g
m
n
o
p
r
s
t
▼
OGS
►
OpenGeoSys 6.5.4-459-g9069bbaf1bf source code documentation
►
OGS CTests—Project Files
►
OGS Input File Parameters—Quality Assurance
►
OGS Input File Parameters
BulkMappingDocuPage
Todo List
OGS Input File Parameters—List of incomplete documentation pages
Bibliography
►
Namespaces
►
Classes
▼
Files
▼
File List
►
Applications
►
BaseLib
►
build
►
ChemistryLib
Documentation
►
GeoLib
►
InfoLib
►
MaterialLib
▼
MathLib
►
Curve
►
Integration
►
InterpolationAlgorithms
▼
LinAlg
►
Eigen
►
EigenLis
▼
Lis
►
LisCheck.h
►
LisMatrix.cpp
►
LisMatrix.h
LisVector.cpp
►
LisVector.h
►
PETSc
ApplyKnownSolution.h
►
FinalizeMatrixAssembly.h
►
FinalizeVectorAssembly.h
►
GlobalLinearSolverType.h
►
GlobalMatrixVectorTypes.h
►
LinAlg.cpp
►
LinAlg.h
►
LinAlgEnums.cpp
►
LinAlgEnums.h
►
LinearSolverBehaviour.h
►
LinearSolverOptions.cpp
►
LinearSolverOptions.h
LinearSolverOptionsParser.h
►
MatrixSpecifications.h
MatrixVectorTraits.cpp
►
MatrixVectorTraits.h
►
RowColumnIndices.h
►
SetMatrixSparsity.h
►
SparsityPattern.h
►
UnifiedMatrixSetters.cpp
►
UnifiedMatrixSetters.h
►
Nonlinear
►
ODE
►
EigenBlockMatrixView.h
FormattingUtils.cpp
►
FormattingUtils.h
►
GeometricBasics.cpp
►
GeometricBasics.h
►
KahanSum.h
►
KelvinVector-impl.h
►
KelvinVector.cpp
►
KelvinVector.h
►
MathTools.cpp
►
MathTools.h
►
Point3d.cpp
►
Point3d.h
►
Point3dWithID.h
►
VectorizedTensor.cpp
►
VectorizedTensor.h
►
WeightedPoint.cpp
►
WeightedPoint.h
►
MeshGeoToolsLib
►
MeshLib
►
MeshToolsLib
►
NumLib
►
ParameterLib
►
ProcessLib
►
File Members
LisVector.cpp
Go to the documentation of this file.
1
15
#include "
LisVector.h
"
16
17
#include "
LisCheck.h
"
18
19
namespace
MathLib
20
{
21
LisVector::LisVector
(std::size_t length)
22
{
23
lis_vector_create(0, &
vec_
);
24
lis_vector_set_size(
vec_
, 0, length);
25
}
21
LisVector::LisVector
(std::size_t length) {
…
}
26
27
LisVector::LisVector
(std::size_t length,
double
* data)
28
{
29
lis_vector_create(0, &
vec_
);
30
lis_vector_set_size(
vec_
, 0, length);
31
for
(std::size_t i = 0; i < length; i++)
32
lis_vector_set_value(LIS_INS_VALUE, i, data[i],
vec_
);
33
}
27
LisVector::LisVector
(std::size_t length,
double
* data) {
…
}
34
35
LisVector::LisVector
(
LisVector
const
& src)
36
{
37
lis_vector_duplicate(src.
vec_
, &
vec_
);
38
lis_vector_copy(src.
vec_
,
vec_
);
39
}
35
LisVector::LisVector
(
LisVector
const
& src) {
…
}
40
41
LisVector::~LisVector
()
42
{
43
lis_vector_destroy(
vec_
);
44
}
41
LisVector::~LisVector
() {
…
}
45
46
std::size_t
LisVector::size
()
const
47
{
48
IndexType
dummy;
49
IndexType
size
;
50
int
const
ierr = lis_vector_get_size(
vec_
, &dummy, &
size
);
51
checkLisError
(ierr);
52
assert(
size
>= 0);
// For safe implicit conversion to std::size_t.
53
return
size
;
54
}
46
std::size_t
LisVector::size
()
const
{
…
}
55
56
void
LisVector::write
(
const
std::string& filename)
const
57
{
58
lis_output_vector(
vec_
, LIS_FMT_PLAIN,
const_cast<
char
*
>
(filename.c_str()));
59
}
56
void
LisVector::write
(
const
std::string& filename)
const
{
…
}
60
61
}
// namespace MathLib
LisCheck.h
LisVector.h
Definition of the LisVector class.
MathLib::LisVector
Lis vector wrapper class.
Definition
LisVector.h:29
MathLib::LisVector::LisVector
LisVector(std::size_t length)
Definition
LisVector.cpp:21
MathLib::LisVector::write
void write(const std::string &filename) const
printout this equation for debugging
Definition
LisVector.cpp:56
MathLib::LisVector::~LisVector
virtual ~LisVector()
Definition
LisVector.cpp:41
MathLib::LisVector::size
std::size_t size() const
return a vector length
Definition
LisVector.cpp:46
MathLib::LisVector::vec_
LIS_VECTOR vec_
Definition
LisVector.h:123
MathLib::LisVector::IndexType
LIS_INT IndexType
Definition
LisVector.h:31
MathLib
Definition
CreateComponent.h:32
MathLib::checkLisError
bool checkLisError(int err)
Definition
LisCheck.h:31
MathLib
LinAlg
Lis
LisVector.cpp
Generated by
1.12.0