Skip to content
Browse files

Work on documentation.

  • Loading branch information...
1 parent 7497def commit 1ee1aa2c0b0a0f467b3f9e5c11157d6231b5a2ca @l-korous l-korous committed
View
9 CMake.vars.example
@@ -1,4 +1,6 @@
# This is a sample CMake.vars file for Hermes.
+#set(H2D_WITH_GLUT NO)
+#set(H2D_WITH_VIEWER_GUI YES)
# Some search paths.
if (WIN32)
@@ -24,9 +26,4 @@ if (WIN32)
else()
set(TRILINOS_ROOT "~/solvers/trilinos")
endif()
-SET(WITH_TRILINOS YES)
-
-# Experimental
-# Turn on Zoltan AND MPI
-# SET(WITH_ZOLTAN YES)
-# SET(WITH_MPI NO)
+SET(WITH_TRILINOS YES)
View
266 Win32/inttypes.h
@@ -0,0 +1,266 @@
+/*
+ * A modified file <inttypes.h> for purposes of MSVC.
+ * It contains a copy of <stdint.h>.
+ */
+
+#ifndef _INTTYPES_H
+#define _INTTYPES_H 1
+#define _STDINT
+
+#define WINDOWS_LEAN_AND_MEAN
+#include <windows.h>
+
+/* Conflicting definitions */
+#undef max
+#undef min
+
+/* Copy of stdint.h adjusted to fit MSCV */
+#ifdef _WIN64
+# define __WORDSIZE 64
+#else
+# define __WORDSIZE 32
+#endif
+
+/* Exact integral types. */
+
+/* Signed. */
+#define int8_t CHAR
+#define int16_t INT16
+#define int32_t INT32
+#define int64_t INT64
+
+/* Unsigned. */
+#define uint8_t BYTE
+#define uint16_t UINT16
+#define uint32_t UINT32
+#define uint64_t UINT64
+
+/* Small types. */
+
+/* Signed. */
+#define int_least8_t CHAR
+#define int_least16_t INT16
+#define int_least32_t INT32
+#define int_least64_t INT64
+
+/* Unsigned. */
+#define uint_least8_t BYTE
+#define uint_least16_t UINT16
+#define uint_least32_t UINT32
+#define uint_least64_t UINT64
+
+/* Fast types. */
+
+/* Signed. */
+#define int_fast8_t CHAR
+#if __WORDSIZE == 64 /* 64-bit */
+# define int_fast16_t INT64
+# define int_fast32_t INT64
+# define int_fast64_t INT64
+#else /* 32-bit */
+# define int_fast16_t INT32
+# define int_fast32_t INT32
+# define int_fast64_t INT64
+#endif
+
+/* Unsigned. */
+#define uint_fast8_t BYTE
+#if __WORDSIZE == 64 /* 64-bit */
+# define uint_fast16_t UINT64
+# define uint_fast32_t UINT64
+# define uint_fast64_t UINT64
+#else /* 32-bit */
+# define uint_fast16_t UINT32
+# define uint_fast32_t UINT32
+# define uint_fast64_t UINT64
+#endif
+
+/* Types for `void *' pointers. */
+#if __WORDSIZE == 64 /* 64-bit */
+# define intptr_t INT64
+# define uintptr_t UINT64
+#else /* 32-bits */
+# define intptr_t INT32
+# define uintptr_t UINT32
+#endif
+
+/* Largest integral types. */
+#define intmax_t INT64
+#define uintmax_t UINT64
+
+/* The ISO C99 standard specifies that in C++ implementations these
+ macros should only be defined if explicitly requested. */
+#if !defined __cplusplus || defined __STDC_LIMIT_MACROS
+
+# if __WORDSIZE == 64
+# define __INT64_C(c) c ## L
+# define __UINT64_C(c) c ## UL
+# else
+# define __INT64_C(c) c ## LL
+# define __UINT64_C(c) c ## ULL
+# endif
+
+/* Limits of integral types. */
+
+/* Minimum of signed integral types. */
+# define INT8_MIN (-128)
+# define INT16_MIN (-32767-1)
+# define INT32_MIN (-2147483647-1)
+# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of signed integral types. */
+# define INT8_MAX (127)
+# define INT16_MAX (32767)
+# define INT32_MAX (2147483647)
+# define INT64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of unsigned integral types. */
+# define UINT8_MAX (255)
+# define UINT16_MAX (65535)
+# define UINT32_MAX (4294967295U)
+# define UINT64_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Minimum of signed integral types having a minimum size. */
+# define INT_LEAST8_MIN (-128)
+# define INT_LEAST16_MIN (-32767-1)
+# define INT_LEAST32_MIN (-2147483647-1)
+# define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of signed integral types having a minimum size. */
+# define INT_LEAST8_MAX (127)
+# define INT_LEAST16_MAX (32767)
+# define INT_LEAST32_MAX (2147483647)
+# define INT_LEAST64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of unsigned integral types having a minimum size. */
+# define UINT_LEAST8_MAX (255)
+# define UINT_LEAST16_MAX (65535)
+# define UINT_LEAST32_MAX (4294967295U)
+# define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Minimum of fast signed integral types having a minimum size. */
+# define INT_FAST8_MIN (-128)
+# if __WORDSIZE == 64
+# define INT_FAST16_MIN (-9223372036854775807L-1)
+# define INT_FAST32_MIN (-9223372036854775807L-1)
+# else
+# define INT_FAST16_MIN (-2147483647-1)
+# define INT_FAST32_MIN (-2147483647-1)
+# endif
+# define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of fast signed integral types having a minimum size. */
+# define INT_FAST8_MAX (127)
+# if __WORDSIZE == 64
+# define INT_FAST16_MAX (9223372036854775807L)
+# define INT_FAST32_MAX (9223372036854775807L)
+# else
+# define INT_FAST16_MAX (2147483647)
+# define INT_FAST32_MAX (2147483647)
+# endif
+# define INT_FAST64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of fast unsigned integral types having a minimum size. */
+# define UINT_FAST8_MAX (255)
+# if __WORDSIZE == 64
+# define UINT_FAST16_MAX (18446744073709551615UL)
+# define UINT_FAST32_MAX (18446744073709551615UL)
+# else
+# define UINT_FAST16_MAX (4294967295U)
+# define UINT_FAST32_MAX (4294967295U)
+# endif
+# define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Values to test for integral types holding `void *' pointer. */
+# if __WORDSIZE == 64
+# define INTPTR_MIN (-9223372036854775807L-1)
+# define INTPTR_MAX (9223372036854775807L)
+# define UINTPTR_MAX (18446744073709551615UL)
+# else
+# define INTPTR_MIN (-2147483647-1)
+# define INTPTR_MAX (2147483647)
+# define UINTPTR_MAX (4294967295U)
+# endif
+
+
+/* Minimum for largest signed integral type. */
+# define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum for largest signed integral type. */
+# define INTMAX_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum for largest unsigned integral type. */
+# define UINTMAX_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Limits of other integer types. */
+
+/* Limits of `ptrdiff_t' type. */
+# if __WORDSIZE == 64
+# define PTRDIFF_MIN (-9223372036854775807L-1)
+# define PTRDIFF_MAX (9223372036854775807L)
+# else
+# define PTRDIFF_MIN (-2147483647-1)
+# define PTRDIFF_MAX (2147483647)
+# endif
+
+/* Limits of `sig_atomic_t'. */
+# define SIG_ATOMIC_MIN (-2147483647-1)
+# define SIG_ATOMIC_MAX (2147483647)
+
+/* Limit of `size_t' type. */
+# if __WORDSIZE == 64
+# define SIZE_MAX (18446744073709551615UL)
+# else
+# define SIZE_MAX (4294967295U)
+# endif
+
+/* Limits of `wchar_t'. */
+# ifndef WCHAR_MIN
+/* These constants might also be defined in <wchar.h>. */
+# define WCHAR_MIN __WCHAR_MIN
+# define WCHAR_MAX __WCHAR_MAX
+# endif
+
+/* Limits of `wint_t'. */
+# define WINT_MIN (0u)
+# define WINT_MAX (4294967295u)
+
+#endif /* C++ && limit macros */
+
+
+/* The ISO C99 standard specifies that in C++ implementations these
+ should only be defined if explicitly requested. */
+#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
+
+/* Signed. */
+# define INT8_C(c) c
+# define INT16_C(c) c
+# define INT32_C(c) c
+# if __WORDSIZE == 64
+# define INT64_C(c) c ## L
+# else
+# define INT64_C(c) c ## LL
+# endif
+
+/* Unsigned. */
+# define UINT8_C(c) c
+# define UINT16_C(c) c
+# define UINT32_C(c) c ## U
+# if __WORDSIZE == 64
+# define UINT64_C(c) c ## UL
+# else
+# define UINT64_C(c) c ## ULL
+# endif
+
+/* Maximal type. */
+# if __WORDSIZE == 64
+# define INTMAX_C(c) c ## L
+# define UINTMAX_C(c) c ## UL
+# else
+# define INTMAX_C(c) c ## LL
+# define UINTMAX_C(c) c ## ULL
+# endif
+
+#endif /* C++ && constant macros */
+
+#endif /* inttypes.h */
View
BIN doc/exts/latexcode.pyc
Binary file not shown.
View
BIN doc/exts/math_dollar.pyc
Binary file not shown.
View
BIN doc/exts/popup.pyc
Binary file not shown.
View
BIN doc/exts/sourcecode.pyc
Binary file not shown.
View
BIN doc/exts/youtube.pyc
Binary file not shown.
View
3 doc/index.rst
@@ -49,12 +49,13 @@ Installation
src/installation/exodusII_netcdf
Documentation
-------------
+-------------
.. toctree::
:maxdepth: 1
src/documentation
+ src/typical_example
src/documentation-tutorial
src/documentation-examples
View
4 doc/src/documentation-examples.rst
@@ -1,6 +1,6 @@
-====================
+======================
Examples Documentation
-====================
+======================
Getting the repository with examples code
-----------------------------------------
View
6 doc/src/documentation.rst
@@ -3,7 +3,7 @@ Hermes Documentation overview
====================
Building user documentation (this one) in HTML
---------------------------
+----------------------------------------------
Before building User Documentation, install the Python Sphinx package::
@@ -19,7 +19,7 @@ or using another web browser.
Building user documentation (this one) in PDF
--------------------------
+---------------------------------------------
In the directory doc/ type "make latex" and you will be instructed how to build
the PDF::
@@ -29,7 +29,7 @@ the PDF::
Developer Documentation (in Doxygen)
------------------------
+------------------------------------
The documentation is accessible online.
`Hermes - common code <http://hpfem.org/~hermes/hermes/hermes_common/doc/html/index.html>`_
View
4 doc/src/installation/linux.rst
@@ -31,8 +31,8 @@ your local copy and the master repository, and you'll become part of the Hermes
network at Github.
Once you have a local copy of the Hermes repository on your computer, change dir
-to hermes/. There you will find a CMakeLists.txt file that contains the lines
-::
+to hermes/. There you will find a CMakeLists.txt file that contains the lines::
+
# OpenMP
# "-1" stands for using as many threads as is the number of available cores.
# Please be aware that the variable OMP_NUM_THREADS, that is often used for this purpose, is ignored.
View
4 doc/src/installation/matrix_solvers/trilinos.rst
@@ -146,7 +146,7 @@ Windows
| Go to the Trilinos source directory.
|
| In the following, replace {CLAPACK_DIR} with the full path to your clapack-3.2.1-CMAKE directory (where you installed CLAPACK as a Hermes's dependency) without any quotes.
-Also, replace {CMAKE_INSTALL_PREFIX} with either your dependency root, or any other folder where you want to install Trilinos packages.::
+| Also, replace {CMAKE_INSTALL_PREFIX} with either your dependency root, or any other folder where you want to install Trilinos packages.::
mkdir build_dir
@@ -174,7 +174,7 @@ Also, replace {CMAKE_INSTALL_PREFIX} with either your dependency root, or any ot
..
| Build the Trilinos solution.
-Go up to the Trilinos source directory and edit the cmake_install.cmake file. Change::
+| Go up to the Trilinos source directory and edit the cmake_install.cmake file. Change::
SET(CMAKE_INSTALL_CONFIG_NAME "Release")
View
50 doc/src/installation/win.rst
@@ -1,13 +1,16 @@
-Windows (MSVC)
-==============
+Windows
+=======
-This section describes how to build and use Hermes in Microsoft Visual C++ 2008 (Express Edition).
-These instructions should probably work even for older versions of MS Visual C++ down to version 2005.
+These installation instructions have been tested with Microsoft Visual Studio 2005, 2008, 2010, and with MinGW
+
+- Probably with small modifications, they should also work for NMake
+- If you would like to use NMake and you run in troubles, drop us a line to `Hermes2D mailing list <http://groups.google.com/group/hermes2d/>`_.
Known limitations and issues
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- - Stand-alone viewers do not compile.
+ - No eigensolver capabilities are so far possible to be used under windows.
+
Building Hermes
~~~~~~~~~~~~~~~
@@ -16,31 +19,33 @@ Building Hermes
- Prepare dependecy libraries, see 'Dependency Check-list'.
- Copy a file 'CMake.vars.example' to 'CMake.vars'. The file contains settings for the project.
- - Modify the file 'CMake.vars'. The first line in WIN32 block has to be modified, for info about the rest of the file, please refer to Linux installation instructions. Please, follow comments in the file. For example, you
+ - Modify the file 'CMake.vars'. For example, you
could set the first line as::
set(DEP_ROOT "../dependencies")
- In the directory 'my_hermes_root', to create project files by running CMAKE from a command prompt::
+ cmake . -G "Visual Studio 8 2005" # MSVC2005 user
cmake . -G "Visual Studio 9 2008" # MSVC2008 user
cmake . -G "Visual Studio 10" # MSVC2010 user
+ cmake . -G "MinGW Makefiles" # MSVC2010 user
If you have Cygwin installed, your might have an error "Coulld not create named generator Visual Studio 10". This is because your
cmake path is contaminated by Cygwin's cmake. Try to use absolute path for windows cmake.exe.
- You also need to copy the file 'my_hermes_root\\CMakeVars\\MSVC\\inttypes.h' to the include folder in your dependency folder.
+ You also need to copy the file 'my_hermes_root\\Win32\\inttypes.h' to the include folder in your dependency folder. In other words, you need to put it anywhere where your compiler will find it when "#include <inttypes.h>" is processed.
- - Open the SLN file 'my_hermes_root\\hermes.sln' and build Hermes. Actually, this step is not necessary if you plan to use Hermes in your projects rather than explore tutorials.
+ - Open the SLN file 'my_hermes_root\\hermes.sln' and build Hermes.
Configuration options
~~~~~~~~~~~~~~~~~~~~~
Hermes is configured through preprocessor directives. Directives are generated by CMAKE and your settings might be overriden by CMAKE. The directives are:
- - NOGLUT : excludes GLUT-dependant parts. This replaces viewers with an empty implementation that does nothing if invoked. If used, the library 'freeglut.lib' does not need to be linked.
+ - H2D_WITH_GLUT : If the line in CMake.vars.example "set(H2D_WITH_GLUT NO)" is uncommented, it excludes GLUT-dependant parts. This replaces viewers with an empty implementation that does nothing if invoked. If used, the library 'freeglut.lib' does not need to be linked.
- - ENABLE_VIEWER_GUI : enables GUI for viewers. Currently, only 'ScalarView' support GUI because this is an experimental feature. This directive is mutually exclusive with NOGLUT. If used, a library 'AntTweakBar.lib' does not need to be linked.
+ - H2D_WITH_VIEWER_GUI : If the line "H2D_WITH_VIEWER_GUI" in CMake.vars.example is uncommented, it enables GUI for viewers. Currently, only 'ScalarView' support GUI because this is an experimental feature. This directive is mutually exclusive with H2D_WITH_GLUT. If used, a library 'AntTweakBar.lib' needs to be linked.
Using Hermes
~~~~~~~~~~~~
@@ -48,16 +53,16 @@ Using Hermes
In order to use Hermes in your project, you need to do the following steps. Steps has 5, 6, and 7 to be repeated for every configuration, i.e., Debug, Release. Except the step 7b, this can be done easily by setting the drop-down Configuration to 'All configurations' in the Project Property dialog.
- Prepare Hermes to be buildable by MSVC, see 'Building Hermes'.
- - Create your project in MSVC. Set the project to be empty Win32 console project.
- - Add either 'my_hermes_root\\src\\hermes-real.vcproj' or 'my_hermes_root\\src\\hermes-cplx.vcproj' project to your solution (<right click on solution>\\Add\\Existing Project...).
- - Set that your project depends on hermes-real/cplx project (<right click on your project>\\Project Dependences...).
- - Add directories 'my_hermes_directory\\src' and 'dependencies\\include' to additional include directories (<right click on your project>\\Properties\\Configuration Properties\\C/C++\\Additional Include Directories).
+ - Create your project in MSVC. Set the project to be an empty Win32 console project.
- Add directories 'dependencies\\lib' to additional library directories (<right click on your project>\\Properties\\Configuration Properties\\Linker\\Additional Library Directories).
- - Deny warnings that are not indicating anything dangerous:
-
- - Avoid warnings about STL in DLL by denying a warning 4251 (<right click on your project>\\Properties\\Configuration Properties\\C/C++\\Advanced\\Disable Specific Warnings, enter 4251).
- - Avoid warnings about standard functions that are not safe (<right click on your project>\\Properties\\Configuration Properties\\C/C++\\Preprocessor\\Preprocessor Definitions, add _CRT_SECURE_NO_WARNINGS).
-
+ - Add also the directory where you copied Hermes libraries to as an additional library directory. This would probably be the variable TARGET_ROOT in your CMake.vars file.
+ - Add 'include "hermes2d.h"', make sure that your TARGET_ROOT is among Include Directories settings in your compiler.
+ - Deny (Ignore) warnings that are not indicating anything dangerous:
+
+ - Ignore warnings about STL in DLL by denying a warning 4251 (<right click on your project>\\Properties\\Configuration Properties\\C/C++\\Advanced\\Disable Specific Warnings, enter 4251).
+ - Ignore warnings about standard functions that are not safe (<right click on your project>\\Properties\\Configuration Properties\\C/C++\\Preprocessor\\Preprocessor Definitions, add _CRT_SECURE_NO_WARNINGS).
+ - Also ignore any template instantiation warnings
+
Dependency check-list
~~~~~~~~~~~~~~~~~~~~~
@@ -130,8 +135,7 @@ This list works for 32-bit version of Hermes.
- AntTweakBar (optional)
- If a directive ENABLE_VIEWER_GUI is *not* used, this step can be skipped.
- - Download a modified version 1.1.3 of AntTweakView
- (http://hpfem.org/downloads/AntTweakBar.1.1.3.modified.tar.gz) and unpack it.
+ - Download a modified version 1.1.3 of AntTweakView (http://hpfem.org/downloads/AntTweakBar.1.1.3.modified.tar.gz) and unpack it.
- Open SLN file in MSVC and compile it.
- Copy 'AntTweakBar.dll', 'AntTweakBar.h', and 'AntTweakBar.lib' to 'bin', 'include', and 'lib' dependency directories respectively.
@@ -142,9 +146,7 @@ This list works for 32-bit version of Hermes.
- Zlib
- Download sources of version 1.2.3 (http://sourceforge.net/projects/libpng/files/) and unpack them.
- - Open 'my_zlib_root/projects/visualc6/zlib.dsw' (Visual C++ 6 Solution File) in MSVC08 and
- let MSVC to convert it and save the .sln file
- (MSVC10 user can open the .sln file).
+ - Open 'my_zlib_root/projects/visualc6/zlib.dsw' (Visual C++ 6 Solution File) in MSVC08 andlet MSVC to convert it and save the .sln file (MSVC10 user can open the .sln file).
- Switch a configuration to 'Release DLL' in Configuration Manager.
- Build project 'zlib': this will create DLL/LIB files in 'my_zlib_root/projects/visual6/Win32_DLL_Release'.
- Copy 'zlib1.dll', 'zlib.h/zconf.h', and 'zlib1.lib' to 'bin', 'include', and 'lib' dependency directories respectively.
View
2 hermes2d/include/weakform/weakform.h
@@ -10,7 +10,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
+// You should have received a copy of the GNU General Public Licenserix
// along with Hermes2D. If not, see <http://www.gnu.org/licenses/>.
#ifndef __H2D_WEAKFORM_H

0 comments on commit 1ee1aa2

Please sign in to comment.
Something went wrong with that request. Please try again.