diff --git a/lecture/mhs/groundwater/contourplots.py b/lecture/mhs/groundwater/contourplots.py index 63438a53d3f2b81ee3a6c12856e927319cbabade..b0d227ddf4d82a30dde205f710f59306ba8b4cb0 100644 --- a/lecture/mhs/groundwater/contourplots.py +++ b/lecture/mhs/groundwater/contourplots.py @@ -2,7 +2,7 @@ import matplotlib.pyplot as plt import numpy as np import pandas as pd -#Instructions: First execute the `groundwater` test, a file called "contourFile.txt" will be written to the respective build-cmake folder. Within the build-cmake/.../groundwater folder you can then run the python script via e.g. `python3 contourPlots.py` to plot the contour and streamlines of the given problem. +#Instructions: First execute the `groundwater` test, a file called "contourfile.txt" will be written to the respective build-cmake folder. Within the build-cmake/.../groundwater folder you can then run the python script via e.g. `python3 contourPlots.py` to plot the contour and streamlines of the given problem. plt.rcParams.update({'font.size': 10}) @@ -27,7 +27,7 @@ cells = parameters.get("Cells").split() nx = int(cells[0]) ny = int(cells[1]) #read in the data which should be plotted -myData = pd.read_csv('contourFile.txt') #choose the correct name of the data file +myData = pd.read_csv('contourfile.txt') #choose the correct name of the data file #-------PREPARING DATA FOR CONTOUR PLOT------- xArray = myData['x'].values #read in a pandas data column and immediately convert it to a numpy array diff --git a/lecture/mhs/groundwater/groundwaterproblem.hh b/lecture/mhs/groundwater/groundwaterproblem.hh index 7396bb8d1a38f3443a9df4fec35a5f8fcb9be549..0e05b99dc3f3bc1458ad14dc80c36dda9054c887 100644 --- a/lecture/mhs/groundwater/groundwaterproblem.hh +++ b/lecture/mhs/groundwater/groundwaterproblem.hh @@ -416,7 +416,7 @@ public: std::cout << "------------------------------------------------------------"<<std::endl; std::ofstream contourFile; - contourFile.open("contourFile.txt"); + contourFile.open("contourfile.txt"); contourFile << "x,y,h,v_x,v_y" << std::endl; for (const auto& element : elements(this->gridView())) @@ -439,8 +439,6 @@ public: contourFile << std::setprecision(15) << x << "," << y << "," << piezo << "," << v_x << "," << v_y << std::endl; } - - contourFile.close(); } private: