Discussion:
[petsc-users] DM structures of PetscInt
TAY wee-beng
2015-11-08 05:27:12 UTC
Permalink
Hi,

I need to use DM structures of type PETScInt.

I tried to use:

DM da_cu_types

Vec cu_types_local,cu_types_global

PetscInt,pointer :: cu_types_array(:,:,:)

Is this allowed? The cu_types_array is to be of integer type. Because I
got into problems compiling.
--
Thank you.

Yours sincerely,

TAY wee-beng
Matthew Knepley
2015-11-08 11:41:09 UTC
Permalink
Post by TAY wee-beng
Hi,
I need to use DM structures of type PETScInt.
DM da_cu_types
Vec cu_types_local,cu_types_global
PetscInt,pointer :: cu_types_array(:,:,:)
Is this allowed? The cu_types_array is to be of integer type. Because I
got into problems compiling.
We do not support integer Vecs. You should use IS. What are you trying to
do?

Matt
Post by TAY wee-beng
--
Thank you.
Yours sincerely,
TAY wee-beng
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
Wee Beng Tay
2015-11-08 13:37:26 UTC
Permalink
Sent using CloudMagic Email
[https://cloudmagic.com/k/d/mailapp?ct=pa&cv=7.4.10&pv=5.0.2&source=email_footer_2]
On Sun, Nov 08, 2015 at 7:41 PM, Matthew Knepley < ***@gmail.com
[***@gmail.com] > wrote:
On Sat, Nov 7, 2015 at 11:27 PM, TAY wee-beng < ***@gmail.com
[***@gmail.com] > wrote:
Hi,

I need to use DM structures of type PETScInt.

I tried to use:

DM da_cu_types

Vec cu_types_local,cu_types_global

PetscInt,pointer :: cu_types_array(:,:,:)

Is this allowed? The cu_types_array is to be of integer type. Because I got
into
problems compiling.
We do not support integer Vecs. You should use IS. What are you trying to
do?
Matt
Hi,
I've a cfd code and I need to separate cells inside or outside a body. I
denote
the inside /boundary /outside cells as type =2/1/0. I've a subroutine which
determines the type in parallel and hence I need a Vec with integer type.
Based
on my description, can I use Is? Is there an example I can follow?
Thanks

--
Thank you.

Yours sincerely,

TAY wee-beng




--
What most experimenters take for granted before they begin their
experiments is
infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
Matthew Knepley
2015-11-08 14:57:14 UTC
Permalink
Post by Wee Beng Tay
Sent using CloudMagic Email
<https://cloudmagic.com/k/d/mailapp?ct=pa&cv=7.4.10&pv=5.0.2&source=email_footer_2>
Post by TAY wee-beng
Hi,
I need to use DM structures of type PETScInt.
DM da_cu_types
Vec cu_types_local,cu_types_global
PetscInt,pointer :: cu_types_array(:,:,:)
Is this allowed? The cu_types_array is to be of integer type. Because I
got into problems compiling.
We do not support integer Vecs. You should use IS. What are you trying to
do?
Matt
Hi,
I've a cfd code and I need to separate cells inside or outside a body. I
denote the inside /boundary /outside cells as type =2/1/0. I've a
subroutine which determines the type in parallel and hence I need a Vec
with integer type. Based on my description, can I use Is? Is there an
example I can follow?
Yes, use an IS. If you need unstructured communication, you will need to
use the PetscSF structure.

Matt
Post by Wee Beng Tay
Thanks
Post by TAY wee-beng
--
Thank you.
Yours sincerely,
TAY wee-beng
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
Barry Smith
2015-11-08 18:08:38 UTC
Permalink
Post by Wee Beng Tay
Sent using CloudMagic Email
Hi,
I need to use DM structures of type PETScInt.
DM da_cu_types
Vec cu_types_local,cu_types_global
PetscInt,pointer :: cu_types_array(:,:,:)
Is this allowed? The cu_types_array is to be of integer type. Because I got into problems compiling.
We do not support integer Vecs. You should use IS. What are you trying to do?
Matt
Hi,
I've a cfd code and I need to separate cells inside or outside a body. I denote the inside /boundary /outside cells as type =2/1/0. I've a subroutine which determines the type in parallel and hence I need a Vec with integer type.
The simplest thing is just to use a real value of 2. 1. or 0. Memoywise it is not a big deal since you will have dozens of vectors plus memory heavy matrix so you won't even notice this extra memory.
Post by Wee Beng Tay
Based on my description, can I use Is? Is there an example I can follow?
Thanks
--
Thank you.
Yours sincerely,
TAY wee-beng
--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener
TAY wee-beng
2015-11-09 14:33:39 UTC
Permalink
Post by Barry Smith
Post by Wee Beng Tay
Sent using CloudMagic Email
Hi,
I need to use DM structures of type PETScInt.
DM da_cu_types
Vec cu_types_local,cu_types_global
PetscInt,pointer :: cu_types_array(:,:,:)
Is this allowed? The cu_types_array is to be of integer type. Because I got into problems compiling.
We do not support integer Vecs. You should use IS. What are you trying to do?
Matt
Hi,
I've a cfd code and I need to separate cells inside or outside a body. I denote the inside /boundary /outside cells as type =2/1/0. I've a subroutine which determines the type in parallel and hence I need a Vec with integer type.
The simplest thing is just to use a real value of 2. 1. or 0. Memoywise it is not a big deal since you will have dozens of vectors plus memory heavy matrix so you won't even notice this extra memory.
Hi,

Ya, thought that this is simpler. It's working now. Thanks.
Post by Barry Smith
Post by Wee Beng Tay
Based on my description, can I use Is? Is there an example I can follow?
Thanks
--
Thank you.
Yours sincerely,
TAY wee-beng
--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener
Loading...