...
 
Commits (1)
This diff is collapsed.
if (NOT ${AEROSOL_PATH} STREQUAL ${AEROSOL_HOME})
set (AEROSOL_IO_LIBRARY "NOTFOUND")
set (AEROSOL_MESH_LIBRARY "NOTFOUND")
set (AEROSOL_COMMON_LIBRARY "NOTFOUND")
set (AEROSOL_INCLUDE_DIR "NOTFOUND")
endif ()
set (AEROSOL_PATH ${AEROSOL_HOME} CACHE INTERNAL "")
find_path (AEROSOL_INCLUDE_DIR common/Defines.hpp HINTS ${AEROSOL_PATH} PATH_SUFFIXES include)
find_library (AEROSOL_IO_LIBRARY NAMES IO HINTS ${AEROSOL_PATH} PATH_SUFFIXES lib)
find_library (AEROSOL_MESH_LIBRARY NAMES Mesh HINTS ${AEROSOL_PATH} PATH_SUFFIXES lib)
find_library (AEROSOL_COMMON_LIBRARY NAMES Common HINTS ${AEROSOL_PATH} PATH_SUFFIXES lib)
if (AEROSOL_INCLUDE_DIR AND AEROSOL_IO_LIBRARY AND AEROSOL_MESH_LIBRARY AND AEROSOL_COMMON_LIBRARY)
set (AEROSOL_FOUND TRUE)
endif ()
if (AEROSOL_FOUND)
if (NOT AEROSOL_FIND_QUIETLY)
message (STATUS "Found AEROSOL : ${AEROSOL_IO_LIBRARY}")
endif (NOT AEROSOL_FIND_QUIETLY)
else (AEROSOL_FOUND)
if (AEROSOL_FIND_REQUIRED)
message (FATAL_ERROR "Could not find AEROSOL. You have to define variable AEROSOL_HOME")
endif (AEROSOL_FIND_REQUIRED)
endif (AEROSOL_FOUND)
mark_as_advanced (AEROSOL_INCLUDE_DIR AEROSOL_IO_LIBRARY AEROSOL_MESH_LIBRARY
AEROSOL_COMMON_LIBRARY)
SET(LIBMESH5_PATH ${LIBMESH5_HOME})
FIND_PATH(LIBMESH5_INCLUDE_DIR libmesh5.h PATHS ${LIBMESH5_PATH} PATH_SUFFIXES include)
FIND_LIBRARY(LIBMESH5_LIBRARY NAMES libmesh5.a PATHS ${LIBMESH5_PATH} PATH_SUFFIXES lib)
IF (LIBMESH5_INCLUDE_DIR AND LIBMESH5_LIBRARY)
SET(LIBMESH5_FOUND TRUE)
ENDIF (LIBMESH5_INCLUDE_DIR AND LIBMESH5_LIBRARY)
IF (LIBMESH5_FOUND)
IF (NOT LIBMESH5_FIND_QUIETLY)
MESSAGE(STATUS "Found LIBMESH5 : ${LIBMESH5_LIBRARY}")
ENDIF (NOT LIBMESH5_FIND_QUIETLY)
ELSE (LIBMESH5_FOUND)
IF (LIBMESH5_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find LIBMESH5. You have to define variable LIBMESH5_HOME")
ENDIF (LIBMESH5_FIND_REQUIRED)
ENDIF (LIBMESH5_FOUND)
MARK_AS_ADVANCED(LIBMESH5_INCLUDE_DIR LIBMESH5_LIBRARY)
SET(MMG3D_PATH ${MMG3D_HOME})
FIND_PATH(MMG3D_INCLUDE_DIR libmmg3d.h PATHS ${MMG3D_PATH} PATH_SUFFIXES include)
FIND_LIBRARY(MMG3D_LIBRARY NAMES libmmg3d.a PATHS ${MMG3D_PATH} PATH_SUFFIXES lib)
if (PAMPA_MMG3D_SCOTCH)
FIND_LIBRARY(SCOTCH_MMG3D_LIBRARY NAMES libscotch.a PATHS ${MMG3D_PATH} PATH_SUFFIXES lib)
endif (PAMPA_MMG3D_SCOTCH)
IF (MMG3D_INCLUDE_DIR AND MMG3D_LIBRARY)
SET(MMG3D_FOUND TRUE)
ENDIF (MMG3D_INCLUDE_DIR AND MMG3D_LIBRARY)
IF (MMG3D_FOUND)
IF (NOT MMG3D_FIND_QUIETLY)
MESSAGE(STATUS "Found MMG3D : ${MMG3D_LIBRARY}")
ENDIF (NOT MMG3D_FIND_QUIETLY)
ELSE (MMG3D_FOUND)
IF (MMG3D_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find MMG3D. You have to define variable MMG3D_HOME")
ENDIF (MMG3D_FIND_REQUIRED)
ENDIF (MMG3D_FOUND)
MARK_AS_ADVANCED(MMG3D_INCLUDE_DIR MMG3D_LIBRARY)
set(MMG3D4_PATH ${MMG3D4_HOME})
FIND_PATH(MMG3D4_INCLUDE_DIR libmmg3d4.h PATHS ${MMG3D4_PATH} PATH_SUFFIXES include)
FIND_LIBRARY(MMG3D4_LIBRARY NAMES libmmg3d4.a PATHS ${MMG3D4_PATH} PATH_SUFFIXES lib)
if (PAMPA_MMG3D4_SCOTCH)
FIND_LIBRARY(SCOTCH_MMG3D4_LIBRARY NAMES libscotch.a PATHS ${MMG3D4_PATH} PATH_SUFFIXES lib)
endif (PAMPA_MMG3D4_SCOTCH)
IF (MMG3D4_INCLUDE_DIR AND MMG3D4_LIBRARY)
SET(MMG3D4_FOUND TRUE)
ENDIF (MMG3D4_INCLUDE_DIR AND MMG3D4_LIBRARY)
IF (MMG3D4_FOUND)
IF (NOT MMG3D4_FIND_QUIETLY)
MESSAGE(STATUS "Found MMG3D4 : ${MMG3D4_LIBRARY}")
ENDIF (NOT MMG3D4_FIND_QUIETLY)
ELSE (MMG3D4_FOUND)
IF (MMG3D4_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find MMG3D4. You have to define variable MMG3D4_HOME")
ENDIF (MMG3D4_FIND_REQUIRED)
ENDIF (MMG3D4_FOUND)
MARK_AS_ADVANCED(MMG3D4_INCLUDE_DIR MMG3D4_LIBRARY)
SET(MMG3D5_PATH ${MMG3D5_HOME})
FIND_PATH(MMG3D5_INCLUDE_DIR libmmg3d5.h PATHS ${MMG3D5_PATH} PATH_SUFFIXES include)
FIND_LIBRARY(MMG3D5_LIBRARY NAMES libmmg3d5.a PATHS ${MMG3D5_PATH} PATH_SUFFIXES lib)
if (PAMPA_MMG3D5_SCOTCH)
FIND_LIBRARY(SCOTCH_MMG3D5_LIBRARY NAMES libscotch.a PATHS ${MMG3D5_PATH} PATH_SUFFIXES lib)
endif (PAMPA_MMG3D5_SCOTCH)
IF (MMG3D5_INCLUDE_DIR AND MMG3D5_LIBRARY)
SET(MMG3D5_FOUND TRUE)
ENDIF (MMG3D5_INCLUDE_DIR AND MMG3D5_LIBRARY)
IF (MMG3D5_FOUND)
IF (NOT MMG3D5_FIND_QUIETLY)
MESSAGE(STATUS "Found MMG3D5 : ${MMG3D5_LIBRARY}")
ENDIF (NOT MMG3D5_FIND_QUIETLY)
ELSE (MMG3D5_FOUND)
IF (MMG3D5_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find MMG3D5. You have to define variable MMG3D5_HOME")
ENDIF (MMG3D5_FIND_REQUIRED)
ENDIF (MMG3D5_FOUND)
MARK_AS_ADVANCED(MMG3D5_INCLUDE_DIR MMG3D5_LIBRARY)
SET(MSHINT_PATH ${MSHINT_HOME})
FIND_PATH(MSHINT_INCLUDE_DIR mshint.h PATHS ${MSHINT_PATH} PATH_SUFFIXES include)
FIND_LIBRARY(MSHINT_LIBRARY NAMES libmshint.a PATHS ${MSHINT_PATH} PATH_SUFFIXES lib)
IF (MSHINT_INCLUDE_DIR AND MSHINT_LIBRARY)
SET(MSHINT_FOUND TRUE)
ENDIF (MSHINT_INCLUDE_DIR AND MSHINT_LIBRARY)
IF (MSHINT_FOUND)
IF (NOT MSHINT_FIND_QUIETLY)
MESSAGE(STATUS "Found MSHINT : ${MSHINT_LIBRARY}")
ENDIF (NOT MSHINT_FIND_QUIETLY)
ELSE (MSHINT_FOUND)
IF (MSHINT_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find MSHINT. You have to define variable MSHINT_HOME")
ENDIF (MSHINT_FIND_REQUIRED)
ENDIF (MSHINT_FOUND)
MARK_AS_ADVANCED(MSHINT_INCLUDE_DIR MSHINT_LIBRARY)
if (NOT ${NETLOC_PATH} STREQUAL ${NETLOC_HOME})
set (NETLOC_LIBRARY "NOTFOUND")
set (NETLOC_INCLUDE_DIR "NOTFOUND")
endif ()
set (NETLOC_PATH ${NETLOC_HOME} CACHE INTERNAL "")
find_path (NETLOC_INCLUDE_DIR netlocscotch.h HINTS ${NETLOC_PATH} PATH_SUFFIXES include)
find_library (NETLOC_LIBRARY NAMES netlocscotch HINTS ${NETLOC_PATH} PATH_SUFFIXES lib)
if (NETLOC_INCLUDE_DIR AND NETLOC_LIBRARY)
set (NETLOC_FOUND TRUE)
endif (NETLOC_INCLUDE_DIR AND NETLOC_LIBRARY)
if (NETLOC_FOUND)
if (NOT NETLOC_FIND_QUIETLY)
message (STATUS "Found NETLOC : ${NETLOC_LIBRARY}")
endif (NOT NETLOC_FIND_QUIETLY)
else (NETLOC_FOUND)
if (NETLOC_FIND_REQUIRED)
message (FATAL_ERROR "Could not find NETLOC. You have to define variable NETLOC_HOME")
endif (NETLOC_FIND_REQUIRED)
endif (NETLOC_FOUND)
mark_as_advanced (NETLOC_INCLUDE_DIR NETLOC_LIBRARY SCOTCH_LIBRARY)
if (NOT ${PTSCOTCH_PATH} STREQUAL ${PTSCOTCH_HOME})
set (PTSCOTCH_LIBRARY "NOTFOUND")
set (SCOTCH_LIBRARY "NOTFOUND")
set (PTSCOTCH_EXTRA_LIBRARY "NOTFOUND")
set (PTSCOTCH_INCLUDE_DIR "NOTFOUND")
endif ()
set (PTSCOTCH_PATH ${PTSCOTCH_HOME} CACHE INTERNAL "")
find_path (PTSCOTCH_INCLUDE_DIR ptscotch${PTSCOTCH_SUFFIX}.h HINTS ${PTSCOTCH_PATH} PATH_SUFFIXES include)
find_library (PTSCOTCH_LIBRARY NAMES ptscotch${PTSCOTCH_SUFFIX} HINTS ${PTSCOTCH_PATH} PATH_SUFFIXES lib)
find_library (SCOTCH_LIBRARY NAMES scotch${PTSCOTCH_SUFFIX} HINTS ${PTSCOTCH_PATH} PATH_SUFFIXES lib)
find_library (PTSCOTCH_EXTRA_LIBRARY NAMES ptscotcherr${PTSCOTCH_SUFFIX} HINTS ${PTSCOTCH_PATH} PATH_SUFFIXES lib)
if (PTSCOTCH_INCLUDE_DIR AND PTSCOTCH_LIBRARY AND SCOTCH_LIBRARY AND PTSCOTCH_EXTRA_LIBRARY)
set (PTSCOTCH_FOUND TRUE)
endif (PTSCOTCH_INCLUDE_DIR AND PTSCOTCH_LIBRARY AND SCOTCH_LIBRARY AND
PTSCOTCH_EXTRA_LIBRARY)
if (PTSCOTCH_FOUND)
if (NOT PTSCOTCH_FIND_QUIETLY)
message (STATUS "Found PTSCOTCH : ${PTSCOTCH_LIBRARY}")
endif (NOT PTSCOTCH_FIND_QUIETLY)
else (PTSCOTCH_FOUND)
if (PTSCOTCH_FIND_REQUIRED)
message (FATAL_ERROR "Could not find PTSCOTCH. You have to define variable PTSCOTCH_HOME")
endif (PTSCOTCH_FIND_REQUIRED)
endif (PTSCOTCH_FOUND)
mark_as_advanced (PTSCOTCH_INCLUDE_DIR PTSCOTCH_LIBRARY SCOTCH_LIBRARY
PTSCOTCH_EXTRA_LIBRARY PTSCOTCH_SUFFIX)
SET(TETGEN_PATH ${TETGEN_HOME})
FIND_PATH(TETGEN_INCLUDE_DIR tetgen.h PATHS ${TETGEN_PATH} PATH_SUFFIXES include)
FIND_LIBRARY(TETGEN_LIBRARY NAMES libtet.a PATHS ${TETGEN_PATH} PATH_SUFFIXES lib)
IF (TETGEN_INCLUDE_DIR AND TETGEN_LIBRARY)
SET(TETGEN_FOUND TRUE)
ENDIF (TETGEN_INCLUDE_DIR AND TETGEN_LIBRARY)
IF (TETGEN_FOUND)
IF (NOT TETGEN_FIND_QUIETLY)
MESSAGE(STATUS "Found TETGEN : ${TETGEN_LIBRARY}")
ENDIF (NOT TETGEN_FIND_QUIETLY)
ELSE (TETGEN_FOUND)
IF (TETGEN_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find TETGEN. You have to define variable TETGEN_HOME")
ENDIF (TETGEN_FIND_REQUIRED)
ENDIF (TETGEN_FOUND)
MARK_AS_ADVANCED(TETGEN_INCLUDE_DIR TETGEN_LIBRARY)
#!/bin/bash
rm -f $4-*
$1 -n $2 $3 $4
cat $4-* > $4
diff $4 $5
#!/bin/bash
rm -f $2
$1 $2
diff $2 $3
#!/bin/bash
#echo $*
opath=$( pwd )
echo "/* Generated file by $0 */" > $opath/versions_ext.h
echo -e "Searching versions for external tools..."
for i in $*; do
prgm=$( echo $i|awk -F: '{print $1}' )
echo -e "\tExternal tool:$prgm"
path=$( echo $i|awk -F: '{print $2}' )
files=$( echo $i|awk -F: '{print $3}'|sed -e 's/,/ /g' )
cd $path
res=$(git rev-parse 2>/dev/null)
if [ $? == 0 ];then
#echo "depot git pour $prgm"
scm="git"
rev=$( git log --pretty=oneline --abbrev-commit --abbrev=10 -1|awk '{print $1}' )
# not commited files
notc=$( git diff HEAD --name-only|wc -l )
else
res=$(svn status 2>&1 |grep -v "not a working copy")
if [ $? == 0 ]; then
#echo "depot svn pour $prgm"
scm="svn"
#rev=$( svn log -l 1|grep "^r"|awk '{print $1}' )
rev=$( svn info|grep Revision|awk '{print $2}' )
# not commited files
notc=$( svn st|grep "^M"|wc -l )
else
#echo "ni git ni svn pour $prgm"
scm="none"
rev="none"
notc="infinity"
fi
fi
echo -e "\t\tFind modified files after last building..."
cmd="find $path -type f"
for file in $files; do
cmd="$cmd -a -cnewer $file"
done
echo -e "\t\tDone"
chgd=$( $cmd | wc -l )
echo "#define ${prgm}_PATH \"$path\"" >> $opath/versions_ext.h
echo "#define ${prgm}_SCM \"$scm\"" >> $opath/versions_ext.h
echo "#define ${prgm}_REV \"$rev\"" >> $opath/versions_ext.h
echo "/* Number of files changed after last building */" >> $opath/versions_ext.h
echo "#define ${prgm}_CHGD \"$chgd\"" >> $opath/versions_ext.h
echo "/* Not commited files */" >> $opath/versions_ext.h
echo "#define ${prgm}_NOTC \"$notc\"" >> $opath/versions_ext.h
echo -e "\tDone"
done
#!/bin/bash
#echo $*
oldfile=$1
newfile=$2
prgm=$3
path=$4
cd $path
res=$(git rev-parse 2>/dev/null)
if [ $? == 0 ];then
#echo "depot git pour $prgm"
scm="git"
rev=$( git log --pretty=oneline --abbrev-commit --abbrev=10 -1|awk '{print $1}' )
# not commited files
notc=$( git diff HEAD --name-only|wc -l )
else
res=$(svn status 2>&1 |grep -v "not a working copy")
if [ $? == 0 ]; then
#echo "depot svn pour $prgm"
scm="svn"
#rev=$( svn log -l 1|grep "^r"|awk '{print $1}' )
rev=$( svn info|grep Revision|awk '{print $2}' )
# not commited files
notc=$( svn st|grep "^M"|wc -l )
else
#echo "ni git ni svn pour $prgm"
scm="none"
rev="none"
notc="infinity"
fi
fi
echo "#define ${prgm}_PATH \"$path\"" >> $oldfile
echo "#define ${prgm}_SCM \"$scm\"" >> $oldfile
echo "#define ${prgm}_REV \"$rev\"" >> $oldfile
echo "/* Number of files changed after last building */" >> $oldfile
echo "/* Not commited files */" >> $oldfile
echo "#define ${prgm}_NOTC \"$notc\"" >> $oldfile
cmd=$( diff -q $oldfile $newfile)
if [ ! $? == 0 ]; then
cp $oldfile $newfile
fi
Cette copie de la distribution logicielle Scotch 5.2 est distribuée
selon les termes de la licence de logiciel libre CeCILL-C.
Une copie du texte de cette licence se trouve dans le sous-répertoire
"doc", dans le fichier appelé "CeCILL-C_V1-fr.txt". Veuillez en lire
attentivement les clauses. Vous ne pourrez utiliser cette copie de la
distribution logicielle Scotch 5.2 que si vous les acceptez.
This copy of the Scotch 5.2 distribution is licensed to you under the
terms of the CeCILL-C free/libre software license.
A copy of this license is available in subdirectory "doc", in file
named "CeCILL-C_V1-en.txt". Please read its terms carefully. Only if
you accept them can you use this copy of the Scotch 5.2 distribution.
The terms under which this copy of the PaMPA 0.0 distribution
is provided to you are described in file "LICENSE_en.txt", located
in the same directory as this file.
If you accept them, please refer to file "docs/user_1.0/doc.pdf" or
"docs/user_0.0/html/index.html", also located in this directory, for
the installation instructions.
########################
# documentation #
########################
find_package (Doxygen)
if (DOXYGEN_FOUND)
if (FORTRAN_INTERFACE)
# Generate pampaf.h
add_custom_command (OUTPUT pampaf_user.h
COMMAND ${CMAKE_COMMAND} -E copy
${PAMPA_BINARY_DIR}/src/libpampa/pampaf.h ${CMAKE_CURRENT_BINARY_DIR}/pampaf_user.h
COMMAND sed -e 's/^!/\\/\\//g' pampaf_user.h > ${PAMPA_SOURCE_DIR}/BUILD/pampaf.h
DEPENDS ${PAMPA_BINARY_DIR}/src/libpampa/pampaf.h)
list (APPEND DOC_DEPENDENCIES pampaf_user.h)
endif (FORTRAN_INTERFACE)
# Api documentation
file (GLOB API_PAGES ${PAMPA_SOURCE_DIR}/docs/api_pages/*.c)
add_custom_command (OUTPUT pampa_api.h
COMMAND ${CMAKE_COMMAND} -E remove
${CMAKE_CURRENT_BINARY_DIR}/pampa_user.h
COMMAND ${CMAKE_COMMAND} -E copy
${PAMPA_BINARY_DIR}/src/libpampa/pampa.h ${CMAKE_CURRENT_BINARY_DIR}/pampa_api.h
COMMAND cat ${PAMPA_SOURCE_DIR}/docs/api_pages/*.c >> ${CMAKE_CURRENT_BINARY_DIR}/pampa_api.h
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/pampa_api.h ${PAMPA_SOURCE_DIR}/BUILD/pampa.h
DEPENDS ${PAMPA_BINARY_DIR}/src/libpampa/pampa.h ${API_PAGES})
list (APPEND DOC_DEPENDENCIES pampa_api.h)
add_custom_target (apidoc
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..."
COMMAND ${DOXYGEN_EXECUTABLE} ${PAMPA_SOURCE_DIR}/docs/ApiDoxyfile
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PAMPA_SOURCE_DIR}/docs
DEPENDS ${DOC_DEPENDENCIES})
# User documentation
file (GLOB USER_PAGES ${PAMPA_SOURCE_DIR}/docs/user_pages/*.c)
add_custom_command (OUTPUT pampa_user.h
COMMAND ${CMAKE_COMMAND} -E remove
${CMAKE_CURRENT_BINARY_DIR}/pampa_api.h
COMMAND ${CMAKE_COMMAND} -E copy
${PAMPA_BINARY_DIR}/src/libpampa/pampa.h ${CMAKE_CURRENT_BINARY_DIR}/pampa_user.h
COMMAND cat ${PAMPA_SOURCE_DIR}/docs/user_pages/*.c >> ${CMAKE_CURRENT_BINARY_DIR}/pampa_user.h
COMMAND ${PAMPA_SOURCE_DIR}/docs/list_examples.sh ${PAMPA_SOURCE_DIR}/src/samples ${CMAKE_CURRENT_BINARY_DIR}/pampa_user.h
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/pampa_user.h ${PAMPA_SOURCE_DIR}/src/libpampa/pampa.h
DEPENDS ${PAMPA_BINARY_DIR}/src/libpampa/pampa.h ${USER_PAGES})
list (APPEND DOC_DEPENDENCIES pampa_user.h)
add_custom_target (userdoc
COMMAND ${CMAKE_COMMAND} -E echo_append "Building User Documentation..."
COMMAND ${DOXYGEN_EXECUTABLE} ${PAMPA_SOURCE_DIR}/docs/UserDoxyfile
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/pampa_user.h ${PAMPA_SOURCE_DIR}/src/libpampa/pampa.h
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PAMPA_SOURCE_DIR}/docs
DEPENDS ${DOC_DEPENDENCIES} pampa_user.h)
# Pdf user documentation
if (UNIX)
add_custom_target (userpdfdoc
COMMAND ${CMAKE_COMMAND} -E echo_append "Building User Pdf Documentation..."
COMMAND make
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ../doc_${PAMPA_VERSION}.${PAMPA_RELEASE}.${PAMPA_PATCHLEVEL}.pdf
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PAMPA_SOURCE_DIR}/docs/user_${PAMPA_VERSION}.${PAMPA_RELEASE}.${PAMPA_PATCHLEVEL}/latex)
add_custom_target (apipdfdoc
COMMAND ${CMAKE_COMMAND} -E echo_append "Building Api Pdf Documentation..."
COMMAND make
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ../doc_api_${PAMPA_VERSION}.${PAMPA_RELEASE}.${PAMPA_PATCHLEVEL}.pdf
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PAMPA_SOURCE_DIR}/docs/api_${PAMPA_VERSION}.${PAMPA_RELEASE}.${PAMPA_PATCHLEVEL}/latex)
endif (UNIX)
add_dependencies (apidoc pampa)
add_dependencies (apipdfdoc apidoc)
add_dependencies (userdoc pampa)
add_dependencies (userpdfdoc userdoc)
# Define target doc
add_custom_target (doc DEPENDS apidoc apipdfdoc userdoc userpdfdoc)
# Specify where man documentation will be installed
file (GLOB MAN_FILES ${PAMPA_SOURCE_DIR}/docs/user_${PAMPA_VERSION}.${PAMPA_RELEASE}.${PAMPA_PATCHLEVEL}/man/man3/*.3)
install (FILES ${MAN_FILES}
DESTINATION share/man/man3)
endif (DOXYGEN_FOUND)
This diff is collapsed.
/*!
\page coding_conv Coding conventions
\section coding_conv_glb_nam Global naming conventions
\subsection naming_conv_intro Introduction
Names of structure fields or variables follow very strict naming conventions.
These conventions allow one to infere the function of a variable from its
name and, conversely, to devise a name from the meaning of a variable to be
created.
Variable names comprise three fields : the prefix, the infix, and the suffix.
Most often, variable names are 10 characters long, because the common sizes
of the three fields is 4-3-3.
- The suffix indicates the usage of the variable, that is, how its contents
are to be used.
- nbr: number (as the quantity of)
- num: number of (as an index)
- idx: index (which does not represent a "num")
- tab: array accessed through un-based indices (starting at 0)
- tax: array accessed through based indices (starting at "baseval")
- msk: mask value (for array index computations such as hash tables or based arrays)
- bax: dummy based array coupled to a "msk" index mask
For instance, a "num" or "nbr" variable can be used as an index to a "tab" or "tax" array.
- The infix, which is composed by three characters, indicates the locality
of variables used in a distributed context:
- glb: global: variable/array is replicated and has the same value across
all processes
- loc: local: variable/array is replicated, but contains data that is
specific (local) to each processing element
- gst: ghost: variable/array contains local data, plus copy (ghost) data
that has been obtained from neighboring processing elements.
- The prefix, which contains four characters, indicates the contents:
- degr: degree value
- eidx: index of entity
- engb: neighbor by entity
- esub: sub-entity
- evrt: vertex number by entity
- flag: flag or flag vector value
- mngb: neighbor by mesh
- mvrt: vertex number by mesh
- nghb: neighbor
- nsub: sub-entity of neighbor
- proc: processor
- sngb: neighbor by sub-entity
- svrt: vertex number by sub-entity
- valu: value, that is, data attached to some vertex
- vent: entity of vertex
- vert: vertex
- vgst: local + ghost vertices
- vind: index of vertex
- vint: internal vertex
- vnbr: number of vertices
- vovp: overlap of vertex
- vprm: permutation of vertices
- vsub: sub-entity of vertex
- snum: number (as index) of sub-entity
\section coding_conv_loc_nam Local naming conventions
- In some functions, local variables could have more than 10 characters. The prefix of these are defined as :
- procvert: vertex and processor numbers
- vertsort: sorted vertices
*/
/*!
\page compil Compilation
\tableofcontents
\section compil_intro Introduction
To build PaMPA, <a href="http://www.cmake.org">CMake</a> is used. You could install it with your package manager or download it <a href="http://www.cmake.org/cmake/resources/software.html">here</a>.
\section compil_hiera Hierarchy
\subsection compil_hiera_main Main configuration file
The main file is located in pampa-p folder. It contains all the dependencies on the other configuration files, which are in the following folders:
- pampa/libpampa
- pampa/libpampa-mmg3d
- samples
- docs
\subsection compil_hiera_libpampa Libpampa
This file configure how to build:
- libpampa
- libpampaerr
- libpampaerrexit
\subsection compil_hiera_libpampa-mmg3d Libpampa-mmg3d
This file configure how to build:
- libpampa-mmg3d
\subsection compil_hiera_samples Samples
This file includes two other configuration files for C and Fortran samples and they are in the following directories:
- samples/C
- samples/FORTRAN
\subsubsection compil_hiera_samples_c C Samples
This file deals with the configuration of all C samples, which have their executable names ends with «_c».
\subsubsection compil_hiera_samples_c Fortran Samples
This file deals with the configuration of all Fortran samples, which have their executable names ends with «_f».
*/
/*!
\page intro Introduction
\tableofcontents
PaMPA ("Parallel Mesh Partitioning and Adaptation") is a middleware library
dedicated to the management of distributed meshes. Its purpose is to relieve
solver writers from the tedious and error prone task of writing again and
again service routines for mesh handling, data communication and exchange,
remeshing, and data redistribution. An API of the future platform has been
devised, and the coding of the mesh handling and redistribution routines is
in progress. PaMPA will be used as a base module for the PLATO solvers, to
balance dynamically, refine and coarsen the distributed mesh.
*/
/*!
\mainpage
This manual is divided in the following sections:
- \subpage intro
- \subpage compil
- \subpage coding_conv
- \subpage sources
*/
/*!
\page sources Source code hierarchy
\tableofcontents
\section sources_intro Introduction
The files, which begin with «library_», are used to the interface. Other files are internal to the library.
There are two macros to display an error:
- errorPrint which contains only a string to display, calls PAMPA_errorPrint
- errorPrint2 which could have variable arguments, must contains firstly the format with two conversion specifications:
+ The first one corresponds to __FUNCTION__
+ The last one corresponds to __LINE__
*/
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script recursively searches c and F90 source files in arg1 directory and
put all files in arg2 file
OPTIONS:
-h Show this message
EOF
}
if [ $# != 2 ]; then
usage
exit 1
fi
while getopts "h" OPTION
do
case $OPTION in
h)
usage
exit 1
;;
?)
usage
exit
;;
esac
done
find $1/C/{include,meshes,tools,components} $1/FORTRAN \( -name "*.c" -o -name "*.F90" \) -execdir ls {} \; | awk -F '/' '{print "//! \\example", $2}'|grep -v -e mdmesh >> $2
/*!
\mainpage
This manual is divided in the following sections:
- \subpage intro
- \subpage compil
- \subpage install
- \subpage quick
- \subpage advanced
*/
/*!
\page intro Introduction
PaMPA ("Parallel Mesh Partitioning and Adaptation") is a middleware library
dedicated to the management of distributed meshes. Its purpose is to relieve
solver writers from the tedious and error prone task of writing again and
again service routines for mesh handling, data communication and exchange,
remeshing, and data redistribution. An API of the future platform has been
devised, and the coding of the mesh handling and redistribution routines is
in progress. PaMPA is used in the Aerosol solver, developped by the Cardamom and the Cagire INRIA teams.
*/
/*!
\page compil Compilation
\tableofcontents
\section unix On Unix:
- In BUILD folder, run:
- "cmake .."
- Maybe, you have to define PTSCOTCH_HOME like "cmake -D SCOTCH_HOME=<absolute path to PTSCOTCH directory> .." or with ccmake.
- If you want to use a specific MPI library, you have to define MPI_COMPILER (or MPI_C_COMPILER and MPI_Fortran_COMPILER depends on your version of CMake) like "cmake … -D MPI_COMPILER=<absolute path to the specific MPI compiler> ..",
- "ccmake ." or "cmake-gui ." to define some variables.
\section windows On Windows:
- Run CMakeSetup.exe,
- For the source code, choose the parent folder of BUILD,
- For the binaries, choose the BUILD folder and:
- Maybe, you have to define PTSCOTCH_HOME,
- If you want to use a specific MPI library, you have to define MPI_COMPILER (or MPI_C_COMPILER and MPI_Fortran_COMPILER depends on your version of CMake).
*/
/*!
\page install Installation
\tableofcontents
- You have to define CMAKE_INSTALL_PREFIX with ccmake or cmake-gui.
- By default, it will be installed in "/usr/local"
*/
/*!
\page quick Quick usage
\tableofcontents
The quick usage depends on your language you have chosen :
- \subpage quick_c
- \subpage quick_fortran
*/
/*!
\page quick_c Quick usage in C
\tableofcontents
\section quick_c_intro Introduction
Smallest array index starts at 0.
\section quick_c_build Building meshes
\subsection quick_c_build_hard Building hardcoded meshes
The following examples show you how to build and check distributed meshes:
- build_check.c
\subsection quick_c_build_read Buiding read meshes
The following example read and build centralized meshes:
- seq_build_check.c
The file format which is used is MESH from Medit program.
\section quick_c_iter Iterators
Some parallel examples use iterators like:
- seq_neighbors.c
You have other example in parallel version:
- neighbors.c
All of them include tools/seq_it.c or tools/it.c
For example, it this code is coupled with 11-vert_2-proc.c and it.c, we obtain this output:
\verbinclude tests/neighbors_11-vert_2-proc_it_c
\section quick_c_map Static mapping
Static mapping is illustrated over these examples:
- part.c
\section quick_c_ovlp Overlap
The following example show how to use the overlap with size 1.
- overlap_1.c
They also use iterators and exchanging values.
\section quick_c_redist Redistribution
Samples are done for both hardcoded and read meshes.
\subsection quick_c_redist_hard Hardcoded meshes
Two examples illustrate this mechanism:
- redist.c
- redist2.c
\subsection quick_c_redist_read Read meshes
- redist_check.c
This example also illustrates how to scatter a centralized mesh into a distributed mesh.
*/
/*!
\page quick_fortran Quick usage in Fortran
\tableofcontents
\section quick_f_intro Introduction
Smallest array index starts at 1.
\section quick_f_build Building meshes
\subsection quick_f_build_seq Building centralized hardcoded meshes
The following examples show you how to build and check centralized meshes:
- seq_build_check.F90
Only samples for hardcoded meshes is available.
\subsection quick_f_build_par Building distributed hardcoded meshes
The following examples show you how to build and check distributed meshes:
- build_check.F90
\section quick_f_iter Iterators
Some parallel examples use iterators like:
- seq_neighbors.F90
You have other example in parallel version:
- neighbors.F90
- loop.F90
All of them include tools/seq_it.F90 or tools/it.F90
For example, it this code is coupled with 11-vert_2-proc.F90 and it.F90, we obtain this output:
\verbinclude tests/neighbors_11-vert_2-proc_it_f
\section quick_f_map Static mapping
Static mapping is illustrated over this example with centralized meshes:
- seq_part.F90
\section quick_f_ovlp Overlap
These following examples show how to use the overlap with different sizes.
- overlap_1.F90
They also use iterators and exchanging values.
*/
/*!
\page advanced Advanced usage
\tableofcontents
The advanced usage depends on your language you have chosen :
- \subpage advanced_c
- \subpage advanced_fortran
*/
/*!
\page advanced_c Advanced usage in C
\tableofcontents
\section advanced_c_read Read meshes
For the time being, 3D meshes are read in sequential and only nodes and elements are used in PaMPA meshes.
It will be modifyed during the adaptation implementation.
The user can also modify this reading which is processed into the libpampa-mmg3d folder. If the user wants to use another file format or another tool else MMG3D, he/she can use the squeleton of the function which does the process and adapt it to his personal use.
*/
/*!
\page advanced_fortran Advanced usage in Fortran
\tableofcontents
*/
#include <common.h>
//! \image latex C/11-vert_2-procs.pdf "Distributed mesh with 11 vertices on 2 processors" width=12cm
int structureBuild(
int rank,
PAMPA_Num * baseval,
PAMPA_Num * vertlocnbr,
PAMPA_Num * edgelocnbr,
PAMPA_Num * enttglbnbr,
PAMPA_Num * valuglbmax,
PAMPA_Num ** ventloctab,
PAMPA_Num ** esubloctab,
PAMPA_Num ** vertloctab,
PAMPA_Num ** edgeloctab) {
*baseval = 0;
*enttglbnbr = 5;
*valuglbmax = 10;
(*esubloctab) = malloc(sizeof(PAMPA_Num) * (*enttglbnbr));
(*esubloctab)[ELEM] = PAMPA_ENTT_SINGLE;
(*esubloctab)[EDGE] = PAMPA_ENTT_STABLE;
(*esubloctab)[BND_EDGE] = EDGE;
(*esubloctab)[INT_EDGE] = EDGE;
(*esubloctab)[NODE] = PAMPA_ENTT_SINGLE;
if (rank == 0){
*vertlocnbr = 6;
*edgelocnbr = 25;
(*ventloctab) = malloc(sizeof(PAMPA_Num)* (*vertlocnbr));
(*ventloctab)[0] = NODE;
(*ventloctab)[1] = BND_EDGE;
(*ventloctab)[2] = ELEM;
(*ventloctab)[3] = INT_EDGE;
(*ventloctab)[4] = NODE;
(*ventloctab)[5] = BND_EDGE;
(*vertloctab) = malloc(sizeof(PAMPA_Num)* (*vertlocnbr + 1));
(*vertloctab)[0] = 0;
(*vertloctab)[1] = 5;
(*vertloctab)[2] = 8;
(*vertloctab)[3] = 15;
(*vertloctab)[4] = 19;
(*vertloctab)[5] = 22;
(*vertloctab)[6] = 25;
(*edgeloctab) = malloc(sizeof(PAMPA_Num)* (*edgelocnbr));
// 0
(*edgeloctab)[0] = 1;
(*edgeloctab)[1] = 2;
(*edgeloctab)[2] = 3;
(*edgeloctab)[3] = 7;
(*edgeloctab)[4] = 9;
// 1
(*edgeloctab)[5] = 0;
(*edgeloctab)[6] = 2;
(*edgeloctab)[7] = 4;
// 2
(*edgeloctab)[8] = 0;
(*edgeloctab)[9] = 1;
(*edgeloctab)[10] = 3;
(*edgeloctab)[11] = 4;
(*edgeloctab)[12] = 5;
(*edgeloctab)[13] = 6;
(*edgeloctab)[14] = 9;
// 3
(*edgeloctab)[15] = 0;
(*edgeloctab)[16] = 2;
(*edgeloctab)[17] = 9;
(*edgeloctab)[18] = 6;
// 4
(*edgeloctab)[19] = 1;
(*edgeloctab)[20] = 2;
(*edgeloctab)[21] = 5;
// 5
(*edgeloctab)[22] = 4;
(*edgeloctab)[23] = 2;
(*edgeloctab)[24] = 6;
}
else if (rank == 1) {
*vertlocnbr = 5;
*edgelocnbr = 21;
(*ventloctab) = malloc(sizeof(PAMPA_Num)* (*vertlocnbr));
(*ventloctab)[0] = NODE;
(*ventloctab)[1] = BND_EDGE;
(*ventloctab)[2] = NODE;
(*ventloctab)[3] = ELEM;
(*ventloctab)[4] = BND_EDGE;
(*vertloctab) = malloc(sizeof(PAMPA_Num)* (*vertlocnbr + 1));
(*vertloctab)[0] = 0;
(*vertloctab)[1] = 5;
(*vertloctab)[2] = 8;
(*vertloctab)[3] = 11;
(*vertloctab)[4] = 18;
(*vertloctab)[5] = 21;
(*edgeloctab) = malloc(sizeof(PAMPA_Num)* (*edgelocnbr));
// 6
(*edgeloctab)[0] = 5;
(*edgeloctab)[1] = 2;
(*edgeloctab)[2] = 3;
(*edgeloctab)[3] = 9;
(*edgeloctab)[4] = 10;
// 7
(*edgeloctab)[5] = 0;
(*edgeloctab)[6] = 9;
(*edgeloctab)[7] = 8;
// 8
(*edgeloctab)[8] = 7;
(*edgeloctab)[9] = 9;
(*edgeloctab)[10] = 10;
// 9
(*edgeloctab)[11] = 0;
(*edgeloctab)[12] = 7;
(*edgeloctab)[13] = 8;
(*edgeloctab)[14] = 3;
(*edgeloctab)[15] = 10;
(*edgeloctab)[16] = 6;
(*edgeloctab)[17] = 2;
// 10
(*edgeloctab)[18] = 8;
(*edgeloctab)[19] = 9;
(*edgeloctab)[20] = 6;
}
else {
*vertlocnbr = 0;
*edgelocnbr = 0;
(*ventloctab) = NULL;
(*vertloctab) = NULL;
(*edgeloctab) = NULL;
}
return (0);
}
int structureFree(
PAMPA_Num ** ventloctab,
PAMPA_Num ** esubloctab,
PAMPA_Num ** vertloctab,
PAMPA_Num ** edgeloctab) {
free( *ventloctab);
free( *esubloctab);
free( *vertloctab);
free( *edgeloctab);
return (0);
}
# This file is created from http://www.cmake.org
#
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}")
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif (NOT ${rm_retval} EQUAL 0)
else (EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif (EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove
"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing
\"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif (NOT ${rm_retval} EQUAL 0)
########################
# libpampa-mshint #
########################
include_directories (${MSHINT_INCLUDE_DIR} ${LIBMESH5_INCLUDE_DIR})
include_directories (${PAMPA_SOURCE_DIR}/pampa/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}/src/libpampa)
# Generate pampa-mshint.h
ADD_CUSTOM_COMMAND(OUTPUT pampa-mshint.h
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/library.h ${CMAKE_CURRENT_BINARY_DIR}/pampa-mshint.h
DEPENDS library.h)
#if (FORTRAN_INTERFACE)
# # Generate pampa_commonf.h
# ADD_CUSTOM_COMMAND(OUTPUT pampa_commonf.h
# COMMAND ${CMAKE_COMMAND} -E copy
# ${CMAKE_CURRENT_SOURCE_DIR}/../../../libpampa/pampa_commonf.h
# ${CMAKE_CURRENT_BINARY_DIR}/pampa_commonf.h
# DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../../libpampa/pampa_commonf.h)
#
# # Generate pampa-mshint_commonf.h
# add_custom_command(OUTPUT pampa-mshint_commonf.h
# COMMAND ${CMAKE_COMMAND} -E copy
# ${CMAKE_CURRENT_SOURCE_DIR}/library_commonf.h ${CMAKE_CURRENT_BINARY_DIR}/pampa-mshint_commonf.h
# DEPENDS library_commonf.h)
#
# # Generate pampaf-mshint.h
# ADD_CUSTOM_COMMAND(OUTPUT pampaf-mshint.h
# COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/libraryf.h ${CMAKE_CURRENT_BINARY_DIR}/pampaf-mshint.h
# DEPENDS library.h)
#endif ()
# Sources to build libpampa-mshint
SET(PAMPA_MSHINT_C_SOURCES
pampa-mshint.h
library_mesh_int.c
#imesh_to_pmesh.c
pmesh_to_imesh.c
)
#if (FORTRAN_INTERFACE)
# set (PAMPA_MSHINT_FORTRAN_SOURCES
# pampa_commonf.h
# pampa-mshint_commonf.h
# pampaf-mshint.h
# library_mesh_load.F90
# library_mesh_save.F90
# library.F90)
#endif ()
ADD_LIBRARY(
pampa-mshint
${PAMPA_MSHINT_C_SOURCES}
${PAMPA_MSHINT_FORTRAN_SOURCES})
# Add dependency on PaMPA
TARGET_LINK_LIBRARIES(pampa-mshint pampa)
# Do some copies after building libpampa
IF (OLD_CMAKE)
ADD_CUSTOM_COMMAND(TARGET pampa-mshint POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy libpampa-mshint.a ${PAMPA_SOURCE_DIR}/pampa/lib # XXX ne fonctionne pas si bib dynamique, meme probleme pour les remailleurs et windows, non ?
COMMAND ${CMAKE_COMMAND} -E copy ${MSHINT_LIBRARY} ${PAMPA_SOURCE_DIR}/pampa/lib
)
# XXX est-ce encore utile ?