overwriting of init did not work

This commit is contained in:
Martin Diehl 2019-02-01 21:56:38 +01:00
parent 8e0556fe3e
commit 3d750e7933
1 changed files with 15 additions and 12 deletions

View File

@ -84,14 +84,13 @@ use PETScis
contains contains
procedure :: init => tMesh_FEM_init procedure, pass(self) :: tMesh_FEM_init
generic, public :: init => tMesh_FEM_init
end type tMesh_FEM end type tMesh_FEM
type(tMesh_FEM), public, protected :: theMesh type(tMesh_FEM), public, protected :: theMesh
public :: & public :: &
mesh_init, & mesh_init, &
mesh_FEM_build_ipVolumes, & mesh_FEM_build_ipVolumes, &
@ -100,24 +99,26 @@ use PETScis
contains contains
subroutine tMesh_FEM_init(self,dimen,order) subroutine tMesh_FEM_init(self,dimen,order,nodes)
implicit none implicit none
integer(pInt), intent(in) :: dimen,order integer, intent(in) :: dimen
integer(pInt), intent(in) :: order
real(pReal), intent(in), dimension(:,:) :: nodes
class(tMesh_FEM) :: self class(tMesh_FEM) :: self
if (dimen == 2_pInt) then if (dimen == 2_pInt) then
if (order == 1_pInt) call self%elem%init(1_pInt) if (order == 1_pInt) call self%tMesh%init('mesh',1_pInt,nodes)
if (order == 2_pInt) call self%elem%init(2_pInt) if (order == 2_pInt) call self%tMesh%init('mesh',2_pInt,nodes)
elseif(dimen == 3_pInt) then elseif(dimen == 3_pInt) then
if (order == 1_pInt) call self%elem%init(6_pInt) if (order == 1_pInt) call self%tMesh%init('mesh',6_pInt,nodes)
if (order == 2_pInt) call self%elem%init(8_pInt) if (order == 2_pInt) call self%tMesh%init('mesh',8_pInt,nodes)
endif endif
end subroutine tMesh_FEM_init end subroutine tMesh_FEM_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief initializes the mesh by calling all necessary private routines the mesh module !> @brief initializes the mesh by calling all necessary private routines the mesh module
!! Order and routines strongly depend on type of solver !! Order and routines strongly depend on type of solver
@ -273,7 +274,9 @@ subroutine mesh_init()
mesh_homogenizationAt = mesh_element(3,:) mesh_homogenizationAt = mesh_element(3,:)
mesh_microstructureAt = mesh_element(4,:) mesh_microstructureAt = mesh_element(4,:)
!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!
call theMesh%init(dimplex,integrationOrder) allocate(mesh_node0(3,mesh_Nnodes),source=0.0_pReal)
call theMesh%init(dimplex,integrationOrder,mesh_node0)
end subroutine mesh_init end subroutine mesh_init