diff --git a/samples/fortrantest/CMakeLists.txt b/samples/fortrantest/CMakeLists.txt new file mode 100644 index 0000000..128ad8e --- /dev/null +++ b/samples/fortrantest/CMakeLists.txt @@ -0,0 +1,4 @@ +enable_language(Fortran) + +add_executable(fortrantest main.f90) +target_link_libraries(fortrantest astaroth_core) diff --git a/samples/fortrantest/main.f90 b/samples/fortrantest/main.f90 new file mode 100644 index 0000000..1eba03f --- /dev/null +++ b/samples/fortrantest/main.f90 @@ -0,0 +1,23 @@ +program pc + use, intrinsic :: iso_c_binding + implicit none + + include "astaroth.f90" + + type(AcMeshInfo) :: info + type(c_ptr) :: device + + print *, "Num int params" + print *, AC_NUM_INT_PARAMS + + ! Setup config + info%int_params(AC_nx + 1) = 128 + info%int_params(AC_ny + 1) = 128 + info%int_params(AC_nz + 1) = 128 + call acupdatebuiltinparams(info) + + call acdevicecreate(0, info, device) + call acdeviceprintinfo(device) + call acdevicedestroy(device) + +end program