Skip to content

Commit

Permalink
Merge branch 'release/1.2.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
szaghi committed Mar 31, 2016
2 parents bcd811a + 4a9fdf0 commit f61278d
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 32 deletions.
56 changes: 25 additions & 31 deletions fobos
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[modes]
modes = shared-gnu static-gnu test-driver-gnu
shared-gnu-debug static-gnu-debug test-driver-gnu-debug
shared-intel static-intel test-driver-intel
shared-intel-debug static-intel-debug test-driver-intel-debug
modes = shared-gnu static-gnu tests-gnu
shared-gnu-debug static-gnu-debug tests-gnu-debug
shared-intel static-intel tests-intel
shared-intel-debug static-intel-debug tests-intel-debug

[common-variables]
$CSHARED_GNU = -cpp -c -fPIC -frealloc-lhs
$CSHARED_INT = -cpp -c -fpic -assume realloc_lhs
$LSHARED = -shared
$CSTATIC_GNU = -cpp -c -frealloc-lhs
$CSTATIC_INT = -cpp -c -assume realloc_lhs
$DEBUG_GNU = -O0 -g3 -Warray-bounds -Wcharacter-truncation -Wline-truncation -Wimplicit-interface -Wimplicit-procedure -Wunderflow -Wuninitialized -fcheck=all -fmodule-private -ffree-line-length-132 -fimplicit-none -fbacktrace -fdump-core -finit-real=nan -std=f2003 -fall-intrinsics
$DEBUG_GNU = -O0 -g3 -Warray-bounds -Wcharacter-truncation -Wline-truncation -Wimplicit-interface -Wimplicit-procedure -Wunderflow -Wuninitialized -fcheck=all -fmodule-private -ffree-line-length-132 -fimplicit-none -fbacktrace -fdump-core -finit-real=nan
$DEBUG_INT = -O0 -debug all -check all -warn all -extend-source 132 -traceback -gen-interfaces#-fpe-all=0 -fp-stack-check -fstack-protector-all -ftrapuv -no-ftz -std03
$OPTIMIZE = -O2
$EXDIRS = src/third_party/BeFoR64/src/tests/ src/third_party/PENF/src/tests/
Expand All @@ -30,11 +30,9 @@ build_dir = ./static/
output = Lib_VTK_IO.a
mklib = static

[test-driver-gnu]
[tests-gnu]
template = template-static-gnu
target = src/test/Test_Driver.f90
build_dir = ./Test_Driver/
output = Test_Driver
build_dir = ./tests

[shared-gnu-debug]
template = template-shared-gnu-debug
Expand All @@ -50,11 +48,9 @@ build_dir = ./static/
output = Lib_VTK_IO.a
mklib = static

[test-driver-gnu-debug]
[tests-gnu-debug]
template = template-static-gnu-debug
target = src/test/Test_Driver.f90
build_dir = ./Test_Driver/
output = Test_Driver
build_dir = ./tests

[shared-intel]
template = template-shared-intel
Expand All @@ -70,11 +66,9 @@ build_dir = ./static/
output = Lib_VTK_IO.a
mklib = static

[test-driver-intel]
[tests-intel]
template = template-static-intel
target = src/test/Test_Driver.f90
build_dir = ./Test_Driver/
output = Test_Driver
build_dir = ./tests

[shared-intel-debug]
template = template-shared-intel-debug
Expand All @@ -90,11 +84,9 @@ build_dir = ./static/
output = Lib_VTK_IO.a
mklib = static

[test-driver-intel-debug]
[tests-intel-debug]
template = template-static-intel-debug
target = src/test/Test_Driver.f90
build_dir = ./Test_Driver/
output = Test_Driver
build_dir = ./tests

#templates
[template-shared-gnu]
Expand Down Expand Up @@ -217,16 +209,18 @@ rule = tar -czf Lib_VTK_IO.tar.gz *

[rule-makecoverage]
help = Rule for performing coverage analysis
rule_1 = FoBiS.py clean -mode test-driver-gnu
rule_2 = FoBiS.py build -mode test-driver-gnu -coverage
rule_3 = ./Test_Driver/Test_Driver -all
rule_4 = gcov -o Test_Driver/obj/ src/lib/*
rule_1 = FoBiS.py clean -mode tests-gnu
rule_2 = FoBiS.py build -mode tests-gnu -coverage
rule_3 = ./tests/Test_Driver -all
rule_4 = ./tests/test_fs
rule_5 = gcov -o tests/obj/ src/lib/*

[rule-coverage-analysis]
help = Rule for performing coverage analysis and saving reports in markdown
rule_1 = FoBiS.py clean -mode test-driver-gnu
rule_2 = FoBiS.py build -mode test-driver-gnu -coverage
rule_3 = ./Test_Driver/Test_Driver -all
rule_4 = gcov -o Test_Driver/obj/ src/lib/*
rule_5 = FoBiS.py rule -gcov_analyzer wiki/ Coverage-Analysis
rule_6 = rm -f *.gcov XML_*vt?
rule_1 = FoBiS.py clean -mode tests-gnu
rule_2 = FoBiS.py build -mode tests-gnu -coverage
rule_3 = ./tests/Test_Driver -all
rule_4 = ./tests/test_fs
rule_5 = gcov -o tests/obj/ src/lib/*
rule_6 = FoBiS.py rule -gcov_analyzer wiki/ Coverage-Analysis
rule_7 = rm -f *.gcov XML_*vt?
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions src/tests/test_fs.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
program fs_test
use Lib_VTK_IO
use penf
implicit none
! dataset dimensions
real, parameter :: delta=0.1
integer, parameter :: nx1=0, nx2=47, ny1=0, ny2=24, nz1=0, nz2=6
integer :: nn=(nx2-nx1+1)*(ny2-ny1+1)*(nz2-nz1+1)
integer :: nx1r, nx2r, ny1r, ny2r, nz1r, nz2r, nnr
! ! grid coordinates
real, dimension(nx1:nx2,ny1:ny2,nz1:nz2) :: x, y, z
real, allocatable, dimension(:,:,:) :: xr, yr, zr
! variables associated at grid nodes
real, dimension(nx1:nx2,ny1:ny2,nz1:nz2) :: v_R
real, allocatable, dimension(:,:,:) :: v_Rr
! auxiliary variables
integer :: E_IO
integer :: i, j, k

do k=nz1,nz2
do j=ny1,ny2
do i=nx1,nx2
x( i, j, k) = i * delta
y( i, j, k) = j * delta
z( i, j, k) = k * delta
enddo
enddo
enddo

call random_number(v_R)

! save
E_IO = VTK_INI_XML_WRITE(fformat='RAW', filename='XML_STRG.vts', mesh_topology='StructuredGrid',&
nx1=nx1, nx2=nx2, ny1=ny1, ny2=ny2, nz1=nz1, nz2=nz2)
E_IO = VTK_GEO_XML_WRITE(nx1=nx1, nx2=nx2, ny1=ny1, ny2=ny2, nz1=nz1, nz2=nz2, NN=nn, X=x, Y=y, Z=z)
E_IO = VTK_DAT_XML(var_location='node', var_block_action='open')
E_IO = VTK_VAR_XML(NC_NN=nn, varname='real scalar', var=v_R)
E_IO = VTK_DAT_XML(var_location='node', var_block_action='close')
E_IO = VTK_GEO_XML_WRITE()
E_IO = VTK_END_XML()

! load
E_IO = VTK_INI_XML_READ(fformat='RAW', filename='XML_STRG.vts', mesh_topology='StructuredGrid')
E_IO = VTK_GEO_XML_READ(nx1r, nx2r, ny1r, ny2r, nz1r, nz2r, NN=nnr, X=xr, Y=yr, Z=zr)
! E_IO = VTK_END_XML()
print*,'x(1,1,1),y(1,1,1),z(1,1,1): ',x(1,1,1),y(1,1,1),z(1,1,1)
print*,'xr(1,1,1),yr(1,1,1),zr(1,1,1): ',xr(1,1,1),yr(1,1,1),zr(1,1,1)
stop
endprogram fs_test
2 changes: 1 addition & 1 deletion src/third_party/PENF
Submodule PENF updated 1 files
+5 −1 src/lib/penf.F90

0 comments on commit f61278d

Please sign in to comment.