Skip to content
Snippets Groups Projects
Commit 9d0e89b9 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

[WIP] addeddocumentation and minor fixes

parent d4f52677
No related branches found
No related tags found
1 merge request!38Piotr's Tutorial 7 on hyperbolic problems
add_subdirectory(doc)
add_subdirectory(src)
add_subdirectory(exercise)
add_latexmk_document(SOURCE tutorial07.tex)
@Book{LeVeque,
author = {{R. J.} Leveque},
title = {Finite Volume Methods for Hyperbolic Problems},
publisher = {Cambridge University Press},
year = {2002},
}
@Book{Evans,
author = {{L. C.} Evans},
title = {Partial Differential Equations},
publisher = {American Mathematical Society},
year = {2010},
edition = "2nd"
}
@Book{RR,
author = {M. Renardy and {R. C.} Rogers},
title = {An Introduction to Partial Differential Equations},
publisher = {Springer},
year = {1993},
volume = {13},
series = {Texts in Applied Mathematics},
}
@inbook {OhlbergerBarth2004,
title = {Finite Volume Methods: Foundation and Analysis},
author = {Barth, Timothy and Ohlberger, Mario},
publisher = {John Wiley \& Sons, Ltd},
isbn = {9780470091357},
url = {http://dx.doi.org/10.1002/0470091355.ecm010},
doi = {10.1002/0470091355.ecm010},
keywords = {finite volume methods, conservation laws, nonoscillatory approximation, discrete maximum principles, higher-order schemes},
booktitle = {Encyclopedia of Computational Mechanics},
year = {2004},
}
@article{Dole2004727,
title = "A semi-implicit discontinuous Galerkin finite element method for the numerical solution of inviscid compressible flow ",
journal = "Journal of Computational Physics ",
volume = "198",
number = "2",
pages = "727 - 746",
year = "2004",
note = "",
issn = "0021-9991",
doi = "http://dx.doi.org/10.1016/j.jcp.2004.01.023",
url = "http://www.sciencedirect.com/science/article/pii/S0021999104000609",
author = "V. Dolej\v{s}\'{i} and M. Feistauer",
}
@Book{WHElliptisch,
author = {W. Hackbusch},
title = {Theorie und Numerik elliptischer Differentialgleichungen},
publisher = {Teubner},
year = {1986},
note = {{\small\url{http://www.mis.mpg.de/preprints/ln/lecturenote-2805.pdf}}},
}
@book{feistauer_book,
author = {M. Feistauer and J. Felcman and I. Straskraba},
publisher = "Clarendon Press",
title = "{Mathematical and Computational Methods for Compressible Flow}",
year = "2003"
}
@Book{Eriksson,
author = {K. Eriksson and D. Estep and P. Hansbo and C. Johnson},
title = {Computational Differential Equations},
publisher = {Cambridge University Press},
year = {1996},
}
@Book{SmirnowII,
author = {{W. I.} Smirnow},
title = {Lehrgang der h\"{o}heren {M}athematik - {Teil II}},
publisher = {VEB Verlag der deutschen Wissenschaften},
year = {1981},
edition = {15.},
}
@Book{JinBook,
author = {J. Jin},
title = {The Finite Element Method in Electromagnetics},
publisher = {John Wiley \& Sons},
year = {2002},
edition = {2.},
}
@book{DiPietro,
title={Mathematical Aspects of Discontinuous Galerkin Methods},
author={Di Pietro, D.A. and Ern, A.},
isbn={9783642229800},
lccn={2011940956},
series={Math{\'e}matiques et Applications},
year={2011},
publisher={Springer Berlin Heidelberg}
}
\ No newline at end of file
This diff is collapsed.
add_executable("tutorial07-maxwell" tutorial07-maxwell.cc)
add_executable("tutorial07-acoustics" tutorial07-acoustics.cc)
add_executable("tutorial07-linearacoustics" tutorial07-linearacoustics.cc)
add_executable("tutorial07-shallowwater" tutorial07-shallowwater.cc)
dune_symlink_to_source_files(FILES tutorial07-maxwell.ini)
dune_symlink_to_source_files(FILES tutorial07-acoustics.ini)
dune_symlink_to_source_files(FILES tutorial07-linearacoustics.ini)
dune_symlink_to_source_files(FILES tutorial07-shallowwater.ini)
......@@ -31,7 +31,9 @@ public:
}
template<typename E, typename X, typename T2, typename T3>
void eigenvectors (const E& e, const X& x, const Dune::FieldVector<T2,dim>& n, Dune::FieldMatrix<T3,m,m>& RT) const
void eigenvectors (const E& e, const X& x,
const Dune::FieldVector<T2,dim>& n,
Dune::FieldMatrix<T3,m,m>& RT) const
{
auto c = problem.c(e,x);
......@@ -40,17 +42,6 @@ public:
RT[2][0] = n[1]; RT[2][1] = n[1]; RT[2][2] = n[0];
}
// where do we need this matrix for?
// template<typename RF>
// static void coefficients (Dune::FieldMatrix<RF,m,m>& A)
// {
// int c2 = 1;
// A[0][0] = 0.0; A[0][1] = 1.0; A[0][2] = 1.0;
// A[1][0] = c2; A[1][1] = 0.0; A[1][2] = 0.0;
// A[2][0] = c2; A[2][1] = 0.0; A[2][2] = 0.0;
// }
template<typename E, typename X, typename RF>
void diagonal (const E& e, const X& x, Dune::FieldMatrix<RF,m,m>& D) const
{
......@@ -73,7 +64,9 @@ public:
//Flux function
template<typename E, typename X, typename RF>
void flux (const E& e, const X& x, const Dune::FieldVector<RF,m>& u, Dune::FieldMatrix<RF,m,dim>& F) const
void flux (const E& e, const X& x,
const Dune::FieldVector<RF,m>& u,
Dune::FieldMatrix<RF,m,dim>& F) const
{
auto c = problem.c(e,x);
......
......@@ -23,7 +23,6 @@ public:
NUMBER c (const E& e, const X& x) const
{
auto xglobal = e.geometry().center();
// if (xglobal[0]>1.0 && xglobal[0]<2.0 && xglobal[1]>0.375 && xglobal[1]<0.625)
if (xglobal[1]>0.625)
return 0.33333;
else
......
......@@ -37,9 +37,12 @@ public:
}
template<typename E, typename X>
void numericalFlux(const E& inside, const X& x_inside, const E& outside, const X& x_outside, const Dune::FieldVector<DF,dim> n_F,
const Dune::FieldVector<RF,m>& u_s,
const Dune::FieldVector<RF,m>& u_n,Dune::FieldVector<RF,m>& f) const
void numericalFlux(const E& inside, const X& x_inside,
const E& outside, const X& x_outside,
const Dune::FieldVector<DF,dim> n_F,
const Dune::FieldVector<RF,m>& u_s,
const Dune::FieldVector<RF,m>& u_n,
Dune::FieldVector<RF,m>& f) const
{
// fetch flux
Dune::FieldMatrix<RF,m,dim> Fs;
......@@ -86,11 +89,12 @@ public:
}
template<typename E, typename X>
void numericalFlux(const E& inside, const X& x_inside, const E& outside, const X& x_outside, const Dune::FieldVector<DF,dim> n_F,
const Dune::FieldVector<RF,m>& u_s,
const Dune::FieldVector<RF,m>& u_n,Dune::FieldVector<RF,m>& f) const
//const std::vector<Dune::FieldVector<RF,dim> >& gradu_s,
//const std::vector<Dune::FieldVector<RF,dim> >& gradu_n)
void numericalFlux(const E& inside, const X& x_inside, const E& outside,
const X& x_outside, const Dune::FieldVector<DF,dim> n_F,
const Dune::FieldVector<RF,m>& u_s,
const Dune::FieldVector<RF,m>& u_n,Dune::FieldVector<RF,m>& f) const
//const std::vector<Dune::FieldVector<RF,dim> >& gradu_s,
//const std::vector<Dune::FieldVector<RF,dim> >& gradu_n)
{
Dune::FieldMatrix<DF,m,m> D(0.0);
// fetch eigenvalues
......
......@@ -41,7 +41,9 @@ public:
//Flux function
template<typename E, typename X, typename RF>
void flux (const E& e, const X& x, const Dune::FieldVector<RF,m>& u, Dune::FieldMatrix<RF,m,dim>& F) const
void flux (const E& e, const X& x,
const Dune::FieldVector<RF,m>& u,
Dune::FieldMatrix<RF,m,dim>& F) const
{
int g = 1;
......
#ifndef ACOUSTICS_RIEMANNPROBLEM
#define ACOUSTICS_RIEMANNPROBLEM
#ifndef SHALLOWWATER_RIEMANNPROBLEM
#define SHALLOWWATER_RIEMANNPROBLEM
template<const int dim, typename GV, typename NUMBER>
class Problem
{
......@@ -85,4 +85,4 @@ private:
NUMBER pi;
};
#endif //ACOUSTICS_RIEMANNPROBLEM
#endif //SHALLOWWATER_RIEMANNPROBLEM
......@@ -89,7 +89,7 @@ int main(int argc, char** argv)
Dune::ParameterTree ptree;
Dune::ParameterTreeParser ptreeparser;
ptreeparser.readINITree("tutorial07-acoustics.ini",ptree);
ptreeparser.readINITree("tutorial07-linearacoustics.ini",ptree);
ptreeparser.readOptions(argc,argv,ptree);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment