Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model
2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
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
r
s
t
u
v
w
z
Variables
a
b
c
d
f
g
h
i
k
l
m
n
r
s
t
u
v
w
Typedefs
Enumerations
a
b
c
d
e
f
i
k
l
m
n
p
r
t
u
v
Enumerator
_
a
b
c
d
e
f
g
h
i
l
m
n
p
q
s
t
u
w
x
y
z
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
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
x
y
z
Typedefs
a
c
d
f
g
h
l
m
p
s
v
w
Enumerations
Enumerator
c
d
e
f
h
i
j
m
n
o
p
r
s
t
w
y
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
p
r
s
u
Variables
b
c
d
e
g
h
k
l
m
n
p
r
s
t
u
w
z
Typedefs
Macros
_
a
b
c
g
h
i
k
m
n
r
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
src
inverse
IPTwoBlockVec.hh
Go to the documentation of this file.
1
// Copyright (C) 2012, 2014, 2015, 2017, 2021 David Maxwell and Constantine Khroulev
2
//
3
// This file is part of PISM.
4
//
5
// PISM is free software; you can redistribute it and/or modify it under the
6
// terms of the GNU General Public License as published by the Free Software
7
// Foundation; either version 3 of the License, or (at your option) any later
8
// version.
9
//
10
// PISM is distributed in the hope that it will be useful, but WITHOUT ANY
11
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13
// details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with PISM; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19
#ifndef IPTWOBLOCKVEC_HH
20
#define IPTWOBLOCKVEC_HH
21
22
#include <petscis.h>
23
#include <petscvec.h>
24
25
#include "pism/util/petscwrappers/Vec.hh"
26
#include "pism/util/petscwrappers/IS.hh"
27
#include "pism/util/petscwrappers/VecScatter.hh"
28
29
namespace
pism
{
30
namespace
inverse {
31
32
class
IPTwoBlockVec
{
33
public
:
34
IPTwoBlockVec
(Vec a, Vec b);
35
~IPTwoBlockVec
() =
default
;
36
37
IS
blockAIndexSet
();
38
IS
blockBIndexSet
();
39
40
void
scatter
(Vec a, Vec b);
41
void
scatterToA
(Vec a);
42
void
scatterToB
(Vec b);
43
44
void
scatter
(Vec ab, Vec a, Vec b);
45
void
scatterToA
(Vec ab, Vec a);
46
void
scatterToB
(Vec ab, Vec b);
47
48
void
gather
(Vec a, Vec b);
49
void
gatherFromA
(Vec a);
50
void
gatherFromB
(Vec b);
51
52
void
gather
(Vec a, Vec b, Vec ab);
53
void
gatherFromA
(Vec a, Vec ab);
54
void
gatherFromB
(Vec b, Vec ab);
55
56
operator
Vec () {
57
return
m_ab
;
58
}
56
operator
Vec () {
…
}
59
60
protected
:
61
void
scatter_begin_end
(VecScatter s, Vec a, Vec b, ScatterMode m);
62
petsc::Vec
m_ab
;
63
64
PetscInt
m_na_local
,
m_na_global
,
m_nb_local
,
m_nb_global
;
65
66
petsc::IS
m_a_in_ab
;
67
petsc::IS
m_b_in_ab
;
68
69
petsc::VecScatter
m_scatter_a
;
70
petsc::VecScatter
m_scatter_b
;
71
};
32
class
IPTwoBlockVec
{
…
};
72
73
}
// end of namespace inverse
74
}
// end of namespace pism
75
76
#endif
/* end of include guard: IPTWOBLOCKVEC_HH */
pism::inverse::IPTwoBlockVec::blockBIndexSet
IS blockBIndexSet()
Definition
IPTwoBlockVec.cc:78
pism::inverse::IPTwoBlockVec::m_scatter_a
petsc::VecScatter m_scatter_a
Definition
IPTwoBlockVec.hh:69
pism::inverse::IPTwoBlockVec::m_nb_local
PetscInt m_nb_local
Definition
IPTwoBlockVec.hh:64
pism::inverse::IPTwoBlockVec::m_scatter_b
petsc::VecScatter m_scatter_b
Definition
IPTwoBlockVec.hh:70
pism::inverse::IPTwoBlockVec::m_nb_global
PetscInt m_nb_global
Definition
IPTwoBlockVec.hh:64
pism::inverse::IPTwoBlockVec::m_ab
petsc::Vec m_ab
Definition
IPTwoBlockVec.hh:62
pism::inverse::IPTwoBlockVec::scatterToB
void scatterToB(Vec b)
Definition
IPTwoBlockVec.cc:91
pism::inverse::IPTwoBlockVec::m_a_in_ab
petsc::IS m_a_in_ab
Definition
IPTwoBlockVec.hh:66
pism::inverse::IPTwoBlockVec::scatter
void scatter(Vec a, Vec b)
Definition
IPTwoBlockVec.cc:82
pism::inverse::IPTwoBlockVec::~IPTwoBlockVec
~IPTwoBlockVec()=default
pism::inverse::IPTwoBlockVec::blockAIndexSet
IS blockAIndexSet()
Definition
IPTwoBlockVec.cc:74
pism::inverse::IPTwoBlockVec::scatterToA
void scatterToA(Vec a)
Definition
IPTwoBlockVec.cc:87
pism::inverse::IPTwoBlockVec::gather
void gather(Vec a, Vec b)
Definition
IPTwoBlockVec.cc:117
pism::inverse::IPTwoBlockVec::m_b_in_ab
petsc::IS m_b_in_ab
Definition
IPTwoBlockVec.hh:67
pism::inverse::IPTwoBlockVec::m_na_local
PetscInt m_na_local
Definition
IPTwoBlockVec.hh:64
pism::inverse::IPTwoBlockVec::scatter_begin_end
void scatter_begin_end(VecScatter s, Vec a, Vec b, ScatterMode m)
Definition
IPTwoBlockVec.cc:100
pism::inverse::IPTwoBlockVec::gatherFromA
void gatherFromA(Vec a)
Definition
IPTwoBlockVec.cc:122
pism::inverse::IPTwoBlockVec::m_na_global
PetscInt m_na_global
Definition
IPTwoBlockVec.hh:64
pism::inverse::IPTwoBlockVec::gatherFromB
void gatherFromB(Vec b)
Definition
IPTwoBlockVec.cc:126
pism::inverse::IPTwoBlockVec
Definition
IPTwoBlockVec.hh:32
pism::petsc::IS
Definition
IS.hh:29
pism::petsc::VecScatter
Definition
VecScatter.hh:29
pism::petsc::Vec
Definition
Vec.hh:36
pism
Definition
AgeColumnSystem.cc:23
Generated by
1.9.8