mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-24 16:30:02 -06:00
56 lines
2.3 KiB
TeX
56 lines
2.3 KiB
TeX
|
\section{Setup of a New Folder}
|
||
|
|
||
|
In this section setting up a new folder is described. In fact it is very easy to create a new folder, but getting \Dumux to know the new folder takes some steps which will be explained in mroe detail below:
|
||
|
|
||
|
\begin{itemize}
|
||
|
\item create new folder with content
|
||
|
\item adapt \verb+Makefile.am+
|
||
|
\item insert new folder in \verb+Makefile.am+ of the directory above
|
||
|
\item adapt \verb+configure.ac+ in the \verb+$DUMUX_ROOT+ (the directory you checked out, probably dune-mux)
|
||
|
\item newly compile \Dumux
|
||
|
\end{itemize}
|
||
|
|
||
|
\noindent In more detail:
|
||
|
|
||
|
\textbf{First} of all, the new folder including all relevant files needs to be created (see Section \ref{tutorial-coupled} and \ref{tutorial-decoupled} for desccription of a problem).
|
||
|
|
||
|
\textbf{Second}, a new \verb+Makefile.am+ for the new Folder needs to be created. It is good practize to simply copy an existing file. For example the file \verb+$DUMUX_ROOT/test/2p/Makefile.am+ looks as follows:
|
||
|
\begin{verbatim}
|
||
|
bin_PROGRAMS = test_2p
|
||
|
|
||
|
test_2p_SOURCES = test_2p.cc
|
||
|
test_2p_CXXFLAGS = $(MPI_CPPFLAGS)
|
||
|
test_2p_LDADD = $(MPI_LDFLAGS)
|
||
|
|
||
|
include $(top_srcdir)/am/global-rules
|
||
|
\end{verbatim}
|
||
|
|
||
|
All occurences of \verb+test_2p+ need to be replaced by the name of the new project, e.g. \verb+New_Project+. At least if the name of the source file as well as the name of the new project are \verb+New_Project+.
|
||
|
|
||
|
\textbf{Third}: In the directory above your new Project there is also a \verb+Makefile.am+ . In this file the subdirectories are listed. As you introduced a new subdirectory, it needs to be included here. In this case the name of the new Folder is \verb+New_Project+ . Don't forget the trailing backslash.
|
||
|
|
||
|
\begin{verbatim}
|
||
|
SUBDIRS = . \
|
||
|
1p \
|
||
|
1p2c \
|
||
|
2p \
|
||
|
2p2c \
|
||
|
2p2cni \
|
||
|
2pni \
|
||
|
New_Project \
|
||
|
...
|
||
|
\end{verbatim}
|
||
|
|
||
|
\textbf{Fourth}: In \verb+$DUMUX_ROOT+ there is a file \verb+configure.ac+. In this file, the respective Makefiles are listed. After a line reading
|
||
|
|
||
|
\verb+AC_CONFIG_FILES([Makefile+
|
||
|
|
||
|
\noindent a line, declaring a new Makefile, needs to be included. The Makefile itself will be generated automatically. For keeping track of the included files, inserting in alphabetical order is good practice. The new line could read: \verb+test/New_Project/Makefile+
|
||
|
|
||
|
\textbf{Fifth}: Compile \Dumux as described in Section \label{install}.
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|