Alger

499 Reputation

16 Badges

11 years, 116 days

MaplePrimes Activity


These are replies submitted by Alger

Thanks for the answer. Sorry, I know the french names. Gradators and frequency variators are respectivelly below.

Thanks for the answer. Sorry, I know the french names. Gradators and frequency variators are respectivelly below.

Thanks for your answer

That is what I want

Thanks for your answer

That is what I want

Thank you, I found it.

Thank you, I found it.

Yes, I will study all your suggestions.

I posted here: http://www.maplesoft.com/applications/view.aspx?SID=103042

A code for finite element modeling and where I used a Matrix with dimension gm[2722,2722].

Could you see the program and give me how to change the code to do a storage sparse without 3 vectors and then the program can work for large Matrix. This is important, because when the matrix is with big order, Maple dont accept and give: error Matrix too large.

I agree that if I can store a Matrix[50000,50000] like A:=Matrix(50000,50000,storage=sparse,datatype=float[8]):

I must find how to construct A without explicitly using 3 vecors. 

For this, actually I'm not good with maple.

Thank you

Yes, I will study all your suggestions.

I posted here: http://www.maplesoft.com/applications/view.aspx?SID=103042

A code for finite element modeling and where I used a Matrix with dimension gm[2722,2722].

Could you see the program and give me how to change the code to do a storage sparse without 3 vectors and then the program can work for large Matrix. This is important, because when the matrix is with big order, Maple dont accept and give: error Matrix too large.

I agree that if I can store a Matrix[50000,50000] like A:=Matrix(50000,50000,storage=sparse,datatype=float[8]):

I must find how to construct A without explicitly using 3 vecors. 

For this, actually I'm not good with maple.

Thank you

I have those vectors for example:

a := Vector[row](110000,[1.0,1.0,-1.0,2.0,2.0,
                      3.0,-2.0,1.0,-2.0,1.0,1.0], etc...
                  datatype=float[8]):

 irow := Vector[row](110000,[1,1,2,2,2,3,3,4,4,4,4], etc...
                  datatype=integer[kernelopts('wordsize')/8]):

 icol := Vector[row](110000,[2,3,1,3,4,1,4,1,2,3,4], etc...
                  datatype=integer[kernelopts('wordsize')/8]):

And I want construct a sparse MAtrix A and solve it.

The resulting Matrix has dimension = (50000,50000)

Can I do like in your program

A:=Matrix(50000,50000,storage=sparse,datatype=float[8]):
 for i from 1 to 110000 do
    A[irow[i],icol[i]]:=A[irow[i],icol[i]]+a[i];
 end do:
Any elements of a that have duplicate values of irow and icol are added together.

and solve it as:
LinearSolve(A,V);

Thank you again

 

I have those vectors for example:

a := Vector[row](110000,[1.0,1.0,-1.0,2.0,2.0,
                      3.0,-2.0,1.0,-2.0,1.0,1.0], etc...
                  datatype=float[8]):

 irow := Vector[row](110000,[1,1,2,2,2,3,3,4,4,4,4], etc...
                  datatype=integer[kernelopts('wordsize')/8]):

 icol := Vector[row](110000,[2,3,1,3,4,1,4,1,2,3,4], etc...
                  datatype=integer[kernelopts('wordsize')/8]):

And I want construct a sparse MAtrix A and solve it.

The resulting Matrix has dimension = (50000,50000)

Can I do like in your program

A:=Matrix(50000,50000,storage=sparse,datatype=float[8]):
 for i from 1 to 110000 do
    A[irow[i],icol[i]]:=A[irow[i],icol[i]]+a[i];
 end do:
Any elements of a that have duplicate values of irow and icol are added together.

and solve it as:
LinearSolve(A,V);

Thank you again

 

Thank you very much for your explanations and help.

But, I want to get a similar command like sparse of Matlab to be able to work with vectors in finite element modeling and with hight order Matrix (A[50000,50000] for example)

I don't know if you have an idea

sparse of Matlab is difined as:

[i,j,s] = find(S);
[m,n] = size(S);
S = sparse(irow,jcol,s,m,n);

uses vectors row, , and to generate an -by- sparse matrix such that , with space allocated for nonzeros. Vectors row, , and are all the same length. Any elements of that are zero are ignored, along with the corresponding values of and . Any elements of that have duplicate values of and are added together. 

Thank you very much for your explanations and help.

But, I want to get a similar command like sparse of Matlab to be able to work with vectors in finite element modeling and with hight order Matrix (A[50000,50000] for example)

I don't know if you have an idea

sparse of Matlab is difined as:

[i,j,s] = find(S);
[m,n] = size(S);
S = sparse(irow,jcol,s,m,n);

uses vectors row, , and to generate an -by- sparse matrix such that , with space allocated for nonzeros. Vectors row, , and are all the same length. Any elements of that are zero are ignored, along with the corresponding values of and . Any elements of that have duplicate values of and are added together. 

@tennisman03110 

Find in the attached file a function in Matlab for storing e finite element Matrix as sparse matrix

This finite element storing concern triangular finite element but you can adapt to your used finite element

asmatele.zip

You can translate it to Maple

@tennisman03110 

Find in the attached file a function in Matlab for storing e finite element Matrix as sparse matrix

This finite element storing concern triangular finite element but you can adapt to your used finite element

asmatele.zip

You can translate it to Maple

@Axel Vogt 

Could you explane what is storage sparse Matrix ?

In Maple the explanation is in NAG/f11

  

A=(1,,,2,,,-1,,,-1,,,-3,,,-1,,,-4,,,3,,,2,,,2,,,4,,,1,,,1,,,-2,,,1)

  

IROW=(1,,,1,,,1,,,1,,,1,,,2,,,2,,,3,,,3,,,4,,,4,,,4,,,4,,,5,,,5)

  

ICOL=(1,,,2,,,3,,,4,,,5,,,2,,,5,,,1,,,5,,,1,,,3,,,4,,,5,,,1,,,5)

 

In Matlab:

For example, this dissects and then reassembles a sparse matrix:
 
               [i,j,s] = find(S);
               [m,n] = size(S);
               S = sparse(i,j,s,m,n);

S,i,j are vectors (arrays)

First 7 8 9 10 11 12 13 Last Page 9 of 17