Author Topic: A variable for a global element number  (Read 4283 times)

skang67

  • Jr. Member
  • **
  • Posts: 23
A variable for a global element number
« on: September 07, 2016, 08:52:03 AM »
Hello,

I know "n" is a element number in each partition.
Is there also a variable for a global element number?


Soonpil

luc

  • Full Member
  • ***
  • Posts: 53
Re: A variable for a global element number
« Reply #1 on: September 12, 2016, 09:03:55 AM »
First, if you read the parallel manual, you will see that the parallel input file lists the local to global node numbers. So if you only need this information for inspection of results you should be able to find it there.

If you need it to program something specific then I recommend to read the palloc.f file stored in the program subfolder of FEAP. In it if you search for "local to global", you will find that an array is created for that particular mapping and that the pointer to the array is up(244). Finally, searching a little bit in the source code, you will see that in file parfeap/pdomain.F (lines 82 or 84) the array 244 is allocated slightly differently depending on how boundary conditions are implemented.

A little later a loop that starts on line 95 of parfeap/pdomain.F, shows how the global node numbers and boundary conditions are stored, but basically hr(np(244)-1 + n) should give you the global node number associated with local node "n".

Cheers,
Luc

skang67

  • Jr. Member
  • **
  • Posts: 23
Re: A variable for a global element number
« Reply #2 on: September 14, 2016, 11:00:04 AM »
I wanted to plot some calculated element-wise values on paraview, and that is why I need a variable of global element number.

It looks a bit complicated, but I will look into the array hr.
Thank you so much for helping me, Luc!
It is a lot helpful.