fPsi functions for edges
I need to make a common module for mesh, many functions for elements are shared. Also, try to reduce the 'select type' statements, but I don't know enough Fortran for it.
This commit is contained in:
parent
e7e6e1bece
commit
fbbb0d5d13
7 changed files with 114 additions and 28 deletions
|
|
@ -97,6 +97,10 @@ MODULE moduleMesh
|
|||
PROCEDURE(getNodesEdge_interface), DEFERRED, PASS:: getNodes
|
||||
PROCEDURE(intersectionEdge_interface), DEFERRED, PASS:: intersection
|
||||
PROCEDURE(randPosEdge_interface), DEFERRED, PASS:: randPos
|
||||
PROCEDURE(fPsi_interface), DEFERRED, NOPASS:: fPsi
|
||||
!Gather value and spatial derivative on the nodes at position Xi
|
||||
PROCEDURE, PASS, PRIVATE:: gatherF_edge_scalar
|
||||
GENERIC:: gatherF => gatherF_edge_scalar
|
||||
|
||||
END TYPE meshEdge
|
||||
|
||||
|
|
@ -561,6 +565,22 @@ MODULE moduleMesh
|
|||
|
||||
END FUNCTION gatherF_cell_scalar
|
||||
|
||||
! Gather the value of valNodes at position Xi of an edge
|
||||
pure function gatherF_edge_scalar(self, Xi, nNodes, valNodes) RESULT(f)
|
||||
implicit none
|
||||
|
||||
class(meshEdge), intent(in):: self
|
||||
real(8), intent(in):: Xi(1:3)
|
||||
integer, intent(in):: nNodes
|
||||
real(8), intent(in):: valNodes(1:nNodes)
|
||||
real(8):: f
|
||||
real(8):: fPsi(1:nNodes)
|
||||
|
||||
fPsi = self%fPsi(Xi, nNodes)
|
||||
f = dot_product(fPsi, valNodes)
|
||||
|
||||
end function gatherF_edge_scalar
|
||||
|
||||
!Gather the value of valNodes (array) at position Xi
|
||||
PURE FUNCTION gatherF_cell_array(self, Xi, nNodes, valNodes) RESULT(f)
|
||||
IMPLICIT NONE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue