base class for mesh
no functions defined yet, only common variables
This commit is contained in:
parent
badf9e9cca
commit
8f106ca8c4
|
@ -61,17 +61,21 @@ add_library(MATH OBJECT "math.f90")
|
||||||
add_dependencies(MATH FEsolving)
|
add_dependencies(MATH FEsolving)
|
||||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MATH>)
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MATH>)
|
||||||
|
|
||||||
|
add_library(MESH_BASE OBJECT "mesh_base.f90")
|
||||||
|
add_dependencies(MESH_BASE MATH)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MESH_BASE>)
|
||||||
|
|
||||||
# SPECTRAL solver and FEM solver use different mesh files
|
# SPECTRAL solver and FEM solver use different mesh files
|
||||||
if (PROJECT_NAME STREQUAL "DAMASK_spectral")
|
if (PROJECT_NAME STREQUAL "DAMASK_spectral")
|
||||||
add_library(MESH OBJECT "mesh_grid.f90")
|
add_library(MESH OBJECT "mesh_grid.f90")
|
||||||
add_dependencies(MESH MATH ELEMENT)
|
add_dependencies(MESH MATH)
|
||||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MESH>)
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MESH>)
|
||||||
elseif (PROJECT_NAME STREQUAL "DAMASK_FEM")
|
elseif (PROJECT_NAME STREQUAL "DAMASK_FEM")
|
||||||
add_library(FEZoo OBJECT "FEM_zoo.f90")
|
add_library(FEZoo OBJECT "FEM_zoo.f90")
|
||||||
add_dependencies(FEZoo MATH)
|
add_dependencies(FEZoo MATH)
|
||||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:FEZoo>)
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:FEZoo>)
|
||||||
add_library(MESH OBJECT "mesh_FEM.f90")
|
add_library(MESH OBJECT "mesh_FEM.f90")
|
||||||
add_dependencies(MESH FEZoo ELEMENT)
|
add_dependencies(MESH FEZoo)
|
||||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MESH>)
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MESH>)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
|
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
|
!> @author Christoph Koords, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
|
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
|
!> @brief Sets up the mesh for the solvers MSC.Marc,FEM, Abaqus and the spectral solver
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
module mesh_base
|
||||||
|
|
||||||
|
use, intrinsic :: iso_c_binding
|
||||||
|
use prec, only: &
|
||||||
|
pStringLen, &
|
||||||
|
pReal, &
|
||||||
|
pInt
|
||||||
|
use element, only: &
|
||||||
|
tElement
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
|
||||||
|
!---------------------------------------------------------------------------------------------------
|
||||||
|
!> Properties of a the whole mesh (consisting of one type of elements)
|
||||||
|
!---------------------------------------------------------------------------------------------------
|
||||||
|
type, public :: tMesh
|
||||||
|
type(tElement) :: &
|
||||||
|
elem
|
||||||
|
real(pReal), dimension(:,:), allocatable, public :: &
|
||||||
|
ipVolume, & !< volume associated with each IP (initially!)
|
||||||
|
node0, & !< node x,y,z coordinates (initially)
|
||||||
|
node !< node x,y,z coordinates (deformed)
|
||||||
|
integer(pInt), dimension(:,:), allocatable, public :: &
|
||||||
|
cellnodeParent !< cellnode's parent element ID, cellnode's intra-element ID
|
||||||
|
character(pStringLen) :: solver = "undefined"
|
||||||
|
integer(pInt) :: &
|
||||||
|
Nnodes, & !< total number of nodes in mesh
|
||||||
|
Nelems = -1_pInt, &
|
||||||
|
elemType, &
|
||||||
|
Ncells, &
|
||||||
|
nIPneighbors, &
|
||||||
|
NcellNodes, &
|
||||||
|
maxElemsPerNode
|
||||||
|
integer(pInt), dimension(:), allocatable, public :: &
|
||||||
|
homogenizationAt, &
|
||||||
|
microstructureAt
|
||||||
|
integer(pInt), dimension(:,:), allocatable, public :: &
|
||||||
|
connectivity
|
||||||
|
end type tMesh
|
||||||
|
|
||||||
|
end module mesh_base
|
Loading…
Reference in New Issue