Re: [Libmesh-users] Query if a Processor Owns a Given Element in a Parallel Mesh

2015-09-01 Thread Roy Stogner
On Tue, 1 Sep 2015, Dafang Wang wrote: > My current solution is to iterate over all the local elements on each > processor in order > to find the i-th element. This is cumbersome. And inefficient. > I am asking if libmesh provides a function for such needs. Yes, that's what query_elem(i) is f

Re: [Libmesh-users] Query if a Processor Owns a Given Element in a Parallel Mesh

2015-09-01 Thread Dafang Wang
Hi Derek, Iterating over elements is NOT what I want to do. I want to operate on the i-th element, supposing that I know the index i. I cannot use Mesh.elem(i) because it is unknown which processor owns the element i. My current solution is to iterate over all the local elements on each proce

Re: [Libmesh-users] Query if a Processor Owns a Given Element in a Parallel Mesh

2015-09-01 Thread Derek Gaston
What are you actually trying to do? I figured you were iterating over elements and then needing to know if the element you are currently on is owned by the local processor or not... Derek On Tue, Sep 1, 2015 at 6:24 PM Dafang Wang wrote: > Hi Derek, > > Thanks for your quick response. What if

Re: [Libmesh-users] Query if a Processor Owns a Given Element in a Parallel Mesh

2015-09-01 Thread Dafang Wang
Hi Derek, Thanks for your quick response. What if the elem pointer is not available, i.e., how can I obtain the i-th element in a parallel mesh without iterating over the mesh? Shall I use mesh.query_elem()? Cheers, Dafang On 9/1/2015 5:17 PM, Derek Gaston wrote: > if (elem->processor_id() =

Re: [Libmesh-users] Query if a Processor Owns a Given Element in a Parallel Mesh

2015-09-01 Thread Derek Gaston
if (elem->processor_id() == mesh.processor_id()) On Tue, Sep 1, 2015 at 5:12 PM Dafang Wang wrote: > Hi, > > I am wondering how to query whether a processor owns a given element in a > parallel mesh, > assuming that the finite-element mesh is partitioned across multiple > processors. One way I >

[Libmesh-users] Query if a Processor Owns a Given Element in a Parallel Mesh

2015-09-01 Thread Dafang Wang
Hi, I am wondering how to query whether a processor owns a given element in a parallel mesh, assuming that the finite-element mesh is partitioned across multiple processors. One way I can think of is to use an iterator over ParallelMesh::active_local_elements() on each processor, but this wa

Re: [Libmesh-users] Physical eigenvalues of the stokes equations

2015-09-01 Thread Julian Andrej
I am aware of that, but I think i should get a bunch of 1 eigenvalues (number depending on the problem size and thus number of Dirichlet BCs) and then the correct eigenvalues for my problem with the posted code. On Tue, Sep 1, 2015 at 6:38 PM, David Knezevic wrote: > On Tue, Sep 1, 2015 at 12:35

Re: [Libmesh-users] Physical eigenvalues of the stokes equations

2015-09-01 Thread David Knezevic
On Tue, Sep 1, 2015 at 12:35 PM, Julian Andrej wrote: > On Tue, Sep 1, 2015 at 6:15 PM, John Peterson > wrote: > > > > > > > On Tue, Sep 1, 2015 at 8:29 AM, Julian Andrej > wrote: > > > >> I'm trying to get into libMesh, so i tried to convert an existing > project. > >> > >> So far i could repr

Re: [Libmesh-users] Physical eigenvalues of the stokes equations

2015-09-01 Thread Julian Andrej
On Tue, Sep 1, 2015 at 6:15 PM, John Peterson wrote: > > > On Tue, Sep 1, 2015 at 8:29 AM, Julian Andrej wrote: > >> I'm trying to get into libMesh, so i tried to convert an existing project. >> >> So far i could reproduce the lid driven cavity case for the Stokes >> equations like in >> example

Re: [Libmesh-users] Physical eigenvalues of the stokes equations

2015-09-01 Thread John Peterson
On Tue, Sep 1, 2015 at 8:29 AM, Julian Andrej wrote: > I'm trying to get into libMesh, so i tried to convert an existing project. > > So far i could reproduce the lid driven cavity case for the Stokes > equations like in > example examples/systems_of_equations/systems_of_equations_ex1. > > Now i'

[Libmesh-users] Physical eigenvalues of the stokes equations

2015-09-01 Thread Julian Andrej
I'm trying to get into libMesh, so i tried to convert an existing project. So far i could reproduce the lid driven cavity case for the Stokes equations like in example examples/systems_of_equations/systems_of_equations_ex1. Now i'm trying to build a mass matrix so i can solve the generalized eige