Hello,
is there a way to create a vector with evenly spaced values in an
interval, like the numpy.arange function?
http://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html or
the linspace function?
Thanks,
Florian
Am Freitag, 29. August 2014, 09:29:21 schrieben Sie:
Florian :
is there a way to create a vector with evenly spaced values in an
interval, like the numpy.arange function?
http://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html
or the linspace function?
Ok, I gave it
Hello,
I want to set the entire column of a N x M matrix to a N vector. What is
the best way to do that?
My first guess would be to VecGetArray and use that array for
MatSetValuesLocal with nrow = VecGetLocalSize. What is the best to say
MatSetValuesLocal that I want to set all rows
Am 01.09.2014 12:45, schrieb Matthew Knepley:
On Mon, Sep 1, 2014 at 4:10 AM, Florian Lindner mailingli...@xgm.de
wrote:
Hello,
I want to set the entire column of a N x M matrix to a N vector. What
is
the best way to do that?
My first guess would be to VecGetArray and use that array
Am 01.09.2014 15:44, schrieb Florian Lindner:
Am 01.09.2014 12:45, schrieb Matthew Knepley:
On Mon, Sep 1, 2014 at 4:10 AM, Florian Lindner mailingli...@xgm.de
wrote:
Hello,
I want to set the entire column of a N x M matrix to a N vector. What
is
the best way to do that?
My first guess
Am 01.09.2014 16:11, schrieb Matthew Knepley:
I recommend running using the debugger so you can get a stack trace,
and
perhaps see
exactly what the problem is. You can also run under valgrind as the
error
says.
This of course I tried, but had no real success. It crashes in
Hello,
This may be rather a C/C++ question, but ...
I encapsulate some petsc functions into c++ classes. Since I don't want
to pull all petsc symbols into the global namespace for anyone using my
classes I try to put petsc into it's own namespace:
Header petsc.h:
namespace petsc {
#include
Hi there, ...
Am 05.09.2014 18:00, schrieb Jed Brown:
Florian Lindner mailingli...@xgm.de writes:
Hello,
This may be rather a C/C++ question, but ...
I encapsulate some petsc functions into c++ classes. Since I don't
want
to pull all petsc symbols into the global namespace for anyone using
:
Florian Lindner mailingli...@xgm.de writes:
If a user of my class library does an #include mypetsc.h he should not
get all the petsc symbols in his global namespace, e.g.
#include mypetsc.h
Vector v; // is an object of my class lib
Vec pv; // should not work, since I do not want petsc
Hello,
I have a matrix that have the option set MAT_SYMMETRY_ETERNAL and set some
values in the upper triangular. When reading values I was expecting that Petsc
makes it a symmetric matrix, but the lower triangular is empty like it was
initialized.
Thanks,
Florian
Example code:
#include
Hello,
I'm currently replacing an RBF implementation with petsc linear algebra. The
program itself runs parallel using MPI but the piece of code I work on runs
strictly sequentially without making any use of MPI, just the same code on
every node. Right now we're more interessted in patsc
Hello,
when I try to KSPSolve my matrix petsc prints out that a diagonal entry is
missing:
KSPSetOperators(solver, _matCLU.matrix, _matCLU.matrix );
KSPSolve(solver, vin.vector, vp.vector);
And petsc is perfectly right about that specific entry being zero. So this may
be more of a
Barry
On Oct 7, 2014, at 8:14 AM, Florian Lindner mailingli...@xgm.de wrote:
Hello,
when I try to KSPSolve my matrix petsc prints out that a diagonal entry is
missing:
KSPSetOperators(solver, _matCLU.matrix, _matCLU.matrix );
KSPSolve(solver, vin.vector, vp.vector
Hello,
I am redoing an radial basis function interpolation algorithm using petsc in
our software.
Using basis function with compact carrier is blazingly fast. These basis
function result in sparse matrices.
ierr = MatSetType(matrixC, MATSBAIJ); CHKERRV(ierr); // create symmetric,
block
Hello,
I try to preallocate a sparse matrix like it was recommended in another
posting, but get an error which kind of surprises me. Somehow I think it might
be related to the order of assembly calls...
My code creates the matrix:
MatSetType(_matrixC.matrix, MATSBAIJ);
, PETSC_VIEWER_STDOUT_WORLD); CHKERRQ(ierr);
MatDestroy(matrix);
PetscFinalize();
return 0;
}
Barry
On Oct 29, 2014, at 8:00 AM, Florian Lindner mailingli...@xgm.de wrote:
Hello,
I try to preallocate a sparse matrix like it was recommended in another
posting, but get an error which kind
Am Donnerstag, 30. Oktober 2014, 09:19:38 schrieb Matthew Knepley:
On Thu, Oct 30, 2014 at 7:25 AM, Barry Smith bsm...@mcs.anl.gov wrote:
On Oct 30, 2014, at 3:36 AM, Florian Lindner mailingli...@xgm.de
wrote:
Am Mittwoch, 29. Oktober 2014, 13:00:17 schrieb Barry Smith
Hello,
I have a fulll matrix of size e.g. 603x603 of which I'm very disappointed with
the runtime, compared to a naive LU / forward / backward solution. My petsc
solution takes about 14s, while the old one takes just 0.5s. (when you're
looking at sparse matrices the figures are almost
Am Dienstag, 4. November 2014, 19:14:58 schrieb Jed Brown:
Barry Smith bsm...@mcs.anl.gov writes:
I've tried to use a direct solver like suggested on pp 72, but:
./petBench 600 1 -ksp_type preonly -pc_type lu
You cannot use LU with SBAIJ format. Only Cholesky. So use -pc_type
Am Dienstag, 4. November 2014, 10:08:27 schrieb Barry Smith:
There are a lot of questions here.
Yes, thanks for replying!
On Nov 4, 2014, at 328 AM, Florian Lindner mailingli...@xgm.de wrote:
Hello,
I have a fulll matrix of size e.g. 603x603 of which I'm very disappointed
-conditioning.
What is your end goal in trying to use iterative methods?
Barry
On Nov 5, 2014, at 3:41 AM, Florian Lindner mailingli...@xgm.de wrote:
Am Dienstag, 4. November 2014, 10:08:27 schrieb Barry Smith:
There are a lot of questions here.
Yes, thanks for replying
Hello,
since our application has two possible entry paths, petsc could be initialized
at different positions. When used as a library (in contrast to a standalone
executable), the code looks like:
PetscErrorCode ierr;
std::cout Petsc before PetscInitializeNoArguments() std::endl;
Hello,
I have a piece of code that looks like that:
// PETSC_COMM_WORLD = MPI_COMM_WORLD;
PetscBool petscIsInitialized;
PetscInitialized(petscIsInitialized);
if (not petscIsInitialized) {
PetscErrorCode ierr;
std::cout PETSC == WORLD: (PETSC_COMM_WORLD == MPI_COMM_WORLD)
Am Mittwoch, 25. März 2015, 10:17:45 schrieb Matthew Knepley:
On Wed, Mar 25, 2015 at 10:13 AM, Florian Lindner mailingli...@xgm.de
wrote:
Hello,
I'm using the petsc4py. It works fine after some hurdling with missing
documentation. (were not able to find API doc anywhere, I generated
Hello,
I'm using the petsc4py. It works fine after some hurdling with missing
documentation. (were not able to find API doc anywhere, I generated it myself
now).
I try to use the switches like -ksp_monitor like that:
import petsc4py
from petsc4py import PETSc
petsc4py.init(sys.argv)
but no
Am Donnerstag, 26. März 2015, 13:59:33 schrieb Lisandro Dalcin:
On 25 March 2015 at 18:34, Matthew Knepley knep...@gmail.com wrote:
That file is obviously old and was removed.
After installing petsc4py, you can do make docs in the top level
source tree, and the docs/ directory will be
Hello,
I'm using petsc with petsc4py.
A matrix is created like that
MPIrank = MPI.COMM_WORLD.Get_rank()
MPIsize = MPI.COMM_WORLD.Get_size()
print(MPI Rank = , MPIrank)
print(MPI Size = , MPIsize)
parts = partitions()
print(Dimension= , nSupport + dimension, bsize =
Am Freitag, 27. März 2015, 07:34:56 schrieb Matthew Knepley:
On Fri, Mar 27, 2015 at 7:31 AM, Florian Lindner mailingli...@xgm.de
wrote:
Am Freitag, 27. März 2015, 07:26:11 schrieb Matthew Knepley:
On Fri, Mar 27, 2015 at 4:28 AM, Florian Lindner mailingli...@xgm.de
wrote:
Am
Am Donnerstag, 26. März 2015, 07:34:27 schrieb Jed Brown:
Florian Lindner mailingli...@xgm.de writes:
Hello,
I'm using petsc with petsc4py.
A matrix is created like that
MPIrank = MPI.COMM_WORLD.Get_rank()
MPIsize = MPI.COMM_WORLD.Get_size()
print(MPI Rank
Am Freitag, 27. März 2015, 07:26:11 schrieb Matthew Knepley:
On Fri, Mar 27, 2015 at 4:28 AM, Florian Lindner mailingli...@xgm.de
wrote:
Am Donnerstag, 26. März 2015, 07:34:27 schrieb Jed Brown:
Florian Lindner mailingli...@xgm.de writes:
Hello,
I'm using petsc
Hello,
given I have this piece of python code:
rank = MPI.COMM_WORLD.Get_rank()
sizes = [ 4, 5]
n = sizes[rank]
A = PETSc.Mat()
A.create()
A.setSizes( ((n, PETSc.DETERMINE), (n, PETSc.DETERMINE)) ) # sets the local
size, let petsc determine global size
A.setFromOptions(); A.setUp()
Hello,
I use an index set for a row mapping but don't want to use one for the column
mapping.
I try to create an idenitity index set to supply to
ISLocalToGlobalMappingCreateIS and MatSetLocalToGlobalMapping:
IS is;
ISCreate(PETSC_COMM_WORLD, is);
ISSetIdentity(is);
but I get an
Am Montag, 20. April 2015, 14:57:58 schrieb Lisandro Dalcin:
On 20 April 2015 at 14:35, Florian Lindner mailingli...@xgm.de wrote:
Hello,
I use an index set for a row mapping but don't want to use one for the
column mapping.
I try to create an idenitity index set to supply
Hello,
just to make sure I don't get something wrong:
An SBAIJ (especially MPISBAIJ) matrix just stores the uper triangle. When I
invoke MatSetSizes with the global dimension set (and local to PETSC_DECIDE)
petsc tries to evenly distribute rows amoung ranks. Same when I set local
dimensions
Hello,
I try to setup petsc on my Arch Linux box. Download it using git -b maint.
% python2 configure works fine:
[...]
Compilers:
compilation on maint with a plain python2 configure.
Thanks a lot!
Florian
Satish
On Thu, 11 Jun 2015, Matthew Knepley wrote:
On Thu, Jun 11, 2015 at 7:04 AM, Florian Lindner mailingli...@xgm.de
wrote:
configure.log is attached.
Ah, you have the buggy Apple preprocessor, so you
Am Mittwoch, 22. Juli 2015, 13:05:57 schrieben Sie:
On Jul 22, 2015, at 11:33 AM, Florian Lindner mailingli...@xgm.de wrote:
Am Dienstag, 21. Juli 2015, 18:32:02 schrieben Sie:
Try putting a breakpoint in KSPSetUp_GMRES and check the values of all
the pointers immediately after
occurs.
Florian
On Jul 13, 2015, at 10:56 AM, Florian Lindner mailingli...@xgm.de wrote:
Hello,
our petsc application suffers from a memory error (double free or
corruption).
Situation is a like that:
A KSP is private member of a C++ class. In its constructor I call
Hello,
our petsc application suffers from a memory error (double free or corruption).
Situation is a like that:
A KSP is private member of a C++ class. In its constructor I call KSPCreate.
Inbetween it may haben that I call KSPREset. In the class' destructor I call
KSPDestroy. That's where
Hello,
our build system Travis uses the old Ubuntu Precice Pangolin version that comes
with PETSc 3.1.
While trying to activate petsc for our CI tests, I get the message that the
type PetscBool wasn't found. I downloaded
http://packages.ubuntu.com/precise/libpetsc3.1-dev and grepped for
Hello,
I use PETSc with 4 MPI processes and I experience different results
when using different distribution of rows amoung ranks. The code looks
like that:
KSPSetOperators(_solver, _matrixC.matrix, _matrixC.matrix);
// _solverRtol = 1e-9
KSPSetTolerances(_solver, _solverRtol, PETSC_DEFAULT,
] KSPConvergedDefault(): Linear solver has converged. Residual norm
7.959757133341e-08 is less than relative tolerance 1.e-09
times initial right hand side norm 1.731788191624e+02 at iteration 9
Best,
Florian
On Tue, 9 Feb 2016 14:06:01 +0100
Florian Lindner <mailingli...@xgm.de>
Hello,
I have this code to draw the structure of a matrix:
PetscErrorCode ierr;
PetscViewer viewer;
ierr = PetscViewerCreate(communicator, ); CHKERRV(ierr);
ierr = PetscViewerSetType(viewer, PETSCVIEWERDRAW); CHKERRV(ierr);
ierr = MatView(matrix, viewer); CHKERRV(ierr);
ierr =
Hello,
I create a couple of index sets:
ISLocalToGlobalMapping _ISmapping;
IS ISlocal, ISlocalInv, ISglobal, ISidentity, ISidentityGlobal;
ISLocalToGlobalMapping ISidentityMapping;
// Create an index set which maps myIndizes to continous chunks of matrix
rows.
ierr =
Hello,
I want to build a global vector (and matrix) from local data. The local data
has a global index, which can be non-contiguous i.e. global index (0, 5, 2) is
on rank 0, (1, 4, 3) is on rank 1. To keep all local data on the local part of
vector I need a mapping:
Application -> PETSc
(0,
ing of rows and not application ordering?
Best Thanks,
Florian
Am Mittwoch, 6. April 2016, 10:19:23 CEST schrieben Sie:
> On Wed, Apr 6, 2016 at 10:12 AM, Florian Lindner <mailingli...@xgm.de>
> wrote:
>
> > Hello,
> >
> > in order to prealloca
Hello,
in order to preallocate I have to know whether a non-zero will be in the local
diagonal submatrix or not.
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMPIAIJSetPreallocation.html
says:
The DIAGONAL portion of the local submatrix of a processor can be defined as
Hello,
I create a MATAIJ on 4 processors using local sizes
(0) Set matrix A to local size 2 x 5
(1) Set matrix A to local size 2 x 2
(2) Set matrix A to local size 2 x 2
(3) Set matrix A to local size 2 x 2
which results in a global size of 8 x 11.
Afaik the local size given is not relevant
Hello,
so far we have happily set PETSC_COMM_WORLD anywhere in our code and we were
not having trouble with that.
However
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PETSC_COMM_WORLD.html
states that:
"Notes: By default PETSC_COMM_WORLD and MPI_COMM_WORLD are identical
Am 23.01.2017 um 14:24 schrieb Matthew Knepley:
> On Mon, Jan 23, 2017 at 7:05 AM, Florian Lindner <mailingli...@xgm.de
> <mailto:mailingli...@xgm.de>> wrote:
>
>
>
> Am 23.01.2017 um 13:59 schrieb Matthew Knepley:
> > On Mon, Jan 23, 2017 at
Am 23.01.2017 um 13:59 schrieb Matthew Knepley:
> On Mon, Jan 23, 2017 at 6:38 AM, Florian Lindner <mailingli...@xgm.de
> <mailto:mailingli...@xgm.de>> wrote:
>
> Hello,
>
> I try to build petsc from the maint branch together with petsc4py and
>
ackages?
> [petsc configure is limited to python2 - but petsc4py works with python3]
> How about other externalpackages that use python? [scientificpython.py etc..
I think it's fine the way it is.
Best,
Florian
>
> Satish
>
> On Mon, 23 Jan 2017, Florian Lindner wrote:
>
>> H
04 max/min 2.829815526858e+06
for each iteration. Sorry about my mathematical illerateness, but where can I
see the condition number of the matrix?
Thanks,
Florian
>
>
>
>> On Aug 30, 2016, at 7:01 AM, Florian Lindner <mailingli...@xgm.de> wrote:
>>
>&g
Thanks everybody, just to be sure, it's max/min of the last iteration?
Florian
Am 30.08.2016 um 16:10 schrieb Matthew Knepley:
> On Tue, Aug 30, 2016 at 9:03 AM, Florian Lindner <mailingli...@xgm.de
> <mailto:mailingli...@xgm.de>> wrote:
>
> Hi,
>
>
Hello,
there is a FAQ and a Stackoverflow article about getting the condition number
of a petsc matrix:
http://www.mcs.anl.gov/petsc/documentation/faq.html#conditionnumber
http://scicomp.stackexchange.com/questions/34/how-can-i-estimate-the-condition-number-of-a-large-sparse-matrix-using-petsc
Hello,
to compute / approximate the condition number of a MATSBAIJ, I put
-ksp_view
# Conditon number estimate
-pc_type none
-ksp_type gmres
-ksp_monitor_singular_value
-ksp_gmres_restart 1000
in my .petscrc
Output is like:
[...]
566 KSP Residual norm 1.241765807317e-07 % max
/a.out() [0x4009e9]
> [neon:113111] *** End of error message ***
> ----------
> mpirun noticed that process rank 1 with PID 113111 on node neon exited on
> signal 6 (Aborted).
> -
Hello,
I want to write a MATSBAIJ to a file in binary, so that I can load it later
using MatLoad.
However, I keep getting the error:
[5]PETSC ERROR: No support for this operation for this object type!
[5]PETSC ERROR: Cannot get subcomm viewer for binary files or sockets unless
SubViewer
eb Matthew Knepley:
> On Thu, Sep 22, 2016 at 5:42 AM, Florian Lindner <mailingli...@xgm.de
> <mailto:mailingli...@xgm.de>> wrote:
>
> Hello,
>
> I want to write a MATSBAIJ to a file in binary, so that I can load it
> later using MatLoad.
>
> How
Am 22.09.2016 um 12:53 schrieb Dave May:
>
>
> On Thursday, 22 September 2016, Florian Lindner <mailingli...@xgm.de
> <javascript:_e(%7B%7D,'cvml','mailingli...@xgm.de');>> wrote:
>
> Hello,
>
> I want to write a MATSBAIJ to a file in binary,
b6)
> > [0x7feed971c08f]
> > [neon:113111] [10] ./a.out() [0x400b8b]
> > [neon:113111] [11]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)
> [0x7feed8943f45]
> > [neon:113111] [12
Hey,
Am 08.11.2016 um 09:57 schrieb Ji Zhang:
> Dear all,
>
> I'm a petsc and petsc4py user. I want to save some petsc matrices and vectors
> after calculation, and reload them later.
> However, it is difficult for me. I think one of the following two ways may
> have the potential to perform
maint branch.
make PETSC_DIR=/data/scratch/lindnefn/software/petsc
PETSC_ARCH=arch-linux2-c-debug test reported no errors.
Best Thanks,
Florian
>
> Barry
>
>> On Nov 4, 2016, at 10:44 AM, Florian Lindner <mailingli...@xgm.de> wrote:
>>
>> Hello,
>>
Hey,
Am 04.11.2016 um 15:21 schrieb Matthew Knepley:
> On Fri, Nov 4, 2016 at 9:14 AM, Florian Lindner <mailingli...@xgm.de
> <mailto:mailingli...@xgm.de>> wrote:
>
> Hello,
>
> I want to print the sparsity structure of a matrix of type MPISBA
Hello,
I want to print the sparsity structure of a matrix of type MPISBAIJ and try to
use this code:
PetscErrorCode ierr = 0;
PetscViewer viewer;
PetscDraw draw;
ierr = PetscViewerCreate(communicator, ); CHKERRV(ierr);
ierr = PetscViewerSetType(viewer, PETSCVIEWERDRAW); CHKERRV(ierr);
Hello,
I have a matrix C that is the result of an RBF interpolation.
It is constructured like that:
c_ij = phi( |x_i - x_j| )
x are supporting points. phi is the radial basis functions, here it is a
Gaussian: phi(r) = exp( -(1.5*r)^2 ).
The system is augmented by a global polynomial, which
() in your code and get error
> tracebacks for PETSc code and your code.
Ok, I'll keep that option in mind...
Best,
Florian
>> On Jan 10, 2017, at 6:42 AM, Florian Lindner <mailingli...@xgm.de> wrote:
>>
>> Hello,
>>
>> I really enjoy the verbosity (line numb
Hello,
I really enjoy the verbosity (line number) of the default
PetscTraceBackErrorHandler. However, I want my application to
be aborted with the PetscMPIAbortErrorHandler when an error occures.
Can I instruct PETSc to call first one handler, then another one?
Thanks,
Florian
Hello,
what is the best / most efficient way to compute:
y = y - A * b
with vectors b, y and matrix A:
* VecAXPY: I need to compute A*b first
MatMult(A, b, r);
VecAXPY(y, -1, r);
* VecWAXPY: Same case, but I don't reuse y
MatMult(A, b, r);
VecWAXPY(w, -1, r, y);
* VecAYPX: Don't work,
Hello,
two questions about symmetric (MATSBAIJ) matrices.
+ Entries set with MatSetValue below the main diagonal are ignored. Is that by
design? I rather expected setting A_ij to
have the same effect as setting A_ji.
+ Has MatSetOption to MAT_SYMMETRIC and MAT_SYMMETRIC_ETERNAL any gain on
ndices(ISmapping, );
Thanks,
Florian
Am 07.07.2017 um 17:31 schrieb Florian Lindner:
> Hello,
>
> I'm having some struggle understanding the preallocation for MPIAIJ matrices,
> especially when a value is in off-diagonal
> vs. diagonal block.
>
> The small example program
+;
} else {
o_nnz[relative_row]++;
}
}
}
}
ierr = MatMPIAIJSetPreallocation(A, 0, d_nnz, 0, o_nnz); CHKERRQ(ierr);
Best,
Florian
>
> Stefano
>
> Il 10 Lug 2017 10:23 AM, "Florian Lindner" <mailingli...@xgm.de
> <ma
Hello,
I'm having some struggle understanding the preallocation for MPIAIJ matrices,
especially when a value is in off-diagonal
vs. diagonal block.
The small example program is at https://pastebin.com/67dXnGm3
In general it should be parallel, but right now I just run it in serial.
According
n rank
0.
Is that correct?
Best,
Florian
>
>Barry
>
>> On Jul 16, 2017, at 9:26 PM, Florian Lindner <mailingli...@xgm.de> wrote:
>>
>> Hello,
>>
>> Am 11.07.2017 um 02:45 schrieb Barry Smith:
>>>
>>> You might consider using
Preallocate* routines, I failed to see :-/
Best Thanks,
Florian
>> On Jul 10, 2017, at 3:22 AM, Florian Lindner <mailingli...@xgm.de> wrote:
>>
>> Hey,
>>
>> one more question about preallocation:
>>
>> I can determine if a column index is d
Am 04.10.2017 um 18:08 schrieb Matthew Knepley:
> I don't know if that is right. However, the sequential and parallel
> algorithms agree on both the initial residual (so
> that parallel
> matrix and rhs appear correct) and the first iterate. Divergence of the
> second iterate could still be a
Am 02.10.2017 um 21:04 schrieb Matthew Knepley:
> On Mon, Oct 2, 2017 at 6:21 AM, Florian Lindner <mailingli...@xgm.de
> <mailto:mailingli...@xgm.de>> wrote:
>
> Hello,
>
> I have a matrix and vector that live on 4 ranks, but only rank 2 and 3
> hav
Am 03.10.2017 um 16:05 schrieb Matthew Knepley:
> On Mon, Oct 2, 2017 at 10:11 PM, Florian Lindner <mailingli...@xgm.de
> <mailto:mailingli...@xgm.de>> wrote:
>
>
>
> Am 02.10.2017 um 21:04 schrieb Matthew Knepley:
> > On Mon, Oct 2, 2017 at
Hello,
I have a matrix and vector that live on 4 ranks, but only rank 2 and 3 have
values:
e.g.
Vec Object: 4 MPI processes
type: mpi
Process [0]
Process [1]
1.1
2.5
3.
4.
Process [2]
5.
6.
7.
8.
Process [3]
Doing a simple LSQR solve does not converge. However, when the values are
Hello,
I try to use the KSP solver package together with a shell matrix:
MyContext mycontext; // an empty struct, not sure it it's needed?
Mat s;
ierr = MatCreateShell(PETSC_COMM_WORLD, size, size, PETSC_DECIDE,
PETSC_DECIDE, , );
ierr = MatShellSetOperation(s, MATOP_MULT,
nes test program.
Best Thanks,
Florian
Am 18.10.18 um 17:56 schrieb Florian Lindner:
> Hello,
>
> I try to use the KSP solver package together with a shell matrix:
>
>
> MyContext mycontext; // an empty struct, not sure it it's needed?
> Mat s;
> ierr = Mat
Am 28.11.18 um 18:12 schrieb Matthew Knepley:
> On Wed, Nov 28, 2018 at 12:06 PM Florian Lindner <mailto:mailingli...@xgm.de>> wrote:
>
> Hey,
>
> thanks for your quick reply!
>
> As far as I understand how MatSetLocalToGlobalMapping works
Hello,
I have a range of local input data indices that I want to use for row indexing,
say { 3, 4, 6}.
For that, I create a matrix with a local number of rows of 3 and map the
indices {3, 4, 5} to these rows.
I create an index set:
ISCreateGeneral(comm, myIndizes.size(), myIndizes.data(),
r.
Any comments from your side are appreciated!
Of course, I should set as much values as possible using MatSetValues...
Best,
Florian
Am 27.11.18 um 16:33 schrieb Matthew Knepley:
> On Tue, Nov 27, 2018 at 10:17 AM Florian Lindner via petsc-users
> mailto:petsc-users@mcs.anl.gov>> wrote:
Hello,
Happy New Year Everybody!
I get a vector from a linear solve and is used a divisor in VecPointwiseDivide.
Clearly, I must check for zero entries before doing the division.
What is the best way to do so, especially performance wise?
The only way I come up with so far, is to VecCopy,
85 matches
Mail list logo