Commit 8e8cd3b2 authored by Kirill Terekhov's avatar Kirill Terekhov

Move differential schemes examples from INMOST/Examples/* to separate...

Move differential schemes examples from INMOST/Examples/* to separate repositories; remove INMOST/Examples/Solver (similar to INMOST/Example/FVDiscr); add style.xsl for xml file with timing output to debuggers
parent a9692ed0
project(ADMFD)
add_executable(MFDDIFF diffusion.cpp)
add_executable(NMFDDIFF diffusion_nonlinear.cpp)
add_executable(MFDELAST elastic.cpp)
target_link_libraries(MFDDIFF inmost)
target_link_libraries(NMFDDIFF inmost)
target_link_libraries(MFDELAST inmost)
if(USE_SOLVER)
if(USE_SOLVER_ANI)
message("linking MFDDIFF with ani3d and BLAS")
target_link_libraries(MFDDIFF ani3d ${BLAS_LIBRARIES})
if(BLAS_LINKER_FLAGS)
set_target_properties(MFDDIFF PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
endif()
endif()
if(USE_SOLVER_PETSC)
message("linking MFDDIFF with PETSc")
target_link_libraries(MFDDIFF ${PETSC_LIBRARIES})
endif()
if(USE_SOLVER_TRILINOS)
message("linking MFDDIFF with Trilinos")
target_link_libraries(MFDDIFF ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
endif()
if(USE_SOLVER_METIS)
message("linking MFDDIFF with Metis")
target_link_libraries(MFDDIFF ${METIS_LIBRARIES})
endif()
if(USE_SOLVER_MONDRIAAN)
message("linking MFDDIFF with Mondriaan")
target_link_libraries(MFDDIFF ${MONDRIAAN_LIBRARIES})
endif()
if(USE_SOLVER_SUPERLU)
message("linking MFDDIFF with SuperLU")
target_link_libraries(MFDDIFF ${SUPERLU_LIBRARIES})
endif()
endif()
if(USE_PARTITIONER)
if(USE_PARTITIONER_ZOLTAN)
message("linking MFDDIFF with Zoltan")
target_link_libraries(MFDDIFF ${ZOLTAN_LIBRARIES})
endif()
if(USE_PARTITIONER_PARMETIS)
message("linking MFDDIFF with ParMETIS")
target_link_libraries(MFDDIFF ${PARMETIS_LIBRARIES})
endif()
endif()
if(USE_MPI)
message("linking MFDDIFF with MPI")
target_link_libraries(MFDDIFF ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(MFDDIFF PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
if(USE_SOLVER)
if(USE_SOLVER_ANI)
message("linking NMFDDIFF with ani3d and BLAS")
target_link_libraries(NMFDDIFF ani3d ${BLAS_LIBRARIES})
if(BLAS_LINKER_FLAGS)
set_target_properties(NMFDDIFF PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
endif()
endif()
if(USE_SOLVER_PETSC)
message("linking NMFDDIFF with PETSc")
target_link_libraries(NMFDDIFF ${PETSC_LIBRARIES})
endif()
if(USE_SOLVER_TRILINOS)
message("linking NMFDDIFF with Trilinos")
target_link_libraries(NMFDDIFF ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
endif()
if(USE_SOLVER_METIS)
message("linking NMFDDIFF with Metis")
target_link_libraries(NMFDDIFF ${METIS_LIBRARIES})
endif()
if(USE_SOLVER_MONDRIAAN)
message("linking NMFDDIFF with Mondriaan")
target_link_libraries(NMFDDIFF ${MONDRIAAN_LIBRARIES})
endif()
if(USE_SOLVER_SUPERLU)
message("linking NMFDDIFF with SuperLU")
target_link_libraries(NMFDDIFF ${SUPERLU_LIBRARIES})
endif()
endif()
if(USE_PARTITIONER)
if(USE_PARTITIONER_ZOLTAN)
message("linking NMFDDIFF with Zoltan")
target_link_libraries(NMFDDIFF ${ZOLTAN_LIBRARIES})
endif()
if(USE_PARTITIONER_PARMETIS)
message("linking NMFDDIFF with ParMETIS")
target_link_libraries(NMFDDIFF ${PARMETIS_LIBRARIES})
endif()
endif()
if(USE_MPI)
message("linking NMFDDIFF with MPI")
target_link_libraries(NMFDDIFF ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(NMFDDIFF PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
if(USE_SOLVER)
if(USE_SOLVER_ANI)
message("linking MFDELAST with ani3d and BLAS")
target_link_libraries(MFDELAST ani3d ${BLAS_LIBRARIES})
if(BLAS_LINKER_FLAGS)
set_target_properties(MFDELAST PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
endif()
endif()
if(USE_SOLVER_PETSC)
message("linking MFDELAST with PETSc")
target_link_libraries(MFDELAST ${PETSC_LIBRARIES})
endif()
if(USE_SOLVER_TRILINOS)
message("linking MFDELAST with Trilinos")
target_link_libraries(MFDELAST ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
endif()
if(USE_SOLVER_METIS)
message("linking MFDELAST with Metis")
target_link_libraries(MFDELAST ${METIS_LIBRARIES})
endif()
if(USE_SOLVER_MONDRIAAN)
message("linking MFDELAST with Mondriaan")
target_link_libraries(MFDELAST ${MONDRIAAN_LIBRARIES})
endif()
if(USE_SOLVER_SUPERLU)
message("linking MFDELAST with SuperLU")
target_link_libraries(MFDELAST ${SUPERLU_LIBRARIES})
endif()
endif()
if(USE_PARTITIONER)
if(USE_PARTITIONER_ZOLTAN)
message("linking MFDELAST with Zoltan")
target_link_libraries(MFDELAST ${ZOLTAN_LIBRARIES})
endif()
if(USE_PARTITIONER_PARMETIS)
message("linking MFDELAST with ParMETIS")
target_link_libraries(MFDELAST ${PARMETIS_LIBRARIES})
endif()
endif()
if(USE_MPI)
message("linking MFDELAST with MPI")
target_link_libraries(MFDELAST ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(MFDELAST PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS MFDDIFF EXPORT inmost-targets RUNTIME DESTINATION bin)
install(TARGETS NMFDDIFF EXPORT inmost-targets RUNTIME DESTINATION bin)
install(TARGETS MFDELAST EXPORT inmost-targets RUNTIME DESTINATION bin)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
project(ADVDIFF)
set(SOURCE main.cpp stencil.cpp checks.cpp limited_average.cpp save_mesh.cpp conv_diff.cpp)
set(HEADER stencil.h checks.h limited_average.h save_mesh.h conv_diff.h)
add_executable(ADVDIFF ${SOURCE} ${HEADER})
target_link_libraries(ADVDIFF inmost)
if(USE_SOLVER)
if(USE_SOLVER_ANI)
message("linking ADVDIFF with ani3d and BLAS")
target_link_libraries(ADVDIFF ani3d ${BLAS_LIBRARIES})
if(BLAS_LINKER_FLAGS)
set_target_properties(ADVDIFF PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
endif()
endif()
if(USE_SOLVER_PETSC)
message("linking ADVDIFF with PETSc")
target_link_libraries(ADVDIFF ${PETSC_LIBRARIES})
endif()
if(USE_SOLVER_TRILINOS)
message("linking ADVDIFF with Trilinos")
target_link_libraries(ADVDIFF ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
endif()
if(USE_SOLVER_METIS)
message("linking ADVDIFF with Metis")
target_link_libraries(ADVDIFF ${METIS_LIBRARIES})
endif()
if(USE_SOLVER_MONDRIAAN)
message("linking ADVDIFF with Mondriaan")
target_link_libraries(ADVDIFF ${MONDRIAAN_LIBRARIES})
endif()
if(USE_SOLVER_SUPERLU)
message("linking ADVDIFF with SuperLU")
target_link_libraries(ADVDIFF ${SUPERLU_LIBRARIES})
endif()
endif()
if(USE_PARTITIONER)
if(USE_PARTITIONER_ZOLTAN)
message("linking ADVDIFF with Zoltan")
target_link_libraries(ADVDIFF ${ZOLTAN_LIBRARIES})
endif()
if(USE_PARTITIONER_PARMETIS)
message("linking ADVDIFF with ParMETIS")
target_link_libraries(ADVDIFF ${PARMETIS_LIBRARIES})
endif()
endif()
if(USE_MPI)
message("linking ADVDIFF with MPI")
target_link_libraries(ADVDIFF ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(ADVDIFF PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS ADVDIFF EXPORT inmost-targets RUNTIME DESTINATION bin)
\ No newline at end of file
This diff is collapsed.
#ifndef __CHECKS_H
#define __CHECKS_H
#include "inmost.h"
/// Check that this will give M-matrix for i-th unknown.
/// @param i Position of the diagonal unknown.
/// @param flux Computed flux expression with derivatives.
/// @param name Name of the flux to be printed out.
/// @param print Print out errors.
bool check_flux_properties(INMOST_DATA_ENUM_TYPE i, const INMOST::variable & flux, const std::string & name, bool print = true);
///Check monotonicity of the matrix.
/// @param A Input matrix to be checked.
/// @param print Print out errors.
bool check_matrix_properties(const INMOST::Sparse::Matrix & A, bool print = true);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
SET GRIDGEN=..\build64_2010_INMOST\Examples\GridGen\Release\GridGen.exe
SET GENERATORS_FOLDER= ..\build64_2010_DiscretizationToolkit\Grids\generators\Release
:: quad grid
%GRIDGEN% 4 %1 %1 1 grid.pmf
:: %GRIDGEN% 4 80 81 1 grid.pmf
:: triangular grid
:: %GRIDGEN% 3 %1 %1 1 grid.pmf
:: hex grid
:: %GENERATORS_FOLDER%\hex_grid.exe %1
:: acute grid
:: %GENERATORS_FOLDER%\acute_grid.exe %1
:: nonconvex grid
:: %GENERATORS_FOLDER%\nonconvex_grid.exe %1
:: (advection only) discontinuous dirichlet condition problem
:: %GENERATORS_FOLDER%\adv_test00.exe grid.pmf grid_out.pmf
:: (advection only) zalesak disc rotation
:: %GENERATORS_FOLDER%\adv_test01.exe grid.pmf grid_out.pmf 4
:: (advection only) enright disc
:: %GENERATORS_FOLDER%\adv_test02.exe grid.pmf grid_out.pmf 4
:: (diffusion only) oblique barrier problem, linear solution
:: %GENERATORS_FOLDER%\fvca5_test7.exe grid.pmf grid_out.pmf
:: (advection-diffusion) oblique barrier problem, linear solution
:: %GENERATORS_FOLDER%\fvca5_test7_adv.exe grid.pmf grid_out.pmf
:: (diffusion only) mild anisotropy test2
:: %GENERATORS_FOLDER%\fvca5_test1_2.exe grid.pmf grid_out.pmf
:: (advection-reaction-diffusion) discontinuous
%GENERATORS_FOLDER%\adv_test03.exe grid.pmf grid_out.pmf
:: (diffusion with unsymmetric tensor)
:: %GENERATORS_FOLDER%\wugao_test3.exe grid.pmf grid_out.pmf
:: (advection-diffusion with unsymmetric tensor)
:: %GENERATORS_FOLDER%\wugao_test3_adv.exe grid.pmf grid_out.pmf
:: (dmp test)
:: %GENERATORS_FOLDER%\dmp_grid.exe .\grid.pmf 0.6 0 1 1 1 1000
::mpiexec -np 4 .\Release\NFVADV.exe .\grid_out.pmf %2
.\Release\NFVADV.exe .\grid_out.pmf %2
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment