-
-
Notifications
You must be signed in to change notification settings - Fork 26
Functionality for volumetric coupling on quadrature points of a mesh #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
4d99ec7
02df2f5
67916c2
d7efaf2
3893cb5
2d52c96
96b3f0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume that these two files contain changes compared to the original CalculiX files. A comment on the modifications would be very helpful when porting to later versions. Was the functionality provided by the deleted file never needed, or is it just substituted by the two new files?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, the contents of both the new Fortran files is essentially copied from the CalculiX source code. Additionally I put some of my own code in there. I will add comments in the file.
The functionality in the deleted file was not used. I tried to use it, but the Gauss point coordinates returned by it were not correct. Hence the decision to remove the file and add two separate files for two different elements. it id worth noting that in the future, these two files can be merged. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| ! | ||
| ! CalculiX - A 3-dimensional finite element program | ||
| ! Copyright (C) 1998-2015 Guido Dhondt | ||
| ! | ||
| ! This program is free software; you can redistribute it and/or | ||
| ! modify it under the terms of the GNU General Public License as | ||
| ! published by the Free Software Foundation(version 2); | ||
| ! | ||
| ! | ||
| ! This program is distributed in the hope that it will be useful, | ||
| ! but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| ! GNU General Public License for more details. | ||
| ! | ||
| ! You should have received a copy of the GNU General Public License | ||
| ! along with this program; if not, write to the Free Software | ||
| ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| ! | ||
| ! This function is a copy of the function for calculation and printout of the lift and drag forces | ||
| ! | ||
| subroutine getc3d4elementgausspointcoords(nelem, elem_ids, | ||
| & co, kon, ipkon, elem_gp_coord) | ||
|
|
||
| implicit none | ||
|
|
||
| !Input/Output variables | ||
| integer :: nelem ! Number of elements | ||
| integer :: elem_ids(*) ! Element IDs, need to be adjusted for Fortran | ||
| real(8) :: co(3,*) ! Nodal coordinates of all nodes | ||
| integer :: kon(*) | ||
| integer :: ipkon(*) | ||
|
|
||
| real(8) :: elem_gp_coord(*) ! Gauss point coords | ||
|
|
||
| ! Internal variables | ||
| integer(4) :: iel, el_id, indexe, i, j, k, l | ||
| integer(4) :: iflag, idx, konl(4), gp_id | ||
| REAL(8) :: xl(3,4), xi, et, ze, xsj, shp(4,20) | ||
|
|
||
| include "gauss.f" | ||
|
|
||
| data iflag /1/ | ||
|
|
||
| ! Initialize gauss point coordinates to zero | ||
| do l = 1, nelem*3 | ||
| elem_gp_coord(l) = 0.0 | ||
| end do | ||
|
|
||
| do iel = 1, nelem | ||
| el_id = elem_ids(iel) | ||
|
|
||
| indexe=ipkon(el_id) | ||
|
|
||
| ! Local nodal coordinates | ||
| do i = 1, 4 | ||
| konl(i) = kon(indexe+i) | ||
| do j = 1, 3 | ||
| xl(j,i)=co(j,konl(i)) | ||
| end do | ||
| end do | ||
|
|
||
| ! One Gauss point per element | ||
| gp_id = 1 | ||
|
|
||
| ! gauss3d4: tet, 1 integration point | ||
| xi = gauss3d4(1,gp_id) | ||
| et = gauss3d4(2,gp_id) | ||
| ze = gauss3d4(3,gp_id) | ||
|
|
||
| ! Get the shape function | ||
| call shape4tet(xi,et,ze,xl,xsj,shp,iflag) | ||
|
|
||
| ! Calculate the Gauss point coordinates | ||
| do k = 1, 3 | ||
| idx = (iel - 1) * 3 + k | ||
| do l = 1, 4 | ||
| elem_gp_coord(idx)=elem_gp_coord(idx) | ||
| & +xl(k,l)*shp(4,l) | ||
| end do | ||
| end do | ||
|
|
||
| end do | ||
|
|
||
| return | ||
|
|
||
| end subroutine getc3d4elementgausspointcoords |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open discussion in the original PR: precice/precice.github.io#530 (comment)
Current state: some cleanup is needed to focus on the feature of this PR vs the feature introduced with #135.
Let's continue the discussion here.