[Nek5000-users] Volume of an element
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Mon Feb 26 14:46:02 CST 2018
Dear Sijo,
We typically refer to elements as the structures that have (N+1)^3
points. (Here, N+1 = lx1.)
They are enumerated in nek5000 by the element number, e:
integer e
nxyz = nx1*ny1*nz1
do e=1,nelt
volume = volel(e)
volume = vlsum(bm1(1,1,1,e),nxyz)
enddo
would both yield the same value for the volume of element e.
It appears to me that you are after something different, however.
It seems like you want to associate a volume with each grid point.
If that is the case, then the entries of the diagonal mass matrix, bm1,
are indeed the quantities that you want.
Each entry of bm1(i,1,1,1) for i=1 to n:=nxyz*nelt, corresponds to the
integral of the underlying basis function.
That is, if we think about a function phi_i(x) such that
u(x) = sum_i=1^n u(i,1,1,1)*phi_i(x)
then
bm1(i,1,1,1) = \int phi_i(x) dx
where the integral (\int) is taken over the entire computational domain.
[ Note that we really don't have such a global phi_i(x) ... I use it simply
for illustration, here.]
hth
Paul
________________________________
From: Nek5000-users <nek5000-users-bounces at lists.mcs.anl.gov> on behalf of nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>
Sent: Monday, February 26, 2018 11:59:19 AM
To: nek5000-users
Subject: [Nek5000-users] Volume of an element
Hi Neks,
How to calculate volume of an element in a 3D mesh? If i write
n = nx1*ny1*nz1*nelv
do i=1,n
v(i) = volume(1,1,1,i)
enddo
Can i store the volume of each element into a varibale called v?
What happens if i use bm1(1,1,1,i)? Instead of volume(1,1,1,i)
Thanks
Sijo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180226/c4b97e3d/attachment.html>
More information about the Nek5000-users
mailing list