diff --git a/.gitignore b/.gitignore index 06ef1855..5e863244 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,5 @@ build/ resources/ sol/ +input/bitmap/others .vscode/ diff --git a/.vscode/settings.json b/.vscode/settings.json index d9e2a74f..7e00fd94 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,5 @@ { "editor.formatOnSave": true, - "files.associations": { "*.json": "jsonc", "cctype": "cpp", @@ -72,6 +71,8 @@ "typeindex": "cpp", "typeinfo": "cpp", "variant": "cpp", - "any": "cpp" + "any": "cpp", + "*.ipp": "cpp" + "*.txx": "cpp" } -} +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 88055bf0..9fa651df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,4 +2,4 @@ cmake_minimum_required(VERSION 3.8) project(numsim) add_subdirectory(src) -# add_subdirectory(tests) \ No newline at end of file +add_subdirectory(tests) \ No newline at end of file diff --git a/README.md b/README.md index 392ce24b..037ee75b 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,142 @@ Project for the lecture Numerische Simulation at the University of Stuttgart. De * `gcc` * `cmake` * `libvtk` +* `libpng` -## TODO -* Documentation with **doxygen** -* Testing -* Visualization with **Paraview** +## Run the simulation +We recommend to run the simulation using the provided bash script `build.sh`. In that file enter the path of the settings file you would like to use. You can uncomment the **doxygen** part to build the documentation. **Tests** using gtest can be executed by uncommenting the run_test line + +## Adjust the settings file +For the user there is the settings.txt file that can be adjusted to +fit the specific simulation needs. + +### General + +* `physicalSizeX` and `physicalSizeY`: The domain size in meters. *If* bitmap has other ratio, will rescale `physicalSizeY` automatically. +* `endTime`: The endtime of the simulation in seconds. +* `re`: The reynolds number (specfies indirectly the viscosity of the fluid). +* `gX` and `gY`: Acceleration resulting from external forces. + +### Domain Boundary Conditions + +Subsequently the domain boundary conditions are specified. You can choose between Pressure and NoSlip. + +* `BcTop`, `BcRight`, `BcBottom` and `BCLeft`: Type of boundary condition on either side of the domain. Can be either "NoSlip" or Pressure. + +Then the specific values for the NoSlip domain boundary conditions follow. + +* `NoSlipVelTopX/Y`: Noslip boundary velocities directly at the domain top in m/s. +* `NoSlipVelRightX/Y`: Noslip boundary velocities directly at the domain right in m/s. +* `NoSlipVelBottomX/Y`: Noslip boundary velocities directly at the domain bottom in m/s. +* `NoSlipVelLeftX/Y`: Noslip boundary velocities directly at the domain left in m/s. + +Then the specific values for the Pressure domain boundary conditions follow. + +* `PressureTop`: Pressure directly at the top of the domain in Pa +* `PressureRight`: Pressure directly at the right of the domain in Pa +* `PressureBottom`: Pressure directly at the bottom of the domain in Pa +* `PressureLeft`: Pressure directly at the left of the domain in Pa + +### Geometry + +If you want to put a rectangular object in the domain you can specfiy its location +and dimension with the following setting. + +* `createRectangularObject`: Set to true if you want to add a rectangular object +* `obstaclePositionX/Y`: Position of the left lower corner of the rectangle in the domain in m +* `obstacleDimensionX/Y`: Dimension of the object in x and y direction in m + +In the following you can specify wheter you want to load your domain from a bitmap. + +* `createDomainfromBitmap`: Set to true if you want to load your domain from a bitmap + +* `pathToBitmap`: path to the location of the bitmap saved as a png. + +### Discretization + +* `nCellsX/Y`: Number of cells in x and y direction as int, *if* bitmap is provided will be ignored +* `useDonorCell`: Set to true if you want to use the Donor Cell scheme +* `alpha`: Factor for donor-cell scheme between 0 and 1. 0 is equivalent to central differences +* `epsilon`: Tolerance of the 2-norm residual +* `maximumNumberOfIterations`: Maximum number of iterations of the pressure solver +* `printInterval` the time which shall pass between output vtk files + +### Open surfaces + +* `useFluidTracer`: Set to true if you want to simulate free surfaces +* `particlePerCell`: Number of fluid particles per cell as integer +* `useParticleSource`: Enables the creation of particle at a specified location +* `particleSourceX`, `particleSourceY`: specifies the location + +Since it yielded the best results, the settings `fluidTracerMethod` is always *fixed* with `fluidTracerThreshold` of 1 as introduced in the lecture. This means that one virtual particle is enough for a cell to be declared fluid instead of e.g. $k$ or a *calculated* which aims at a constant number of fluid cells. + + +## Creating a domain using a bitmap +An easy way to introduce new obstacles into the domain, changing the domain +geometry or adding air cells to the domain for free surfaces simulation is to use +a bitmap. In gerneral you can use any program to create a bitmap however we recommend +[Pixilart](https://www.pixilart.com/). Here you can specify the number of pixels +in x and y direction when creating a new bitmap. These pixel numbers directly correlate to the number of cells **inside** the simulation domain. Use the Bucket +tool to fill your image with either white pixels (r:255, g:255, b:255) for air cells +or blue pixels (any color apart from white and black actually works) for fluid cells. +Then use the drawing tool to add black obstacle cells (r:0, g:0, b:0). When saving +the file, all pixels need to have a color value. If there are only black and white +pixels you will essentially simulate an empty space, so always add colored pixels +for fluid as well. + +Safe the bitmap as a png, specify the path to that file in the settings.txt file +and set **createDomainfromBitmap** to true. In the input/ bitmap folder you can find +example files that you can simulate. + + +## Display simulation results in ParaView +You can display your simulation results using ParaView. The necessary vtk files +will be written to the `build/out` folder during simulation. + +When the files are loaded into paraview you should apply a threshold to the mask +field to make obstacle visible in paraview (see image). Then use the threshold field to perform further visualizations. + +![mask](media/mask.png) + + + +## Results + +### Quadrupel Lid-Driven Cavity + +As an example, that there is no interaction through obstacles we implemented a somewhat circular Lid-Driven-Cavity. The settings and bitmap are provided in the `input` folder, [here](input/settings_quadruple_cavity.txt). + + +![Example_QuadLidDrivenCavity](media/Example_QuadLidDrivenCavity.png) + +### Cavity with a step + +Again the settings are provided [here](input/settings_cavity_with_a_step.txt) + +![Cavity Step](media/CavityStep.png) + +### Aerodynamic +With pressure Boundary Condition and a bitmap an aerodynamic shape can be simulated. The settings can be found [here](input/settings_aerodynamic_obstacle.txt). + +![Aero with Glyphs](media/aero_vector.png) + +### Water drop + +A water drop falls with gravity in shallow fluid, where generated waves propagate. + +![drop](media/drop.png) + + +### Dam break + +A scenario which was also simulated with *OpenFOAM*. Our solver has yet to improve to achieve the same accuarcy. + + + + + +The simulation doesn't complete, since there are some mistakes in creating particles in the air, which violates the velocity condition. ## Contributors diff --git a/build.sh b/build.sh index b95dffcd..eecc3395 100755 --- a/build.sh +++ b/build.sh @@ -16,37 +16,26 @@ else fi make install -j4 -# ./numsim ../input/settings_v3.txt - -# run different resolution -# ./numsim ../input/different_resolutions/settings_01.txt -# ./numsim ../input/different_resolutions/settings_02.txt -# ./numsim ../input/different_resolutions/settings_03.txt -# ./numsim ../input/different_resolutions/settings_04.txt -# ./numsim ../input/different_resolutions/settings_05.txt -# ./numsim ../input/different_resolutions/settings_06.txt - -# run different viscosity -# ./numsim ../input/different_re/100.txt -# ./numsim ../input/different_re/500.txt -# ./numsim ../input/different_re/2000.txt -# ./numsim ../input/different_re/10000.txt -cd .. -# directly open output in paraview +./numsim ../input/settings.txt +# ./numsim ../input/settings_aerodynamic_obstacle.txt +# ./numsim ../input/settings_damBreak.txt +# ./numsim ../input/settings_drop.txt +# ./numsim ../input/settings_quadruple_cavity.txt +# ./numsim ../input/settings_lid_driven_cavity_with_a_step.txt -# paraview out/output_* +# ./numsim ../input/settings_water_tap.txt -# for writing documentation -# cd .. +cd .. + +# Documentation + # mkdir documentation # cd documentation # doxygen ../Doxyfile # cd .. -# run tests -# build/tests/run_tests - -zip -r submission.zip src/ CMakeLists.txt \ No newline at end of file +# Tests +build/tests/run_tests \ No newline at end of file diff --git a/documentation/html/annotated.html b/documentation/html/annotated.html new file mode 100644 index 00000000..99e38136 --- /dev/null +++ b/documentation/html/annotated.html @@ -0,0 +1,105 @@ + + + + + + + +NumSim: Class List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 12]
+ + + + + + + + + + + + + + + + + + +
 CArray2DThis class represents a 2D array of double values
 CBoundaryClass responsible to caluclate boundary conditions
 CCentralDifferencesDiscretizes the problem using the central differences scheme
 CComputationComputation of Simulation
 CDiscretizationComputes derivatives included in governing equations
 CDonorCellDiscretizes the problem using the donor cell scheme
 CFieldVariableDiscretization of a scalar function
 CFluidTracer
 CGaussSeidelStandard Gauss-Seidel solver
 CMask
 COutputWriterInteface class for writing simulation data output
 COutputWriterParaviewWrite *.vti files that can be viewed with ParaView
 COutputWriterTextWrite *.txt files that are useful for debugging
 CPressureSolverSolves the Poisson problem for the pressure
 CSettingsAll settings that parametrize a simulation run
 CLineContentContains the content of a single line in a file
 CSORSuccessive over-relaxation solver
 CStaggeredGridCreate field variables and define limits for the indices
+
+
+ + + + diff --git a/documentation/html/array2D_8h_source.html b/documentation/html/array2D_8h_source.html new file mode 100644 index 00000000..f3f26112 --- /dev/null +++ b/documentation/html/array2D_8h_source.html @@ -0,0 +1,122 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/storage/array2D.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
array2D.h
+
+
+
1#pragma once
+
2
+
3#include <vector>
+
4#include <array>
+
5#include <cassert>
+
6
+
7
+
+ +
16{
+
17public:
+
23 Array2D(std::array<int, 2> size);
+
24
+
32 double &operator()(int i, int j);
+
33
+
41 double operator()(int i, int j) const;
+
42
+
46 std::array<int, 2> size() const;
+
47
+
48protected:
+
49 const std::array<int, 2> size_;
+
50 std::vector<double> data_;
+
51};
+
+
This class represents a 2D array of double values.
Definition array2D.h:16
+
Array2D(std::array< int, 2 > size)
constructor.
Definition array2D.cpp:5
+
const std::array< int, 2 > size_
size of array in x and y direction
Definition array2D.h:49
+
double & operator()(int i, int j)
set array value. Overloads the () operator
Definition array2D.cpp:11
+
std::array< int, 2 > size() const
get size of array in x and y direction
Definition array2D.cpp:39
+
std::vector< double > data_
storage array values, in row-major order
Definition array2D.h:50
+
+ + + + diff --git a/documentation/html/bc_s.png b/documentation/html/bc_s.png new file mode 100644 index 00000000..224b29aa Binary files /dev/null and b/documentation/html/bc_s.png differ diff --git a/documentation/html/bc_sd.png b/documentation/html/bc_sd.png new file mode 100644 index 00000000..31ca888d Binary files /dev/null and b/documentation/html/bc_sd.png differ diff --git a/documentation/html/boundary_8h_source.html b/documentation/html/boundary_8h_source.html new file mode 100644 index 00000000..7737e85f --- /dev/null +++ b/documentation/html/boundary_8h_source.html @@ -0,0 +1,157 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/boundary/boundary.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
boundary.h
+
+
+
1#pragma once
+
2
+
3#include "mask.h"
+
4#include "../discretization/discretization.h"
+
5#include "../settings_parser/settings.h"
+
6#include <vector>
+
7#include <memory>
+
8
+
+ +
15{
+
16public:
+
24 Boundary(std::shared_ptr<Mask> mask, std::shared_ptr<Discretization> discretization, Settings settings);
+
25
+ +
30
+ +
37
+ +
42
+
50 void setVelocityBoundaryValues(double dt);
+
51
+
55 bool doCalculateF(int i, int j) const;
+
56
+
60 bool doCalculateG(int i, int j) const;
+
61
+
65 void updateBoundary();
+
66
+
67 std::shared_ptr<Mask> mask_;
+
68
+
69private:
+
73 void createBoundaryCellsLists();
+
74
+
78 void setPressureDomainBC();
+
79
+
83 void setPressureObstacleBC();
+
84
+
88 void setVelocityDomainBC();
+
89
+
93 void setVelocityObstacleBC();
+
94
+
98 void setVelocitySurfaceBC();
+
99
+
103 void updateVelocitySurfaceBC(double dt);
+
104
+
108 void setAirCellsZero();
+
109
+
110 std::shared_ptr<Discretization> discretization_;
+
111 Settings settings_;
+
112
+
113 std::vector<int> domainBoundaryCells_;
+
114 std::vector<int> obstacleBoundaryCells_;
+
115 std::vector<int> fluidBoundaryCells_;
+
116};
+
+
Class responsible to caluclate boundary conditions.
Definition boundary.h:15
+
std::shared_ptr< Mask > mask_
shared pointer to mask entity
Definition boundary.h:67
+
Boundary(std::shared_ptr< Mask > mask, std::shared_ptr< Discretization > discretization, Settings settings)
Constructor.
Definition boundary.cpp:3
+
void setPressureBoundaryValues()
calculates and sets the pressure boundary values for obstacles and domain boundary
Definition boundary.cpp:39
+
void updateBoundary()
updates fluid boundary cell list
Definition boundary.cpp:28
+
bool doCalculateG(int i, int j) const
returns true if cell top and bottom of G value are fluid (not a boundary value)
Definition boundary.cpp:676
+
void setVelocityBoundaryValues()
calculates and sets the velocity boundary values for surface, obstacle and domain boundary
Definition boundary.cpp:207
+
void setPressureSurfaceBC()
calculates and sets the pressure boundary values for surface boundary
Definition boundary.cpp:119
+
bool doCalculateF(int i, int j) const
returns true if cell left and rigt of F value are fluid (not a boundary value)
Definition boundary.cpp:672
+
All settings that parametrize a simulation run.
Definition settings.h:14
+
+ + + + diff --git a/documentation/html/central__differences_8h_source.html b/documentation/html/central__differences_8h_source.html new file mode 100644 index 00000000..06dd6ccb --- /dev/null +++ b/documentation/html/central__differences_8h_source.html @@ -0,0 +1,119 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/discretization/central_differences.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
central_differences.h
+
+
+
1#pragma once
+
2
+
3#include <array>
+
4#include <vector>
+
5#include "discretization.h"
+
6
+
+ +
15{
+
16public:
+
23 CentralDifferences(std::array<int, 2> nCells, std::array<double, 2> meshWidth);
+
24
+
29 double computeDu2Dx(int i, int j) const override;
+
34 double computeDv2Dy(int i, int j) const override;
+
39 double computeDuvDx(int i, int j) const override;
+
44 double computeDuvDy(int i, int j) const override;
+
45};
+
+
Discretizes the problem using the central differences scheme.
Definition central_differences.h:15
+
double computeDuvDy(int i, int j) const override
Calculate first derivative of u*v with respect to y with the central differences Scheme.
Definition central_differences.cpp:32
+
double computeDv2Dy(int i, int j) const override
Calculate first derivative of v^2 with respect to y with the central differences Scheme.
Definition central_differences.cpp:14
+
double computeDuvDx(int i, int j) const override
Calculate first derivative of u*v with respect to x with the central differences Scheme.
Definition central_differences.cpp:21
+
CentralDifferences(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
Constructor.
Definition central_differences.cpp:3
+
double computeDu2Dx(int i, int j) const override
Calculate first derivative of u^2 with respect to x with the central differences Scheme.
Definition central_differences.cpp:7
+
Computes derivatives included in governing equations.
Definition discretization.h:16
+
const std::array< double, 2 > meshWidth() const
Get the length of a single cell in x and y directions.
Definition staggered_grid.cpp:14
+
const std::array< int, 2 > nCells() const
Get number of cells in x and y directions.
Definition staggered_grid.cpp:19
+
+ + + + diff --git a/documentation/html/classArray2D-members.html b/documentation/html/classArray2D-members.html new file mode 100644 index 00000000..b1ed0030 --- /dev/null +++ b/documentation/html/classArray2D-members.html @@ -0,0 +1,92 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
Array2D Member List
+
+
+ +

This is the complete list of members for Array2D, including all inherited members.

+ + + + + + + +
Array2D(std::array< int, 2 > size)Array2D
data_Array2Dprotected
operator()(int i, int j)Array2D
operator()(int i, int j) constArray2D
size() constArray2D
size_Array2Dprotected
+ + + + diff --git a/documentation/html/classArray2D.html b/documentation/html/classArray2D.html new file mode 100644 index 00000000..06918d52 --- /dev/null +++ b/documentation/html/classArray2D.html @@ -0,0 +1,238 @@ + + + + + + + +NumSim: Array2D Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
Array2D Class Reference
+
+
+ +

This class represents a 2D array of double values. + More...

+ +

#include <array2D.h>

+
+Inheritance diagram for Array2D:
+
+
+ + +FieldVariable + +
+ + + + + + + + + + + + + + +

+Public Member Functions

 Array2D (std::array< int, 2 > size)
 constructor.
 
double & operator() (int i, int j)
 set array value. Overloads the () operator
 
double operator() (int i, int j) const
 get array value. Overloads the () operator
 
+std::array< int, 2 > size () const
 get size of array in x and y direction
 
+ + + + + + + +

+Protected Attributes

+const std::array< int, 2 > size_
 size of array in x and y direction
 
+std::vector< double > data_
 storage array values, in row-major order
 
+

Detailed Description

+

This class represents a 2D array of double values.

+

Internally they are stored consecutively in memory. The entries can be accessed by two indices i,j.

+

Constructor & Destructor Documentation

+ +

◆ Array2D()

+ +
+
+ + + + + + + + +
Array2D::Array2D (std::array< int, 2 > size)
+
+ +

constructor.

+
Parameters
+ + +
sizesize of array in x and y direction
+
+
+ +
+
+

Member Function Documentation

+ +

◆ operator()() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
double & Array2D::operator() (int i,
int j 
)
+
+ +

set array value. Overloads the () operator

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+ +
+
+ +

◆ operator()() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
double Array2D::operator() (int i,
int j 
) const
+
+ +

get array value. Overloads the () operator

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classArray2D.png b/documentation/html/classArray2D.png new file mode 100644 index 00000000..c9e0e4f3 Binary files /dev/null and b/documentation/html/classArray2D.png differ diff --git a/documentation/html/classBoundary-members.html b/documentation/html/classBoundary-members.html new file mode 100644 index 00000000..758c368e --- /dev/null +++ b/documentation/html/classBoundary-members.html @@ -0,0 +1,95 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
Boundary Member List
+
+
+ +

This is the complete list of members for Boundary, including all inherited members.

+ + + + + + + + + + +
Boundary(std::shared_ptr< Mask > mask, std::shared_ptr< Discretization > discretization, Settings settings)Boundary
doCalculateF(int i, int j) constBoundary
doCalculateG(int i, int j) constBoundary
mask_Boundary
setPressureBoundaryValues()Boundary
setPressureSurfaceBC()Boundary
setVelocityBoundaryValues()Boundary
setVelocityBoundaryValues(double dt)Boundary
updateBoundary()Boundary
+ + + + diff --git a/documentation/html/classBoundary.html b/documentation/html/classBoundary.html new file mode 100644 index 00000000..12f3a06c --- /dev/null +++ b/documentation/html/classBoundary.html @@ -0,0 +1,231 @@ + + + + + + + +NumSim: Boundary Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
Boundary Class Reference
+
+
+ +

Class responsible to caluclate boundary conditions. + More...

+ +

#include <boundary.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Boundary (std::shared_ptr< Mask > mask, std::shared_ptr< Discretization > discretization, Settings settings)
 Constructor.
 
+void setPressureBoundaryValues ()
 calculates and sets the pressure boundary values for obstacles and domain boundary
 
void setPressureSurfaceBC ()
 calculates and sets the pressure boundary values for surface boundary
 
+void setVelocityBoundaryValues ()
 calculates and sets the velocity boundary values for surface, obstacle and domain boundary
 
void setVelocityBoundaryValues (double dt)
 overloaded function that sets velocity boundary
 
+bool doCalculateF (int i, int j) const
 returns true if cell left and rigt of F value are fluid (not a boundary value)
 
+bool doCalculateG (int i, int j) const
 returns true if cell top and bottom of G value are fluid (not a boundary value)
 
+void updateBoundary ()
 updates fluid boundary cell list
 
+ + + + +

+Public Attributes

+std::shared_ptr< Maskmask_
 shared pointer to mask entity
 
+

Detailed Description

+

Class responsible to caluclate boundary conditions.

+

Constructor & Destructor Documentation

+ +

◆ Boundary()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Boundary::Boundary (std::shared_ptr< Maskmask,
std::shared_ptr< Discretizationdiscretization,
Settings settings 
)
+
+ +

Constructor.

+
Parameters
+ + + + +
discretizationinstance of Discretization holding the needed field variables for rhs and p
maskinstance of mask holding the boundary condition enums for each cell tolerance for the solver
settingsholding the necessary domainn boundary condition
+
+
+ +
+
+

Member Function Documentation

+ +

◆ setPressureSurfaceBC()

+ +
+
+ + + + + + + +
void Boundary::setPressureSurfaceBC ()
+
+ +

calculates and sets the pressure boundary values for surface boundary

+

Only needs to be set once -> no need to update each solver iteration

+ +
+
+ +

◆ setVelocityBoundaryValues()

+ +
+
+ + + + + + + + +
void Boundary::setVelocityBoundaryValues (double dt)
+
+ +

overloaded function that sets velocity boundary

+

necessary when fluid tracker is used

+
Parameters
+ + +
dtcurrent time step
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classCentralDifferences-members.html b/documentation/html/classCentralDifferences-members.html new file mode 100644 index 00000000..66f6e3a4 --- /dev/null +++ b/documentation/html/classCentralDifferences-members.html @@ -0,0 +1,148 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
CentralDifferences Member List
+
+
+ +

This is the complete list of members for CentralDifferences, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CentralDifferences(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)CentralDifferences
computeD2uDx2(int i, int j) constDiscretizationvirtual
computeD2uDy2(int i, int j) constDiscretizationvirtual
computeD2vDx2(int i, int j) constDiscretizationvirtual
computeD2vDy2(int i, int j) constDiscretizationvirtual
computeDpDx(int i, int j) constDiscretizationvirtual
computeDpDy(int i, int j) constDiscretizationvirtual
computeDu2Dx(int i, int j) const overrideCentralDifferencesvirtual
computeDuvDx(int i, int j) const overrideCentralDifferencesvirtual
computeDuvDy(int i, int j) const overrideCentralDifferencesvirtual
computeDv2Dy(int i, int j) const overrideCentralDifferencesvirtual
Discretization(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)Discretization
dx() constStaggeredGrid
dy() constStaggeredGrid
f(int i, int j)StaggeredGrid
f_StaggeredGridprotected
fIBegin() constStaggeredGrid
fIEnd() constStaggeredGrid
fJBegin() constStaggeredGrid
fJEnd() constStaggeredGrid
g(int i, int j)StaggeredGrid
g_StaggeredGridprotected
gIBegin() constStaggeredGrid
gIEnd() constStaggeredGrid
gJBegin() constStaggeredGrid
gJEnd() constStaggeredGrid
meshWidth() constStaggeredGrid
meshWidth_StaggeredGridprotected
nCells() constStaggeredGrid
nCells_StaggeredGridprotected
p() constStaggeredGrid
p(int i, int j) constStaggeredGrid
p(int i, int j)StaggeredGrid
p_StaggeredGridprotected
pIBegin() constStaggeredGrid
pIEnd() constStaggeredGrid
pJBegin() constStaggeredGrid
pJEnd() constStaggeredGrid
rhs() constStaggeredGrid
rhs(int i, int j)StaggeredGrid
rhs_StaggeredGridprotected
rhsIBegin() constStaggeredGrid
rhsIEnd() constStaggeredGrid
rhsJBegin() constStaggeredGrid
rhsJEnd() constStaggeredGrid
StaggeredGrid(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)StaggeredGrid
u() constStaggeredGrid
u(int i, int j) constStaggeredGrid
u(int i, int j)StaggeredGrid
u_StaggeredGridprotected
uIBegin() constStaggeredGrid
uIEnd() constStaggeredGrid
uJBegin() constStaggeredGrid
uJEnd() constStaggeredGrid
v() constStaggeredGrid
v(int i, int j) constStaggeredGrid
v(int i, int j)StaggeredGrid
v_StaggeredGridprotected
vIBegin() constStaggeredGrid
vIEnd() constStaggeredGrid
vJBegin() constStaggeredGrid
vJEnd() constStaggeredGrid
+ + + + diff --git a/documentation/html/classCentralDifferences.html b/documentation/html/classCentralDifferences.html new file mode 100644 index 00000000..de6e40e1 --- /dev/null +++ b/documentation/html/classCentralDifferences.html @@ -0,0 +1,558 @@ + + + + + + + +NumSim: CentralDifferences Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
CentralDifferences Class Reference
+
+
+ +

Discretizes the problem using the central differences scheme. + More...

+ +

#include <central_differences.h>

+
+Inheritance diagram for CentralDifferences:
+
+
+ + +Discretization +StaggeredGrid + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 CentralDifferences (std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
 Constructor.
 
double computeDu2Dx (int i, int j) const override
 Calculate first derivative of u^2 with respect to x with the central differences Scheme.
 
double computeDv2Dy (int i, int j) const override
 Calculate first derivative of v^2 with respect to y with the central differences Scheme.
 
double computeDuvDx (int i, int j) const override
 Calculate first derivative of u*v with respect to x with the central differences Scheme.
 
double computeDuvDy (int i, int j) const override
 Calculate first derivative of u*v with respect to y with the central differences Scheme.
 
- Public Member Functions inherited from Discretization
 Discretization (std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
 Constructor.
 
+virtual double computeD2uDx2 (int i, int j) const
 Calculate second derivative of u with respect to x.
 
+virtual double computeD2uDy2 (int i, int j) const
 Calculate second derivative of u with respect to y.
 
+virtual double computeD2vDx2 (int i, int j) const
 Calculate second derivative of v with respect to x.
 
+virtual double computeD2vDy2 (int i, int j) const
 Calculate second derivative of v with respect to y.
 
+virtual double computeDpDx (int i, int j) const
 Calculate first derivative of p with respect to x.
 
+virtual double computeDpDy (int i, int j) const
 Calculate first derivative of p with respect to y.
 
- Public Member Functions inherited from StaggeredGrid
 StaggeredGrid (std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
 Constructor.
 
+const std::array< double, 2 > meshWidth () const
 Get the length of a single cell in x and y directions.
 
+const std::array< int, 2 > nCells () const
 Get number of cells in x and y directions.
 
+const FieldVariableu () const
 Get a reference to the field variable u.
 
+const FieldVariablev () const
 Get a reference to the field variable v.
 
+const FieldVariablep () const
 Get a reference to the field variable p.
 
+const FieldVariablerhs () const
 Get a reference to the field variable rhs.
 
+double u (int i, int j) const
 Access value of u in element (i,j), declared constant.
 
+double & u (int i, int j)
 Access value of u in element (i,j)
 
+double v (int i, int j) const
 Access value of v in element (i,j), declared constant.
 
+double & v (int i, int j)
 Access value of v in element (i,j)
 
+double p (int i, int j) const
 Access value of p in element (i,j), declared constant.
 
+double & p (int i, int j)
 Access value of p in element (i,j)
 
+double & f (int i, int j)
 Access value of f in element (i,j)
 
+double & g (int i, int j)
 Access value of g in element (i,j)
 
+double & rhs (int i, int j)
 Access value of rhs in element (i,j)
 
+double dx () const
 Get the mesh width in x-direction.
 
+double dy () const
 Get the mesh width in y-direction.
 
+int uIBegin () const
 first valid index for u in x direction
 
+int uIEnd () const
 one after last valid index for u in x direction
 
+int uJBegin () const
 first valid index for u in y direction
 
+int uJEnd () const
 one after last valid index for u in y direction
 
+int vIBegin () const
 first valid index for v in x direction
 
+int vIEnd () const
 one after last valid index for v in x direction
 
+int vJBegin () const
 first valid index for v in y direction
 
+int vJEnd () const
 one after last valid index for v in y direction
 
+int pIBegin () const
 first valid index for p in x direction
 
+int pIEnd () const
 one after last valid index for p in x direction
 
+int pJBegin () const
 first valid index for p in y direction
 
+int pJEnd () const
 one after last valid index for p in y direction
 
+int fIBegin () const
 first valid index for f in x direction
 
+int fIEnd () const
 one after last valid index for f in x direction
 
+int fJBegin () const
 first valid index for f in y direction
 
+int fJEnd () const
 one after last valid index for f in y direction
 
+int gIBegin () const
 first valid index for g in x direction
 
+int gIEnd () const
 one after last valid index for g in x direction
 
+int gJBegin () const
 first valid index for g in y direction
 
+int gJEnd () const
 one after last valid index for g in y direction
 
+int rhsIBegin () const
 first valid index for rhs in x direction
 
+int rhsIEnd () const
 one after last valid index for rhs in x direction
 
+int rhsJBegin () const
 first valid index for rhs in y direction
 
+int rhsJEnd () const
 one after last valid index for rhs in y direction
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from StaggeredGrid
+const std::array< int, 2 > nCells_
 array containing number of cells in x and y directions
 
+const std::array< double, 2 > meshWidth_
 array containing the sizes of cell edges in x and y directions
 
+FieldVariable u_
 instance of the field variable u
 
+FieldVariable v_
 instance of the field variable v
 
+FieldVariable p_
 instance of the field variable p
 
+FieldVariable f_
 instance of the field variable f
 
+FieldVariable g_
 instance of the field variable g
 
+FieldVariable rhs_
 instance of the field variable rhs
 
+

Detailed Description

+

Discretizes the problem using the central differences scheme.

+

Implements the first derivatives of u^2, v^2 and u*v according to the central differences scheme

+

Constructor & Destructor Documentation

+ +

◆ CentralDifferences()

+ +
+
+ + + + + + + + + + + + + + + + + + +
CentralDifferences::CentralDifferences (std::array< int, 2 > nCells,
std::array< double, 2 > meshWidth 
)
+
+ +

Constructor.

+
Parameters
+ + + +
nCellsarray containing number of cells in x and y directions
meshWidtharray containing the length of a single cell in x and y directions
+
+
+ +
+
+

Member Function Documentation

+ +

◆ computeDu2Dx()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double CentralDifferences::computeDu2Dx (int i,
int j 
) const
+
+overridevirtual
+
+ +

Calculate first derivative of u^2 with respect to x with the central differences Scheme.

+ +

Implements Discretization.

+ +
+
+ +

◆ computeDuvDx()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double CentralDifferences::computeDuvDx (int i,
int j 
) const
+
+overridevirtual
+
+ +

Calculate first derivative of u*v with respect to x with the central differences Scheme.

+ +

Implements Discretization.

+ +
+
+ +

◆ computeDuvDy()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double CentralDifferences::computeDuvDy (int i,
int j 
) const
+
+overridevirtual
+
+ +

Calculate first derivative of u*v with respect to y with the central differences Scheme.

+ +

Implements Discretization.

+ +
+
+ +

◆ computeDv2Dy()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double CentralDifferences::computeDv2Dy (int i,
int j 
) const
+
+overridevirtual
+
+ +

Calculate first derivative of v^2 with respect to y with the central differences Scheme.

+ +

Implements Discretization.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classCentralDifferences.png b/documentation/html/classCentralDifferences.png new file mode 100644 index 00000000..047955ca Binary files /dev/null and b/documentation/html/classCentralDifferences.png differ diff --git a/documentation/html/classComputation-members.html b/documentation/html/classComputation-members.html new file mode 100644 index 00000000..3de2ea13 --- /dev/null +++ b/documentation/html/classComputation-members.html @@ -0,0 +1,88 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
Computation Member List
+
+
+ +

This is the complete list of members for Computation, including all inherited members.

+ + + +
initialize(int argc, char *argv[])Computation
runSimulation()Computation
+ + + + diff --git a/documentation/html/classComputation.html b/documentation/html/classComputation.html new file mode 100644 index 00000000..eb082e75 --- /dev/null +++ b/documentation/html/classComputation.html @@ -0,0 +1,147 @@ + + + + + + + +NumSim: Computation Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
Computation Class Reference
+
+
+ +

Computation of Simulation. + More...

+ +

#include <computation.h>

+ + + + + + + + +

+Public Member Functions

void initialize (int argc, char *argv[])
 Initialize the simulation with settings from .txt file.
 
+void runSimulation ()
 run the whole simulation until t_end
 
+

Detailed Description

+

Computation of Simulation.

+

Combines discretization, pressure solver and outputwriter

+

Member Function Documentation

+ +

◆ initialize()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Computation::initialize (int argc,
char * argv[] 
)
+
+ +

Initialize the simulation with settings from .txt file.

+
Parameters
+ + + +
argccounts of CLI commands
argvvalues of CLI commands, expect settings.txt filename
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classDiscretization-members.html b/documentation/html/classDiscretization-members.html new file mode 100644 index 00000000..6971d969 --- /dev/null +++ b/documentation/html/classDiscretization-members.html @@ -0,0 +1,147 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
Discretization Member List
+
+
+ +

This is the complete list of members for Discretization, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
computeD2uDx2(int i, int j) constDiscretizationvirtual
computeD2uDy2(int i, int j) constDiscretizationvirtual
computeD2vDx2(int i, int j) constDiscretizationvirtual
computeD2vDy2(int i, int j) constDiscretizationvirtual
computeDpDx(int i, int j) constDiscretizationvirtual
computeDpDy(int i, int j) constDiscretizationvirtual
computeDu2Dx(int i, int j) const =0Discretizationpure virtual
computeDuvDx(int i, int j) const =0Discretizationpure virtual
computeDuvDy(int i, int j) const =0Discretizationpure virtual
computeDv2Dy(int i, int j) const =0Discretizationpure virtual
Discretization(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)Discretization
dx() constStaggeredGrid
dy() constStaggeredGrid
f(int i, int j)StaggeredGrid
f_StaggeredGridprotected
fIBegin() constStaggeredGrid
fIEnd() constStaggeredGrid
fJBegin() constStaggeredGrid
fJEnd() constStaggeredGrid
g(int i, int j)StaggeredGrid
g_StaggeredGridprotected
gIBegin() constStaggeredGrid
gIEnd() constStaggeredGrid
gJBegin() constStaggeredGrid
gJEnd() constStaggeredGrid
meshWidth() constStaggeredGrid
meshWidth_StaggeredGridprotected
nCells() constStaggeredGrid
nCells_StaggeredGridprotected
p() constStaggeredGrid
p(int i, int j) constStaggeredGrid
p(int i, int j)StaggeredGrid
p_StaggeredGridprotected
pIBegin() constStaggeredGrid
pIEnd() constStaggeredGrid
pJBegin() constStaggeredGrid
pJEnd() constStaggeredGrid
rhs() constStaggeredGrid
rhs(int i, int j)StaggeredGrid
rhs_StaggeredGridprotected
rhsIBegin() constStaggeredGrid
rhsIEnd() constStaggeredGrid
rhsJBegin() constStaggeredGrid
rhsJEnd() constStaggeredGrid
StaggeredGrid(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)StaggeredGrid
u() constStaggeredGrid
u(int i, int j) constStaggeredGrid
u(int i, int j)StaggeredGrid
u_StaggeredGridprotected
uIBegin() constStaggeredGrid
uIEnd() constStaggeredGrid
uJBegin() constStaggeredGrid
uJEnd() constStaggeredGrid
v() constStaggeredGrid
v(int i, int j) constStaggeredGrid
v(int i, int j)StaggeredGrid
v_StaggeredGridprotected
vIBegin() constStaggeredGrid
vIEnd() constStaggeredGrid
vJBegin() constStaggeredGrid
vJEnd() constStaggeredGrid
+ + + + diff --git a/documentation/html/classDiscretization.html b/documentation/html/classDiscretization.html new file mode 100644 index 00000000..e76e7937 --- /dev/null +++ b/documentation/html/classDiscretization.html @@ -0,0 +1,555 @@ + + + + + + + +NumSim: Discretization Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
Discretization Class Referenceabstract
+
+
+ +

Computes derivatives included in governing equations. + More...

+ +

#include <discretization.h>

+
+Inheritance diagram for Discretization:
+
+
+ + +StaggeredGrid +CentralDifferences +DonorCell + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Discretization (std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
 Constructor.
 
virtual double computeDu2Dx (int i, int j) const =0
 Calculate first derivative of u^2 with respect to x.
 
virtual double computeDv2Dy (int i, int j) const =0
 Calculate first derivative of v^2 with respect to y.
 
virtual double computeDuvDx (int i, int j) const =0
 Calculate first derivative of u*v with respect to x.
 
virtual double computeDuvDy (int i, int j) const =0
 Calculate first derivative of u*v with respect to y.
 
+virtual double computeD2uDx2 (int i, int j) const
 Calculate second derivative of u with respect to x.
 
+virtual double computeD2uDy2 (int i, int j) const
 Calculate second derivative of u with respect to y.
 
+virtual double computeD2vDx2 (int i, int j) const
 Calculate second derivative of v with respect to x.
 
+virtual double computeD2vDy2 (int i, int j) const
 Calculate second derivative of v with respect to y.
 
+virtual double computeDpDx (int i, int j) const
 Calculate first derivative of p with respect to x.
 
+virtual double computeDpDy (int i, int j) const
 Calculate first derivative of p with respect to y.
 
- Public Member Functions inherited from StaggeredGrid
 StaggeredGrid (std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
 Constructor.
 
+const std::array< double, 2 > meshWidth () const
 Get the length of a single cell in x and y directions.
 
+const std::array< int, 2 > nCells () const
 Get number of cells in x and y directions.
 
+const FieldVariableu () const
 Get a reference to the field variable u.
 
+const FieldVariablev () const
 Get a reference to the field variable v.
 
+const FieldVariablep () const
 Get a reference to the field variable p.
 
+const FieldVariablerhs () const
 Get a reference to the field variable rhs.
 
+double u (int i, int j) const
 Access value of u in element (i,j), declared constant.
 
+double & u (int i, int j)
 Access value of u in element (i,j)
 
+double v (int i, int j) const
 Access value of v in element (i,j), declared constant.
 
+double & v (int i, int j)
 Access value of v in element (i,j)
 
+double p (int i, int j) const
 Access value of p in element (i,j), declared constant.
 
+double & p (int i, int j)
 Access value of p in element (i,j)
 
+double & f (int i, int j)
 Access value of f in element (i,j)
 
+double & g (int i, int j)
 Access value of g in element (i,j)
 
+double & rhs (int i, int j)
 Access value of rhs in element (i,j)
 
+double dx () const
 Get the mesh width in x-direction.
 
+double dy () const
 Get the mesh width in y-direction.
 
+int uIBegin () const
 first valid index for u in x direction
 
+int uIEnd () const
 one after last valid index for u in x direction
 
+int uJBegin () const
 first valid index for u in y direction
 
+int uJEnd () const
 one after last valid index for u in y direction
 
+int vIBegin () const
 first valid index for v in x direction
 
+int vIEnd () const
 one after last valid index for v in x direction
 
+int vJBegin () const
 first valid index for v in y direction
 
+int vJEnd () const
 one after last valid index for v in y direction
 
+int pIBegin () const
 first valid index for p in x direction
 
+int pIEnd () const
 one after last valid index for p in x direction
 
+int pJBegin () const
 first valid index for p in y direction
 
+int pJEnd () const
 one after last valid index for p in y direction
 
+int fIBegin () const
 first valid index for f in x direction
 
+int fIEnd () const
 one after last valid index for f in x direction
 
+int fJBegin () const
 first valid index for f in y direction
 
+int fJEnd () const
 one after last valid index for f in y direction
 
+int gIBegin () const
 first valid index for g in x direction
 
+int gIEnd () const
 one after last valid index for g in x direction
 
+int gJBegin () const
 first valid index for g in y direction
 
+int gJEnd () const
 one after last valid index for g in y direction
 
+int rhsIBegin () const
 first valid index for rhs in x direction
 
+int rhsIEnd () const
 one after last valid index for rhs in x direction
 
+int rhsJBegin () const
 first valid index for rhs in y direction
 
+int rhsJEnd () const
 one after last valid index for rhs in y direction
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from StaggeredGrid
+const std::array< int, 2 > nCells_
 array containing number of cells in x and y directions
 
+const std::array< double, 2 > meshWidth_
 array containing the sizes of cell edges in x and y directions
 
+FieldVariable u_
 instance of the field variable u
 
+FieldVariable v_
 instance of the field variable v
 
+FieldVariable p_
 instance of the field variable p
 
+FieldVariable f_
 instance of the field variable f
 
+FieldVariable g_
 instance of the field variable g
 
+FieldVariable rhs_
 instance of the field variable rhs
 
+

Detailed Description

+

Computes derivatives included in governing equations.

+

Interface for the discretization. Computes the needed derivatives to solve the Poisson and continuity equations.

+

Constructor & Destructor Documentation

+ +

◆ Discretization()

+ +
+
+ + + + + + + + + + + + + + + + + + +
Discretization::Discretization (std::array< int, 2 > nCells,
std::array< double, 2 > meshWidth 
)
+
+ +

Constructor.

+
Parameters
+ + + +
nCellsarray containing number of cells in x and y directions
meshWidtharray containing the length of a single cell in x and y directions
+
+
+ +
+
+

Member Function Documentation

+ +

◆ computeDu2Dx()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual double Discretization::computeDu2Dx (int i,
int j 
) const
+
+pure virtual
+
+ +

Calculate first derivative of u^2 with respect to x.

+ +

Implemented in CentralDifferences, and DonorCell.

+ +
+
+ +

◆ computeDuvDx()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual double Discretization::computeDuvDx (int i,
int j 
) const
+
+pure virtual
+
+ +

Calculate first derivative of u*v with respect to x.

+ +

Implemented in CentralDifferences, and DonorCell.

+ +
+
+ +

◆ computeDuvDy()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual double Discretization::computeDuvDy (int i,
int j 
) const
+
+pure virtual
+
+ +

Calculate first derivative of u*v with respect to y.

+ +

Implemented in CentralDifferences, and DonorCell.

+ +
+
+ +

◆ computeDv2Dy()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual double Discretization::computeDv2Dy (int i,
int j 
) const
+
+pure virtual
+
+ +

Calculate first derivative of v^2 with respect to y.

+ +

Implemented in CentralDifferences, and DonorCell.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classDiscretization.png b/documentation/html/classDiscretization.png new file mode 100644 index 00000000..d491366f Binary files /dev/null and b/documentation/html/classDiscretization.png differ diff --git a/documentation/html/classDonorCell-members.html b/documentation/html/classDonorCell-members.html new file mode 100644 index 00000000..01049bd1 --- /dev/null +++ b/documentation/html/classDonorCell-members.html @@ -0,0 +1,148 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
DonorCell Member List
+
+
+ +

This is the complete list of members for DonorCell, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
computeD2uDx2(int i, int j) constDiscretizationvirtual
computeD2uDy2(int i, int j) constDiscretizationvirtual
computeD2vDx2(int i, int j) constDiscretizationvirtual
computeD2vDy2(int i, int j) constDiscretizationvirtual
computeDpDx(int i, int j) constDiscretizationvirtual
computeDpDy(int i, int j) constDiscretizationvirtual
computeDu2Dx(int i, int j) const overrideDonorCellvirtual
computeDuvDx(int i, int j) const overrideDonorCellvirtual
computeDuvDy(int i, int j) const overrideDonorCellvirtual
computeDv2Dy(int i, int j) const overrideDonorCellvirtual
Discretization(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)Discretization
DonorCell(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth, double alpha)DonorCell
dx() constStaggeredGrid
dy() constStaggeredGrid
f(int i, int j)StaggeredGrid
f_StaggeredGridprotected
fIBegin() constStaggeredGrid
fIEnd() constStaggeredGrid
fJBegin() constStaggeredGrid
fJEnd() constStaggeredGrid
g(int i, int j)StaggeredGrid
g_StaggeredGridprotected
gIBegin() constStaggeredGrid
gIEnd() constStaggeredGrid
gJBegin() constStaggeredGrid
gJEnd() constStaggeredGrid
meshWidth() constStaggeredGrid
meshWidth_StaggeredGridprotected
nCells() constStaggeredGrid
nCells_StaggeredGridprotected
p() constStaggeredGrid
p(int i, int j) constStaggeredGrid
p(int i, int j)StaggeredGrid
p_StaggeredGridprotected
pIBegin() constStaggeredGrid
pIEnd() constStaggeredGrid
pJBegin() constStaggeredGrid
pJEnd() constStaggeredGrid
rhs() constStaggeredGrid
rhs(int i, int j)StaggeredGrid
rhs_StaggeredGridprotected
rhsIBegin() constStaggeredGrid
rhsIEnd() constStaggeredGrid
rhsJBegin() constStaggeredGrid
rhsJEnd() constStaggeredGrid
StaggeredGrid(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)StaggeredGrid
u() constStaggeredGrid
u(int i, int j) constStaggeredGrid
u(int i, int j)StaggeredGrid
u_StaggeredGridprotected
uIBegin() constStaggeredGrid
uIEnd() constStaggeredGrid
uJBegin() constStaggeredGrid
uJEnd() constStaggeredGrid
v() constStaggeredGrid
v(int i, int j) constStaggeredGrid
v(int i, int j)StaggeredGrid
v_StaggeredGridprotected
vIBegin() constStaggeredGrid
vIEnd() constStaggeredGrid
vJBegin() constStaggeredGrid
vJEnd() constStaggeredGrid
+ + + + diff --git a/documentation/html/classDonorCell.html b/documentation/html/classDonorCell.html new file mode 100644 index 00000000..1f68fdb8 --- /dev/null +++ b/documentation/html/classDonorCell.html @@ -0,0 +1,565 @@ + + + + + + + +NumSim: DonorCell Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
DonorCell Class Reference
+
+
+ +

Discretizes the problem using the donor cell scheme. + More...

+ +

#include <donor_cell.h>

+
+Inheritance diagram for DonorCell:
+
+
+ + +Discretization +StaggeredGrid + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 DonorCell (std::array< int, 2 > nCells, std::array< double, 2 > meshWidth, double alpha)
 Constructor.
 
double computeDu2Dx (int i, int j) const override
 Calculate first derivative of u^2 with respect to x with the donor cell Scheme.
 
double computeDv2Dy (int i, int j) const override
 Calculate first derivative of v^2 with respect to y with the donor cell Scheme.
 
double computeDuvDx (int i, int j) const override
 Calculate first derivative of u*v with respect to x with the donor cell Scheme.
 
double computeDuvDy (int i, int j) const override
 Calculate first derivative of u*v with respect to y with the donor cell Scheme.
 
- Public Member Functions inherited from Discretization
 Discretization (std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
 Constructor.
 
+virtual double computeD2uDx2 (int i, int j) const
 Calculate second derivative of u with respect to x.
 
+virtual double computeD2uDy2 (int i, int j) const
 Calculate second derivative of u with respect to y.
 
+virtual double computeD2vDx2 (int i, int j) const
 Calculate second derivative of v with respect to x.
 
+virtual double computeD2vDy2 (int i, int j) const
 Calculate second derivative of v with respect to y.
 
+virtual double computeDpDx (int i, int j) const
 Calculate first derivative of p with respect to x.
 
+virtual double computeDpDy (int i, int j) const
 Calculate first derivative of p with respect to y.
 
- Public Member Functions inherited from StaggeredGrid
 StaggeredGrid (std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
 Constructor.
 
+const std::array< double, 2 > meshWidth () const
 Get the length of a single cell in x and y directions.
 
+const std::array< int, 2 > nCells () const
 Get number of cells in x and y directions.
 
+const FieldVariableu () const
 Get a reference to the field variable u.
 
+const FieldVariablev () const
 Get a reference to the field variable v.
 
+const FieldVariablep () const
 Get a reference to the field variable p.
 
+const FieldVariablerhs () const
 Get a reference to the field variable rhs.
 
+double u (int i, int j) const
 Access value of u in element (i,j), declared constant.
 
+double & u (int i, int j)
 Access value of u in element (i,j)
 
+double v (int i, int j) const
 Access value of v in element (i,j), declared constant.
 
+double & v (int i, int j)
 Access value of v in element (i,j)
 
+double p (int i, int j) const
 Access value of p in element (i,j), declared constant.
 
+double & p (int i, int j)
 Access value of p in element (i,j)
 
+double & f (int i, int j)
 Access value of f in element (i,j)
 
+double & g (int i, int j)
 Access value of g in element (i,j)
 
+double & rhs (int i, int j)
 Access value of rhs in element (i,j)
 
+double dx () const
 Get the mesh width in x-direction.
 
+double dy () const
 Get the mesh width in y-direction.
 
+int uIBegin () const
 first valid index for u in x direction
 
+int uIEnd () const
 one after last valid index for u in x direction
 
+int uJBegin () const
 first valid index for u in y direction
 
+int uJEnd () const
 one after last valid index for u in y direction
 
+int vIBegin () const
 first valid index for v in x direction
 
+int vIEnd () const
 one after last valid index for v in x direction
 
+int vJBegin () const
 first valid index for v in y direction
 
+int vJEnd () const
 one after last valid index for v in y direction
 
+int pIBegin () const
 first valid index for p in x direction
 
+int pIEnd () const
 one after last valid index for p in x direction
 
+int pJBegin () const
 first valid index for p in y direction
 
+int pJEnd () const
 one after last valid index for p in y direction
 
+int fIBegin () const
 first valid index for f in x direction
 
+int fIEnd () const
 one after last valid index for f in x direction
 
+int fJBegin () const
 first valid index for f in y direction
 
+int fJEnd () const
 one after last valid index for f in y direction
 
+int gIBegin () const
 first valid index for g in x direction
 
+int gIEnd () const
 one after last valid index for g in x direction
 
+int gJBegin () const
 first valid index for g in y direction
 
+int gJEnd () const
 one after last valid index for g in y direction
 
+int rhsIBegin () const
 first valid index for rhs in x direction
 
+int rhsIEnd () const
 one after last valid index for rhs in x direction
 
+int rhsJBegin () const
 first valid index for rhs in y direction
 
+int rhsJEnd () const
 one after last valid index for rhs in y direction
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from StaggeredGrid
+const std::array< int, 2 > nCells_
 array containing number of cells in x and y directions
 
+const std::array< double, 2 > meshWidth_
 array containing the sizes of cell edges in x and y directions
 
+FieldVariable u_
 instance of the field variable u
 
+FieldVariable v_
 instance of the field variable v
 
+FieldVariable p_
 instance of the field variable p
 
+FieldVariable f_
 instance of the field variable f
 
+FieldVariable g_
 instance of the field variable g
 
+FieldVariable rhs_
 instance of the field variable rhs
 
+

Detailed Description

+

Discretizes the problem using the donor cell scheme.

+

Implements the first derivatives of u^2, v^2 and u*v according to the donor cell scheme

+

Constructor & Destructor Documentation

+ +

◆ DonorCell()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
DonorCell::DonorCell (std::array< int, 2 > nCells,
std::array< double, 2 > meshWidth,
double alpha 
)
+
+ +

Constructor.

+
Parameters
+ + + + +
nCellsarray containing number of cells in x and y directions
meshWidtharray containing the length of a single cell in x and y directions
alphaweight factor between central differences and donor cell schemes
+
+
+ +
+
+

Member Function Documentation

+ +

◆ computeDu2Dx()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double DonorCell::computeDu2Dx (int i,
int j 
) const
+
+overridevirtual
+
+ +

Calculate first derivative of u^2 with respect to x with the donor cell Scheme.

+ +

Implements Discretization.

+ +
+
+ +

◆ computeDuvDx()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double DonorCell::computeDuvDx (int i,
int j 
) const
+
+overridevirtual
+
+ +

Calculate first derivative of u*v with respect to x with the donor cell Scheme.

+ +

Implements Discretization.

+ +
+
+ +

◆ computeDuvDy()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double DonorCell::computeDuvDy (int i,
int j 
) const
+
+overridevirtual
+
+ +

Calculate first derivative of u*v with respect to y with the donor cell Scheme.

+ +

Implements Discretization.

+ +
+
+ +

◆ computeDv2Dy()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double DonorCell::computeDv2Dy (int i,
int j 
) const
+
+overridevirtual
+
+ +

Calculate first derivative of v^2 with respect to y with the donor cell Scheme.

+ +

Implements Discretization.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classDonorCell.png b/documentation/html/classDonorCell.png new file mode 100644 index 00000000..20dde334 Binary files /dev/null and b/documentation/html/classDonorCell.png differ diff --git a/documentation/html/classFieldVariable-members.html b/documentation/html/classFieldVariable-members.html new file mode 100644 index 00000000..a9dcfae0 --- /dev/null +++ b/documentation/html/classFieldVariable-members.html @@ -0,0 +1,95 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
FieldVariable Member List
+
+
+ +

This is the complete list of members for FieldVariable, including all inherited members.

+ + + + + + + + + + +
Array2D(std::array< int, 2 > size)Array2D
data_Array2Dprotected
FieldVariable(std::array< int, 2 > size, std::array< double, 2 > origin, std::array< double, 2 > meshWidth)FieldVariable
findAbsMax() constFieldVariable
interpolateAt(double x, double y) constFieldVariable
operator()(int i, int j)Array2D
operator()(int i, int j) constArray2D
size() constArray2D
size_Array2Dprotected
+ + + + diff --git a/documentation/html/classFieldVariable.html b/documentation/html/classFieldVariable.html new file mode 100644 index 00000000..fcefd336 --- /dev/null +++ b/documentation/html/classFieldVariable.html @@ -0,0 +1,250 @@ + + + + + + + +NumSim: FieldVariable Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
FieldVariable Class Reference
+
+
+ +

Discretization of a scalar function. + More...

+ +

#include <field_variable.h>

+
+Inheritance diagram for FieldVariable:
+
+
+ + +Array2D + +
+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 FieldVariable (std::array< int, 2 > size, std::array< double, 2 > origin, std::array< double, 2 > meshWidth)
 Constructor.
 
double interpolateAt (double x, double y) const
 Interpolates value of field variable in domain using x and y coordinates.
 
double findAbsMax () const
 Find point in Array2D of Fieldvariable with maximum value.
 
- Public Member Functions inherited from Array2D
 Array2D (std::array< int, 2 > size)
 constructor.
 
double & operator() (int i, int j)
 set array value. Overloads the () operator
 
double operator() (int i, int j) const
 get array value. Overloads the () operator
 
+std::array< int, 2 > size () const
 get size of array in x and y direction
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from Array2D
+const std::array< int, 2 > size_
 size of array in x and y direction
 
+std::vector< double > data_
 storage array values, in row-major order
 
+

Detailed Description

+

Discretization of a scalar function.

+

A field variable is the discretization of a scalar function f(x) with x in the computational domain. More specifically, a scalar value is stored at discrete nodes/points. The nodes are arranged in an equidistant mesh with specified mesh width.

+

Constructor & Destructor Documentation

+ +

◆ FieldVariable()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
FieldVariable::FieldVariable (std::array< int, 2 > size,
std::array< double, 2 > origin,
std::array< double, 2 > meshWidth 
)
+
+ +

Constructor.

+
Parameters
+ + + + +
sizenumber of cells in x and y direction
originorgin of Fieldvariable relative to domain origin
meshwidthmesh width in x and y direction
+
+
+ +
+
+

Member Function Documentation

+ +

◆ findAbsMax()

+ +
+
+ + + + + + + +
double FieldVariable::findAbsMax () const
+
+ +

Find point in Array2D of Fieldvariable with maximum value.

+

Finds maximum by iterating through all values in FielVariable

+ +
+
+ +

◆ interpolateAt()

+ +
+
+ + + + + + + + + + + + + + + + + + +
double FieldVariable::interpolateAt (double x,
double y 
) const
+
+ +

Interpolates value of field variable in domain using x and y coordinates.

+

Interpolates by using bilinear interpolation.

+
Parameters
+ + + +
xx postion of point to interpolate
yy postion of point to interpolate
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classFieldVariable.png b/documentation/html/classFieldVariable.png new file mode 100644 index 00000000..39c18d0f Binary files /dev/null and b/documentation/html/classFieldVariable.png differ diff --git a/documentation/html/classFluidTracer-members.html b/documentation/html/classFluidTracer-members.html new file mode 100644 index 00000000..38b6a622 --- /dev/null +++ b/documentation/html/classFluidTracer-members.html @@ -0,0 +1,99 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
FluidTracer Member List
+
+
+ +

This is the complete list of members for FluidTracer, including all inherited members.

+ + + + + + + + + + + + + + +
cellOfParticle(int i) (defined in FluidTracer)FluidTracer
createParticles(double positionSourceX, double positionSourceY)FluidTracer
FluidTracer(int numParticlesperCell, std::shared_ptr< Discretization > discretization, std::shared_ptr< Mask > mask) (defined in FluidTracer)FluidTracer
FluidTracer(std::vector< double > x, std::vector< double > y, std::shared_ptr< Discretization > discretization, std::shared_ptr< Mask > mask) (defined in FluidTracer)FluidTracer
getNumberOfParticles() constFluidTracer
getNumberOfParticles(int i, int j) constFluidTracer
getParticlePosition(int i) constFluidTracer
moveParticles(double dt)FluidTracer
moveParticles(double dt, std::array< double, 2 > vel) (defined in FluidTracer)FluidTracer
printParticles() (defined in FluidTracer)FluidTracer
updateParticle(int i, std::array< int, 2 > idx, double dt, std::array< double, 2 > vel, int depth) (defined in FluidTracer)FluidTracer
val2CellX(double xVal) (defined in FluidTracer)FluidTracer
val2CellY(double yVal) (defined in FluidTracer)FluidTracer
+ + + + diff --git a/documentation/html/classFluidTracer.html b/documentation/html/classFluidTracer.html new file mode 100644 index 00000000..49aafc60 --- /dev/null +++ b/documentation/html/classFluidTracer.html @@ -0,0 +1,264 @@ + + + + + + + +NumSim: FluidTracer Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
FluidTracer Class Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

FluidTracer (int numParticlesperCell, std::shared_ptr< Discretization > discretization, std::shared_ptr< Mask > mask)
 
FluidTracer (std::vector< double > x, std::vector< double > y, std::shared_ptr< Discretization > discretization, std::shared_ptr< Mask > mask)
 
void moveParticles (double dt)
 Update the position of the particles according to the velocity field and sets mask accordingly.
 
void createParticles (double positionSourceX, double positionSourceY)
 can be used to create a source cell for particles
 
int getNumberOfParticles () const
 Total number of Particles.
 
int getNumberOfParticles (int i, int j) const
 Particles of specified cell.
 
std::array< double, 2 > getParticlePosition (int i) const
 Get the Particle Position, index starts at 0.
 
+std::array< int, 2 > cellOfParticle (int i)
 
+int val2CellX (double xVal)
 
+int val2CellY (double yVal)
 
+std::array< double, 2 > updateParticle (int i, std::array< int, 2 > idx, double dt, std::array< double, 2 > vel, int depth)
 
+std::array< double, 2 > moveParticles (double dt, std::array< double, 2 > vel)
 
+void printParticles ()
 
+

Member Function Documentation

+ +

◆ createParticles()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void FluidTracer::createParticles (double positionSourceX,
double positionSourceY 
)
+
+ +

can be used to create a source cell for particles

+

fills the cell homogenously with particles by cell

+ +
+
+ +

◆ getNumberOfParticles() [1/2]

+ +
+
+ + + + + + + +
int FluidTracer::getNumberOfParticles () const
+
+ +

Total number of Particles.

+
Returns
int
+ +
+
+ +

◆ getNumberOfParticles() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
int FluidTracer::getNumberOfParticles (int i,
int j 
) const
+
+ +

Particles of specified cell.

+

uses mask Grid

+ +
+
+ +

◆ getParticlePosition()

+ +
+
+ + + + + + + + +
std::array< double, 2 > FluidTracer::getParticlePosition (int i) const
+
+ +

Get the Particle Position, index starts at 0.

+
Returns
std::array<double, 2>
+ +
+
+ +

◆ moveParticles()

+ +
+
+ + + + + + + + +
void FluidTracer::moveParticles (double dt)
+
+ +

Update the position of the particles according to the velocity field and sets mask accordingly.

+

get the velocity field $u$ and $v$ Checks for collision with border or obstacle and reflects the particle at this position Update the mask where there are new Air or Fluid cells

+
Parameters
+ + +
dt
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classGaussSeidel-members.html b/documentation/html/classGaussSeidel-members.html new file mode 100644 index 00000000..ece7c0c4 --- /dev/null +++ b/documentation/html/classGaussSeidel-members.html @@ -0,0 +1,101 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
GaussSeidel Member List
+
+
+ +

This is the complete list of members for GaussSeidel, including all inherited members.

+ + + + + + + + + + + + + + + + +
boundary_PressureSolverprotected
calculateResiduum()PressureSolverprotected
discretization_PressureSolverprotected
dx2 (defined in PressureSolver)PressureSolver
dy2PressureSolver
epsilon_PressureSolverprotected
GaussSeidel(const std::shared_ptr< Discretization > &data, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)GaussSeidel
i_begPressureSolverprotected
i_endPressureSolverprotected
j_begPressureSolverprotected
j_endPressureSolverprotected
maximumNumberOfIterations_PressureSolverprotected
PressureSolver(std::shared_ptr< Discretization > discretization, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)PressureSolver
setBoundaryValues()PressureSolverprotected
solve() overrideGaussSeidelvirtual
+ + + + diff --git a/documentation/html/classGaussSeidel.html b/documentation/html/classGaussSeidel.html new file mode 100644 index 00000000..57198a55 --- /dev/null +++ b/documentation/html/classGaussSeidel.html @@ -0,0 +1,253 @@ + + + + + + + +NumSim: GaussSeidel Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
GaussSeidel Class Reference
+
+
+ +

Standard Gauss-Seidel solver. + More...

+ +

#include <gauss_seidel.h>

+
+Inheritance diagram for GaussSeidel:
+
+
+ + +PressureSolver + +
+ + + + + + + + + + + + +

+Public Member Functions

 GaussSeidel (const std::shared_ptr< Discretization > &data, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)
 Constructor.
 
void solve () override
 override function that starts solver.
 
- Public Member Functions inherited from PressureSolver
 PressureSolver (std::shared_ptr< Discretization > discretization, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)
 Constructor.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from PressureSolver
+double dx2
 
+double dy2
 squared mesh widths
 
- Protected Member Functions inherited from PressureSolver
void setBoundaryValues ()
 Set the Boundary Values.
 
+double calculateResiduum ()
 calculate residuum of current time step
 
- Protected Attributes inherited from PressureSolver
+int i_beg
 begin of loop for rhs in x direction
 
+int i_end
 end of loop for rhs in x direction
 
+int j_beg
 begin of loop for rhs in y direction
 
+int j_end
 end of loop for rhs in y direction
 
+std::shared_ptr< Discretizationdiscretization_
 object holding the needed field variables for rhs and p
 
+std::shared_ptr< Boundaryboundary_
 object managing boundary for obstacle and surface tension
 
+double epsilon_
 tolerance for the solver
 
+int maximumNumberOfIterations_
 maximum number of iterations
 
+

Detailed Description

+

Standard Gauss-Seidel solver.

+

Constructor & Destructor Documentation

+ +

◆ GaussSeidel()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GaussSeidel::GaussSeidel (const std::shared_ptr< Discretization > & data,
double epsilon,
int maximumNumberOfIterations,
std::shared_ptr< Boundaryboundary 
)
+
+ +

Constructor.

+
Parameters
+ + + + +
datainstance of Discretization holding the needed field variables for rhs and p
epsilontolerance for the solver
maximumNumberOfIterationsmaximum of iteration
+
+
+ +
+
+

Member Function Documentation

+ +

◆ solve()

+ +
+
+ + + + + +
+ + + + + + + +
void GaussSeidel::solve ()
+
+overridevirtual
+
+ +

override function that starts solver.

+ +

Implements PressureSolver.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classGaussSeidel.png b/documentation/html/classGaussSeidel.png new file mode 100644 index 00000000..9e4343d9 Binary files /dev/null and b/documentation/html/classGaussSeidel.png differ diff --git a/documentation/html/classMask-members.html b/documentation/html/classMask-members.html new file mode 100644 index 00000000..7210cd32 --- /dev/null +++ b/documentation/html/classMask-members.html @@ -0,0 +1,148 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
Mask Member List
+
+
+ +

This is the complete list of members for Mask, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AIR enum value (defined in Mask)Mask
boundary_listMaskprotected
CellType enum nameMask
createMaskFromPNGBitMap()Mask
data_Maskprotected
DOMAIN_BOTTOM_NOSLIP enum value (defined in Mask)Mask
DOMAIN_BOTTOM_PRESSURE enum value (defined in Mask)Mask
DOMAIN_BOUNDARY enum value (defined in Mask)Mask
DOMAIN_LEFT_NOSLIP enum value (defined in Mask)Mask
DOMAIN_LEFT_PRESSURE enum value (defined in Mask)Mask
DOMAIN_RIGHT_NOSLIP enum value (defined in Mask)Mask
DOMAIN_RIGHT_PRESSURE enum value (defined in Mask)Mask
DOMAIN_TOP_NOSLIP enum value (defined in Mask)Mask
DOMAIN_TOP_PRESSURE enum value (defined in Mask)Mask
FLUID enum value (defined in Mask)Mask
FLUID_BORDER_BOTTOM enum value (defined in Mask)Mask
FLUID_BORDER_LEFT enum value (defined in Mask)Mask
FLUID_BORDER_RIGHT enum value (defined in Mask)Mask
FLUID_BORDER_TOP enum value (defined in Mask)Mask
FLUID_COLUMN_HORIZONTAL enum value (defined in Mask)Mask
FLUID_COLUMN_VERTICAL enum value (defined in Mask)Mask
FLUID_CORNER_BOTTOM_LEFT enum value (defined in Mask)Mask
FLUID_CORNER_BOTTOM_RIGHT enum value (defined in Mask)Mask
FLUID_CORNER_TOP_LEFT enum value (defined in Mask)Mask
FLUID_CORNER_TOP_RIGHT enum value (defined in Mask)Mask
FLUID_DROPLET enum value (defined in Mask)Mask
FLUID_SINGLE_BOTTOM enum value (defined in Mask)Mask
FLUID_SINGLE_LEFT enum value (defined in Mask)Mask
FLUID_SINGLE_RIGHT enum value (defined in Mask)Mask
FLUID_SINGLE_TOP enum value (defined in Mask)Mask
FLUID_TYPE enum value (defined in Mask)Mask
forbiddenObstacleFluidCombinationsMaskprotected
getNumberOfFluidCells() constMask
isAir(int i, int j) constMask
isDomainBoundary(int i, int j) constMask
isFluid(int i, int j) constMask
isFluidBoundary(int i, int j) constMask
isInnerFluid(int i, int j) constMask
isObstacle(int i, int j) constMask
isObstacleBoundary(int i, int j) constMask
makeRectangularObstacle()Mask
Mask(Settings settings)Mask
OBSTACLE enum value (defined in Mask)Mask
OBSTACLE_BORDER_BOTTOM enum value (defined in Mask)Mask
OBSTACLE_BORDER_LEFT enum value (defined in Mask)Mask
OBSTACLE_BORDER_RIGHT enum value (defined in Mask)Mask
OBSTACLE_BORDER_TOP enum value (defined in Mask)Mask
OBSTACLE_CORNER_BOTTOM_LEFT enum value (defined in Mask)Mask
OBSTACLE_CORNER_BOTTOM_RIGHT enum value (defined in Mask)Mask
OBSTACLE_CORNER_TOP_LEFT enum value (defined in Mask)Mask
OBSTACLE_CORNER_TOP_RIGHT enum value (defined in Mask)Mask
OBSTACLE_INSIDE enum value (defined in Mask)Mask
operator()(int i, int j)Mask
operator()(int i, int j) constMask
printMask() constMask
resetMask()Mask
setDomainBC()Mask
setFluidBC()Mask
setObstacleBC()Mask
settings_Maskprotected
size() constMask
size_Maskprotected
+ + + + diff --git a/documentation/html/classMask.html b/documentation/html/classMask.html new file mode 100644 index 00000000..efa2e348 --- /dev/null +++ b/documentation/html/classMask.html @@ -0,0 +1,679 @@ + + + + + + + +NumSim: Mask Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Types | +Public Member Functions | +Protected Attributes | +List of all members
+
Mask Class Reference
+
+
+ + + + + +

+Public Types

enum  CellType {
+  FLUID_DROPLET = 0 +, FLUID_SINGLE_LEFT = 1 +, FLUID_SINGLE_TOP = 2 +, FLUID_SINGLE_RIGHT = 4 +,
+  FLUID_SINGLE_BOTTOM = 8 +, FLUID_CORNER_BOTTOM_LEFT = 6 +, FLUID_CORNER_TOP_LEFT = 12 +, FLUID_CORNER_TOP_RIGHT = 9 +,
+  FLUID_CORNER_BOTTOM_RIGHT = 3 +, FLUID_COLUMN_HORIZONTAL = 5 +, FLUID_COLUMN_VERTICAL = 10 +, FLUID_BORDER_LEFT = 14 +,
+  FLUID_BORDER_TOP = 13 +, FLUID_BORDER_RIGHT = 11 +, FLUID_BORDER_BOTTOM = 7 +, FLUID = 15 +,
+  FLUID_TYPE = 50 +, AIR = 64 +, OBSTACLE = 99 +, OBSTACLE_INSIDE = 100 +,
+  OBSTACLE_BORDER_LEFT = 101 +, OBSTACLE_BORDER_TOP = 102 +, OBSTACLE_CORNER_TOP_LEFT = 103 +, OBSTACLE_BORDER_RIGHT = 104 +,
+  OBSTACLE_CORNER_TOP_RIGHT = 106 +, OBSTACLE_BORDER_BOTTOM = 108 +, OBSTACLE_CORNER_BOTTOM_LEFT = 109 +, OBSTACLE_CORNER_BOTTOM_RIGHT = 112 +,
+  DOMAIN_BOUNDARY = 200 +, DOMAIN_LEFT_NOSLIP = 201 +, DOMAIN_TOP_NOSLIP = 202 +, DOMAIN_RIGHT_NOSLIP = 203 +,
+  DOMAIN_BOTTOM_NOSLIP = 204 +, DOMAIN_LEFT_PRESSURE = 205 +, DOMAIN_TOP_PRESSURE = 206 +, DOMAIN_RIGHT_PRESSURE = 207 +,
+  DOMAIN_BOTTOM_PRESSURE = 208 +
+ }
 < enums used to encode cell type and boundary condition
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Mask (Settings settings)
 constructor.
 
int & operator() (int i, int j)
 set array value. Overloads the () operator
 
int operator() (int i, int j) const
 get array value. Overloads the () operator
 
+std::array< int, 2 > size () const
 get size of array in x and y direction
 
+void resetMask ()
 sets all not obstacle cells to air
 
bool isFluid (int i, int j) const
 Cell at (i,j) is fluid or not.
 
bool isObstacle (int i, int j) const
 True if Cell at (i,j) is either obstacle or boundary.
 
bool isAir (int i, int j) const
 Cell at (i,j) is a air cell or not.
 
bool isInnerFluid (int i, int j) const
 Cell at (i,j) is a inner fluid cell or not.
 
bool isDomainBoundary (int i, int j) const
 Cecks if cell at index is domain boundary.
 
bool isObstacleBoundary (int i, int j) const
 Cecks if cell at index is obstacle boundary.
 
bool isFluidBoundary (int i, int j) const
 Cecks if cell at index is fluid boundary.
 
int getNumberOfFluidCells () const
 number of fluid cells
 
void makeRectangularObstacle ()
 creates rectangulat objecct inside domain
 
void createMaskFromPNGBitMap ()
 creates mask by reading in bitmap
 
void setDomainBC ()
 sets enums for all cells that belong to domain boundary
 
+void setObstacleBC ()
 sets enums for all cells that belong to an obstacle
 
+void setFluidBC ()
 sets enums for all fluid cells that belong are located at a surface
 
+void printMask () const
 print mask enums to terminal
 
+ + + + + + + + + + + + + + + + +

+Protected Attributes

+std::array< int, 2 > size_
 size of array in x and y direction
 
+std::vector< int > data_
 storage array values, in row-major order
 
+std::vector< int > boundary_list
 stores the indices of the boundary cells
 
+Settings settings_
 settings entity
 
+int forbiddenObstacleFluidCombinations [7] = {105, 107, 110, 111, 113, 114, 115}
 enums that singnal forbidden obstacle - fluid cell combinations
 
+

Constructor & Destructor Documentation

+ +

◆ Mask()

+ +
+
+ + + + + + + + +
Mask::Mask (Settings settings)
+
+ +

constructor.

+
Parameters
+ + +
settingsettings containing necessary user input
+
+
+ +
+
+

Member Function Documentation

+ +

◆ createMaskFromPNGBitMap()

+ +
+
+ + + + + + + +
void Mask::createMaskFromPNGBitMap ()
+
+ +

creates mask by reading in bitmap

+

path to bitmap saved as png is specified in settings file by user

+ +
+
+ +

◆ getNumberOfFluidCells()

+ +
+
+ + + + + + + +
int Mask::getNumberOfFluidCells () const
+
+ +

number of fluid cells

+

not efficient but is only used once in the creation of the fluid tracer

+ +
+
+ +

◆ isAir()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Mask::isAir (int i,
int j 
) const
+
+ +

Cell at (i,j) is a air cell or not.

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+

If i and j are out of bond returns false

+ +
+
+ +

◆ isDomainBoundary()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Mask::isDomainBoundary (int i,
int j 
) const
+
+ +

Cecks if cell at index is domain boundary.

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+ +
+
+ +

◆ isFluid()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Mask::isFluid (int i,
int j 
) const
+
+ +

Cell at (i,j) is fluid or not.

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+

If i and j are out of bond returns false

+ +
+
+ +

◆ isFluidBoundary()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Mask::isFluidBoundary (int i,
int j 
) const
+
+ +

Cecks if cell at index is fluid boundary.

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+ +
+
+ +

◆ isInnerFluid()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Mask::isInnerFluid (int i,
int j 
) const
+
+ +

Cell at (i,j) is a inner fluid cell or not.

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+

Checks if fluid is sourrounded by only fluid cells If i and j are out of bond returns false

+ +
+
+ +

◆ isObstacle()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Mask::isObstacle (int i,
int j 
) const
+
+ +

True if Cell at (i,j) is either obstacle or boundary.

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+ +
+
+ +

◆ isObstacleBoundary()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Mask::isObstacleBoundary (int i,
int j 
) const
+
+ +

Cecks if cell at index is obstacle boundary.

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+ +
+
+ +

◆ makeRectangularObstacle()

+ +
+
+ + + + + + + +
void Mask::makeRectangularObstacle ()
+
+ +

creates rectangulat objecct inside domain

+

location and size are specified in settings file by user

+ +
+
+ +

◆ operator()() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
int & Mask::operator() (int i,
int j 
)
+
+ +

set array value. Overloads the () operator

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+ +
+
+ +

◆ operator()() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
int Mask::operator() (int i,
int j 
) const
+
+ +

get array value. Overloads the () operator

+
Parameters
+ + + +
iindex in x direction
jindex in y direction
+
+
+ +
+
+ +

◆ setDomainBC()

+ +
+
+ + + + + + + +
void Mask::setDomainBC ()
+
+ +

sets enums for all cells that belong to domain boundary

+

type of domain boundary condition is specified in settings file by user

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classOutputWriter-members.html b/documentation/html/classOutputWriter-members.html new file mode 100644 index 00000000..a07d193b --- /dev/null +++ b/documentation/html/classOutputWriter-members.html @@ -0,0 +1,90 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
OutputWriter Member List
+
+
+ +

This is the complete list of members for OutputWriter, including all inherited members.

+ + + + + +
discretization_OutputWriterprotected
fileNo_OutputWriterprotected
OutputWriter(std::shared_ptr< Discretization > discretization)OutputWriter
writeFile(double currentTime)=0OutputWriterpure virtual
+ + + + diff --git a/documentation/html/classOutputWriter.html b/documentation/html/classOutputWriter.html new file mode 100644 index 00000000..62415c92 --- /dev/null +++ b/documentation/html/classOutputWriter.html @@ -0,0 +1,194 @@ + + + + + + + +NumSim: OutputWriter Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
OutputWriter Class Referenceabstract
+
+
+ +

Inteface class for writing simulation data output. + More...

+ +

#include <output_writer.h>

+
+Inheritance diagram for OutputWriter:
+
+
+ + +OutputWriterParaview +OutputWriterText + +
+ + + + + + + + +

+Public Member Functions

 OutputWriter (std::shared_ptr< Discretization > discretization)
 Constructor.
 
virtual void writeFile (double currentTime)=0
 Write current velocities to file.
 
+ + + + + + + +

+Protected Attributes

+std::shared_ptr< Discretizationdiscretization_
 shared pointer, discretization object containing data to be written to file
 
+int fileNo_
 a counter that increments for every file written to disk
 
+

Detailed Description

+

Inteface class for writing simulation data output.

+

Constructor & Destructor Documentation

+ +

◆ OutputWriter()

+ +
+
+ + + + + + + + +
OutputWriter::OutputWriter (std::shared_ptr< Discretizationdiscretization)
+
+ +

Constructor.

+
Parameters
+ + +
discretizationdiscretization object containing data to be written to file
+
+
+ +
+
+

Member Function Documentation

+ +

◆ writeFile()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void OutputWriter::writeFile (double currentTime)
+
+pure virtual
+
+ +

Write current velocities to file.

+

Filename is output_<fileNo_>.vti

+
Parameters
+ + +
currentTimecurrent time of simulation
+
+
+ +

Implemented in OutputWriterParaview, and OutputWriterText.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classOutputWriter.png b/documentation/html/classOutputWriter.png new file mode 100644 index 00000000..8c067052 Binary files /dev/null and b/documentation/html/classOutputWriter.png differ diff --git a/documentation/html/classOutputWriterParaview-members.html b/documentation/html/classOutputWriterParaview-members.html new file mode 100644 index 00000000..8545541e --- /dev/null +++ b/documentation/html/classOutputWriterParaview-members.html @@ -0,0 +1,91 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
OutputWriterParaview Member List
+
+
+ +

This is the complete list of members for OutputWriterParaview, including all inherited members.

+ + + + + + +
discretization_OutputWriterprotected
fileNo_OutputWriterprotected
OutputWriter(std::shared_ptr< Discretization > discretization)OutputWriter
OutputWriterParaview(std::shared_ptr< Discretization > discretization, std::shared_ptr< Mask > mask, std::shared_ptr< FluidTracer > fluidTracer)OutputWriterParaview
writeFile(double currentTime)OutputWriterParaviewvirtual
+ + + + diff --git a/documentation/html/classOutputWriterParaview.html b/documentation/html/classOutputWriterParaview.html new file mode 100644 index 00000000..35bca98a --- /dev/null +++ b/documentation/html/classOutputWriterParaview.html @@ -0,0 +1,213 @@ + + + + + + + +NumSim: OutputWriterParaview Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
OutputWriterParaview Class Reference
+
+
+ +

Write *.vti files that can be viewed with ParaView. + More...

+ +

#include <output_writer_paraview.h>

+
+Inheritance diagram for OutputWriterParaview:
+
+
+ + +OutputWriter + +
+ + + + + + + + + + + + +

+Public Member Functions

 OutputWriterParaview (std::shared_ptr< Discretization > discretization, std::shared_ptr< Mask > mask, std::shared_ptr< FluidTracer > fluidTracer)
 Constructor.
 
void writeFile (double currentTime)
 Write current velocities to file, filename is output_<count>.vti.
 
- Public Member Functions inherited from OutputWriter
 OutputWriter (std::shared_ptr< Discretization > discretization)
 Constructor.
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from OutputWriter
+std::shared_ptr< Discretizationdiscretization_
 shared pointer, discretization object containing data to be written to file
 
+int fileNo_
 a counter that increments for every file written to disk
 
+

Detailed Description

+

Write *.vti files that can be viewed with ParaView.

+

The mesh that can be visualized in ParaView corresponds to the mesh of the computational domain. All values are given for the nodes of the mesh, i.e., the corners of each cell. This means, values will be interpolated because the values are stored at positions given by the staggered grid.

+

Constructor & Destructor Documentation

+ +

◆ OutputWriterParaview()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
OutputWriterParaview::OutputWriterParaview (std::shared_ptr< Discretizationdiscretization,
std::shared_ptr< Maskmask,
std::shared_ptr< FluidTracerfluidTracer 
)
+
+ +

Constructor.

+
Parameters
+ + +
discretizationshared pointer to the discretization object that will contain all the data to be written to the file
+
+
+ +
+
+

Member Function Documentation

+ +

◆ writeFile()

+ +
+
+ + + + + +
+ + + + + + + + +
void OutputWriterParaview::writeFile (double currentTime)
+
+virtual
+
+ +

Write current velocities to file, filename is output_<count>.vti.

+
Parameters
+ + +
currentTimecurrent time in simulation
+
+
+ +

Implements OutputWriter.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classOutputWriterParaview.png b/documentation/html/classOutputWriterParaview.png new file mode 100644 index 00000000..b855af00 Binary files /dev/null and b/documentation/html/classOutputWriterParaview.png differ diff --git a/documentation/html/classOutputWriterText-members.html b/documentation/html/classOutputWriterText-members.html new file mode 100644 index 00000000..f461d22b --- /dev/null +++ b/documentation/html/classOutputWriterText-members.html @@ -0,0 +1,91 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
OutputWriterText Member List
+
+
+ +

This is the complete list of members for OutputWriterText, including all inherited members.

+ + + + + + +
discretization_OutputWriterprotected
fileNo_OutputWriterprotected
OutputWriter(std::shared_ptr< Discretization > discretization)OutputWriterText
writeFile(double currentTime)OutputWriterTextvirtual
writePressureFile()OutputWriterText
+ + + + diff --git a/documentation/html/classOutputWriterText.html b/documentation/html/classOutputWriterText.html new file mode 100644 index 00000000..bedaafe8 --- /dev/null +++ b/documentation/html/classOutputWriterText.html @@ -0,0 +1,195 @@ + + + + + + + +NumSim: OutputWriterText Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
OutputWriterText Class Reference
+
+
+ +

Write *.txt files that are useful for debugging. + More...

+ +

#include <output_writer_text.h>

+
+Inheritance diagram for OutputWriterText:
+
+
+ + +OutputWriter + +
+ + + + + + + + + + + + + + + +

+Public Member Functions

void writeFile (double currentTime)
 Write current velocities to file.
 
void writePressureFile ()
 Write only current values of pressure to file.
 
OutputWriter (std::shared_ptr< Discretization > discretization)
 Default constructor.
 
- Public Member Functions inherited from OutputWriter
 OutputWriter (std::shared_ptr< Discretization > discretization)
 Constructor.
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from OutputWriter
+std::shared_ptr< Discretizationdiscretization_
 shared pointer, discretization object containing data to be written to file
 
+int fileNo_
 a counter that increments for every file written to disk
 
+

Detailed Description

+

Write *.txt files that are useful for debugging.

+

All values are written to the file as they are stored in the field variables, no interpolation takes place.

+

Member Function Documentation

+ +

◆ writeFile()

+ +
+
+ + + + + +
+ + + + + + + + +
void OutputWriterText::writeFile (double currentTime)
+
+virtual
+
+ +

Write current velocities to file.

+

Filename is output_<count>.vti

+
Parameters
+ + +
currentTimecurrent time of simulation
+
+
+ +

Implements OutputWriter.

+ +
+
+ +

◆ writePressureFile()

+ +
+
+ + + + + + + +
void OutputWriterText::writePressureFile ()
+
+ +

Write only current values of pressure to file.

+

Filename is pressure_<count>.txt

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classOutputWriterText.png b/documentation/html/classOutputWriterText.png new file mode 100644 index 00000000..8fb73cca Binary files /dev/null and b/documentation/html/classOutputWriterText.png differ diff --git a/documentation/html/classPressureSolver-members.html b/documentation/html/classPressureSolver-members.html new file mode 100644 index 00000000..16f89391 --- /dev/null +++ b/documentation/html/classPressureSolver-members.html @@ -0,0 +1,100 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
PressureSolver Member List
+
+
+ +

This is the complete list of members for PressureSolver, including all inherited members.

+ + + + + + + + + + + + + + + +
boundary_PressureSolverprotected
calculateResiduum()PressureSolverprotected
discretization_PressureSolverprotected
dx2 (defined in PressureSolver)PressureSolver
dy2PressureSolver
epsilon_PressureSolverprotected
i_begPressureSolverprotected
i_endPressureSolverprotected
j_begPressureSolverprotected
j_endPressureSolverprotected
maximumNumberOfIterations_PressureSolverprotected
PressureSolver(std::shared_ptr< Discretization > discretization, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)PressureSolver
setBoundaryValues()PressureSolverprotected
solve()=0PressureSolverpure virtual
+ + + + diff --git a/documentation/html/classPressureSolver.html b/documentation/html/classPressureSolver.html new file mode 100644 index 00000000..af1d8d08 --- /dev/null +++ b/documentation/html/classPressureSolver.html @@ -0,0 +1,286 @@ + + + + + + + +NumSim: PressureSolver Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +Public Attributes | +Protected Member Functions | +Protected Attributes | +List of all members
+
PressureSolver Class Referenceabstract
+
+
+ +

Solves the Poisson problem for the pressure. + More...

+ +

#include <pressure_solver.h>

+
+Inheritance diagram for PressureSolver:
+
+
+ + +GaussSeidel +SOR + +
+ + + + + + + + +

+Public Member Functions

 PressureSolver (std::shared_ptr< Discretization > discretization, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)
 Constructor.
 
virtual void solve ()=0
 virtual function that starts solver.
 
+ + + + + + +

+Public Attributes

+double dx2
 
+double dy2
 squared mesh widths
 
+ + + + + + + +

+Protected Member Functions

void setBoundaryValues ()
 Set the Boundary Values.
 
+double calculateResiduum ()
 calculate residuum of current time step
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Attributes

+int i_beg
 begin of loop for rhs in x direction
 
+int i_end
 end of loop for rhs in x direction
 
+int j_beg
 begin of loop for rhs in y direction
 
+int j_end
 end of loop for rhs in y direction
 
+std::shared_ptr< Discretizationdiscretization_
 object holding the needed field variables for rhs and p
 
+std::shared_ptr< Boundaryboundary_
 object managing boundary for obstacle and surface tension
 
+double epsilon_
 tolerance for the solver
 
+int maximumNumberOfIterations_
 maximum number of iterations
 
+

Detailed Description

+

Solves the Poisson problem for the pressure.

+

Interface for the pressure solver. It computes the pressure field variable such that the continuity equation is fulfilled.

+

Constructor & Destructor Documentation

+ +

◆ PressureSolver()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PressureSolver::PressureSolver (std::shared_ptr< Discretizationdiscretization,
double epsilon,
int maximumNumberOfIterations,
std::shared_ptr< Boundaryboundary 
)
+
+ +

Constructor.

+
Parameters
+ + + + + +
discretizationinstance of Discretization holding the needed field variables for rhs and p
epsilontolerance for the solver
maximumNumberOfIterationsmaximum of iteration
boundaryobject managing boundary for obstacle and surface tension
+
+
+ +
+
+

Member Function Documentation

+ +

◆ setBoundaryValues()

+ +
+
+ + + + + +
+ + + + + + + +
void PressureSolver::setBoundaryValues ()
+
+protected
+
+ +

Set the Boundary Values.

+

Account for homogenous Neuman BC Has to be called every iteration

+ +
+
+ +

◆ solve()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void PressureSolver::solve ()
+
+pure virtual
+
+ +

virtual function that starts solver.

+ +

Implemented in GaussSeidel, and SOR.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classPressureSolver.png b/documentation/html/classPressureSolver.png new file mode 100644 index 00000000..c4c751c2 Binary files /dev/null and b/documentation/html/classPressureSolver.png differ diff --git a/documentation/html/classSOR-members.html b/documentation/html/classSOR-members.html new file mode 100644 index 00000000..98ccee2b --- /dev/null +++ b/documentation/html/classSOR-members.html @@ -0,0 +1,101 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
SOR Member List
+
+
+ +

This is the complete list of members for SOR, including all inherited members.

+ + + + + + + + + + + + + + + + +
boundary_PressureSolverprotected
calculateResiduum()PressureSolverprotected
discretization_PressureSolverprotected
dx2 (defined in PressureSolver)PressureSolver
dy2PressureSolver
epsilon_PressureSolverprotected
i_begPressureSolverprotected
i_endPressureSolverprotected
j_begPressureSolverprotected
j_endPressureSolverprotected
maximumNumberOfIterations_PressureSolverprotected
PressureSolver(std::shared_ptr< Discretization > discretization, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)PressureSolver
setBoundaryValues()PressureSolverprotected
solve() overrideSORvirtual
SOR(const std::shared_ptr< Discretization > &data, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary, double omega)SOR
+ + + + diff --git a/documentation/html/classSOR.html b/documentation/html/classSOR.html new file mode 100644 index 00000000..4db90542 --- /dev/null +++ b/documentation/html/classSOR.html @@ -0,0 +1,260 @@ + + + + + + + +NumSim: SOR Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +List of all members
+
SOR Class Reference
+
+
+ +

Successive over-relaxation solver. + More...

+ +

#include <sor.h>

+
+Inheritance diagram for SOR:
+
+
+ + +PressureSolver + +
+ + + + + + + + + + + + +

+Public Member Functions

 SOR (const std::shared_ptr< Discretization > &data, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary, double omega)
 Constructor.
 
void solve () override
 override function that starts solver.
 
- Public Member Functions inherited from PressureSolver
 PressureSolver (std::shared_ptr< Discretization > discretization, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)
 Constructor.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from PressureSolver
+double dx2
 
+double dy2
 squared mesh widths
 
- Protected Member Functions inherited from PressureSolver
void setBoundaryValues ()
 Set the Boundary Values.
 
+double calculateResiduum ()
 calculate residuum of current time step
 
- Protected Attributes inherited from PressureSolver
+int i_beg
 begin of loop for rhs in x direction
 
+int i_end
 end of loop for rhs in x direction
 
+int j_beg
 begin of loop for rhs in y direction
 
+int j_end
 end of loop for rhs in y direction
 
+std::shared_ptr< Discretizationdiscretization_
 object holding the needed field variables for rhs and p
 
+std::shared_ptr< Boundaryboundary_
 object managing boundary for obstacle and surface tension
 
+double epsilon_
 tolerance for the solver
 
+int maximumNumberOfIterations_
 maximum number of iterations
 
+

Detailed Description

+

Successive over-relaxation solver.

+

Constructor & Destructor Documentation

+ +

◆ SOR()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SOR::SOR (const std::shared_ptr< Discretization > & data,
double epsilon,
int maximumNumberOfIterations,
std::shared_ptr< Boundaryboundary,
double omega 
)
+
+ +

Constructor.

+
Parameters
+ + + + + +
datainstance of Discretization holding the needed field variables for rhs and p
epsilontolerance for the solver
maximumNumberOfIterationsmaximum of iteration
omegarelaxation factor
+
+
+ +
+
+

Member Function Documentation

+ +

◆ solve()

+ +
+
+ + + + + +
+ + + + + + + +
void SOR::solve ()
+
+overridevirtual
+
+ +

override function that starts solver.

+ +

Implements PressureSolver.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classSOR.png b/documentation/html/classSOR.png new file mode 100644 index 00000000..78abfb47 Binary files /dev/null and b/documentation/html/classSOR.png differ diff --git a/documentation/html/classStaggeredGrid-members.html b/documentation/html/classStaggeredGrid-members.html new file mode 100644 index 00000000..1937fb53 --- /dev/null +++ b/documentation/html/classStaggeredGrid-members.html @@ -0,0 +1,136 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
StaggeredGrid Member List
+
+
+ +

This is the complete list of members for StaggeredGrid, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
dx() constStaggeredGrid
dy() constStaggeredGrid
f(int i, int j)StaggeredGrid
f_StaggeredGridprotected
fIBegin() constStaggeredGrid
fIEnd() constStaggeredGrid
fJBegin() constStaggeredGrid
fJEnd() constStaggeredGrid
g(int i, int j)StaggeredGrid
g_StaggeredGridprotected
gIBegin() constStaggeredGrid
gIEnd() constStaggeredGrid
gJBegin() constStaggeredGrid
gJEnd() constStaggeredGrid
meshWidth() constStaggeredGrid
meshWidth_StaggeredGridprotected
nCells() constStaggeredGrid
nCells_StaggeredGridprotected
p() constStaggeredGrid
p(int i, int j) constStaggeredGrid
p(int i, int j)StaggeredGrid
p_StaggeredGridprotected
pIBegin() constStaggeredGrid
pIEnd() constStaggeredGrid
pJBegin() constStaggeredGrid
pJEnd() constStaggeredGrid
rhs() constStaggeredGrid
rhs(int i, int j)StaggeredGrid
rhs_StaggeredGridprotected
rhsIBegin() constStaggeredGrid
rhsIEnd() constStaggeredGrid
rhsJBegin() constStaggeredGrid
rhsJEnd() constStaggeredGrid
StaggeredGrid(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)StaggeredGrid
u() constStaggeredGrid
u(int i, int j) constStaggeredGrid
u(int i, int j)StaggeredGrid
u_StaggeredGridprotected
uIBegin() constStaggeredGrid
uIEnd() constStaggeredGrid
uJBegin() constStaggeredGrid
uJEnd() constStaggeredGrid
v() constStaggeredGrid
v(int i, int j) constStaggeredGrid
v(int i, int j)StaggeredGrid
v_StaggeredGridprotected
vIBegin() constStaggeredGrid
vIEnd() constStaggeredGrid
vJBegin() constStaggeredGrid
vJEnd() constStaggeredGrid
+ + + + diff --git a/documentation/html/classStaggeredGrid.html b/documentation/html/classStaggeredGrid.html new file mode 100644 index 00000000..d97a9704 --- /dev/null +++ b/documentation/html/classStaggeredGrid.html @@ -0,0 +1,354 @@ + + + + + + + +NumSim: StaggeredGrid Class Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
StaggeredGrid Class Reference
+
+
+ +

Create field variables and define limits for the indices. + More...

+ +

#include <staggered_grid.h>

+
+Inheritance diagram for StaggeredGrid:
+
+
+ + +Discretization +CentralDifferences +DonorCell + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 StaggeredGrid (std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
 Constructor.
 
+const std::array< double, 2 > meshWidth () const
 Get the length of a single cell in x and y directions.
 
+const std::array< int, 2 > nCells () const
 Get number of cells in x and y directions.
 
+const FieldVariableu () const
 Get a reference to the field variable u.
 
+const FieldVariablev () const
 Get a reference to the field variable v.
 
+const FieldVariablep () const
 Get a reference to the field variable p.
 
+const FieldVariablerhs () const
 Get a reference to the field variable rhs.
 
+double u (int i, int j) const
 Access value of u in element (i,j), declared constant.
 
+double & u (int i, int j)
 Access value of u in element (i,j)
 
+double v (int i, int j) const
 Access value of v in element (i,j), declared constant.
 
+double & v (int i, int j)
 Access value of v in element (i,j)
 
+double p (int i, int j) const
 Access value of p in element (i,j), declared constant.
 
+double & p (int i, int j)
 Access value of p in element (i,j)
 
+double & f (int i, int j)
 Access value of f in element (i,j)
 
+double & g (int i, int j)
 Access value of g in element (i,j)
 
+double & rhs (int i, int j)
 Access value of rhs in element (i,j)
 
+double dx () const
 Get the mesh width in x-direction.
 
+double dy () const
 Get the mesh width in y-direction.
 
+int uIBegin () const
 first valid index for u in x direction
 
+int uIEnd () const
 one after last valid index for u in x direction
 
+int uJBegin () const
 first valid index for u in y direction
 
+int uJEnd () const
 one after last valid index for u in y direction
 
+int vIBegin () const
 first valid index for v in x direction
 
+int vIEnd () const
 one after last valid index for v in x direction
 
+int vJBegin () const
 first valid index for v in y direction
 
+int vJEnd () const
 one after last valid index for v in y direction
 
+int pIBegin () const
 first valid index for p in x direction
 
+int pIEnd () const
 one after last valid index for p in x direction
 
+int pJBegin () const
 first valid index for p in y direction
 
+int pJEnd () const
 one after last valid index for p in y direction
 
+int fIBegin () const
 first valid index for f in x direction
 
+int fIEnd () const
 one after last valid index for f in x direction
 
+int fJBegin () const
 first valid index for f in y direction
 
+int fJEnd () const
 one after last valid index for f in y direction
 
+int gIBegin () const
 first valid index for g in x direction
 
+int gIEnd () const
 one after last valid index for g in x direction
 
+int gJBegin () const
 first valid index for g in y direction
 
+int gJEnd () const
 one after last valid index for g in y direction
 
+int rhsIBegin () const
 first valid index for rhs in x direction
 
+int rhsIEnd () const
 one after last valid index for rhs in x direction
 
+int rhsJBegin () const
 first valid index for rhs in y direction
 
+int rhsJEnd () const
 one after last valid index for rhs in y direction
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Attributes

+const std::array< int, 2 > nCells_
 array containing number of cells in x and y directions
 
+const std::array< double, 2 > meshWidth_
 array containing the sizes of cell edges in x and y directions
 
+FieldVariable u_
 instance of the field variable u
 
+FieldVariable v_
 instance of the field variable v
 
+FieldVariable p_
 instance of the field variable p
 
+FieldVariable f_
 instance of the field variable f
 
+FieldVariable g_
 instance of the field variable g
 
+FieldVariable rhs_
 instance of the field variable rhs
 
+

Detailed Description

+

Create field variables and define limits for the indices.

+

Create the necessary u, v, p, f, g, rhs field variables and define the first valid index for each of the field variables, as well as the (one after) last valid index

+

Constructor & Destructor Documentation

+ +

◆ StaggeredGrid()

+ +
+
+ + + + + + + + + + + + + + + + + + +
StaggeredGrid::StaggeredGrid (std::array< int, 2 > nCells,
std::array< double, 2 > meshWidth 
)
+
+ +

Constructor.

+
Parameters
+ + + +
nCellsarray containing number of cells in x and y directions
meshWidtharray containing the length of a single cell in x and y directions
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/documentation/html/classStaggeredGrid.png b/documentation/html/classStaggeredGrid.png new file mode 100644 index 00000000..372a826c Binary files /dev/null and b/documentation/html/classStaggeredGrid.png differ diff --git a/documentation/html/classes.html b/documentation/html/classes.html new file mode 100644 index 00000000..7297e602 --- /dev/null +++ b/documentation/html/classes.html @@ -0,0 +1,119 @@ + + + + + + + +NumSim: Class Index + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Index
+
+
+
A | B | C | D | F | G | L | M | O | P | S
+
+
+
A
+
Array2D
+
+
B
+
Boundary
+
+
C
+
CentralDifferences
Computation
+
+
D
+
Discretization
DonorCell
+
+
F
+
FieldVariable
FluidTracer
+
+
G
+
GaussSeidel
+
+
L
+
Settings::LineContent
+
+
M
+
Mask
+
+
O
+
OutputWriter
OutputWriterParaview
OutputWriterText
+
+
P
+
PressureSolver
+
+
S
+
Settings
SOR
StaggeredGrid
+
+
+ + + + diff --git a/documentation/html/clipboard.js b/documentation/html/clipboard.js new file mode 100644 index 00000000..42c1fb0e --- /dev/null +++ b/documentation/html/clipboard.js @@ -0,0 +1,61 @@ +/** + +The code below is based on the Doxygen Awesome project, see +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2022 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +let clipboard_title = "Copy to clipboard" +let clipboard_icon = `` +let clipboard_successIcon = `` +let clipboard_successDuration = 1000 + +$(function() { + if(navigator.clipboard) { + const fragments = document.getElementsByClassName("fragment") + for(const fragment of fragments) { + const clipboard_div = document.createElement("div") + clipboard_div.classList.add("clipboard") + clipboard_div.innerHTML = clipboard_icon + clipboard_div.title = clipboard_title + $(clipboard_div).click(function() { + const content = this.parentNode.cloneNode(true) + // filter out line number and folded fragments from file listings + content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) + let text = content.textContent + // remove trailing newlines and trailing spaces from empty lines + text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') + navigator.clipboard.writeText(text); + this.classList.add("success") + this.innerHTML = clipboard_successIcon + window.setTimeout(() => { // switch back to normal icon after timeout + this.classList.remove("success") + this.innerHTML = clipboard_icon + }, clipboard_successDuration); + }) + fragment.insertBefore(clipboard_div, fragment.firstChild) + } + } +}) diff --git a/documentation/html/closed.png b/documentation/html/closed.png new file mode 100644 index 00000000..98cc2c90 Binary files /dev/null and b/documentation/html/closed.png differ diff --git a/documentation/html/computation_8h_source.html b/documentation/html/computation_8h_source.html new file mode 100644 index 00000000..bc3567fd --- /dev/null +++ b/documentation/html/computation_8h_source.html @@ -0,0 +1,154 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/computation.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
computation.h
+
+
+
1#pragma once
+
2
+
3#include "discretization/discretization.h"
+
4#include "discretization/donor_cell.h"
+
5#include "discretization/central_differences.h"
+
6
+
7#include "solver/pressure_solver.h"
+
8#include "solver/sor.h"
+
9#include "solver/gauss_seidel.h"
+
10
+
11#include "output_writer/output_writer_paraview.h"
+
12#include "output_writer/output_writer_text.h"
+
13#include "settings_parser/settings.h"
+
14
+
15#include "boundary/boundary.h"
+
16#include "boundary/mask.h"
+
17#include "surface/fluid_tracer.h"
+
18#include <unistd.h>
+
19
+
20#include <cmath>
+
21#include <algorithm>
+
22#include <iostream>
+
23
+
+ +
31{
+
32public:
+
39 void initialize(int argc, char *argv[]);
+
40
+
45 void runSimulation();
+
46
+
47private:
+
53 void computeTimeStepWidth(double currentTime);
+
54
+
58 void applyBoundaryValues();
+
59
+
63 void computePreliminaryVelocities();
+
64
+
68 void computeRightHandSide();
+
69
+
73 void computePressure();
+
74
+
79 void computeVelocities();
+
80
+
81 Settings settings_;
+
82 std::shared_ptr<Discretization> discretization_;
+
83
+
84 std::shared_ptr<Mask> mask_;
+
85 std::shared_ptr<Boundary> boundary_;
+
86 std::shared_ptr<FluidTracer> fluidTracer_;
+
87
+
88 std::unique_ptr<PressureSolver> pressureSolver_;
+
89 std::unique_ptr<OutputWriterParaview> outputWriterParaview_;
+
90 std::unique_ptr<OutputWriterText> outputWriterText_;
+
91 std::array<double, 2> meshWidth_;
+
92 double dt_;
+
93};
+
+
Computation of Simulation.
Definition computation.h:31
+
void initialize(int argc, char *argv[])
Initialize the simulation with settings from .txt file.
Definition computation.cpp:6
+
void runSimulation()
run the whole simulation until t_end
Definition computation.cpp:72
+
All settings that parametrize a simulation run.
Definition settings.h:14
+
+ + + + diff --git a/documentation/html/dir_041db6ad6a3d44280e40e5af409429cb.html b/documentation/html/dir_041db6ad6a3d44280e40e5af409429cb.html new file mode 100644 index 00000000..5d8432d6 --- /dev/null +++ b/documentation/html/dir_041db6ad6a3d44280e40e5af409429cb.html @@ -0,0 +1,97 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/solver Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
solver Directory Reference
+
+
+ + + + + + + + +

+Files

 gauss_seidel.h
 
 pressure_solver.h
 
 sor.h
 
+
+ + + + diff --git a/documentation/html/dir_2725064ac5d6db7b2425ad4e379e8748.html b/documentation/html/dir_2725064ac5d6db7b2425ad4e379e8748.html new file mode 100644 index 00000000..b6eba009 --- /dev/null +++ b/documentation/html/dir_2725064ac5d6db7b2425ad4e379e8748.html @@ -0,0 +1,95 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/boundary Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
boundary Directory Reference
+
+
+ + + + + + +

+Files

 boundary.h
 
 mask.h
 
+
+ + + + diff --git a/documentation/html/dir_29398f723566cb24cda620b0fb0566c4.html b/documentation/html/dir_29398f723566cb24cda620b0fb0566c4.html new file mode 100644 index 00000000..b23354e5 --- /dev/null +++ b/documentation/html/dir_29398f723566cb24cda620b0fb0566c4.html @@ -0,0 +1,93 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/settings_parser Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
settings_parser Directory Reference
+
+
+ + + + +

+Files

 settings.h
 
+
+ + + + diff --git a/documentation/html/dir_452baf35e1d7639c9f2a5ece4ec85855.html b/documentation/html/dir_452baf35e1d7639c9f2a5ece4ec85855.html new file mode 100644 index 00000000..1c5fedbe --- /dev/null +++ b/documentation/html/dir_452baf35e1d7639c9f2a5ece4ec85855.html @@ -0,0 +1,95 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/storage Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
storage Directory Reference
+
+
+ + + + + + +

+Files

 array2D.h
 
 field_variable.h
 
+
+ + + + diff --git a/documentation/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/documentation/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html new file mode 100644 index 00000000..c3b9eb33 --- /dev/null +++ b/documentation/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -0,0 +1,110 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
src Directory Reference
+
+
+ + + + + + + + + + + + + + + + +

+Directories

 boundary
 
 discretization
 
 output_writer
 
 settings_parser
 
 solver
 
 storage
 
 surface
 
+ + + +

+Files

 computation.h
 
+
+ + + + diff --git a/documentation/html/dir_93b0d6a552827721ec9247642283aaa7.html b/documentation/html/dir_93b0d6a552827721ec9247642283aaa7.html new file mode 100644 index 00000000..301faaa0 --- /dev/null +++ b/documentation/html/dir_93b0d6a552827721ec9247642283aaa7.html @@ -0,0 +1,93 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/surface Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
surface Directory Reference
+
+
+ + + + +

+Files

 fluid_tracer.h
 
+
+ + + + diff --git a/documentation/html/dir_b0b9c4b8ebed4a07d44b9aa635c19fe7.html b/documentation/html/dir_b0b9c4b8ebed4a07d44b9aa635c19fe7.html new file mode 100644 index 00000000..35414c01 --- /dev/null +++ b/documentation/html/dir_b0b9c4b8ebed4a07d44b9aa635c19fe7.html @@ -0,0 +1,97 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/output_writer Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
output_writer Directory Reference
+
+
+ + + + + + + + +

+Files

 output_writer.h
 
 output_writer_paraview.h
 
 output_writer_text.h
 
+
+ + + + diff --git a/documentation/html/dir_e7c1ed2d2d4c4bb5d8a9744d9e98c346.html b/documentation/html/dir_e7c1ed2d2d4c4bb5d8a9744d9e98c346.html new file mode 100644 index 00000000..95868c54 --- /dev/null +++ b/documentation/html/dir_e7c1ed2d2d4c4bb5d8a9744d9e98c346.html @@ -0,0 +1,99 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/discretization Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
discretization Directory Reference
+
+
+ + + + + + + + + + +

+Files

 central_differences.h
 
 discretization.h
 
 donor_cell.h
 
 staggered_grid.h
 
+
+ + + + diff --git a/documentation/html/discretization_8h_source.html b/documentation/html/discretization_8h_source.html new file mode 100644 index 00000000..1994adb4 --- /dev/null +++ b/documentation/html/discretization_8h_source.html @@ -0,0 +1,137 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/discretization/discretization.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
discretization.h
+
+
+
1#pragma once
+
2
+
3#include <array>
+
4#include <vector>
+
5#include "staggered_grid.h"
+
6
+
+ +
16{
+
17public:
+
24 Discretization(std::array<int, 2> nCells, std::array<double, 2> meshWidth);
+
25
+
29 virtual double computeDu2Dx(int i, int j) const = 0;
+
33 virtual double computeDv2Dy(int i, int j) const = 0;
+
34
+
38 virtual double computeDuvDx(int i, int j) const = 0;
+
42 virtual double computeDuvDy(int i, int j) const = 0;
+
43
+
47 virtual double computeD2uDx2(int i, int j) const;
+
51 virtual double computeD2uDy2(int i, int j) const;
+
55 virtual double computeD2vDx2(int i, int j) const;
+
59 virtual double computeD2vDy2(int i, int j) const;
+
60
+
64 virtual double computeDpDx(int i, int j) const;
+
68 virtual double computeDpDy(int i, int j) const;
+
69
+
70
+
71};
+
+
72
+
Computes derivatives included in governing equations.
Definition discretization.h:16
+
virtual double computeDuvDy(int i, int j) const =0
Calculate first derivative of u*v with respect to y.
+
virtual double computeD2uDy2(int i, int j) const
Calculate second derivative of u with respect to y.
Definition discretization.cpp:12
+
Discretization(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
Constructor.
Definition discretization.cpp:3
+
virtual double computeD2vDx2(int i, int j) const
Calculate second derivative of v with respect to x.
Definition discretization.cpp:17
+
virtual double computeD2vDy2(int i, int j) const
Calculate second derivative of v with respect to y.
Definition discretization.cpp:22
+
virtual double computeD2uDx2(int i, int j) const
Calculate second derivative of u with respect to x.
Definition discretization.cpp:7
+
virtual double computeDv2Dy(int i, int j) const =0
Calculate first derivative of v^2 with respect to y.
+
virtual double computeDpDy(int i, int j) const
Calculate first derivative of p with respect to y.
Definition discretization.cpp:32
+
virtual double computeDuvDx(int i, int j) const =0
Calculate first derivative of u*v with respect to x.
+
virtual double computeDu2Dx(int i, int j) const =0
Calculate first derivative of u^2 with respect to x.
+
virtual double computeDpDx(int i, int j) const
Calculate first derivative of p with respect to x.
Definition discretization.cpp:27
+
Create field variables and define limits for the indices.
Definition staggered_grid.h:15
+
const std::array< double, 2 > meshWidth() const
Get the length of a single cell in x and y directions.
Definition staggered_grid.cpp:14
+
const std::array< int, 2 > nCells() const
Get number of cells in x and y directions.
Definition staggered_grid.cpp:19
+
+ + + + diff --git a/documentation/html/doc.svg b/documentation/html/doc.svg new file mode 100644 index 00000000..0b928a53 --- /dev/null +++ b/documentation/html/doc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/documentation/html/docd.svg b/documentation/html/docd.svg new file mode 100644 index 00000000..ac18b275 --- /dev/null +++ b/documentation/html/docd.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/documentation/html/donor__cell_8h_source.html b/documentation/html/donor__cell_8h_source.html new file mode 100644 index 00000000..a69ecec9 --- /dev/null +++ b/documentation/html/donor__cell_8h_source.html @@ -0,0 +1,123 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/discretization/donor_cell.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
donor_cell.h
+
+
+
1#pragma once
+
2
+
3#include <array>
+
4#include <vector>
+
5#include <cmath>
+
6#include "discretization.h"
+
7
+
+ +
16{
+
17public:
+
25 DonorCell(std::array<int, 2> nCells, std::array<double, 2> meshWidth, double alpha);
+
26
+
31 double computeDu2Dx(int i, int j) const override;
+
36 double computeDv2Dy(int i, int j) const override;
+
41 double computeDuvDx(int i, int j) const override;
+
46 double computeDuvDy(int i, int j) const override;
+
47
+
48private:
+
49 const double alpha_;
+
50};
+
+
Computes derivatives included in governing equations.
Definition discretization.h:16
+
Discretizes the problem using the donor cell scheme.
Definition donor_cell.h:16
+
double computeDv2Dy(int i, int j) const override
Calculate first derivative of v^2 with respect to y with the donor cell Scheme.
Definition donor_cell.cpp:49
+
double computeDu2Dx(int i, int j) const override
Calculate first derivative of u^2 with respect to x with the donor cell Scheme.
Definition donor_cell.cpp:36
+
double computeDuvDy(int i, int j) const override
Calculate first derivative of u*v with respect to y with the donor cell Scheme.
Definition donor_cell.cpp:22
+
DonorCell(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth, double alpha)
Constructor.
Definition donor_cell.cpp:3
+
double computeDuvDx(int i, int j) const override
Calculate first derivative of u*v with respect to x with the donor cell Scheme.
Definition donor_cell.cpp:8
+
const std::array< double, 2 > meshWidth() const
Get the length of a single cell in x and y directions.
Definition staggered_grid.cpp:14
+
const std::array< int, 2 > nCells() const
Get number of cells in x and y directions.
Definition staggered_grid.cpp:19
+
+ + + + diff --git a/documentation/html/doxygen.css b/documentation/html/doxygen.css new file mode 100644 index 00000000..9193852a --- /dev/null +++ b/documentation/html/doxygen.css @@ -0,0 +1,2080 @@ +/* The standard CSS for doxygen 1.10.0*/ + +html { +/* page base colors */ +--page-background-color: white; +--page-foreground-color: black; +--page-link-color: #3D578C; +--page-visited-link-color: #4665A2; + +/* index */ +--index-odd-item-bg-color: #F8F9FC; +--index-even-item-bg-color: white; +--index-header-color: black; +--index-separator-color: #A0A0A0; + +/* header */ +--header-background-color: #F9FAFC; +--header-separator-color: #C4CFE5; +--header-gradient-image: url('nav_h.png'); +--group-header-separator-color: #879ECB; +--group-header-color: #354C7B; +--inherit-header-color: gray; + +--footer-foreground-color: #2A3D61; +--footer-logo-width: 104px; +--citation-label-color: #334975; +--glow-color: cyan; + +--title-background-color: white; +--title-separator-color: #5373B4; +--directory-separator-color: #9CAFD4; +--separator-color: #4A6AAA; + +--blockquote-background-color: #F7F8FB; +--blockquote-border-color: #9CAFD4; + +--scrollbar-thumb-color: #9CAFD4; +--scrollbar-background-color: #F9FAFC; + +--icon-background-color: #728DC1; +--icon-foreground-color: white; +--icon-doc-image: url('doc.svg'); +--icon-folder-open-image: url('folderopen.svg'); +--icon-folder-closed-image: url('folderclosed.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #F9FAFC; +--memdecl-separator-color: #DEE4F0; +--memdecl-foreground-color: #555; +--memdecl-template-color: #4665A2; + +/* detailed member list */ +--memdef-border-color: #A8B8D9; +--memdef-title-background-color: #E2E8F2; +--memdef-title-gradient-image: url('nav_f.png'); +--memdef-proto-background-color: #DFE5F1; +--memdef-proto-text-color: #253555; +--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--memdef-doc-background-color: white; +--memdef-param-name-color: #602020; +--memdef-template-color: #4665A2; + +/* tables */ +--table-cell-border-color: #2D4068; +--table-header-background-color: #374F7F; +--table-header-foreground-color: #FFFFFF; + +/* labels */ +--label-background-color: #728DC1; +--label-left-top-border-color: #5373B4; +--label-right-bottom-border-color: #C4CFE5; +--label-foreground-color: white; + +/** navigation bar/tree/menu */ +--nav-background-color: #F9FAFC; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_b.png'); +--nav-gradient-hover-image: url('tab_h.png'); +--nav-gradient-active-image: url('tab_a.png'); +--nav-gradient-active-image-parent: url("../tab_a.png"); +--nav-separator-image: url('tab_s.png'); +--nav-breadcrumb-image: url('bc_s.png'); +--nav-breadcrumb-border-color: #C2CDE4; +--nav-splitbar-image: url('splitbar.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #283A5D; +--nav-text-hover-color: white; +--nav-text-active-color: white; +--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #364D7C; +--nav-menu-background-color: white; +--nav-menu-foreground-color: #555555; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.5); +--nav-arrow-color: #9CAFD4; +--nav-arrow-selected-color: #9CAFD4; + +/* table of contents */ +--toc-background-color: #F4F6FA; +--toc-border-color: #D8DFEE; +--toc-header-color: #4665A2; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: white; +--search-foreground-color: #909090; +--search-magnification-image: url('mag.svg'); +--search-magnification-select-image: url('mag_sel.svg'); +--search-active-color: black; +--search-filter-background-color: #F9FAFC; +--search-filter-foreground-color: black; +--search-filter-border-color: #90A5CE; +--search-filter-highlight-text-color: white; +--search-filter-highlight-bg-color: #3D578C; +--search-results-foreground-color: #425E97; +--search-results-background-color: #EEF1F7; +--search-results-border-color: black; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #555; + +/** code fragments */ +--code-keyword-color: #008000; +--code-type-keyword-color: #604020; +--code-flow-keyword-color: #E08000; +--code-comment-color: #800000; +--code-preprocessor-color: #806020; +--code-string-literal-color: #002080; +--code-char-literal-color: #008080; +--code-xml-cdata-color: black; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #4665A2; +--code-external-link-color: #4665A2; +--fragment-foreground-color: black; +--fragment-background-color: #FBFCFD; +--fragment-border-color: #C4CFE5; +--fragment-lineno-border-color: #00FF00; +--fragment-lineno-background-color: #E8E8E8; +--fragment-lineno-foreground-color: black; +--fragment-lineno-link-fg-color: #4665A2; +--fragment-lineno-link-bg-color: #D8D8D8; +--fragment-lineno-link-hover-fg-color: #4665A2; +--fragment-lineno-link-hover-bg-color: #C8C8C8; +--fragment-copy-ok-color: #2EC82E; +--tooltip-foreground-color: black; +--tooltip-background-color: white; +--tooltip-border-color: gray; +--tooltip-doc-color: grey; +--tooltip-declaration-color: #006318; +--tooltip-link-color: #4665A2; +--tooltip-shadow: 1px 1px 7px gray; +--fold-line-color: #808080; +--fold-minus-image: url('minus.svg'); +--fold-plus-image: url('plus.svg'); +--fold-minus-image-relpath: url('../../minus.svg'); +--fold-plus-image-relpath: url('../../plus.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +} + +@media (prefers-color-scheme: dark) { + html:not(.dark-mode) { + color-scheme: dark; + +/* page base colors */ +--page-background-color: black; +--page-foreground-color: #C9D1D9; +--page-link-color: #90A5CE; +--page-visited-link-color: #A3B4D7; + +/* index */ +--index-odd-item-bg-color: #0B101A; +--index-even-item-bg-color: black; +--index-header-color: #C4CFE5; +--index-separator-color: #334975; + +/* header */ +--header-background-color: #070B11; +--header-separator-color: #141C2E; +--header-gradient-image: url('nav_hd.png'); +--group-header-separator-color: #283A5D; +--group-header-color: #90A5CE; +--inherit-header-color: #A0A0A0; + +--footer-foreground-color: #5B7AB7; +--footer-logo-width: 60px; +--citation-label-color: #90A5CE; +--glow-color: cyan; + +--title-background-color: #090D16; +--title-separator-color: #354C79; +--directory-separator-color: #283A5D; +--separator-color: #283A5D; + +--blockquote-background-color: #101826; +--blockquote-border-color: #283A5D; + +--scrollbar-thumb-color: #283A5D; +--scrollbar-background-color: #070B11; + +--icon-background-color: #334975; +--icon-foreground-color: #C4CFE5; +--icon-doc-image: url('docd.svg'); +--icon-folder-open-image: url('folderopend.svg'); +--icon-folder-closed-image: url('folderclosedd.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #0B101A; +--memdecl-separator-color: #2C3F65; +--memdecl-foreground-color: #BBB; +--memdecl-template-color: #7C95C6; + +/* detailed member list */ +--memdef-border-color: #233250; +--memdef-title-background-color: #1B2840; +--memdef-title-gradient-image: url('nav_fd.png'); +--memdef-proto-background-color: #19243A; +--memdef-proto-text-color: #9DB0D4; +--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); +--memdef-doc-background-color: black; +--memdef-param-name-color: #D28757; +--memdef-template-color: #7C95C6; + +/* tables */ +--table-cell-border-color: #283A5D; +--table-header-background-color: #283A5D; +--table-header-foreground-color: #C4CFE5; + +/* labels */ +--label-background-color: #354C7B; +--label-left-top-border-color: #4665A2; +--label-right-bottom-border-color: #283A5D; +--label-foreground-color: #CCCCCC; + +/** navigation bar/tree/menu */ +--nav-background-color: #101826; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_bd.png'); +--nav-gradient-hover-image: url('tab_hd.png'); +--nav-gradient-active-image: url('tab_ad.png'); +--nav-gradient-active-image-parent: url("../tab_ad.png"); +--nav-separator-image: url('tab_sd.png'); +--nav-breadcrumb-image: url('bc_sd.png'); +--nav-breadcrumb-border-color: #2A3D61; +--nav-splitbar-image: url('splitbard.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #B6C4DF; +--nav-text-hover-color: #DCE2EF; +--nav-text-active-color: #DCE2EF; +--nav-text-normal-shadow: 0px 1px 1px black; +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #B6C4DF; +--nav-menu-background-color: #05070C; +--nav-menu-foreground-color: #BBBBBB; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.2); +--nav-arrow-color: #334975; +--nav-arrow-selected-color: #90A5CE; + +/* table of contents */ +--toc-background-color: #151E30; +--toc-border-color: #202E4A; +--toc-header-color: #A3B4D7; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: black; +--search-foreground-color: #C5C5C5; +--search-magnification-image: url('mag_d.svg'); +--search-magnification-select-image: url('mag_seld.svg'); +--search-active-color: #C5C5C5; +--search-filter-background-color: #101826; +--search-filter-foreground-color: #90A5CE; +--search-filter-border-color: #7C95C6; +--search-filter-highlight-text-color: #BCC9E2; +--search-filter-highlight-bg-color: #283A5D; +--search-results-background-color: #101826; +--search-results-foreground-color: #90A5CE; +--search-results-border-color: #7C95C6; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; + +/** code fragments */ +--code-keyword-color: #CC99CD; +--code-type-keyword-color: #AB99CD; +--code-flow-keyword-color: #E08000; +--code-comment-color: #717790; +--code-preprocessor-color: #65CABE; +--code-string-literal-color: #7EC699; +--code-char-literal-color: #00E0F0; +--code-xml-cdata-color: #C9D1D9; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #C0C0C0; +--code-vhdl-keyword-color: #CF53C9; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #79C0FF; +--code-external-link-color: #79C0FF; +--fragment-foreground-color: #C9D1D9; +--fragment-background-color: black; +--fragment-border-color: #30363D; +--fragment-lineno-border-color: #30363D; +--fragment-lineno-background-color: black; +--fragment-lineno-foreground-color: #6E7681; +--fragment-lineno-link-fg-color: #6E7681; +--fragment-lineno-link-bg-color: #303030; +--fragment-lineno-link-hover-fg-color: #8E96A1; +--fragment-lineno-link-hover-bg-color: #505050; +--fragment-copy-ok-color: #0EA80E; +--tooltip-foreground-color: #C9D1D9; +--tooltip-background-color: #202020; +--tooltip-border-color: #C9D1D9; +--tooltip-doc-color: #D9E1E9; +--tooltip-declaration-color: #20C348; +--tooltip-link-color: #79C0FF; +--tooltip-shadow: none; +--fold-line-color: #808080; +--fold-minus-image: url('minusd.svg'); +--fold-plus-image: url('plusd.svg'); +--fold-minus-image-relpath: url('../../minusd.svg'); +--fold-plus-image-relpath: url('../../plusd.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +}} +body { + background-color: var(--page-background-color); + color: var(--page-foreground-color); +} + +body, table, div, p, dl { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 22px; +} + +/* @group Heading Levels */ + +.title { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h1.groupheader { + font-size: 150%; +} + +h2.groupheader { + border-bottom: 1px solid var(--group-header-separator-color); + color: var(--group-header-color); + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--glow-color); +} + +dt { + font-weight: bold; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL { + background-image: var(--nav-gradient-active-image); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: var(--index-separator-color); +} + +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: var(--index-header-color); +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.even { + background-color: var(--index-even-item-bg-color); +} + +.classindex dl.odd { + background-color: var(--index-odd-item-bg-color); +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: var(--page-link-color); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: var(--page-visited-link-color); +} + +a:hover { + text-decoration: underline; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: var(--code-link-color); +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: var(--code-external-link-color); +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: visible; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-type: none; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; + overflow-y: hidden; + position: relative; + min-height: 28px; + margin: 4px 4px 4px 2px; + padding: 2px 2px 3px 2px; + border: 1px solid var(--fragment-border-color); + background-color: var(--fragment-background-color); + border-radius : 2px; + color: var(--fragment-foreground-color); +} + +pre.fragment { + word-wrap: break-word; + font-size: 10pt; + line-height: 125%; + font-family: var(--font-family-monospace); +} + +.clipboard { + width: 24px; + height: 24px; + right: 5px; + top: 5px; + opacity: 0; + position: absolute; + display: inline; + overflow: auto; + fill: var(--fragment-foreground-color); + justify-content: center; + align-items: center; + cursor: pointer; +} + +.clipboard.success { + border: 1px solid var(--fragment-foreground-color); + border-radius: 4px; +} + +.fragment:hover .clipboard, .clipboard.success { + opacity: .28; +} + +.clipboard:hover, .clipboard.success { + opacity: 1 !important; +} + +.clipboard:active:not([class~=success]) svg { + transform: scale(.91); +} + +.clipboard.success svg { + fill: var(--fragment-copy-ok-color); +} + +.clipboard.success { + border-color: var(--fragment-copy-ok-color); +} + +div.line { + font-family: var(--font-family-monospace); + font-size: 13px; + min-height: 13px; + line-height: 1.2; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: var(--glow-color); + box-shadow: 0 0 10px var(--glow-color); +} + +span.fold { + margin-left: 5px; + margin-right: 1px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; + display: inline-block; + width: 12px; + height: 12px; + background-repeat:no-repeat; + background-position:center; +} + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid var(--fragment-lineno-border-color); + color: var(--fragment-lineno-foreground-color); + background-color: var(--fragment-lineno-background-color); + white-space: pre; +} +span.lineno a, span.lineno a:visited { + color: var(--fragment-lineno-link-fg-color); + background-color: var(--fragment-lineno-link-bg-color); +} + +span.lineno a:hover { + color: var(--fragment-lineno-link-hover-fg-color); + background-color: var(--fragment-lineno-link-hover-bg-color); +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + color: var(--page-foreground-color); + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +p.formulaDsp { + text-align: center; +} + +img.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; + width: var(--footer-logo-width); +} + +.compoundTemplParams { + color: var(--memdecl-template-color); + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: var(--code-keyword-color); +} + +span.keywordtype { + color: var(--code-type-keyword-color); +} + +span.keywordflow { + color: var(--code-flow-keyword-color); +} + +span.comment { + color: var(--code-comment-color); +} + +span.preprocessor { + color: var(--code-preprocessor-color); +} + +span.stringliteral { + color: var(--code-string-literal-color); +} + +span.charliteral { + color: var(--code-char-literal-color); +} + +span.xmlcdata { + color: var(--code-xml-cdata-color); +} + +span.vhdldigit { + color: var(--code-vhdl-digit-color); +} + +span.vhdlchar { + color: var(--code-vhdl-char-color); +} + +span.vhdlkeyword { + color: var(--code-vhdl-keyword-color); +} + +span.vhdllogic { + color: var(--code-vhdl-logic-color); +} + +blockquote { + background-color: var(--blockquote-background-color); + border-left: 2px solid var(--blockquote-border-color); + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid var(--table-cell-border-color); +} + +th.dirtab { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid var(--separator-color); +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--glow-color); + box-shadow: 0 0 15px var(--glow-color); +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: var(--memdecl-background-color); + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: var(--memdecl-foreground-color); +} + +.memSeparator { + border-bottom: 1px solid var(--memdecl-separator-color); + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: var(--memdecl-template-color); + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: var(--memdef-title-gradient-image); + background-repeat: repeat-x; + background-color: var(--memdef-title-background-color); + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: var(--memdef-template-color); + font-weight: normal; + margin-left: 9px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px var(--glow-color); +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 0px 6px 0px; + color: var(--memdef-proto-text-color); + font-weight: bold; + text-shadow: var(--memdef-proto-text-shadow); + background-color: var(--memdef-proto-background-color); + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; +} + +.overload { + font-family: var(--font-family-monospace); + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 10px 2px 10px; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: var(--memdef-doc-background-color); + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: var(--memdef-param-name-color); + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: var(--font-family-monospace); + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: var(--label-background-color); + border-top:1px solid var(--label-left-top-border-color); + border-left:1px solid var(--label-left-top-border-color); + border-right:1px solid var(--label-right-bottom-border-color); + border-bottom:1px solid var(--label-right-bottom-border-color); + text-shadow: none; + color: var(--label-foreground-color); + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid var(--directory-separator-color); + border-bottom: 1px solid var(--directory-separator-color); + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.odd { + padding-left: 6px; + background-color: var(--index-odd-item-bg-color); +} + +.directory tr.even { + padding-left: 6px; + background-color: var(--index-even-item-bg-color); +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: var(--page-link-color); +} + +.arrow { + color: var(--nav-arrow-color); + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: var(--font-family-icon); + line-height: normal; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: var(--icon-background-color); + color: var(--icon-foreground-color); + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-open-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-closed-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-doc-image); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: var(--footer-foreground-color); +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + margin-bottom: 10px; + border: 1px solid var(--memdef-border-color); + border-spacing: 0px; + border-radius: 4px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid var(--memdef-border-color); + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid var(--memdef-border-color); +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image: var(--memdef-title-gradient-image); + background-repeat:repeat-x; + background-color: var(--memdef-title-background-color); + font-size: 90%; + color: var(--memdef-proto-text-color); + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid var(--memdef-border-color); +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: var(--nav-gradient-image); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image: var(--nav-gradient-image); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:var(--nav-text-normal-color); + border:solid 1px var(--nav-breadcrumb-border-color); + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:var(--nav-breadcrumb-image); + background-repeat:no-repeat; + background-position:right; + color: var(--nav-foreground-color); +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: var(--nav-text-normal-color); + font-family: var(--font-family-nav); + text-shadow: var(--nav-text-normal-shadow); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color: var(--footer-foreground-color); + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image: var(--header-gradient-image); + background-repeat:repeat-x; + background-color: var(--header-background-color); + margin: 0px; + border-bottom: 1px solid var(--header-separator-color); +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font-size: 200%; + font-family: var(--font-family-title); + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font-size: 90%; + font-family: var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font-size: 50%; + font-family: 50% var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid var(--title-separator-color); + background-color: var(--title-background-color); +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:var(--citation-label-color); + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: var(--toc-background-color); + border: 1px solid var(--toc-border-color); + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; + font: 10px/1.2 var(--font-family-toc); + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 var(--font-family-toc); + color: var(--toc-header-color); + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 15px; +} + +div.toc li.level4 { + margin-left: 15px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.inherit_header { + font-weight: bold; + color: var(--inherit-header-color); + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + color: var(--tooltip-foreground-color); + background-color: var(--tooltip-background-color); + border: 1px solid var(--tooltip-border-color); + border-radius: 4px 4px 4px 4px; + box-shadow: var(--tooltip-shadow); + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: var(--tooltip-doc-color); + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip a { + color: var(--tooltip-link-color); +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: var(--tooltip-declaration-color); +} + +#powerTip div { + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: var(--font-family-tooltip); + line-height: 16px; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +tt, code, kbd, samp +{ + display: inline-block; +} +/* @end */ + +u { + text-decoration: underline; +} + +details>summary { + list-style-type: none; +} + +details > summary::-webkit-details-marker { + display: none; +} + +details>summary::before { + content: "\25ba"; + padding-right:4px; + font-size: 80%; +} + +details[open]>summary::before { + content: "\25bc"; + padding-right:4px; + font-size: 80%; +} + +body { + scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); +} + +::-webkit-scrollbar { + background-color: var(--scrollbar-background-color); + height: 12px; + width: 12px; +} +::-webkit-scrollbar-thumb { + border-radius: 6px; + box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); + border: solid 2px transparent; +} +::-webkit-scrollbar-corner { + background-color: var(--scrollbar-background-color); +} + diff --git a/documentation/html/doxygen.svg b/documentation/html/doxygen.svg new file mode 100644 index 00000000..79a76354 --- /dev/null +++ b/documentation/html/doxygen.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/html/dynsections.js b/documentation/html/dynsections.js new file mode 100644 index 00000000..8f493264 --- /dev/null +++ b/documentation/html/dynsections.js @@ -0,0 +1,194 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +let dynsection = { + + // helper function + updateStripes : function() { + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); + $('table.directory tr'). + removeClass('odd').filter(':visible:odd').addClass('odd'); + }, + + toggleVisibility : function(linkObj) { + const base = $(linkObj).attr('id'); + const summary = $('#'+base+'-summary'); + const content = $('#'+base+'-content'); + const trigger = $('#'+base+'-trigger'); + const src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; + }, + + toggleLevel : function(level) { + $('table.directory tr').each(function() { + const l = this.id.split('_').length-1; + const i = $('#img'+this.id.substring(3)); + const a = $('#arr'+this.id.substring(3)); + if (l'); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + const id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + const start = $(this).attr('data-start'); + const end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + const line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); + }, +}; +/* @license-end */ diff --git a/documentation/html/field__variable_8h_source.html b/documentation/html/field__variable_8h_source.html new file mode 100644 index 00000000..7c9903a9 --- /dev/null +++ b/documentation/html/field__variable_8h_source.html @@ -0,0 +1,121 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/storage/field_variable.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
field_variable.h
+
+
+
1#pragma once
+
2
+
3#include <array>
+
4#include <vector>
+
5#include <cmath>
+
6#include <iostream>
+
7#include "array2D.h"
+
8
+
+
17class FieldVariable : public Array2D
+
18{
+
19public:
+
27 FieldVariable(std::array<int, 2> size, std::array<double, 2> origin, std::array<double, 2> meshWidth);
+
28
+
37 double interpolateAt(double x, double y) const;
+
38
+
44 double findAbsMax() const;
+
45
+
46private:
+
47 const std::array<double, 2> origin_;
+
48 const std::array<double, 2> meshWidth_;
+
49};
+
+
This class represents a 2D array of double values.
Definition array2D.h:16
+
std::array< int, 2 > size() const
get size of array in x and y direction
Definition array2D.cpp:39
+
Discretization of a scalar function.
Definition field_variable.h:18
+
double interpolateAt(double x, double y) const
Interpolates value of field variable in domain using x and y coordinates.
Definition field_variable.cpp:12
+
double findAbsMax() const
Find point in Array2D of Fieldvariable with maximum value.
Definition field_variable.cpp:55
+
FieldVariable(std::array< int, 2 > size, std::array< double, 2 > origin, std::array< double, 2 > meshWidth)
Constructor.
Definition field_variable.cpp:4
+
+ + + + diff --git a/documentation/html/files.html b/documentation/html/files.html new file mode 100644 index 00000000..af63bf73 --- /dev/null +++ b/documentation/html/files.html @@ -0,0 +1,112 @@ + + + + + + + +NumSim: File List + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 123]
+ + + + + + + + + + + + + + + + + + + + + + + + + +
  src
  boundary
 boundary.h
 mask.h
  discretization
 central_differences.h
 discretization.h
 donor_cell.h
 staggered_grid.h
  output_writer
 output_writer.h
 output_writer_paraview.h
 output_writer_text.h
  settings_parser
 settings.h
  solver
 gauss_seidel.h
 pressure_solver.h
 sor.h
  storage
 array2D.h
 field_variable.h
  surface
 fluid_tracer.h
 computation.h
+
+
+ + + + diff --git a/documentation/html/fluid__tracer_8h_source.html b/documentation/html/fluid__tracer_8h_source.html new file mode 100644 index 00000000..a08ecfea --- /dev/null +++ b/documentation/html/fluid__tracer_8h_source.html @@ -0,0 +1,176 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/surface/fluid_tracer.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
fluid_tracer.h
+
+
+
1#pragma once
+
2
+
3#include <iostream>
+
4#include <vector>
+
5#include <queue>
+
6#include <algorithm>
+
7#include <memory>
+
8#include <cmath>
+
9#include <cassert>
+
10
+
11#include "../discretization/discretization.h"
+
12#include "../boundary/boundary.h"
+
13
+
14
+
+ +
16 public:
+
17 FluidTracer(int numParticlesperCell,
+
18 std::shared_ptr<Discretization> discretization,
+
19 std::shared_ptr<Mask> mask);
+
20
+
21 // Mainly for testing purposes
+
22 FluidTracer(std::vector<double> x, std::vector<double> y,
+
23 std::shared_ptr<Discretization> discretization,
+
24 std::shared_ptr<Mask> mask);
+
25
+
35 void moveParticles(double dt);
+
36
+
43 void createParticles(double positionSourceX, double positionSourceY);
+
44
+
50 int getNumberOfParticles() const;
+
51
+
57 int getNumberOfParticles(int i, int j) const;
+
58
+
59
+
65 std::array<double, 2> getParticlePosition(int i) const;
+
66
+
67 std::array<int, 2> cellOfParticle(int i);
+
68 int val2CellX(double xVal);
+
69 int val2CellY(double yVal);
+
70
+
71
+
72
+
73 // Only test
+
74 std::array<double, 2> updateParticle(int i, std::array<int, 2> idx, double dt, std::array<double,2> vel, int depth);
+
75 std::array<double, 2> moveParticles(double dt, std::array<double, 2> vel);
+
76
+
77 void printParticles();
+
78
+
79
+
80 private:
+
81 void initializeHomogenousParticleDistribution();
+
85 void initializeFluidCell(int i, int j, int idx);
+
86
+
87
+
88 // Helper for move Particles
+
89 int getThresholdParticlesFluidCell();
+
90 std::array<int, 2> updateParticle(int i, std::array<int, 2> idx, double dt, std::array<double,2> vel);
+
91 void resetVelocityInAirCells();
+
92
+
93
+
94 int numParticles_;
+
95 int numParticlesPerCell_; // <! is usually because of ceil larger then numParticlesPerCell>
+
96
+
97 // aspect ratio e.g. 1.0 for square cells and 0.5 for (dx = 2*dy) cells
+
98 double seedRelationDyDx_;
+
99 // how many particles are placed in each direction per cell
+
100 int n_x, n_y;
+
101 // inital count of fluid cells
+
102 int numFluidCells_;
+
103
+
104 std::shared_ptr<Discretization> discretization_;
+
105 std::shared_ptr<Mask> mask_;
+
106 std::vector<double> x_;
+
107 std::vector<double> y_;
+
108 std::vector<int> currentParticlesPerCell_;
+
109
+
110};
+
+
Definition fluid_tracer.h:15
+
std::array< double, 2 > getParticlePosition(int i) const
Get the Particle Position, index starts at 0.
Definition fluid_tracer.cpp:93
+
void moveParticles(double dt)
Update the position of the particles according to the velocity field and sets mask accordingly.
Definition fluid_tracer.cpp:116
+
void createParticles(double positionSourceX, double positionSourceY)
can be used to create a source cell for particles
Definition fluid_tracer.cpp:61
+
int getNumberOfParticles() const
Total number of Particles.
Definition fluid_tracer.cpp:73
+
+ + + + diff --git a/documentation/html/folderclosed.svg b/documentation/html/folderclosed.svg new file mode 100644 index 00000000..b04bed2e --- /dev/null +++ b/documentation/html/folderclosed.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/documentation/html/folderclosedd.svg b/documentation/html/folderclosedd.svg new file mode 100644 index 00000000..52f0166a --- /dev/null +++ b/documentation/html/folderclosedd.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/documentation/html/folderopen.svg b/documentation/html/folderopen.svg new file mode 100644 index 00000000..f6896dd2 --- /dev/null +++ b/documentation/html/folderopen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/documentation/html/folderopend.svg b/documentation/html/folderopend.svg new file mode 100644 index 00000000..2d1f06e7 --- /dev/null +++ b/documentation/html/folderopend.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/documentation/html/functions.html b/documentation/html/functions.html new file mode 100644 index 00000000..dd39fa60 --- /dev/null +++ b/documentation/html/functions.html @@ -0,0 +1,312 @@ + + + + + + + +NumSim: Class Members + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- i -

+ + +

- j -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- w -

+
+ + + + diff --git a/documentation/html/functions_enum.html b/documentation/html/functions_enum.html new file mode 100644 index 00000000..6e003ad5 --- /dev/null +++ b/documentation/html/functions_enum.html @@ -0,0 +1,83 @@ + + + + + + + +NumSim: Class Members - Enumerations + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented enums with links to the class documentation for each member:
+
+ + + + diff --git a/documentation/html/functions_func.html b/documentation/html/functions_func.html new file mode 100644 index 00000000..55ee92e0 --- /dev/null +++ b/documentation/html/functions_func.html @@ -0,0 +1,245 @@ + + + + + + + +NumSim: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented functions with links to the class documentation for each member:
+ +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- g -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- u -

+ + +

- v -

+ + +

- w -

+
+ + + + diff --git a/documentation/html/functions_vars.html b/documentation/html/functions_vars.html new file mode 100644 index 00000000..8ff28357 --- /dev/null +++ b/documentation/html/functions_vars.html @@ -0,0 +1,208 @@ + + + + + + + +NumSim: Class Members - Variables + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented variables with links to the class documentation for each member:
+ +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- i -

+ + +

- j -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+
+ + + + diff --git a/documentation/html/gauss__seidel_8h_source.html b/documentation/html/gauss__seidel_8h_source.html new file mode 100644 index 00000000..6d550217 --- /dev/null +++ b/documentation/html/gauss__seidel_8h_source.html @@ -0,0 +1,113 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/solver/gauss_seidel.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
gauss_seidel.h
+
+
+
1#pragma once
+
2
+
3#include "pressure_solver.h"
+
4#include <iostream>
+
5
+
+ +
12{
+
13
+
14public:
+
22 GaussSeidel(const std::shared_ptr<Discretization> &data,
+
23 double epsilon,
+
24 int maximumNumberOfIterations,
+
25 std::shared_ptr<Boundary> boundary);
+
30 void solve() override;
+
31};
+
+
Standard Gauss-Seidel solver.
Definition gauss_seidel.h:12
+
void solve() override
override function that starts solver.
Definition gauss_seidel.cpp:10
+
GaussSeidel(const std::shared_ptr< Discretization > &data, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)
Constructor.
Definition gauss_seidel.cpp:3
+
Solves the Poisson problem for the pressure.
Definition pressure_solver.h:21
+
+ + + + diff --git a/documentation/html/hierarchy.html b/documentation/html/hierarchy.html new file mode 100644 index 00000000..fc05bc8d --- /dev/null +++ b/documentation/html/hierarchy.html @@ -0,0 +1,105 @@ + + + + + + + +NumSim: Class Hierarchy + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 123]
+ + + + + + + + + + + + + + + + + + +
 CArray2DThis class represents a 2D array of double values
 CFieldVariableDiscretization of a scalar function
 CBoundaryClass responsible to caluclate boundary conditions
 CComputationComputation of Simulation
 CFluidTracer
 CSettings::LineContentContains the content of a single line in a file
 CMask
 COutputWriterInteface class for writing simulation data output
 COutputWriterParaviewWrite *.vti files that can be viewed with ParaView
 COutputWriterTextWrite *.txt files that are useful for debugging
 CPressureSolverSolves the Poisson problem for the pressure
 CGaussSeidelStandard Gauss-Seidel solver
 CSORSuccessive over-relaxation solver
 CSettingsAll settings that parametrize a simulation run
 CStaggeredGridCreate field variables and define limits for the indices
 CDiscretizationComputes derivatives included in governing equations
 CCentralDifferencesDiscretizes the problem using the central differences scheme
 CDonorCellDiscretizes the problem using the donor cell scheme
+
+
+ + + + diff --git a/documentation/html/index.html b/documentation/html/index.html new file mode 100644 index 00000000..ea3c2329 --- /dev/null +++ b/documentation/html/index.html @@ -0,0 +1,83 @@ + + + + + + + +NumSim: Main Page + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
NumSim Documentation
+
+
+
+ + + + diff --git a/documentation/html/jquery.js b/documentation/html/jquery.js new file mode 100644 index 00000000..0ac00e20 --- /dev/null +++ b/documentation/html/jquery.js @@ -0,0 +1,91 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$});/*! + Cookie helper functions + Copyright (c) 2023 Dimitri van Heesch + Released under MIT license. +*/ +let Cookie = { + cookie_namespace: 'doxygen_', + + readSetting(cookie,defVal) { + if (window.chrome) { + const val = localStorage.getItem(this.cookie_namespace+cookie) || + sessionStorage.getItem(this.cookie_namespace+cookie); + if (val) return val; + } else { + let myCookie = this.cookie_namespace+cookie+"="; + if (document.cookie) { + const index = document.cookie.indexOf(myCookie); + if (index != -1) { + const valStart = index + myCookie.length; + let valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + return document.cookie.substring(valStart, valEnd); + } + } + } + return defVal; + }, + + writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete + if (window.chrome) { + if (days==0) { + sessionStorage.setItem(this.cookie_namespace+cookie,val); + } else { + localStorage.setItem(this.cookie_namespace+cookie,val); + } + } else { + let date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; + document.cookie = this.cookie_namespace + cookie + "=" + + val + "; SameSite=Lax;" + expiration + "path=/"; + } + }, + + eraseSetting(cookie) { + if (window.chrome) { + if (localStorage.getItem(this.cookie_namespace+cookie)) { + localStorage.removeItem(this.cookie_namespace+cookie); + } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { + sessionStorage.removeItem(this.cookie_namespace+cookie); + } + } else { + this.writeSetting(cookie,'',-1); + } + }, +} diff --git a/documentation/html/mask_8h_source.html b/documentation/html/mask_8h_source.html new file mode 100644 index 00000000..857148fa --- /dev/null +++ b/documentation/html/mask_8h_source.html @@ -0,0 +1,237 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/boundary/mask.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
NumSim 1.0 +
+
Numerical Simulation of fluid-flow
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
mask.h
+
+
+
1#pragma once
+
2
+
3#include <vector>
+
4#include <array>
+
5#include <cassert>
+
6#include <cmath>
+
7
+
8#include <iostream>
+
9#include <iomanip>
+
10#include <png.h>
+
11#include <fstream>
+
12#include "../settings_parser/settings.h"
+
13
+
+
14class Mask
+
15{
+
16public:
+
22 Mask(Settings settings);
+
23
+
+ +
25 {
+
26 FLUID_DROPLET = 0,
+
27
+
28 FLUID_SINGLE_LEFT = 1,
+
29 FLUID_SINGLE_TOP = 2,
+
30 FLUID_SINGLE_RIGHT = 4,
+
31 FLUID_SINGLE_BOTTOM = 8,
+
32
+
33 FLUID_CORNER_BOTTOM_LEFT = 6,
+
34 FLUID_CORNER_TOP_LEFT = 12,
+
35 FLUID_CORNER_TOP_RIGHT = 9,
+
36 FLUID_CORNER_BOTTOM_RIGHT = 3,
+
37
+
38 FLUID_COLUMN_HORIZONTAL = 5,
+
39 FLUID_COLUMN_VERTICAL = 10,
+
40
+
41 FLUID_BORDER_LEFT = 14,
+
42 FLUID_BORDER_TOP = 13,
+
43 FLUID_BORDER_RIGHT = 11,
+
44 FLUID_BORDER_BOTTOM = 7,
+
45
+
46 FLUID = 15,
+
47 FLUID_TYPE = 50,
+
48 AIR = 64,
+
49
+
50 OBSTACLE = 99,
+
51 OBSTACLE_INSIDE = 100,
+
52
+
53 OBSTACLE_BORDER_LEFT = 101,
+
54 OBSTACLE_BORDER_TOP = 102,
+
55 OBSTACLE_CORNER_TOP_LEFT = 103,
+
56 OBSTACLE_BORDER_RIGHT = 104,
+
57 OBSTACLE_CORNER_TOP_RIGHT = 106,
+
58 OBSTACLE_BORDER_BOTTOM = 108,
+
59 OBSTACLE_CORNER_BOTTOM_LEFT = 109,
+
60 OBSTACLE_CORNER_BOTTOM_RIGHT = 112,
+
61
+
62 DOMAIN_BOUNDARY = 200,
+
63
+
64 DOMAIN_LEFT_NOSLIP = 201,
+
65 DOMAIN_TOP_NOSLIP = 202,
+
66 DOMAIN_RIGHT_NOSLIP = 203,
+
67 DOMAIN_BOTTOM_NOSLIP = 204,
+
68
+
69 DOMAIN_LEFT_PRESSURE = 205,
+
70 DOMAIN_TOP_PRESSURE = 206,
+
71 DOMAIN_RIGHT_PRESSURE = 207,
+
72 DOMAIN_BOTTOM_PRESSURE = 208,
+
73 };
+
+
74
+
82 int &operator()(int i, int j);
+
83
+
91 int operator()(int i, int j) const;
+
92
+
96 std::array<int, 2> size() const;
+
97
+
102 void resetMask();
+
103
+
104 // ********************************************************
+
105 // R E Q U E S T S
+
106
+
115 bool isFluid(int i, int j) const;
+
116
+
123 bool isObstacle(int i, int j) const;
+
124
+
133 bool isAir(int i, int j) const;
+
134
+
144 bool isInnerFluid(int i, int j) const;
+
145
+
153 bool isDomainBoundary(int i, int j) const;
+
154
+
162 bool isObstacleBoundary(int i, int j) const;
+
163
+
171 bool isFluidBoundary(int i, int j) const;
+
172
+
179 int getNumberOfFluidCells() const;
+
180
+ +
187
+ +
194
+
200 void setDomainBC();
+
201
+
205 void setObstacleBC();
+
206
+
210 void setFluidBC();
+
211
+
215 void printMask() const;
+
216
+
217protected:
+
218 std::array<int, 2> size_;
+
219 std::vector<int> data_;
+
220 std::vector<int> boundary_list;
+ +
222 int forbiddenObstacleFluidCombinations[7] = {105, 107, 110, 111, 113, 114, 115};
+
223};
+
+
Definition mask.h:15
+
bool isFluidBoundary(int i, int j) const
Cecks if cell at index is fluid boundary.
Definition mask.cpp:70
+
int getNumberOfFluidCells() const
number of fluid cells
Definition mask.cpp:78
+
void printMask() const
print mask enums to terminal
Definition mask.cpp:304
+
std::vector< int > boundary_list
stores the indices of the boundary cells
Definition mask.h:220
+
void setFluidBC()
sets enums for all fluid cells that belong are located at a surface
Definition mask.cpp:206
+
bool isObstacle(int i, int j) const
True if Cell at (i,j) is either obstacle or boundary.
Definition mask.cpp:52
+
Mask(Settings settings)
constructor.
Definition mask.cpp:3
+
bool isInnerFluid(int i, int j) const
Cell at (i,j) is a inner fluid cell or not.
Definition mask.cpp:74
+
void setObstacleBC()
sets enums for all cells that belong to an obstacle
Definition mask.cpp:272
+
int & operator()(int i, int j)
set array value. Overloads the () operator
Definition mask.cpp:23
+
void makeRectangularObstacle()
creates rectangulat objecct inside domain
Definition mask.cpp:92
+
bool isAir(int i, int j) const
Cell at (i,j) is a air cell or not.
Definition mask.cpp:56
+
std::array< int, 2 > size_
size of array in x and y direction
Definition mask.h:218
+
bool isDomainBoundary(int i, int j) const
Cecks if cell at index is domain boundary.
Definition mask.cpp:61
+
void setDomainBC()
sets enums for all cells that belong to domain boundary
Definition mask.cpp:223
+
bool isFluid(int i, int j) const
Cell at (i,j) is fluid or not.
Definition mask.cpp:48
+
std::array< int, 2 > size() const
get size of array in x and y direction
Definition mask.cpp:33
+
int forbiddenObstacleFluidCombinations[7]
enums that singnal forbidden obstacle - fluid cell combinations
Definition mask.h:222
+
void resetMask()
sets all not obstacle cells to air
Definition mask.cpp:37
+
Settings settings_
settings entity
Definition mask.h:221
+
std::vector< int > data_
storage array values, in row-major order
Definition mask.h:219
+
void createMaskFromPNGBitMap()
creates mask by reading in bitmap
Definition mask.cpp:117
+
CellType
< enums used to encode cell type and boundary condition
Definition mask.h:25
+
bool isObstacleBoundary(int i, int j) const
Cecks if cell at index is obstacle boundary.
Definition mask.cpp:65
+
All settings that parametrize a simulation run.
Definition settings.h:14
+
+ + + + diff --git a/documentation/html/menu.js b/documentation/html/menu.js new file mode 100644 index 00000000..717761d0 --- /dev/null +++ b/documentation/html/menu.js @@ -0,0 +1,134 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + let result=''; + if ('children' in data) { + result+='
    '; + for (let i in data.children) { + let url; + const link = data.children[i].url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + } else { + url = relPath+link; + } + result+='
  • '+ + data.children[i].text+''+ + makeTree(data.children[i],relPath)+'
  • '; + } + result+='
'; + } + return result; + } + let searchBoxHtml; + if (searchEnabled) { + if (serverSide) { + searchBoxHtml='
'+ + '
'+ + '
 '+ + ''+ + '
'+ + '
'+ + '
'+ + '
'; + } else { + searchBoxHtml='
'+ + ''+ + ' '+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
'; + } + } + + $('#main-nav').before('
'+ + ''+ + ''+ + '
'); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBoxHtml) { + $('#main-menu').append('
  • '); + } + const $mainMenuState = $('#main-menu-state'); + let prevWidth = 0; + if ($mainMenuState.length) { + const initResizableIfExists = function() { + if (typeof initResizable==='function') initResizable(); + } + // animate mobile menu + $mainMenuState.change(function() { + const $menu = $('#main-menu'); + let options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = () => $menu.css('display', 'block'); + $menu.hide().slideDown(options); + } else { + options['complete'] = () => $menu.css('display', 'none'); + $menu.show().slideUp(options); + } + }); + // set default menu visibility + const resetState = function() { + const $menu = $('#main-menu'); + const newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBoxHtml); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBoxHtml); + $('#searchBoxPos2').show(); + } + if (typeof searchBox!=='undefined') { + searchBox.CloseResultsWindow(); + } + prevWidth = newWidth; + } + } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/documentation/html/menudata.js b/documentation/html/menudata.js new file mode 100644 index 00000000..614ce7b1 --- /dev/null +++ b/documentation/html/menudata.js @@ -0,0 +1,92 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Hierarchy",url:"hierarchy.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"a",url:"functions.html#index_a"}, +{text:"b",url:"functions.html#index_b"}, +{text:"c",url:"functions.html#index_c"}, +{text:"d",url:"functions.html#index_d"}, +{text:"e",url:"functions.html#index_e"}, +{text:"f",url:"functions.html#index_f"}, +{text:"g",url:"functions.html#index_g"}, +{text:"i",url:"functions.html#index_i"}, +{text:"j",url:"functions.html#index_j"}, +{text:"l",url:"functions.html#index_l"}, +{text:"m",url:"functions.html#index_m"}, +{text:"n",url:"functions.html#index_n"}, +{text:"o",url:"functions.html#index_o"}, +{text:"p",url:"functions.html#index_p"}, +{text:"r",url:"functions.html#index_r"}, +{text:"s",url:"functions.html#index_s"}, +{text:"t",url:"functions.html#index_t"}, +{text:"u",url:"functions.html#index_u"}, +{text:"v",url:"functions.html#index_v"}, +{text:"w",url:"functions.html#index_w"}]}, +{text:"Functions",url:"functions_func.html",children:[ +{text:"a",url:"functions_func.html#index_a"}, +{text:"b",url:"functions_func.html#index_b"}, +{text:"c",url:"functions_func.html#index_c"}, +{text:"d",url:"functions_func.html#index_d"}, +{text:"f",url:"functions_func.html#index_f"}, +{text:"g",url:"functions_func.html#index_g"}, +{text:"i",url:"functions_func.html#index_i"}, +{text:"l",url:"functions_func.html#index_l"}, +{text:"m",url:"functions_func.html#index_m"}, +{text:"n",url:"functions_func.html#index_n"}, +{text:"o",url:"functions_func.html#index_o"}, +{text:"p",url:"functions_func.html#index_p"}, +{text:"r",url:"functions_func.html#index_r"}, +{text:"s",url:"functions_func.html#index_s"}, +{text:"u",url:"functions_func.html#index_u"}, +{text:"v",url:"functions_func.html#index_v"}, +{text:"w",url:"functions_func.html#index_w"}]}, +{text:"Variables",url:"functions_vars.html",children:[ +{text:"a",url:"functions_vars.html#index_a"}, +{text:"b",url:"functions_vars.html#index_b"}, +{text:"c",url:"functions_vars.html#index_c"}, +{text:"d",url:"functions_vars.html#index_d"}, +{text:"e",url:"functions_vars.html#index_e"}, +{text:"f",url:"functions_vars.html#index_f"}, +{text:"g",url:"functions_vars.html#index_g"}, +{text:"i",url:"functions_vars.html#index_i"}, +{text:"j",url:"functions_vars.html#index_j"}, +{text:"m",url:"functions_vars.html#index_m"}, +{text:"n",url:"functions_vars.html#index_n"}, +{text:"o",url:"functions_vars.html#index_o"}, +{text:"p",url:"functions_vars.html#index_p"}, +{text:"r",url:"functions_vars.html#index_r"}, +{text:"s",url:"functions_vars.html#index_s"}, +{text:"t",url:"functions_vars.html#index_t"}, +{text:"u",url:"functions_vars.html#index_u"}, +{text:"v",url:"functions_vars.html#index_v"}]}, +{text:"Enumerations",url:"functions_enum.html"}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}]}]} diff --git a/documentation/html/minus.svg b/documentation/html/minus.svg new file mode 100644 index 00000000..f70d0c1a --- /dev/null +++ b/documentation/html/minus.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/documentation/html/minusd.svg b/documentation/html/minusd.svg new file mode 100644 index 00000000..5f8e8796 --- /dev/null +++ b/documentation/html/minusd.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/documentation/html/nav_f.png b/documentation/html/nav_f.png new file mode 100644 index 00000000..72a58a52 Binary files /dev/null and b/documentation/html/nav_f.png differ diff --git a/documentation/html/nav_fd.png b/documentation/html/nav_fd.png new file mode 100644 index 00000000..032fbdd4 Binary files /dev/null and b/documentation/html/nav_fd.png differ diff --git a/documentation/html/nav_g.png b/documentation/html/nav_g.png new file mode 100644 index 00000000..2093a237 Binary files /dev/null and b/documentation/html/nav_g.png differ diff --git a/documentation/html/nav_h.png b/documentation/html/nav_h.png new file mode 100644 index 00000000..33389b10 Binary files /dev/null and b/documentation/html/nav_h.png differ diff --git a/documentation/html/nav_hd.png b/documentation/html/nav_hd.png new file mode 100644 index 00000000..de80f18a Binary files /dev/null and b/documentation/html/nav_hd.png differ diff --git a/documentation/html/open.png b/documentation/html/open.png new file mode 100644 index 00000000..30f75c7e Binary files /dev/null and b/documentation/html/open.png differ diff --git a/documentation/html/output__writer_8h_source.html b/documentation/html/output__writer_8h_source.html new file mode 100644 index 00000000..1f2c9e92 --- /dev/null +++ b/documentation/html/output__writer_8h_source.html @@ -0,0 +1,118 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/output_writer/output_writer.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    output_writer.h
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include "../discretization/discretization.h"
    +
    4
    +
    5#include <memory>
    +
    6#include <iostream>
    +
    7#include <cstring>
    +
    8
    +
    + +
    14{
    +
    15public:
    +
    21 OutputWriter(std::shared_ptr<Discretization> discretization);
    +
    22
    +
    30 virtual void writeFile(double currentTime) = 0;
    +
    31
    +
    32protected:
    +
    33 std::shared_ptr<Discretization> discretization_;
    +
    34 int fileNo_;
    +
    35};
    +
    +
    Inteface class for writing simulation data output.
    Definition output_writer.h:14
    +
    std::shared_ptr< Discretization > discretization_
    shared pointer, discretization object containing data to be written to file
    Definition output_writer.h:33
    +
    OutputWriter(std::shared_ptr< Discretization > discretization)
    Constructor.
    Definition output_writer.cpp:3
    +
    int fileNo_
    a counter that increments for every file written to disk
    Definition output_writer.h:34
    +
    virtual void writeFile(double currentTime)=0
    Write current velocities to file.
    +
    + + + + diff --git a/documentation/html/output__writer__paraview_8h_source.html b/documentation/html/output__writer__paraview_8h_source.html new file mode 100644 index 00000000..dc80fc48 --- /dev/null +++ b/documentation/html/output__writer__paraview_8h_source.html @@ -0,0 +1,128 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/output_writer/output_writer_paraview.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    output_writer_paraview.h
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include "output_writer.h"
    +
    4
    +
    5#include <vtkSmartPointer.h>
    +
    6#include <vtkXMLImageDataWriter.h>
    +
    7#include <vtkImageData.h>
    +
    8#include <vtkDoubleArray.h>
    +
    9#include <vtkPointData.h>
    +
    10#include <cmath>
    +
    11
    +
    12#include <memory>
    +
    13#include <iostream>
    +
    14#include "../boundary/mask.h"
    +
    15#include "../surface/fluid_tracer.h"
    +
    16
    +
    + +
    26{
    +
    27public:
    +
    33 OutputWriterParaview(std::shared_ptr<Discretization> discretization,
    +
    34 std::shared_ptr<Mask> mask,
    +
    35 std::shared_ptr<FluidTracer> fluidTracer);
    +
    36
    +
    42 void writeFile(double currentTime);
    +
    43
    +
    44private:
    +
    45 vtkSmartPointer<vtkXMLImageDataWriter> vtkWriter_;
    +
    46 std::shared_ptr<Mask> mask_;
    +
    47 std::shared_ptr<FluidTracer> fluidTracer_;
    +
    48};
    +
    +
    Write *.vti files that can be viewed with ParaView.
    Definition output_writer_paraview.h:26
    +
    void writeFile(double currentTime)
    Write current velocities to file, filename is output_<count>.vti.
    Definition output_writer_paraview.cpp:11
    +
    OutputWriterParaview(std::shared_ptr< Discretization > discretization, std::shared_ptr< Mask > mask, std::shared_ptr< FluidTracer > fluidTracer)
    Constructor.
    Definition output_writer_paraview.cpp:3
    +
    Inteface class for writing simulation data output.
    Definition output_writer.h:14
    +
    + + + + diff --git a/documentation/html/output__writer__text_8h_source.html b/documentation/html/output__writer__text_8h_source.html new file mode 100644 index 00000000..4709d143 --- /dev/null +++ b/documentation/html/output__writer__text_8h_source.html @@ -0,0 +1,116 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/output_writer/output_writer_text.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    output_writer_text.h
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include "output_writer.h"
    +
    4#include <iostream>
    +
    5#include <fstream>
    +
    6#include <sstream>
    +
    7#include <iomanip>
    +
    8
    +
    + +
    17{
    +
    18public:
    + +
    23
    +
    31 void writeFile(double currentTime);
    +
    32
    +
    38 void writePressureFile();
    +
    39};
    +
    +
    Write *.txt files that are useful for debugging.
    Definition output_writer_text.h:17
    +
    void writeFile(double currentTime)
    Write current velocities to file.
    Definition output_writer_text.cpp:3
    +
    void writePressureFile()
    Write only current values of pressure to file.
    Definition output_writer_text.cpp:177
    +
    Inteface class for writing simulation data output.
    Definition output_writer.h:14
    +
    OutputWriter(std::shared_ptr< Discretization > discretization)
    Constructor.
    Definition output_writer.cpp:3
    +
    + + + + diff --git a/documentation/html/plus.svg b/documentation/html/plus.svg new file mode 100644 index 00000000..07520165 --- /dev/null +++ b/documentation/html/plus.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/documentation/html/plusd.svg b/documentation/html/plusd.svg new file mode 100644 index 00000000..0c65bfe9 --- /dev/null +++ b/documentation/html/plusd.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/documentation/html/pressure__solver_8h_source.html b/documentation/html/pressure__solver_8h_source.html new file mode 100644 index 00000000..37705c28 --- /dev/null +++ b/documentation/html/pressure__solver_8h_source.html @@ -0,0 +1,148 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/solver/pressure_solver.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    pressure_solver.h
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include <math.h>
    +
    4#include <iostream>
    +
    5#include <memory>
    +
    6
    +
    7#include "../storage/field_variable.h"
    +
    8#include "../discretization/discretization.h"
    +
    9#include "../boundary/boundary.h"
    +
    10
    +
    11
    +
    + +
    21{
    +
    22public:
    +
    31 PressureSolver(std::shared_ptr<Discretization> discretization,
    +
    32 double epsilon,
    +
    33 int maximumNumberOfIterations,
    +
    34 std::shared_ptr<Boundary> boundary);
    +
    35
    +
    40 virtual void solve() = 0;
    +
    41
    +
    42 double dx2, dy2;
    +
    43
    +
    44protected:
    +
    51 void setBoundaryValues();
    +
    52
    +
    56 double calculateResiduum();
    +
    57
    +
    58 int i_beg;
    +
    59 int i_end;
    +
    60 int j_beg;
    +
    61 int j_end;
    +
    62
    +
    63 std::shared_ptr<Discretization> discretization_;
    +
    64 std::shared_ptr<Boundary> boundary_;
    +
    65
    +
    66 double epsilon_;
    +
    67
    + +
    69};
    +
    +
    Solves the Poisson problem for the pressure.
    Definition pressure_solver.h:21
    +
    std::shared_ptr< Boundary > boundary_
    object managing boundary for obstacle and surface tension
    Definition pressure_solver.h:64
    +
    PressureSolver(std::shared_ptr< Discretization > discretization, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary)
    Constructor.
    Definition pressure_solver.cpp:5
    +
    double epsilon_
    tolerance for the solver
    Definition pressure_solver.h:66
    +
    double dy2
    squared mesh widths
    Definition pressure_solver.h:42
    +
    int i_end
    end of loop for rhs in x direction
    Definition pressure_solver.h:59
    +
    void setBoundaryValues()
    Set the Boundary Values.
    Definition pressure_solver.cpp:28
    +
    virtual void solve()=0
    virtual function that starts solver.
    +
    int j_beg
    begin of loop for rhs in y direction
    Definition pressure_solver.h:60
    +
    int j_end
    end of loop for rhs in y direction
    Definition pressure_solver.h:61
    +
    int i_beg
    begin of loop for rhs in x direction
    Definition pressure_solver.h:58
    +
    int maximumNumberOfIterations_
    maximum number of iterations
    Definition pressure_solver.h:68
    +
    std::shared_ptr< Discretization > discretization_
    object holding the needed field variables for rhs and p
    Definition pressure_solver.h:63
    +
    double calculateResiduum()
    calculate residuum of current time step
    Definition pressure_solver.cpp:33
    +
    + + + + diff --git a/documentation/html/search/all_0.js b/documentation/html/search/all_0.js new file mode 100644 index 00000000..d432d029 --- /dev/null +++ b/documentation/html/search/all_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['alpha_0',['alpha',['../structSettings.html#a8b3721d24a5417caa0f2ad6f5eb85782',1,'Settings']]], + ['array2d_1',['array2d',['../classArray2D.html',1,'Array2D'],['../classArray2D.html#a16521417dfdf67ec694bfb7747df9000',1,'Array2D::Array2D()']]] +]; diff --git a/documentation/html/search/all_1.js b/documentation/html/search/all_1.js new file mode 100644 index 00000000..257f986e --- /dev/null +++ b/documentation/html/search/all_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['boundary_0',['boundary',['../classBoundary.html',1,'Boundary'],['../classBoundary.html#a4c78a28ad0839810f15229382f642cf1',1,'Boundary::Boundary()']]], + ['boundary_5f_1',['boundary_',['../classPressureSolver.html#a0b17b46580d259e4bb3a05486bc06a60',1,'PressureSolver']]], + ['boundary_5flist_2',['boundary_list',['../classMask.html#a3c5a51f6d03bb4a5e1742537a22ec441',1,'Mask']]] +]; diff --git a/documentation/html/search/all_10.js b/documentation/html/search/all_10.js new file mode 100644 index 00000000..b7e0cc14 --- /dev/null +++ b/documentation/html/search/all_10.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['tau_0',['tau',['../structSettings.html#adaa611dc8c075474d40d7149afd310d1',1,'Settings']]] +]; diff --git a/documentation/html/search/all_11.js b/documentation/html/search/all_11.js new file mode 100644 index 00000000..670a9233 --- /dev/null +++ b/documentation/html/search/all_11.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['u_0',['u',['../classStaggeredGrid.html#a87cee12621c641ab143a8b1a61b2ef7e',1,'StaggeredGrid::u() const'],['../classStaggeredGrid.html#a0324ce4d1fe2343d8aa9514e460cc556',1,'StaggeredGrid::u(int i, int j) const'],['../classStaggeredGrid.html#a0ed62d6752b6b2b3ead5f654b515cd12',1,'StaggeredGrid::u(int i, int j)']]], + ['u_5f_1',['u_',['../classStaggeredGrid.html#adcef36b4ce8cc6843a2b6f603b62c763',1,'StaggeredGrid']]], + ['uibegin_2',['uIBegin',['../classStaggeredGrid.html#a31e2d3a0b6e03685380810a7c2f323e1',1,'StaggeredGrid']]], + ['uiend_3',['uIEnd',['../classStaggeredGrid.html#a641e473d72e1d02ba3de1c16e9d0d332',1,'StaggeredGrid']]], + ['ujbegin_4',['uJBegin',['../classStaggeredGrid.html#a9b0e97704e1871441a8e713ecaa2cff5',1,'StaggeredGrid']]], + ['ujend_5',['uJEnd',['../classStaggeredGrid.html#a3393aa91b17054d2d700de308ae25632',1,'StaggeredGrid']]], + ['updateboundary_6',['updateBoundary',['../classBoundary.html#a9910a68c5dec5845ef4cdde98e680155',1,'Boundary']]], + ['usedonorcell_7',['useDonorCell',['../structSettings.html#a05bd5ffa1e1b48f5dc99878538596db3',1,'Settings']]], + ['usefluidtracer_8',['useFluidTracer',['../structSettings.html#a7f3405eef6ef103b60e7c2b01088c5ec',1,'Settings']]] +]; diff --git a/documentation/html/search/all_12.js b/documentation/html/search/all_12.js new file mode 100644 index 00000000..72fb9675 --- /dev/null +++ b/documentation/html/search/all_12.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['v_0',['v',['../classStaggeredGrid.html#a26e478abba632554652c9e05a279d1ca',1,'StaggeredGrid::v() const'],['../classStaggeredGrid.html#ac052d8803ff950aee04b86ac026c516b',1,'StaggeredGrid::v(int i, int j) const'],['../classStaggeredGrid.html#a7746f703f32c2f20a4c77246eebac697',1,'StaggeredGrid::v(int i, int j)']]], + ['v_5f_1',['v_',['../classStaggeredGrid.html#a20ec43568fe937b194561e21a0b84ad9',1,'StaggeredGrid']]], + ['value_2',['value',['../structSettings_1_1LineContent.html#a0bb96393366f2e5035379ab5b99d3ab2',1,'Settings::LineContent']]], + ['vibegin_3',['vIBegin',['../classStaggeredGrid.html#ace7bf8cb1d279131739d5d12de302d09',1,'StaggeredGrid']]], + ['viend_4',['vIEnd',['../classStaggeredGrid.html#aa5a44aa088b5a7923fa952af1ecb5778',1,'StaggeredGrid']]], + ['vjbegin_5',['vJBegin',['../classStaggeredGrid.html#a7f8468d672411c0e3a5eeb67788fc826',1,'StaggeredGrid']]], + ['vjend_6',['vJEnd',['../classStaggeredGrid.html#ab67e8d9d8d76d34fb02d4d644f0b3795',1,'StaggeredGrid']]] +]; diff --git a/documentation/html/search/all_13.js b/documentation/html/search/all_13.js new file mode 100644 index 00000000..9578483c --- /dev/null +++ b/documentation/html/search/all_13.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['writefile_0',['writefile',['../classOutputWriter.html#ac625c204affdc05919388a3549c2e945',1,'OutputWriter::writeFile()'],['../classOutputWriterParaview.html#a9e203b63d0e2f26ad53d18ee1821c6bb',1,'OutputWriterParaview::writeFile()'],['../classOutputWriterText.html#a25a12ea2524fc34e9acb19ef1f4c7431',1,'OutputWriterText::writeFile(double currentTime)']]], + ['writepressurefile_1',['writePressureFile',['../classOutputWriterText.html#a3480b58a23fd158f16d0ef9c1b67cbfd',1,'OutputWriterText']]] +]; diff --git a/documentation/html/search/all_2.js b/documentation/html/search/all_2.js new file mode 100644 index 00000000..0b1f14ff --- /dev/null +++ b/documentation/html/search/all_2.js @@ -0,0 +1,21 @@ +var searchData= +[ + ['calculateresiduum_0',['calculateResiduum',['../classPressureSolver.html#afc51f4315c483988aeec327a16c5bb90',1,'PressureSolver']]], + ['celltype_1',['CellType',['../classMask.html#ad74a26afe88ebadafebd733837f3252a',1,'Mask']]], + ['centraldifferences_2',['centraldifferences',['../classCentralDifferences.html#ab055731e615298f745364c54f86fc191',1,'CentralDifferences::CentralDifferences()'],['../classCentralDifferences.html',1,'CentralDifferences']]], + ['computation_3',['Computation',['../classComputation.html',1,'']]], + ['computed2udx2_4',['computeD2uDx2',['../classDiscretization.html#a6986501b0b5c96699ff3ac843c1a6ca2',1,'Discretization']]], + ['computed2udy2_5',['computeD2uDy2',['../classDiscretization.html#a446aabc55a9fb4b5cb2f476babc532f9',1,'Discretization']]], + ['computed2vdx2_6',['computeD2vDx2',['../classDiscretization.html#a5119047788a34eadf37480e913bdc8ea',1,'Discretization']]], + ['computed2vdy2_7',['computeD2vDy2',['../classDiscretization.html#a56678582a049b1b141621e41afff1438',1,'Discretization']]], + ['computedpdx_8',['computeDpDx',['../classDiscretization.html#aed3ad75ad6e647d14f118a12652c01b2',1,'Discretization']]], + ['computedpdy_9',['computeDpDy',['../classDiscretization.html#a859f4dc33f0ea91f5e6537be09ce4999',1,'Discretization']]], + ['computedu2dx_10',['computedu2dx',['../classDonorCell.html#a265bdaf46ed8ba46a42ef0cb03807175',1,'DonorCell::computeDu2Dx()'],['../classDiscretization.html#acca6bf193e0e91f645d292527299254b',1,'Discretization::computeDu2Dx()'],['../classCentralDifferences.html#adb4502f473cc047a433db596146672e4',1,'CentralDifferences::computeDu2Dx(int i, int j) const override']]], + ['computeduvdx_11',['computeduvdx',['../classCentralDifferences.html#a9bd7ac3bfd709991525ec57de10ed2e1',1,'CentralDifferences::computeDuvDx()'],['../classDiscretization.html#ab1c2aa237e13e7c4c9edd429de656795',1,'Discretization::computeDuvDx()'],['../classDonorCell.html#ae41b5f85743ca7f148bd829561bd9cb5',1,'DonorCell::computeDuvDx()']]], + ['computeduvdy_12',['computeduvdy',['../classCentralDifferences.html#a4184367de8d48e678edfb078a19fc0a4',1,'CentralDifferences::computeDuvDy()'],['../classDiscretization.html#a0bab86aef10a72e01b4f8102a3c91f84',1,'Discretization::computeDuvDy()'],['../classDonorCell.html#a285562312f08efde26afd160174d2843',1,'DonorCell::computeDuvDy()']]], + ['computedv2dy_13',['computedv2dy',['../classCentralDifferences.html#a66eb9b800b9a9ac6f81fc719a42eb0ee',1,'CentralDifferences::computeDv2Dy()'],['../classDiscretization.html#a69ba136ab7f8c09d805afca159cab428',1,'Discretization::computeDv2Dy()'],['../classDonorCell.html#a01dcfb7fcf356d5ee412107a30c26fb3',1,'DonorCell::computeDv2Dy()']]], + ['createdomainfrombitmap_14',['createDomainfromBitmap',['../structSettings.html#a6300ad5a809cdaf480f4553c3e3dbf7c',1,'Settings']]], + ['createmaskfrompngbitmap_15',['createMaskFromPNGBitMap',['../classMask.html#ad69aefd91f740d6758cdedf0df8c8ca6',1,'Mask']]], + ['createparticles_16',['createParticles',['../classFluidTracer.html#ace163e1fe040acbd4c3122f082b08eea',1,'FluidTracer']]], + ['createrectangularobject_17',['createRectangularObject',['../structSettings.html#a9e871c2bbb7d1b0131eac1f30f4f7788',1,'Settings']]] +]; diff --git a/documentation/html/search/all_3.js b/documentation/html/search/all_3.js new file mode 100644 index 00000000..e54b04ca --- /dev/null +++ b/documentation/html/search/all_3.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['data_5f_0',['data_',['../classMask.html#acdb73aee935b502fecc8de6bf1e32a09',1,'Mask::data_'],['../classArray2D.html#af1572f75d219caab4b2372a98341b991',1,'Array2D::data_']]], + ['discretization_1',['discretization',['../classDiscretization.html',1,'Discretization'],['../classDiscretization.html#a4fb8cc9823938e7c2dec329b906a462c',1,'Discretization::Discretization()']]], + ['discretization_5f_2',['discretization_',['../classOutputWriter.html#a0587b2dc160a9b1393411433dfc23b68',1,'OutputWriter::discretization_'],['../classPressureSolver.html#af579ecebaaa8b11914293ef18af5fdc6',1,'PressureSolver::discretization_']]], + ['docalculatef_3',['doCalculateF',['../classBoundary.html#ac76b887d65491d38c093ca50333697a9',1,'Boundary']]], + ['docalculateg_4',['doCalculateG',['../classBoundary.html#aacf325c02e71925b7847d7189282b5c1',1,'Boundary']]], + ['donorcell_5',['donorcell',['../classDonorCell.html',1,'DonorCell'],['../classDonorCell.html#a4896ad035a5ac50c85e2b66d442a5312',1,'DonorCell::DonorCell()']]], + ['dx_6',['dx',['../classStaggeredGrid.html#aec8490affea703cdd73b1febaed68968',1,'StaggeredGrid']]], + ['dy_7',['dy',['../classStaggeredGrid.html#abde2da10e0c130fb0f206de64c9b4956',1,'StaggeredGrid']]], + ['dy2_8',['dy2',['../classPressureSolver.html#a25b7ff50bdaea53d1b5c7a5cf735c5b5',1,'PressureSolver']]] +]; diff --git a/documentation/html/search/all_4.js b/documentation/html/search/all_4.js new file mode 100644 index 00000000..9909aa46 --- /dev/null +++ b/documentation/html/search/all_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['endtime_0',['endTime',['../structSettings.html#a73cd9110793ede99e9ebe409e5e115fd',1,'Settings']]], + ['epsilon_1',['epsilon',['../structSettings.html#aa02bd91d026d9ded9e36004b41b068b1',1,'Settings']]], + ['epsilon_5f_2',['epsilon_',['../classPressureSolver.html#a22b723f3b3ba54e47f36cfc2b9576749',1,'PressureSolver']]] +]; diff --git a/documentation/html/search/all_5.js b/documentation/html/search/all_5.js new file mode 100644 index 00000000..e23218de --- /dev/null +++ b/documentation/html/search/all_5.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['f_0',['f',['../classStaggeredGrid.html#adb05c59512dc8993367e4beddba05785',1,'StaggeredGrid']]], + ['f_5f_1',['f_',['../classStaggeredGrid.html#a94933ac0c6e0d2a794f46c7a97d72f75',1,'StaggeredGrid']]], + ['fibegin_2',['fIBegin',['../classStaggeredGrid.html#a5cc368f9ede58a3cb689705df998f750',1,'StaggeredGrid']]], + ['fieldvariable_3',['fieldvariable',['../classFieldVariable.html',1,'FieldVariable'],['../classFieldVariable.html#aa0985778bc6331b74904a03c3ef67a98',1,'FieldVariable::FieldVariable()']]], + ['fiend_4',['fIEnd',['../classStaggeredGrid.html#a8162b849231354ba73aacb085b5cd665',1,'StaggeredGrid']]], + ['fileno_5f_5',['fileNo_',['../classOutputWriter.html#a69d167e2526407602dce26ca7a2b9248',1,'OutputWriter']]], + ['findabsmax_6',['findAbsMax',['../classFieldVariable.html#a55168fd422c70c8386ba311909427cf7',1,'FieldVariable']]], + ['fjbegin_7',['fJBegin',['../classStaggeredGrid.html#ab92aca90331200d0cc7bc0c0a857b4ef',1,'StaggeredGrid']]], + ['fjend_8',['fJEnd',['../classStaggeredGrid.html#a7ac43ac86231987bc0bf6565589d52e1',1,'StaggeredGrid']]], + ['fluidtracer_9',['FluidTracer',['../classFluidTracer.html',1,'']]], + ['fluidtracermethod_10',['fluidTracerMethod',['../structSettings.html#a70a321e56d7bc445f58a8662430fd68d',1,'Settings']]], + ['forbiddenobstaclefluidcombinations_11',['forbiddenObstacleFluidCombinations',['../classMask.html#abe4f6f251b0517f01d0f58f9042d3af4',1,'Mask']]] +]; diff --git a/documentation/html/search/all_6.js b/documentation/html/search/all_6.js new file mode 100644 index 00000000..387ec73a --- /dev/null +++ b/documentation/html/search/all_6.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['g_0',['g',['../structSettings.html#a1a21237c7f5b7585e5a3545c7d4a4e8c',1,'Settings::g'],['../classStaggeredGrid.html#aaf849bec40f7fa7c68823038f0877341',1,'StaggeredGrid::g(int i, int j)']]], + ['g_5f_1',['g_',['../classStaggeredGrid.html#a5f5c88f603d4e503cba4c44ed43de46a',1,'StaggeredGrid']]], + ['gaussseidel_2',['gaussseidel',['../classGaussSeidel.html',1,'GaussSeidel'],['../classGaussSeidel.html#af31cc1ace2d616ebb8e0592c06865b9c',1,'GaussSeidel::GaussSeidel()']]], + ['getnumberoffluidcells_3',['getNumberOfFluidCells',['../classMask.html#a3471a6026ce7eab118f660557a8abac6',1,'Mask']]], + ['getnumberofparticles_4',['getnumberofparticles',['../classFluidTracer.html#adc687a4988f532e21e13c9aa0591d658',1,'FluidTracer::getNumberOfParticles() const'],['../classFluidTracer.html#a95d6d49d957b2639169c136addf52719',1,'FluidTracer::getNumberOfParticles(int i, int j) const']]], + ['getparticleposition_5',['getParticlePosition',['../classFluidTracer.html#a37ee0325d6af08be6eba8b073162342e',1,'FluidTracer']]], + ['gibegin_6',['gIBegin',['../classStaggeredGrid.html#a061fb6d6948cdc3054171dd60842a8c3',1,'StaggeredGrid']]], + ['giend_7',['gIEnd',['../classStaggeredGrid.html#aebc76693e5dd61db521d6763236bf664',1,'StaggeredGrid']]], + ['gjbegin_8',['gJBegin',['../classStaggeredGrid.html#a18ca3a121787b19c18886b0945aca2e3',1,'StaggeredGrid']]], + ['gjend_9',['gJEnd',['../classStaggeredGrid.html#a7a29456e1bce9efffa27de0b41957b50',1,'StaggeredGrid']]] +]; diff --git a/documentation/html/search/all_7.js b/documentation/html/search/all_7.js new file mode 100644 index 00000000..8d6c2954 --- /dev/null +++ b/documentation/html/search/all_7.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['i_5fbeg_0',['i_beg',['../classPressureSolver.html#af3ac2e53c6f49b9a362415a89595a7f0',1,'PressureSolver']]], + ['i_5fend_1',['i_end',['../classPressureSolver.html#a41b263980e55591d1ffdc4837c252a61',1,'PressureSolver']]], + ['initialize_2',['initialize',['../classComputation.html#a4a344479797b15bd5c9ed2f262657339',1,'Computation']]], + ['interpolateat_3',['interpolateAt',['../classFieldVariable.html#a2949624f1d2d7e29872f743db0b1d83b',1,'FieldVariable']]], + ['isair_4',['isAir',['../classMask.html#a7eb34f789ef96c622ab93718d5278d77',1,'Mask']]], + ['iscontent_5',['isContent',['../structSettings_1_1LineContent.html#aa2af8a274c468eb68c61cd93171748e5',1,'Settings::LineContent']]], + ['isdomainboundary_6',['isDomainBoundary',['../classMask.html#a9f76177c70d7cab7f268c8fd9a102e73',1,'Mask']]], + ['isfluid_7',['isFluid',['../classMask.html#aadacef52f95b796920864b8519d0594b',1,'Mask']]], + ['isfluidboundary_8',['isFluidBoundary',['../classMask.html#a2ffcf2b70edede392422ea692e49d313',1,'Mask']]], + ['isinnerfluid_9',['isInnerFluid',['../classMask.html#a5f3d53087eb5a1d9427716804e280751',1,'Mask']]], + ['isobstacle_10',['isObstacle',['../classMask.html#a53e4e7c0b29234856cbee33386cc5c18',1,'Mask']]], + ['isobstacleboundary_11',['isObstacleBoundary',['../classMask.html#ada8b2531a4a16703f145fd6f708f21ff',1,'Mask']]] +]; diff --git a/documentation/html/search/all_8.js b/documentation/html/search/all_8.js new file mode 100644 index 00000000..92030a3a --- /dev/null +++ b/documentation/html/search/all_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['j_5fbeg_0',['j_beg',['../classPressureSolver.html#aa309af30e5e63e09b77900091e562235',1,'PressureSolver']]], + ['j_5fend_1',['j_end',['../classPressureSolver.html#ac2402794034dd74073700998ee2860bf',1,'PressureSolver']]] +]; diff --git a/documentation/html/search/all_9.js b/documentation/html/search/all_9.js new file mode 100644 index 00000000..e7fbc954 --- /dev/null +++ b/documentation/html/search/all_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['linecontent_0',['LineContent',['../structSettings_1_1LineContent.html',1,'Settings']]], + ['loadfromfile_1',['loadFromFile',['../structSettings.html#a55f95e3b6e7379bef4f8399a2cd670cc',1,'Settings']]] +]; diff --git a/documentation/html/search/all_a.js b/documentation/html/search/all_a.js new file mode 100644 index 00000000..d8c1065e --- /dev/null +++ b/documentation/html/search/all_a.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['makerectangularobstacle_0',['makeRectangularObstacle',['../classMask.html#a75a1750221e41c1b34f80d4d352163ac',1,'Mask']]], + ['mask_1',['mask',['../classMask.html',1,'Mask'],['../classMask.html#a5d65d3a108a79864bc69994f5e56f6c3',1,'Mask::Mask()']]], + ['mask_5f_2',['mask_',['../classBoundary.html#a25d33b12fbdf312cf319713ff88b3d38',1,'Boundary']]], + ['maximumdt_3',['maximumDt',['../structSettings.html#a988b93fdeb6c91932043b3f746b45e86',1,'Settings']]], + ['maximumnumberofiterations_4',['maximumNumberOfIterations',['../structSettings.html#ac118e1c6052e35fb0ee38547a85d84ba',1,'Settings']]], + ['maximumnumberofiterations_5f_5',['maximumNumberOfIterations_',['../classPressureSolver.html#af3b02d29bf1b21ad8b7e6edf8c2f4e87',1,'PressureSolver']]], + ['meshwidth_6',['meshWidth',['../classStaggeredGrid.html#a330856d4efe952771daf0753ef84068e',1,'StaggeredGrid']]], + ['meshwidth_5f_7',['meshWidth_',['../classStaggeredGrid.html#a9603c3334440aab082dda48947e5ce6e',1,'StaggeredGrid']]], + ['moveparticles_8',['moveParticles',['../classFluidTracer.html#aba4d452f26e9276b91256dd251789b90',1,'FluidTracer']]] +]; diff --git a/documentation/html/search/all_b.js b/documentation/html/search/all_b.js new file mode 100644 index 00000000..ad7092d3 --- /dev/null +++ b/documentation/html/search/all_b.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['ncells_0',['ncells',['../structSettings.html#a43a0d2ee903496bfb86693a43a891a69',1,'Settings::nCells'],['../classStaggeredGrid.html#af37816ccb2c46e4a514dedac261897bf',1,'StaggeredGrid::nCells() const']]], + ['ncells_5f_1',['nCells_',['../classStaggeredGrid.html#acacffb5739539d9015c986080bb5ed44',1,'StaggeredGrid']]], + ['noslipvelbottom_2',['NoSlipVelBottom',['../structSettings.html#a13e254a0439df7f7bd24ffe4f919a1a4',1,'Settings']]], + ['noslipvelleft_3',['NoSlipVelLeft',['../structSettings.html#aafaec8c10a728a0f115f3bed43a1c478',1,'Settings']]], + ['noslipvelright_4',['NoSlipVelRight',['../structSettings.html#a2508aa084fe48e78d72b06e67c5a2006',1,'Settings']]], + ['noslipveltop_5',['NoSlipVelTop',['../structSettings.html#a8887591c6c157d7006051aa95896c284',1,'Settings']]] +]; diff --git a/documentation/html/search/all_c.js b/documentation/html/search/all_c.js new file mode 100644 index 00000000..00384044 --- /dev/null +++ b/documentation/html/search/all_c.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['obstacledimension_0',['obstacleDimension',['../structSettings.html#ae23782f18cddfea58cb843e98cb5854f',1,'Settings']]], + ['obstacleposition_1',['obstaclePosition',['../structSettings.html#aff5a1563289e354946a164fd80da5bf6',1,'Settings']]], + ['omega_2',['omega',['../structSettings.html#af5ac13128e8c442ba45eedfab06ba14c',1,'Settings']]], + ['operator_28_29_3',['operator()',['../classMask.html#a6d612f1ac2185304b3ad7432d90dcd2b',1,'Mask::operator()(int i, int j)'],['../classMask.html#a154acb41f2695c2a6ace82b5ebccbb1c',1,'Mask::operator()(int i, int j) const'],['../classArray2D.html#a9d49e5544f4acf51a57dcbb0ed1bb0f8',1,'Array2D::operator()(int i, int j)'],['../classArray2D.html#af745718ec25b815051de2d0c3c94e0d2',1,'Array2D::operator()(int i, int j) const']]], + ['outputwriter_4',['outputwriter',['../classOutputWriter.html',1,'OutputWriter'],['../classOutputWriter.html#a4f3180552b8102c27e087357b9cdd1f7',1,'OutputWriter::OutputWriter()'],['../classOutputWriterText.html#a4f3180552b8102c27e087357b9cdd1f7',1,'OutputWriterText::OutputWriter()']]], + ['outputwriterparaview_5',['outputwriterparaview',['../classOutputWriterParaview.html',1,'OutputWriterParaview'],['../classOutputWriterParaview.html#ab2d30ea87bf48abef82f95976c662cc1',1,'OutputWriterParaview::OutputWriterParaview()']]], + ['outputwritertext_6',['OutputWriterText',['../classOutputWriterText.html',1,'']]] +]; diff --git a/documentation/html/search/all_d.js b/documentation/html/search/all_d.js new file mode 100644 index 00000000..82882ac1 --- /dev/null +++ b/documentation/html/search/all_d.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['p_0',['p',['../classStaggeredGrid.html#aafe6e0bb3509f6aad272b94f74e7ffec',1,'StaggeredGrid::p() const'],['../classStaggeredGrid.html#aa6a5d99d9b4fbd9bd9cfa6ec071918f9',1,'StaggeredGrid::p(int i, int j) const'],['../classStaggeredGrid.html#aa09a4ca67141589bae153797fbc4f3c5',1,'StaggeredGrid::p(int i, int j)']]], + ['p_5f_1',['p_',['../classStaggeredGrid.html#a2ea3c93dd401ac06461ade9a74e76459',1,'StaggeredGrid']]], + ['parametername_2',['parameterName',['../structSettings_1_1LineContent.html#a2fa37c56a8ebe361c95b8332fa0262d3',1,'Settings::LineContent']]], + ['particlepercell_3',['particlePerCell',['../structSettings.html#ab24c3f0faab5278e400792f8b172322a',1,'Settings']]], + ['pathtobitmap_4',['pathToBitmap',['../structSettings.html#a398d6490c8731b9b74115abc34700086',1,'Settings']]], + ['physicalsize_5',['physicalSize',['../structSettings.html#a372a1549c306b12ca7bb0ed84f8a4cef',1,'Settings']]], + ['pibegin_6',['pIBegin',['../classStaggeredGrid.html#a9922c955707f2a31a4a27d1d696f002e',1,'StaggeredGrid']]], + ['piend_7',['pIEnd',['../classStaggeredGrid.html#a34f16fdf87971fe84ffc3c84722bb2c7',1,'StaggeredGrid']]], + ['pjbegin_8',['pJBegin',['../classStaggeredGrid.html#ae4c9ba16c5635dc1ffaa264fbcc3e034',1,'StaggeredGrid']]], + ['pjend_9',['pJEnd',['../classStaggeredGrid.html#ad9928ee522eedb7d7fd48ca0b92f2795',1,'StaggeredGrid']]], + ['pressurebottom_10',['PressureBottom',['../structSettings.html#acae74bcd333251c982ea347b8eb52017',1,'Settings']]], + ['pressureleft_11',['PressureLeft',['../structSettings.html#a55f2fbdeb4d9c25bc679bd1fd42f1da7',1,'Settings']]], + ['pressureright_12',['PressureRight',['../structSettings.html#a8e7d49e95d30c9390fc5039f9326df32',1,'Settings']]], + ['pressuresolver_13',['pressuresolver',['../classPressureSolver.html',1,'PressureSolver'],['../structSettings.html#a888e2fca33db512d4e200b49f1f618f7',1,'Settings::pressureSolver'],['../classPressureSolver.html#a10803d8c3d7f3810fc0ba059acf04058',1,'PressureSolver::PressureSolver()']]], + ['pressuretop_14',['PressureTop',['../structSettings.html#a5c8295a86e29ac27579058f07242e78c',1,'Settings']]], + ['printmask_15',['printMask',['../classMask.html#a372d2a81ff261f126b11fdfcfd2f845e',1,'Mask']]], + ['printsettings_16',['printSettings',['../structSettings.html#a68ce38117dcef2cbdd3bd17f127b3078',1,'Settings']]] +]; diff --git a/documentation/html/search/all_e.js b/documentation/html/search/all_e.js new file mode 100644 index 00000000..033d4072 --- /dev/null +++ b/documentation/html/search/all_e.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['re_0',['re',['../structSettings.html#a8b8330dfa04fe849291d68eacbc8dfec',1,'Settings']]], + ['readsingleline_1',['readSingleLine',['../structSettings.html#a6dbc25f91b99664976cd4a0a8af153c9',1,'Settings']]], + ['resetmask_2',['resetMask',['../classMask.html#ac30997cdd83faef98290733acb325cf8',1,'Mask']]], + ['rhs_3',['rhs',['../classStaggeredGrid.html#a3f36422a02b9b18d1577d61e406f08cf',1,'StaggeredGrid::rhs() const'],['../classStaggeredGrid.html#a761ea51f1e8fd1290b3adfe09942b0d3',1,'StaggeredGrid::rhs(int i, int j)']]], + ['rhs_5f_4',['rhs_',['../classStaggeredGrid.html#a496206955162452a0629a7742fe92a84',1,'StaggeredGrid']]], + ['rhsibegin_5',['rhsIBegin',['../classStaggeredGrid.html#ad5c16b00d9dbf0f115e1ded81203edce',1,'StaggeredGrid']]], + ['rhsiend_6',['rhsIEnd',['../classStaggeredGrid.html#ae11e8842fdd508b914dc8f24b09b36a9',1,'StaggeredGrid']]], + ['rhsjbegin_7',['rhsJBegin',['../classStaggeredGrid.html#a28c36939e3d3cc8df76e7aa91f0e0804',1,'StaggeredGrid']]], + ['rhsjend_8',['rhsJEnd',['../classStaggeredGrid.html#a953ec890a986473bffe87ea26dfcd782',1,'StaggeredGrid']]], + ['runsimulation_9',['runSimulation',['../classComputation.html#ad20ce6e82ec9a918e6ac03840bc688d5',1,'Computation']]] +]; diff --git a/documentation/html/search/all_f.js b/documentation/html/search/all_f.js new file mode 100644 index 00000000..f8e80e3a --- /dev/null +++ b/documentation/html/search/all_f.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['setboundaryvalues_0',['setBoundaryValues',['../classPressureSolver.html#a458c383fcacaf54c1a333a271049ca93',1,'PressureSolver']]], + ['setdomainbc_1',['setDomainBC',['../classMask.html#aacf4d2cfe1362df85ed08fd3b0fc6d6b',1,'Mask']]], + ['setfluidbc_2',['setFluidBC',['../classMask.html#a41bf0aa100e2554eaea3ab29a999c0ee',1,'Mask']]], + ['setobstaclebc_3',['setObstacleBC',['../classMask.html#a644a84aca88442b72b5cd87ee80f1724',1,'Mask']]], + ['setparameter_4',['setParameter',['../structSettings.html#a588f30eb8d791c03ec811360386bff0d',1,'Settings']]], + ['setpressureboundaryvalues_5',['setPressureBoundaryValues',['../classBoundary.html#a77c90b2a43220ce9796d098158e4376d',1,'Boundary']]], + ['setpressuresurfacebc_6',['setPressureSurfaceBC',['../classBoundary.html#ac603742c37221bd82cbb545b6cdbe6cb',1,'Boundary']]], + ['settings_7',['Settings',['../structSettings.html',1,'']]], + ['settings_5f_8',['settings_',['../classMask.html#acb8b165d56689722fd836569e066fdd4',1,'Mask']]], + ['setvelocityboundaryvalues_9',['setvelocityboundaryvalues',['../classBoundary.html#ab7e15ee44237de051ff8347f2f9c770b',1,'Boundary::setVelocityBoundaryValues()'],['../classBoundary.html#a81d6f13c90f37e63fc0cad27a6999915',1,'Boundary::setVelocityBoundaryValues(double dt)']]], + ['size_10',['size',['../classMask.html#aafa0857af35b02ba6070e76f82d51c7b',1,'Mask::size()'],['../classArray2D.html#accf87be860645d6c50d6ba6fa39ec6f9',1,'Array2D::size()']]], + ['size_5f_11',['size_',['../classMask.html#a84bff46271e16eb8639c1831403c1bb9',1,'Mask::size_'],['../classArray2D.html#a75bc7a1ff6f218c38f6ab94ec34e9472',1,'Array2D::size_']]], + ['solve_12',['solve',['../classGaussSeidel.html#a6f0eb0c6938a64f8ded186f88170a04b',1,'GaussSeidel::solve()'],['../classPressureSolver.html#a504ac61a1317650e0eb70d6a93212ca0',1,'PressureSolver::solve()'],['../classSOR.html#a860992d85d8aacf114a3a02b5831f728',1,'SOR::solve() override']]], + ['sor_13',['sor',['../classSOR.html#a357cfea8935f4b2dfee06f2d8e1461a8',1,'SOR::SOR()'],['../classSOR.html',1,'SOR']]], + ['staggeredgrid_14',['staggeredgrid',['../classStaggeredGrid.html',1,'StaggeredGrid'],['../classStaggeredGrid.html#aec0990b64c559b1690f21b48fb2d13b1',1,'StaggeredGrid::StaggeredGrid()']]] +]; diff --git a/documentation/html/search/classes_0.js b/documentation/html/search/classes_0.js new file mode 100644 index 00000000..a18a1a26 --- /dev/null +++ b/documentation/html/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['array2d_0',['Array2D',['../classArray2D.html',1,'']]] +]; diff --git a/documentation/html/search/classes_1.js b/documentation/html/search/classes_1.js new file mode 100644 index 00000000..e067cded --- /dev/null +++ b/documentation/html/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['boundary_0',['Boundary',['../classBoundary.html',1,'']]] +]; diff --git a/documentation/html/search/classes_2.js b/documentation/html/search/classes_2.js new file mode 100644 index 00000000..665d9deb --- /dev/null +++ b/documentation/html/search/classes_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['centraldifferences_0',['CentralDifferences',['../classCentralDifferences.html',1,'']]], + ['computation_1',['Computation',['../classComputation.html',1,'']]] +]; diff --git a/documentation/html/search/classes_3.js b/documentation/html/search/classes_3.js new file mode 100644 index 00000000..6c1d2569 --- /dev/null +++ b/documentation/html/search/classes_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['discretization_0',['Discretization',['../classDiscretization.html',1,'']]], + ['donorcell_1',['DonorCell',['../classDonorCell.html',1,'']]] +]; diff --git a/documentation/html/search/classes_4.js b/documentation/html/search/classes_4.js new file mode 100644 index 00000000..f09b5865 --- /dev/null +++ b/documentation/html/search/classes_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['fieldvariable_0',['FieldVariable',['../classFieldVariable.html',1,'']]], + ['fluidtracer_1',['FluidTracer',['../classFluidTracer.html',1,'']]] +]; diff --git a/documentation/html/search/classes_5.js b/documentation/html/search/classes_5.js new file mode 100644 index 00000000..461456be --- /dev/null +++ b/documentation/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['gaussseidel_0',['GaussSeidel',['../classGaussSeidel.html',1,'']]] +]; diff --git a/documentation/html/search/classes_6.js b/documentation/html/search/classes_6.js new file mode 100644 index 00000000..a14c2b1e --- /dev/null +++ b/documentation/html/search/classes_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['linecontent_0',['LineContent',['../structSettings_1_1LineContent.html',1,'Settings']]] +]; diff --git a/documentation/html/search/classes_7.js b/documentation/html/search/classes_7.js new file mode 100644 index 00000000..e15d664e --- /dev/null +++ b/documentation/html/search/classes_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mask_0',['Mask',['../classMask.html',1,'']]] +]; diff --git a/documentation/html/search/classes_8.js b/documentation/html/search/classes_8.js new file mode 100644 index 00000000..780dc018 --- /dev/null +++ b/documentation/html/search/classes_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['outputwriter_0',['OutputWriter',['../classOutputWriter.html',1,'']]], + ['outputwriterparaview_1',['OutputWriterParaview',['../classOutputWriterParaview.html',1,'']]], + ['outputwritertext_2',['OutputWriterText',['../classOutputWriterText.html',1,'']]] +]; diff --git a/documentation/html/search/classes_9.js b/documentation/html/search/classes_9.js new file mode 100644 index 00000000..b1ff3b09 --- /dev/null +++ b/documentation/html/search/classes_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['pressuresolver_0',['PressureSolver',['../classPressureSolver.html',1,'']]] +]; diff --git a/documentation/html/search/classes_a.js b/documentation/html/search/classes_a.js new file mode 100644 index 00000000..5f84540d --- /dev/null +++ b/documentation/html/search/classes_a.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['settings_0',['Settings',['../structSettings.html',1,'']]], + ['sor_1',['SOR',['../classSOR.html',1,'']]], + ['staggeredgrid_2',['StaggeredGrid',['../classStaggeredGrid.html',1,'']]] +]; diff --git a/documentation/html/search/close.svg b/documentation/html/search/close.svg new file mode 100644 index 00000000..337d6cc1 --- /dev/null +++ b/documentation/html/search/close.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/documentation/html/search/enums_0.js b/documentation/html/search/enums_0.js new file mode 100644 index 00000000..99fea8e0 --- /dev/null +++ b/documentation/html/search/enums_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['celltype_0',['CellType',['../classMask.html#ad74a26afe88ebadafebd733837f3252a',1,'Mask']]] +]; diff --git a/documentation/html/search/functions_0.js b/documentation/html/search/functions_0.js new file mode 100644 index 00000000..b31bc990 --- /dev/null +++ b/documentation/html/search/functions_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['array2d_0',['Array2D',['../classArray2D.html#a16521417dfdf67ec694bfb7747df9000',1,'Array2D']]] +]; diff --git a/documentation/html/search/functions_1.js b/documentation/html/search/functions_1.js new file mode 100644 index 00000000..d52fdafb --- /dev/null +++ b/documentation/html/search/functions_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['boundary_0',['Boundary',['../classBoundary.html#a4c78a28ad0839810f15229382f642cf1',1,'Boundary']]] +]; diff --git a/documentation/html/search/functions_10.js b/documentation/html/search/functions_10.js new file mode 100644 index 00000000..9578483c --- /dev/null +++ b/documentation/html/search/functions_10.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['writefile_0',['writefile',['../classOutputWriter.html#ac625c204affdc05919388a3549c2e945',1,'OutputWriter::writeFile()'],['../classOutputWriterParaview.html#a9e203b63d0e2f26ad53d18ee1821c6bb',1,'OutputWriterParaview::writeFile()'],['../classOutputWriterText.html#a25a12ea2524fc34e9acb19ef1f4c7431',1,'OutputWriterText::writeFile(double currentTime)']]], + ['writepressurefile_1',['writePressureFile',['../classOutputWriterText.html#a3480b58a23fd158f16d0ef9c1b67cbfd',1,'OutputWriterText']]] +]; diff --git a/documentation/html/search/functions_2.js b/documentation/html/search/functions_2.js new file mode 100644 index 00000000..e0705e13 --- /dev/null +++ b/documentation/html/search/functions_2.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['calculateresiduum_0',['calculateResiduum',['../classPressureSolver.html#afc51f4315c483988aeec327a16c5bb90',1,'PressureSolver']]], + ['centraldifferences_1',['CentralDifferences',['../classCentralDifferences.html#ab055731e615298f745364c54f86fc191',1,'CentralDifferences']]], + ['computed2udx2_2',['computeD2uDx2',['../classDiscretization.html#a6986501b0b5c96699ff3ac843c1a6ca2',1,'Discretization']]], + ['computed2udy2_3',['computeD2uDy2',['../classDiscretization.html#a446aabc55a9fb4b5cb2f476babc532f9',1,'Discretization']]], + ['computed2vdx2_4',['computeD2vDx2',['../classDiscretization.html#a5119047788a34eadf37480e913bdc8ea',1,'Discretization']]], + ['computed2vdy2_5',['computeD2vDy2',['../classDiscretization.html#a56678582a049b1b141621e41afff1438',1,'Discretization']]], + ['computedpdx_6',['computeDpDx',['../classDiscretization.html#aed3ad75ad6e647d14f118a12652c01b2',1,'Discretization']]], + ['computedpdy_7',['computeDpDy',['../classDiscretization.html#a859f4dc33f0ea91f5e6537be09ce4999',1,'Discretization']]], + ['computedu2dx_8',['computedu2dx',['../classCentralDifferences.html#adb4502f473cc047a433db596146672e4',1,'CentralDifferences::computeDu2Dx()'],['../classDiscretization.html#acca6bf193e0e91f645d292527299254b',1,'Discretization::computeDu2Dx()'],['../classDonorCell.html#a265bdaf46ed8ba46a42ef0cb03807175',1,'DonorCell::computeDu2Dx()']]], + ['computeduvdx_9',['computeduvdx',['../classCentralDifferences.html#a9bd7ac3bfd709991525ec57de10ed2e1',1,'CentralDifferences::computeDuvDx()'],['../classDonorCell.html#ae41b5f85743ca7f148bd829561bd9cb5',1,'DonorCell::computeDuvDx()'],['../classDiscretization.html#ab1c2aa237e13e7c4c9edd429de656795',1,'Discretization::computeDuvDx()']]], + ['computeduvdy_10',['computeduvdy',['../classCentralDifferences.html#a4184367de8d48e678edfb078a19fc0a4',1,'CentralDifferences::computeDuvDy()'],['../classDiscretization.html#a0bab86aef10a72e01b4f8102a3c91f84',1,'Discretization::computeDuvDy()'],['../classDonorCell.html#a285562312f08efde26afd160174d2843',1,'DonorCell::computeDuvDy()']]], + ['computedv2dy_11',['computedv2dy',['../classCentralDifferences.html#a66eb9b800b9a9ac6f81fc719a42eb0ee',1,'CentralDifferences::computeDv2Dy()'],['../classDiscretization.html#a69ba136ab7f8c09d805afca159cab428',1,'Discretization::computeDv2Dy()'],['../classDonorCell.html#a01dcfb7fcf356d5ee412107a30c26fb3',1,'DonorCell::computeDv2Dy()']]], + ['createmaskfrompngbitmap_12',['createMaskFromPNGBitMap',['../classMask.html#ad69aefd91f740d6758cdedf0df8c8ca6',1,'Mask']]], + ['createparticles_13',['createParticles',['../classFluidTracer.html#ace163e1fe040acbd4c3122f082b08eea',1,'FluidTracer']]] +]; diff --git a/documentation/html/search/functions_3.js b/documentation/html/search/functions_3.js new file mode 100644 index 00000000..814af1c3 --- /dev/null +++ b/documentation/html/search/functions_3.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['discretization_0',['Discretization',['../classDiscretization.html#a4fb8cc9823938e7c2dec329b906a462c',1,'Discretization']]], + ['docalculatef_1',['doCalculateF',['../classBoundary.html#ac76b887d65491d38c093ca50333697a9',1,'Boundary']]], + ['docalculateg_2',['doCalculateG',['../classBoundary.html#aacf325c02e71925b7847d7189282b5c1',1,'Boundary']]], + ['donorcell_3',['DonorCell',['../classDonorCell.html#a4896ad035a5ac50c85e2b66d442a5312',1,'DonorCell']]], + ['dx_4',['dx',['../classStaggeredGrid.html#aec8490affea703cdd73b1febaed68968',1,'StaggeredGrid']]], + ['dy_5',['dy',['../classStaggeredGrid.html#abde2da10e0c130fb0f206de64c9b4956',1,'StaggeredGrid']]] +]; diff --git a/documentation/html/search/functions_4.js b/documentation/html/search/functions_4.js new file mode 100644 index 00000000..b8771a06 --- /dev/null +++ b/documentation/html/search/functions_4.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['f_0',['f',['../classStaggeredGrid.html#adb05c59512dc8993367e4beddba05785',1,'StaggeredGrid']]], + ['fibegin_1',['fIBegin',['../classStaggeredGrid.html#a5cc368f9ede58a3cb689705df998f750',1,'StaggeredGrid']]], + ['fieldvariable_2',['FieldVariable',['../classFieldVariable.html#aa0985778bc6331b74904a03c3ef67a98',1,'FieldVariable']]], + ['fiend_3',['fIEnd',['../classStaggeredGrid.html#a8162b849231354ba73aacb085b5cd665',1,'StaggeredGrid']]], + ['findabsmax_4',['findAbsMax',['../classFieldVariable.html#a55168fd422c70c8386ba311909427cf7',1,'FieldVariable']]], + ['fjbegin_5',['fJBegin',['../classStaggeredGrid.html#ab92aca90331200d0cc7bc0c0a857b4ef',1,'StaggeredGrid']]], + ['fjend_6',['fJEnd',['../classStaggeredGrid.html#a7ac43ac86231987bc0bf6565589d52e1',1,'StaggeredGrid']]] +]; diff --git a/documentation/html/search/functions_5.js b/documentation/html/search/functions_5.js new file mode 100644 index 00000000..bb58e9aa --- /dev/null +++ b/documentation/html/search/functions_5.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['g_0',['g',['../classStaggeredGrid.html#aaf849bec40f7fa7c68823038f0877341',1,'StaggeredGrid']]], + ['gaussseidel_1',['GaussSeidel',['../classGaussSeidel.html#af31cc1ace2d616ebb8e0592c06865b9c',1,'GaussSeidel']]], + ['getnumberoffluidcells_2',['getNumberOfFluidCells',['../classMask.html#a3471a6026ce7eab118f660557a8abac6',1,'Mask']]], + ['getnumberofparticles_3',['getnumberofparticles',['../classFluidTracer.html#adc687a4988f532e21e13c9aa0591d658',1,'FluidTracer::getNumberOfParticles() const'],['../classFluidTracer.html#a95d6d49d957b2639169c136addf52719',1,'FluidTracer::getNumberOfParticles(int i, int j) const']]], + ['getparticleposition_4',['getParticlePosition',['../classFluidTracer.html#a37ee0325d6af08be6eba8b073162342e',1,'FluidTracer']]], + ['gibegin_5',['gIBegin',['../classStaggeredGrid.html#a061fb6d6948cdc3054171dd60842a8c3',1,'StaggeredGrid']]], + ['giend_6',['gIEnd',['../classStaggeredGrid.html#aebc76693e5dd61db521d6763236bf664',1,'StaggeredGrid']]], + ['gjbegin_7',['gJBegin',['../classStaggeredGrid.html#a18ca3a121787b19c18886b0945aca2e3',1,'StaggeredGrid']]], + ['gjend_8',['gJEnd',['../classStaggeredGrid.html#a7a29456e1bce9efffa27de0b41957b50',1,'StaggeredGrid']]] +]; diff --git a/documentation/html/search/functions_6.js b/documentation/html/search/functions_6.js new file mode 100644 index 00000000..d59f28e0 --- /dev/null +++ b/documentation/html/search/functions_6.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['initialize_0',['initialize',['../classComputation.html#a4a344479797b15bd5c9ed2f262657339',1,'Computation']]], + ['interpolateat_1',['interpolateAt',['../classFieldVariable.html#a2949624f1d2d7e29872f743db0b1d83b',1,'FieldVariable']]], + ['isair_2',['isAir',['../classMask.html#a7eb34f789ef96c622ab93718d5278d77',1,'Mask']]], + ['isdomainboundary_3',['isDomainBoundary',['../classMask.html#a9f76177c70d7cab7f268c8fd9a102e73',1,'Mask']]], + ['isfluid_4',['isFluid',['../classMask.html#aadacef52f95b796920864b8519d0594b',1,'Mask']]], + ['isfluidboundary_5',['isFluidBoundary',['../classMask.html#a2ffcf2b70edede392422ea692e49d313',1,'Mask']]], + ['isinnerfluid_6',['isInnerFluid',['../classMask.html#a5f3d53087eb5a1d9427716804e280751',1,'Mask']]], + ['isobstacle_7',['isObstacle',['../classMask.html#a53e4e7c0b29234856cbee33386cc5c18',1,'Mask']]], + ['isobstacleboundary_8',['isObstacleBoundary',['../classMask.html#ada8b2531a4a16703f145fd6f708f21ff',1,'Mask']]] +]; diff --git a/documentation/html/search/functions_7.js b/documentation/html/search/functions_7.js new file mode 100644 index 00000000..73effe35 --- /dev/null +++ b/documentation/html/search/functions_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['loadfromfile_0',['loadFromFile',['../structSettings.html#a55f95e3b6e7379bef4f8399a2cd670cc',1,'Settings']]] +]; diff --git a/documentation/html/search/functions_8.js b/documentation/html/search/functions_8.js new file mode 100644 index 00000000..149fcee2 --- /dev/null +++ b/documentation/html/search/functions_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['makerectangularobstacle_0',['makeRectangularObstacle',['../classMask.html#a75a1750221e41c1b34f80d4d352163ac',1,'Mask']]], + ['mask_1',['Mask',['../classMask.html#a5d65d3a108a79864bc69994f5e56f6c3',1,'Mask']]], + ['meshwidth_2',['meshWidth',['../classStaggeredGrid.html#a330856d4efe952771daf0753ef84068e',1,'StaggeredGrid']]], + ['moveparticles_3',['moveParticles',['../classFluidTracer.html#aba4d452f26e9276b91256dd251789b90',1,'FluidTracer']]] +]; diff --git a/documentation/html/search/functions_9.js b/documentation/html/search/functions_9.js new file mode 100644 index 00000000..92b377ad --- /dev/null +++ b/documentation/html/search/functions_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ncells_0',['nCells',['../classStaggeredGrid.html#af37816ccb2c46e4a514dedac261897bf',1,'StaggeredGrid']]] +]; diff --git a/documentation/html/search/functions_a.js b/documentation/html/search/functions_a.js new file mode 100644 index 00000000..4877aff7 --- /dev/null +++ b/documentation/html/search/functions_a.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['operator_28_29_0',['operator()',['../classMask.html#a6d612f1ac2185304b3ad7432d90dcd2b',1,'Mask::operator()(int i, int j)'],['../classMask.html#a154acb41f2695c2a6ace82b5ebccbb1c',1,'Mask::operator()(int i, int j) const'],['../classArray2D.html#a9d49e5544f4acf51a57dcbb0ed1bb0f8',1,'Array2D::operator()(int i, int j)'],['../classArray2D.html#af745718ec25b815051de2d0c3c94e0d2',1,'Array2D::operator()(int i, int j) const']]], + ['outputwriter_1',['outputwriter',['../classOutputWriter.html#a4f3180552b8102c27e087357b9cdd1f7',1,'OutputWriter::OutputWriter()'],['../classOutputWriterText.html#a4f3180552b8102c27e087357b9cdd1f7',1,'OutputWriterText::OutputWriter()']]], + ['outputwriterparaview_2',['OutputWriterParaview',['../classOutputWriterParaview.html#ab2d30ea87bf48abef82f95976c662cc1',1,'OutputWriterParaview']]] +]; diff --git a/documentation/html/search/functions_b.js b/documentation/html/search/functions_b.js new file mode 100644 index 00000000..679c46de --- /dev/null +++ b/documentation/html/search/functions_b.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['p_0',['p',['../classStaggeredGrid.html#aafe6e0bb3509f6aad272b94f74e7ffec',1,'StaggeredGrid::p() const'],['../classStaggeredGrid.html#aa6a5d99d9b4fbd9bd9cfa6ec071918f9',1,'StaggeredGrid::p(int i, int j) const'],['../classStaggeredGrid.html#aa09a4ca67141589bae153797fbc4f3c5',1,'StaggeredGrid::p(int i, int j)']]], + ['pibegin_1',['pIBegin',['../classStaggeredGrid.html#a9922c955707f2a31a4a27d1d696f002e',1,'StaggeredGrid']]], + ['piend_2',['pIEnd',['../classStaggeredGrid.html#a34f16fdf87971fe84ffc3c84722bb2c7',1,'StaggeredGrid']]], + ['pjbegin_3',['pJBegin',['../classStaggeredGrid.html#ae4c9ba16c5635dc1ffaa264fbcc3e034',1,'StaggeredGrid']]], + ['pjend_4',['pJEnd',['../classStaggeredGrid.html#ad9928ee522eedb7d7fd48ca0b92f2795',1,'StaggeredGrid']]], + ['pressuresolver_5',['PressureSolver',['../classPressureSolver.html#a10803d8c3d7f3810fc0ba059acf04058',1,'PressureSolver']]], + ['printmask_6',['printMask',['../classMask.html#a372d2a81ff261f126b11fdfcfd2f845e',1,'Mask']]], + ['printsettings_7',['printSettings',['../structSettings.html#a68ce38117dcef2cbdd3bd17f127b3078',1,'Settings']]] +]; diff --git a/documentation/html/search/functions_c.js b/documentation/html/search/functions_c.js new file mode 100644 index 00000000..4e64c4dc --- /dev/null +++ b/documentation/html/search/functions_c.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['readsingleline_0',['readSingleLine',['../structSettings.html#a6dbc25f91b99664976cd4a0a8af153c9',1,'Settings']]], + ['resetmask_1',['resetMask',['../classMask.html#ac30997cdd83faef98290733acb325cf8',1,'Mask']]], + ['rhs_2',['rhs',['../classStaggeredGrid.html#a3f36422a02b9b18d1577d61e406f08cf',1,'StaggeredGrid::rhs() const'],['../classStaggeredGrid.html#a761ea51f1e8fd1290b3adfe09942b0d3',1,'StaggeredGrid::rhs(int i, int j)']]], + ['rhsibegin_3',['rhsIBegin',['../classStaggeredGrid.html#ad5c16b00d9dbf0f115e1ded81203edce',1,'StaggeredGrid']]], + ['rhsiend_4',['rhsIEnd',['../classStaggeredGrid.html#ae11e8842fdd508b914dc8f24b09b36a9',1,'StaggeredGrid']]], + ['rhsjbegin_5',['rhsJBegin',['../classStaggeredGrid.html#a28c36939e3d3cc8df76e7aa91f0e0804',1,'StaggeredGrid']]], + ['rhsjend_6',['rhsJEnd',['../classStaggeredGrid.html#a953ec890a986473bffe87ea26dfcd782',1,'StaggeredGrid']]], + ['runsimulation_7',['runSimulation',['../classComputation.html#ad20ce6e82ec9a918e6ac03840bc688d5',1,'Computation']]] +]; diff --git a/documentation/html/search/functions_d.js b/documentation/html/search/functions_d.js new file mode 100644 index 00000000..5c8c5ae1 --- /dev/null +++ b/documentation/html/search/functions_d.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['setboundaryvalues_0',['setBoundaryValues',['../classPressureSolver.html#a458c383fcacaf54c1a333a271049ca93',1,'PressureSolver']]], + ['setdomainbc_1',['setDomainBC',['../classMask.html#aacf4d2cfe1362df85ed08fd3b0fc6d6b',1,'Mask']]], + ['setfluidbc_2',['setFluidBC',['../classMask.html#a41bf0aa100e2554eaea3ab29a999c0ee',1,'Mask']]], + ['setobstaclebc_3',['setObstacleBC',['../classMask.html#a644a84aca88442b72b5cd87ee80f1724',1,'Mask']]], + ['setparameter_4',['setParameter',['../structSettings.html#a588f30eb8d791c03ec811360386bff0d',1,'Settings']]], + ['setpressureboundaryvalues_5',['setPressureBoundaryValues',['../classBoundary.html#a77c90b2a43220ce9796d098158e4376d',1,'Boundary']]], + ['setpressuresurfacebc_6',['setPressureSurfaceBC',['../classBoundary.html#ac603742c37221bd82cbb545b6cdbe6cb',1,'Boundary']]], + ['setvelocityboundaryvalues_7',['setvelocityboundaryvalues',['../classBoundary.html#ab7e15ee44237de051ff8347f2f9c770b',1,'Boundary::setVelocityBoundaryValues()'],['../classBoundary.html#a81d6f13c90f37e63fc0cad27a6999915',1,'Boundary::setVelocityBoundaryValues(double dt)']]], + ['size_8',['size',['../classMask.html#aafa0857af35b02ba6070e76f82d51c7b',1,'Mask::size()'],['../classArray2D.html#accf87be860645d6c50d6ba6fa39ec6f9',1,'Array2D::size()']]], + ['solve_9',['solve',['../classGaussSeidel.html#a6f0eb0c6938a64f8ded186f88170a04b',1,'GaussSeidel::solve()'],['../classPressureSolver.html#a504ac61a1317650e0eb70d6a93212ca0',1,'PressureSolver::solve()'],['../classSOR.html#a860992d85d8aacf114a3a02b5831f728',1,'SOR::solve() override']]], + ['sor_10',['SOR',['../classSOR.html#a357cfea8935f4b2dfee06f2d8e1461a8',1,'SOR']]], + ['staggeredgrid_11',['StaggeredGrid',['../classStaggeredGrid.html#aec0990b64c559b1690f21b48fb2d13b1',1,'StaggeredGrid']]] +]; diff --git a/documentation/html/search/functions_e.js b/documentation/html/search/functions_e.js new file mode 100644 index 00000000..2bcca744 --- /dev/null +++ b/documentation/html/search/functions_e.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['u_0',['u',['../classStaggeredGrid.html#a87cee12621c641ab143a8b1a61b2ef7e',1,'StaggeredGrid::u() const'],['../classStaggeredGrid.html#a0324ce4d1fe2343d8aa9514e460cc556',1,'StaggeredGrid::u(int i, int j) const'],['../classStaggeredGrid.html#a0ed62d6752b6b2b3ead5f654b515cd12',1,'StaggeredGrid::u(int i, int j)']]], + ['uibegin_1',['uIBegin',['../classStaggeredGrid.html#a31e2d3a0b6e03685380810a7c2f323e1',1,'StaggeredGrid']]], + ['uiend_2',['uIEnd',['../classStaggeredGrid.html#a641e473d72e1d02ba3de1c16e9d0d332',1,'StaggeredGrid']]], + ['ujbegin_3',['uJBegin',['../classStaggeredGrid.html#a9b0e97704e1871441a8e713ecaa2cff5',1,'StaggeredGrid']]], + ['ujend_4',['uJEnd',['../classStaggeredGrid.html#a3393aa91b17054d2d700de308ae25632',1,'StaggeredGrid']]], + ['updateboundary_5',['updateBoundary',['../classBoundary.html#a9910a68c5dec5845ef4cdde98e680155',1,'Boundary']]] +]; diff --git a/documentation/html/search/functions_f.js b/documentation/html/search/functions_f.js new file mode 100644 index 00000000..8b908be9 --- /dev/null +++ b/documentation/html/search/functions_f.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['v_0',['v',['../classStaggeredGrid.html#a26e478abba632554652c9e05a279d1ca',1,'StaggeredGrid::v() const'],['../classStaggeredGrid.html#ac052d8803ff950aee04b86ac026c516b',1,'StaggeredGrid::v(int i, int j) const'],['../classStaggeredGrid.html#a7746f703f32c2f20a4c77246eebac697',1,'StaggeredGrid::v(int i, int j)']]], + ['vibegin_1',['vIBegin',['../classStaggeredGrid.html#ace7bf8cb1d279131739d5d12de302d09',1,'StaggeredGrid']]], + ['viend_2',['vIEnd',['../classStaggeredGrid.html#aa5a44aa088b5a7923fa952af1ecb5778',1,'StaggeredGrid']]], + ['vjbegin_3',['vJBegin',['../classStaggeredGrid.html#a7f8468d672411c0e3a5eeb67788fc826',1,'StaggeredGrid']]], + ['vjend_4',['vJEnd',['../classStaggeredGrid.html#ab67e8d9d8d76d34fb02d4d644f0b3795',1,'StaggeredGrid']]] +]; diff --git a/documentation/html/search/mag.svg b/documentation/html/search/mag.svg new file mode 100644 index 00000000..ffb6cf0d --- /dev/null +++ b/documentation/html/search/mag.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/documentation/html/search/mag_d.svg b/documentation/html/search/mag_d.svg new file mode 100644 index 00000000..4122773f --- /dev/null +++ b/documentation/html/search/mag_d.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/documentation/html/search/mag_sel.svg b/documentation/html/search/mag_sel.svg new file mode 100644 index 00000000..553dba87 --- /dev/null +++ b/documentation/html/search/mag_sel.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/documentation/html/search/mag_seld.svg b/documentation/html/search/mag_seld.svg new file mode 100644 index 00000000..c906f84c --- /dev/null +++ b/documentation/html/search/mag_seld.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/documentation/html/search/search.css b/documentation/html/search/search.css new file mode 100644 index 00000000..19f76f9d --- /dev/null +++ b/documentation/html/search/search.css @@ -0,0 +1,291 @@ +/*---------------- Search Box positioning */ + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search box styling */ + +.SRPage * { + font-weight: normal; + line-height: normal; +} + +dark-mode-toggle { + margin-left: 5px; + display: flex; + float: right; +} + +#MSearchBox { + display: inline-block; + white-space : nowrap; + background: var(--search-background-color); + border-radius: 0.65em; + box-shadow: var(--search-box-shadow); + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + width: 20px; + height: 19px; + background-image: var(--search-magnification-select-image); + margin: 0 0 0 0.3em; + padding: 0; +} + +#MSearchSelectExt { + display: inline-block; + vertical-align: middle; + width: 10px; + height: 19px; + background-image: var(--search-magnification-image); + margin: 0 0 0 0.5em; + padding: 0; +} + + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 19px; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: var(--search-foreground-color); + outline: none; + font-family: var(--font-family-search); + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + +@media(hover: none) { + /* to avoid zooming on iOS */ + #MSearchField { + font-size: 16px; + } +} + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: var(--search-active-color); +} + + + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-filter-border-color); + background-color: var(--search-filter-background-color); + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt var(--font-family-search); + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: var(--font-family-monospace); + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: var(--search-filter-foreground-color); + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: var(--search-filter-foreground-color); + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: var(--search-filter-highlight-text-color); + background-color: var(--search-filter-highlight-bg-color); + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + /*width: 60ex;*/ + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-results-border-color); + background-color: var(--search-results-background-color); + z-index:10000; + width: 300px; + height: 400px; + overflow: auto; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +div.SRPage { + margin: 5px 2px; + background-color: var(--search-results-background-color); +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + font-size: 8pt; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: var(--font-family-search); +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: var(--font-family-search); +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: var(--nav-gradient-active-image-parent); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/documentation/html/search/search.js b/documentation/html/search/search.js new file mode 100644 index 00000000..666af01e --- /dev/null +++ b/documentation/html/search/search.js @@ -0,0 +1,694 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +const SEARCH_COOKIE_NAME = ''+'search_grp'; + +const searchResults = new SearchResults(); + +/* A class handling everything associated with the search panel. + + Parameters: + name - The name of the global variable that will be + storing this instance. Is needed to be able to set timeouts. + resultPath - path to use for external files +*/ +function SearchBox(name, resultsPath, extension) { + if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } + if (!extension || extension == "") { extension = ".html"; } + + function getXPos(item) { + let x = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + x += item.offsetLeft; + item = item.offsetParent; + } + } + return x; + } + + function getYPos(item) { + let y = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + y += item.offsetTop; + item = item.offsetParent; + } + } + return y; + } + + // ---------- Instance variables + this.name = name; + this.resultsPath = resultsPath; + this.keyTimeout = 0; + this.keyTimeoutLength = 500; + this.closeSelectionTimeout = 300; + this.lastSearchValue = ""; + this.lastResultsPage = ""; + this.hideTimeout = 0; + this.searchIndex = 0; + this.searchActive = false; + this.extension = extension; + + // ----------- DOM Elements + + this.DOMSearchField = () => document.getElementById("MSearchField"); + this.DOMSearchSelect = () => document.getElementById("MSearchSelect"); + this.DOMSearchSelectWindow = () => document.getElementById("MSearchSelectWindow"); + this.DOMPopupSearchResults = () => document.getElementById("MSearchResults"); + this.DOMPopupSearchResultsWindow = () => document.getElementById("MSearchResultsWindow"); + this.DOMSearchClose = () => document.getElementById("MSearchClose"); + this.DOMSearchBox = () => document.getElementById("MSearchBox"); + + // ------------ Event Handlers + + // Called when focus is added or removed from the search field. + this.OnSearchFieldFocus = function(isActive) { + this.Activate(isActive); + } + + this.OnSearchSelectShow = function() { + const searchSelectWindow = this.DOMSearchSelectWindow(); + const searchField = this.DOMSearchSelect(); + + const left = getXPos(searchField); + const top = getYPos(searchField) + searchField.offsetHeight; + + // show search selection popup + searchSelectWindow.style.display='block'; + searchSelectWindow.style.left = left + 'px'; + searchSelectWindow.style.top = top + 'px'; + + // stop selection hide timer + if (this.hideTimeout) { + clearTimeout(this.hideTimeout); + this.hideTimeout=0; + } + return false; // to avoid "image drag" default event + } + + this.OnSearchSelectHide = function() { + this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this), + this.closeSelectionTimeout); + } + + // Called when the content of the search field is changed. + this.OnSearchFieldChange = function(evt) { + if (this.keyTimeout) { // kill running timer + clearTimeout(this.keyTimeout); + this.keyTimeout = 0; + } + + const e = evt ? evt : window.event; // for IE + if (e.keyCode==40 || e.keyCode==13) { + if (e.shiftKey==1) { + this.OnSearchSelectShow(); + const win=this.DOMSearchSelectWindow(); + for (let i=0;i do a search + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) { // Up + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } else if (e.keyCode==13 || e.keyCode==27) { + e.stopPropagation(); + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() { + this.keyTimeout = 0; + + // strip leading whitespace + const searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + const code = searchValue.toLowerCase().charCodeAt(0); + let idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) { // surrogate pair + idxChar = searchValue.substr(0, 2); + } + + let jsFile; + let idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) { + const hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + } + + const loadJS = function(url, impl, loc) { + const scriptTag = document.createElement('script'); + scriptTag.src = url; + scriptTag.onload = impl; + scriptTag.onreadystatechange = impl; + loc.appendChild(scriptTag); + } + + const domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + const domSearchBox = this.DOMSearchBox(); + const domPopupSearchResults = this.DOMPopupSearchResults(); + const domSearchClose = this.DOMSearchClose(); + const resultsPath = this.resultsPath; + + const handleResults = function() { + document.getElementById("Loading").style.display="none"; + if (typeof searchData !== 'undefined') { + createResults(resultsPath); + document.getElementById("NoMatches").style.display="none"; + } + + if (idx!=-1) { + searchResults.Search(searchValue); + } else { // no file with search results => force empty search results + searchResults.Search('===='); + } + + if (domPopupSearchResultsWindow.style.display!='block') { + domSearchClose.style.display = 'inline-block'; + let left = getXPos(domSearchBox) + 150; + let top = getYPos(domSearchBox) + 20; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + const maxWidth = document.body.clientWidth; + const maxHeight = document.body.clientHeight; + let width = 300; + if (left<10) left=10; + if (width+left+8>maxWidth) width=maxWidth-left-8; + let height = 400; + if (height+top+8>maxHeight) height=maxHeight-top-8; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResultsWindow.style.height = height + 'px'; + } + } + + if (jsFile) { + loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow()); + } else { + handleResults(); + } + + this.lastSearchValue = searchValue; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) { + this.DOMSearchBox().className = 'MSearchBoxActive'; + this.searchActive = true; + } else if (!isActive) { // directly remove the panel + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + this.DOMSearchField().value = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults() { + + function convertToId(search) { + let result = ''; + for (let i=0;i. + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) { + const parentElement = document.getElementById(id); + let element = parentElement.firstChild; + + while (element && element!=parentElement) { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) { + element = element.firstChild; + } else if (element.nextSibling) { + element = element.nextSibling; + } else { + do { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) { + const element = this.FindChildElement(id); + if (element) { + if (element.style.display == 'block') { + element.style.display = 'none'; + } else { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) { + if (!search) { // get search word from URL + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + const resultRows = document.getElementsByTagName("div"); + let matches = 0; + + let i = 0; + while (i < resultRows.length) { + const row = resultRows.item(i); + if (row.className == "SRResult") { + let rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) { + row.style.display = 'block'; + matches++; + } else { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) { // no results + document.getElementById("NoMatches").style.display='block'; + } else { // at least one result + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) { + if (e.type == "keydown") { + this.repeatOn = false; + this.lastKey = e.keyCode; + } else if (e.type == "keypress") { + if (!this.repeatOn) { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } else if (e.type == "keyup") { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + const newIndex = itemIndex-1; + let focusItem = this.NavPrev(newIndex); + if (focusItem) { + let child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') { // children visible + let n=0; + let tmpElem; + for (;;) { // search for last child + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) { + focusItem = tmpElem; + } else { // found it! + break; + } + n++; + } + } + } + if (focusItem) { + focusItem.focus(); + } else { // return focus to search field + document.getElementById("MSearchField").focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = itemIndex+1; + let focusItem; + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') { // children visible + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } else if (this.lastKey==39) { // Right + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } else if (this.lastKey==37) { // Left + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + if (childIndex>0) { + const newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } else { // already at first child, jump to parent + document.getElementById('Item'+itemIndex).focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = childIndex+1; + let elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) { // last child, jump to parent next parent + elem = this.NavNext(itemIndex+1); + } + if (elem) { + elem.focus(); + } + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } +} + +function createResults(resultsPath) { + + function setKeyActions(elem,action) { + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); + } + + function setClassAttr(elem,attr) { + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); + } + + const results = document.getElementById("SRResults"); + results.innerHTML = ''; + searchData.forEach((elem,index) => { + const id = elem[0]; + const srResult = document.createElement('div'); + srResult.setAttribute('id','SR_'+id); + setClassAttr(srResult,'SRResult'); + const srEntry = document.createElement('div'); + setClassAttr(srEntry,'SREntry'); + const srLink = document.createElement('a'); + srLink.setAttribute('id','Item'+index); + setKeyActions(srLink,'return searchResults.Nav(event,'+index+')'); + setClassAttr(srLink,'SRSymbol'); + srLink.innerHTML = elem[1][0]; + srEntry.appendChild(srLink); + if (elem[1].length==2) { // single result + srLink.setAttribute('href',resultsPath+elem[1][1][0]); + srLink.setAttribute('onclick','searchBox.CloseResultsWindow()'); + if (elem[1][1][1]) { + srLink.setAttribute('target','_parent'); + } else { + srLink.setAttribute('target','_blank'); + } + const srScope = document.createElement('span'); + setClassAttr(srScope,'SRScope'); + srScope.innerHTML = elem[1][1][2]; + srEntry.appendChild(srScope); + } else { // multiple results + srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")'); + const srChildren = document.createElement('div'); + setClassAttr(srChildren,'SRChildren'); + for (let c=0; c + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/settings_parser/settings.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    settings.h
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include <iostream>
    +
    4#include <array>
    +
    5#include <fstream>
    +
    6#include <iostream>
    +
    7#include <functional>
    +
    8
    +
    + +
    14{
    +
    15 std::array<int, 2> nCells;
    +
    16 std::array<double, 2> physicalSize;
    +
    17 double re = 1000;
    +
    18 double endTime = 10.0;
    +
    19 double tau = 0.5;
    +
    20 double maximumDt = 0.1;
    +
    21
    +
    22 std::array<double, 2> g{0., 0.};
    +
    23
    +
    24 bool useDonorCell = false;
    +
    25 double alpha = 0.5;
    +
    26
    +
    27 // Boundary Conditions Type
    +
    28 std::string BCTop = "NoSlip";
    +
    29 std::string BCRight = "NoSlip";
    +
    30 std::string BCBottom = "NoSlip";
    +
    31 std::string BCLeft = "NoSlip";
    +
    32
    +
    33 // NoSlip boundary conditions
    +
    34 std::array<double, 2> NoSlipVelTop;
    +
    35 std::array<double, 2> NoSlipVelRight;
    +
    36 std::array<double, 2> NoSlipVelBottom;
    +
    37 std::array<double, 2> NoSlipVelLeft;
    +
    38
    +
    39 // Pressure boundary conditions
    +
    40 double PressureTop;
    + + +
    43 double PressureLeft;
    +
    44
    +
    45 // Create rectangular obstacle in domain
    + +
    47
    +
    48 // Create domain from PNGBitmap
    + +
    50 std::string pathToBitmap;
    +
    51
    +
    52 std::array<double, 2> obstaclePosition;
    +
    53 std::array<double, 2> obstacleDimension;
    +
    54
    +
    55 std::string pressureSolver = "SOR";
    +
    56 double omega = 1.0;
    +
    57 double epsilon = 1e-5;
    + +
    59
    +
    60
    +
    61 // Fluid Tracer
    +
    62 bool useFluidTracer = true;
    +
    63 int particlePerCell = 100;
    +
    68 std::string fluidTracerMethod = "single";
    +
    69 // bool useParticleSource = false; //!< Enables virtual particles source
    +
    70 // std::array<double, 2> particleSource = {0.5, 0.5}; //!< Source of virtual particles
    +
    71
    +
    72
    +
    73
    +
    74 // Writer Options
    +
    75
    +
    81 void loadFromFile(std::string filename);
    +
    82
    +
    86 void printSettings();
    +
    87
    +
    + +
    93 {
    +
    94 std::string parameterName;
    +
    95 std::string value;
    +
    96 bool isContent;
    +
    97 };
    +
    +
    98
    +
    104 LineContent readSingleLine(std::string line);
    +
    105
    +
    106 // sets the parameter to the corresponding value
    +
    113 void setParameter(std::string parameterName, std::string value);
    +
    114};
    +
    +
    Contains the content of a single line in a file.
    Definition settings.h:93
    +
    std::string value
    value of the parameter
    Definition settings.h:95
    +
    std::string parameterName
    Name of parameter.
    Definition settings.h:94
    +
    bool isContent
    whether line is readable parameter or comment
    Definition settings.h:96
    +
    All settings that parametrize a simulation run.
    Definition settings.h:14
    +
    bool useDonorCell
    if the donor cell scheme schould be used
    Definition settings.h:24
    +
    std::array< double, 2 > NoSlipVelBottom
    prescribed values of u,v at bottom of domain
    Definition settings.h:36
    +
    std::array< double, 2 > g
    external forces
    Definition settings.h:22
    +
    std::array< double, 2 > NoSlipVelRight
    prescribed values of u,v at right of domain
    Definition settings.h:35
    +
    std::array< double, 2 > physicalSize
    physical size of the domain
    Definition settings.h:16
    +
    std::string pathToBitmap
    path to bitmap
    Definition settings.h:50
    +
    std::array< int, 2 > nCells
    number of cells in x and y direction
    Definition settings.h:15
    +
    double PressureLeft
    prescribed pressure BC left of domain
    Definition settings.h:43
    +
    void loadFromFile(std::string filename)
    Parse a text file with settings.
    Definition settings.cpp:3
    +
    void setParameter(std::string parameterName, std::string value)
    Sets the parameter to the corresponding value.
    Definition settings.cpp:99
    +
    double PressureTop
    prescribed pressure BC top of domain
    Definition settings.h:40
    +
    bool createDomainfromBitmap
    wheter domain should be created from bitmap
    Definition settings.h:49
    +
    void printSettings()
    Print all setting to terminal.
    Definition settings.cpp:40
    +
    LineContent readSingleLine(std::string line)
    Reads one line of the settings file.
    Definition settings.cpp:53
    +
    std::string fluidTracerMethod
    Definition settings.h:68
    +
    double endTime
    end time of the simulation
    Definition settings.h:18
    +
    bool useFluidTracer
    Enables Open Surface Evolution.
    Definition settings.h:62
    +
    std::array< double, 2 > NoSlipVelTop
    prescribed values of u,v at top of domain
    Definition settings.h:34
    +
    std::string pressureSolver
    which pressure solver to use, "GaussSeidel" or "SOR"
    Definition settings.h:55
    +
    double alpha
    factor for donor-cell scheme
    Definition settings.h:25
    +
    double re
    reynolds number
    Definition settings.h:17
    +
    double PressureRight
    prescribed pressure BC right of domain
    Definition settings.h:41
    +
    double maximumDt
    maximum time step width
    Definition settings.h:20
    +
    bool createRectangularObject
    wheter a rectangular object in domain should be created
    Definition settings.h:46
    +
    double epsilon
    tolerance for the residual in the pressure solver
    Definition settings.h:57
    +
    std::array< double, 2 > NoSlipVelLeft
    prescribed values of u,v at left of domain
    Definition settings.h:37
    +
    int particlePerCell
    Initializes with given virtual particles per cell.
    Definition settings.h:63
    +
    int maximumNumberOfIterations
    maximum number of iterations in the solver
    Definition settings.h:58
    +
    double PressureBottom
    prescribed pressure BC bottom of domain
    Definition settings.h:42
    +
    double tau
    safety factor for time step width
    Definition settings.h:19
    +
    std::array< double, 2 > obstacleDimension
    x and y dimension of rectangular object
    Definition settings.h:53
    +
    double omega
    overrelaxation factor
    Definition settings.h:56
    +
    std::array< double, 2 > obstaclePosition
    x and y position of rectangular object
    Definition settings.h:52
    +
    + + + + diff --git a/documentation/html/sor_8h_source.html b/documentation/html/sor_8h_source.html new file mode 100644 index 00000000..bbaa387d --- /dev/null +++ b/documentation/html/sor_8h_source.html @@ -0,0 +1,117 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/solver/sor.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    sor.h
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include "pressure_solver.h"
    +
    4
    +
    +
    10class SOR : public PressureSolver
    +
    11{
    +
    12
    +
    13public:
    +
    22 SOR(const std::shared_ptr<Discretization> &data,
    +
    23 double epsilon,
    +
    24 int maximumNumberOfIterations,
    +
    25 std::shared_ptr<Boundary> boundary,
    +
    26 double omega);
    +
    27
    +
    32 void solve() override;
    +
    33
    +
    34private:
    +
    35 double omega_;
    +
    36};
    +
    +
    Solves the Poisson problem for the pressure.
    Definition pressure_solver.h:21
    +
    Successive over-relaxation solver.
    Definition sor.h:11
    +
    SOR(const std::shared_ptr< Discretization > &data, double epsilon, int maximumNumberOfIterations, std::shared_ptr< Boundary > boundary, double omega)
    Constructor.
    Definition sor.cpp:4
    +
    void solve() override
    override function that starts solver.
    Definition sor.cpp:12
    +
    + + + + diff --git a/documentation/html/splitbar.png b/documentation/html/splitbar.png new file mode 100644 index 00000000..fe895f2c Binary files /dev/null and b/documentation/html/splitbar.png differ diff --git a/documentation/html/splitbard.png b/documentation/html/splitbard.png new file mode 100644 index 00000000..8367416d Binary files /dev/null and b/documentation/html/splitbard.png differ diff --git a/documentation/html/staggered__grid_8h_source.html b/documentation/html/staggered__grid_8h_source.html new file mode 100644 index 00000000..193163f5 --- /dev/null +++ b/documentation/html/staggered__grid_8h_source.html @@ -0,0 +1,219 @@ + + + + + + + +NumSim: /home/jonat/Documents/01_Studium/NumSim/src/discretization/staggered_grid.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    staggered_grid.h
    +
    +
    +
    1#include <array>
    +
    2#include <vector>
    +
    3#include <iostream>
    +
    4#include "../storage/field_variable.h"
    +
    5
    +
    + +
    15{
    +
    16public:
    +
    23 StaggeredGrid(std::array<int, 2> nCells, std::array<double, 2> meshWidth);
    +
    24
    +
    28 const std::array<double, 2> meshWidth() const;
    +
    32 const std::array<int, 2> nCells() const;
    +
    33
    +
    37 const FieldVariable &u() const;
    +
    41 const FieldVariable &v() const;
    +
    45 const FieldVariable &p() const;
    +
    49 const FieldVariable &rhs() const;
    +
    50
    +
    54 double u(int i, int j) const;
    +
    58 double &u(int i, int j);
    +
    59
    +
    63 double v(int i, int j) const;
    +
    67 double &v(int i, int j);
    +
    68
    +
    72 double p(int i, int j) const;
    +
    76 double &p(int i, int j);
    +
    77
    +
    81 double &f(int i, int j);
    +
    85 double &g(int i, int j);
    +
    89 double &rhs(int i, int j);
    +
    90
    +
    94 double dx() const;
    +
    98 double dy() const;
    +
    99
    +
    103 int uIBegin() const;
    +
    107 int uIEnd() const;
    +
    108
    +
    112 int uJBegin() const;
    +
    116 int uJEnd() const;
    +
    117
    +
    121 int vIBegin() const;
    +
    125 int vIEnd() const;
    +
    126
    +
    130 int vJBegin() const;
    +
    134 int vJEnd() const;
    +
    135
    +
    139 int pIBegin() const;
    +
    143 int pIEnd() const;
    +
    144
    +
    148 int pJBegin() const;
    +
    152 int pJEnd() const;
    +
    153
    +
    157 int fIBegin() const;
    +
    161 int fIEnd() const;
    +
    162
    +
    166 int fJBegin() const;
    +
    170 int fJEnd() const;
    +
    171
    +
    175 int gIBegin() const;
    +
    179 int gIEnd() const;
    +
    180
    +
    184 int gJBegin() const;
    +
    188 int gJEnd() const;
    +
    189
    +
    193 int rhsIBegin() const;
    +
    197 int rhsIEnd() const;
    +
    198
    +
    202 int rhsJBegin() const;
    +
    206 int rhsJEnd() const;
    +
    207
    +
    208protected:
    +
    209 const std::array<int, 2> nCells_;
    +
    210 const std::array<double, 2> meshWidth_;
    + + + + + + +
    217};
    +
    +
    Discretization of a scalar function.
    Definition field_variable.h:18
    +
    Create field variables and define limits for the indices.
    Definition staggered_grid.h:15
    +
    int gIBegin() const
    first valid index for g in x direction
    Definition staggered_grid.cpp:159
    +
    int gJBegin() const
    first valid index for g in y direction
    Definition staggered_grid.cpp:169
    +
    FieldVariable v_
    instance of the field variable v
    Definition staggered_grid.h:212
    +
    const FieldVariable & v() const
    Get a reference to the field variable v.
    Definition staggered_grid.cpp:29
    +
    int rhsJBegin() const
    first valid index for rhs in y direction
    Definition staggered_grid.cpp:209
    +
    FieldVariable p_
    instance of the field variable p
    Definition staggered_grid.h:213
    +
    int uIBegin() const
    first valid index for u in x direction
    Definition staggered_grid.cpp:99
    +
    const std::array< double, 2 > meshWidth() const
    Get the length of a single cell in x and y directions.
    Definition staggered_grid.cpp:14
    +
    int uJEnd() const
    one after last valid index for u in y direction
    Definition staggered_grid.cpp:114
    +
    int pIEnd() const
    one after last valid index for p in x direction
    Definition staggered_grid.cpp:184
    +
    const FieldVariable & rhs() const
    Get a reference to the field variable rhs.
    Definition staggered_grid.cpp:39
    +
    FieldVariable rhs_
    instance of the field variable rhs
    Definition staggered_grid.h:216
    +
    int fIBegin() const
    first valid index for f in x direction
    Definition staggered_grid.cpp:119
    +
    FieldVariable g_
    instance of the field variable g
    Definition staggered_grid.h:215
    +
    int uIEnd() const
    one after last valid index for u in x direction
    Definition staggered_grid.cpp:104
    +
    int gJEnd() const
    one after last valid index for g in y direction
    Definition staggered_grid.cpp:174
    +
    int fJEnd() const
    one after last valid index for f in y direction
    Definition staggered_grid.cpp:134
    +
    int vJBegin() const
    first valid index for v in y direction
    Definition staggered_grid.cpp:149
    +
    int fIEnd() const
    one after last valid index for f in x direction
    Definition staggered_grid.cpp:124
    +
    const FieldVariable & u() const
    Get a reference to the field variable u.
    Definition staggered_grid.cpp:24
    +
    FieldVariable f_
    instance of the field variable f
    Definition staggered_grid.h:214
    +
    int rhsJEnd() const
    one after last valid index for rhs in y direction
    Definition staggered_grid.cpp:214
    +
    const std::array< double, 2 > meshWidth_
    array containing the sizes of cell edges in x and y directions
    Definition staggered_grid.h:210
    +
    int pIBegin() const
    first valid index for p in x direction
    Definition staggered_grid.cpp:179
    +
    int uJBegin() const
    first valid index for u in y direction
    Definition staggered_grid.cpp:109
    +
    int vIEnd() const
    one after last valid index for v in x direction
    Definition staggered_grid.cpp:144
    +
    double & g(int i, int j)
    Access value of g in element (i,j)
    Definition staggered_grid.cpp:79
    +
    const FieldVariable & p() const
    Get a reference to the field variable p.
    Definition staggered_grid.cpp:34
    +
    int vJEnd() const
    one after last valid index for v in y direction
    Definition staggered_grid.cpp:154
    +
    int fJBegin() const
    first valid index for f in y direction
    Definition staggered_grid.cpp:129
    +
    double dy() const
    Get the mesh width in y-direction.
    Definition staggered_grid.cpp:94
    +
    const std::array< int, 2 > nCells_
    array containing number of cells in x and y directions
    Definition staggered_grid.h:209
    +
    int vIBegin() const
    first valid index for v in x direction
    Definition staggered_grid.cpp:139
    +
    int rhsIBegin() const
    first valid index for rhs in x direction
    Definition staggered_grid.cpp:199
    +
    int pJEnd() const
    one after last valid index for p in y direction
    Definition staggered_grid.cpp:194
    +
    double & f(int i, int j)
    Access value of f in element (i,j)
    Definition staggered_grid.cpp:74
    +
    FieldVariable u_
    instance of the field variable u
    Definition staggered_grid.h:211
    +
    int rhsIEnd() const
    one after last valid index for rhs in x direction
    Definition staggered_grid.cpp:204
    +
    int pJBegin() const
    first valid index for p in y direction
    Definition staggered_grid.cpp:189
    +
    int gIEnd() const
    one after last valid index for g in x direction
    Definition staggered_grid.cpp:164
    +
    StaggeredGrid(std::array< int, 2 > nCells, std::array< double, 2 > meshWidth)
    Constructor.
    Definition staggered_grid.cpp:3
    +
    double dx() const
    Get the mesh width in x-direction.
    Definition staggered_grid.cpp:89
    +
    const std::array< int, 2 > nCells() const
    Get number of cells in x and y directions.
    Definition staggered_grid.cpp:19
    +
    + + + + diff --git a/documentation/html/structSettings-members.html b/documentation/html/structSettings-members.html new file mode 100644 index 00000000..be71e4d6 --- /dev/null +++ b/documentation/html/structSettings-members.html @@ -0,0 +1,123 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    +
    Settings Member List
    +
    + + + + + diff --git a/documentation/html/structSettings.html b/documentation/html/structSettings.html new file mode 100644 index 00000000..c1366041 --- /dev/null +++ b/documentation/html/structSettings.html @@ -0,0 +1,352 @@ + + + + + + + +NumSim: Settings Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    + +
    Settings Struct Reference
    +
    +
    + +

    All settings that parametrize a simulation run. + More...

    + +

    #include <settings.h>

    + + + + + +

    +Classes

    struct  LineContent
     Contains the content of a single line in a file. More...
     
    + + + + + + + + + + + + + +

    +Public Member Functions

    void loadFromFile (std::string filename)
     Parse a text file with settings.
     
    +void printSettings ()
     Print all setting to terminal.
     
    LineContent readSingleLine (std::string line)
     Reads one line of the settings file.
     
    void setParameter (std::string parameterName, std::string value)
     Sets the parameter to the corresponding value.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Attributes

    +std::array< int, 2 > nCells
     number of cells in x and y direction
     
    +std::array< double, 2 > physicalSize
     physical size of the domain
     
    +double re = 1000
     reynolds number
     
    +double endTime = 10.0
     end time of the simulation
     
    +double tau = 0.5
     safety factor for time step width
     
    +double maximumDt = 0.1
     maximum time step width
     
    +std::array< double, 2 > g {0., 0.}
     external forces
     
    +bool useDonorCell = false
     if the donor cell scheme schould be used
     
    +double alpha = 0.5
     factor for donor-cell scheme
     
    +std::string BCTop = "NoSlip"
     
    +std::string BCRight = "NoSlip"
     
    +std::string BCBottom = "NoSlip"
     
    +std::string BCLeft = "NoSlip"
     
    +std::array< double, 2 > NoSlipVelTop
     prescribed values of u,v at top of domain
     
    +std::array< double, 2 > NoSlipVelRight
     prescribed values of u,v at right of domain
     
    +std::array< double, 2 > NoSlipVelBottom
     prescribed values of u,v at bottom of domain
     
    +std::array< double, 2 > NoSlipVelLeft
     prescribed values of u,v at left of domain
     
    +double PressureTop
     prescribed pressure BC top of domain
     
    +double PressureRight
     prescribed pressure BC right of domain
     
    +double PressureBottom
     prescribed pressure BC bottom of domain
     
    +double PressureLeft
     prescribed pressure BC left of domain
     
    +bool createRectangularObject = false
     wheter a rectangular object in domain should be created
     
    +bool createDomainfromBitmap = false
     wheter domain should be created from bitmap
     
    +std::string pathToBitmap
     path to bitmap
     
    +std::array< double, 2 > obstaclePosition
     x and y position of rectangular object
     
    +std::array< double, 2 > obstacleDimension
     x and y dimension of rectangular object
     
    +std::string pressureSolver = "SOR"
     which pressure solver to use, "GaussSeidel" or "SOR"
     
    +double omega = 1.0
     overrelaxation factor
     
    +double epsilon = 1e-5
     tolerance for the residual in the pressure solver
     
    +int maximumNumberOfIterations = 1e5
     maximum number of iterations in the solver
     
    +bool useFluidTracer = true
     Enables Open Surface Evolution.
     
    +int particlePerCell = 100
     Initializes with given virtual particles per cell.
     
    std::string fluidTracerMethod = "single"
     
    +

    Detailed Description

    +

    All settings that parametrize a simulation run.

    +

    Member Function Documentation

    + +

    ◆ loadFromFile()

    + +
    +
    + + + + + + + + +
    void Settings::loadFromFile (std::string filename)
    +
    + +

    Parse a text file with settings.

    +

    Each line contains "<parameterName> = <value>"

    + +
    +
    + +

    ◆ readSingleLine()

    + +
    +
    + + + + + + + + +
    Settings::LineContent Settings::readSingleLine (std::string line)
    +
    + +

    Reads one line of the settings file.

    +
    Parameters
    + + +
    lineline of file to read
    +
    +
    + +
    +
    + +

    ◆ setParameter()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void Settings::setParameter (std::string parameterName,
    std::string value 
    )
    +
    + +

    Sets the parameter to the corresponding value.

    +
    Parameters
    + + + +
    parameterNameparamter name
    valueof parameter
    +
    +
    + +
    +
    +

    Member Data Documentation

    + +

    ◆ fluidTracerMethod

    + +
    +
    + + + + +
    std::string Settings::fluidTracerMethod = "single"
    +
    +

    single -> one virtual particles is enough for fluid cell threshold -> aims at a constant amount of fluid cells

    + +
    +
    +
    The documentation for this struct was generated from the following files:
      +
    • /home/jonat/Documents/01_Studium/NumSim/src/settings_parser/settings.h
    • +
    • /home/jonat/Documents/01_Studium/NumSim/src/settings_parser/settings.cpp
    • +
    +
    + + + + diff --git a/documentation/html/structSettings_1_1LineContent-members.html b/documentation/html/structSettings_1_1LineContent-members.html new file mode 100644 index 00000000..bed13298 --- /dev/null +++ b/documentation/html/structSettings_1_1LineContent-members.html @@ -0,0 +1,93 @@ + + + + + + + +NumSim: Member List + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    Settings::LineContent Member List
    +
    +
    + +

    This is the complete list of members for Settings::LineContent, including all inherited members.

    + + + + +
    isContentSettings::LineContent
    parameterNameSettings::LineContent
    valueSettings::LineContent
    + + + + diff --git a/documentation/html/structSettings_1_1LineContent.html b/documentation/html/structSettings_1_1LineContent.html new file mode 100644 index 00000000..056e45ad --- /dev/null +++ b/documentation/html/structSettings_1_1LineContent.html @@ -0,0 +1,116 @@ + + + + + + + +NumSim: Settings::LineContent Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    NumSim 1.0 +
    +
    Numerical Simulation of fluid-flow
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    Settings::LineContent Struct Reference
    +
    +
    + +

    Contains the content of a single line in a file. + More...

    + +

    #include <settings.h>

    + + + + + + + + + + + +

    +Public Attributes

    +std::string parameterName
     Name of parameter.
     
    +std::string value
     value of the parameter
     
    +bool isContent
     whether line is readable parameter or comment
     
    +

    Detailed Description

    +

    Contains the content of a single line in a file.

    +

    The documentation for this struct was generated from the following file:
      +
    • /home/jonat/Documents/01_Studium/NumSim/src/settings_parser/settings.h
    • +
    +
    + + + + diff --git a/documentation/html/sync_off.png b/documentation/html/sync_off.png new file mode 100644 index 00000000..3b443fc6 Binary files /dev/null and b/documentation/html/sync_off.png differ diff --git a/documentation/html/sync_on.png b/documentation/html/sync_on.png new file mode 100644 index 00000000..e08320fb Binary files /dev/null and b/documentation/html/sync_on.png differ diff --git a/documentation/html/tab_a.png b/documentation/html/tab_a.png new file mode 100644 index 00000000..3b725c41 Binary files /dev/null and b/documentation/html/tab_a.png differ diff --git a/documentation/html/tab_ad.png b/documentation/html/tab_ad.png new file mode 100644 index 00000000..e34850ac Binary files /dev/null and b/documentation/html/tab_ad.png differ diff --git a/documentation/html/tab_b.png b/documentation/html/tab_b.png new file mode 100644 index 00000000..e2b4a863 Binary files /dev/null and b/documentation/html/tab_b.png differ diff --git a/documentation/html/tab_bd.png b/documentation/html/tab_bd.png new file mode 100644 index 00000000..91c25249 Binary files /dev/null and b/documentation/html/tab_bd.png differ diff --git a/documentation/html/tab_h.png b/documentation/html/tab_h.png new file mode 100644 index 00000000..fd5cb705 Binary files /dev/null and b/documentation/html/tab_h.png differ diff --git a/documentation/html/tab_hd.png b/documentation/html/tab_hd.png new file mode 100644 index 00000000..2489273d Binary files /dev/null and b/documentation/html/tab_hd.png differ diff --git a/documentation/html/tab_s.png b/documentation/html/tab_s.png new file mode 100644 index 00000000..ab478c95 Binary files /dev/null and b/documentation/html/tab_s.png differ diff --git a/documentation/html/tab_sd.png b/documentation/html/tab_sd.png new file mode 100644 index 00000000..757a565c Binary files /dev/null and b/documentation/html/tab_sd.png differ diff --git a/documentation/html/tabs.css b/documentation/html/tabs.css new file mode 100644 index 00000000..71c8a470 --- /dev/null +++ b/documentation/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important;color:var(--nav-menu-foreground-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file diff --git a/documentation/latex/Makefile b/documentation/latex/Makefile new file mode 100644 index 00000000..7f829721 --- /dev/null +++ b/documentation/latex/Makefile @@ -0,0 +1,27 @@ +LATEX_CMD?=pdflatex +MKIDX_CMD?=makeindex +BIBTEX_CMD?=bibtex +LATEX_COUNT?=8 +MANUAL_FILE?=refman + +all: $(MANUAL_FILE).pdf + +pdf: $(MANUAL_FILE).pdf + +$(MANUAL_FILE).pdf: clean $(MANUAL_FILE).tex + $(LATEX_CMD) $(MANUAL_FILE) + $(MKIDX_CMD) $(MANUAL_FILE).idx + $(LATEX_CMD) $(MANUAL_FILE) + latex_count=$(LATEX_COUNT) ; \ + while grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\ + do \ + echo "Rerunning latex...." ;\ + $(LATEX_CMD) $(MANUAL_FILE) ;\ + latex_count=`expr $$latex_count - 1` ;\ + done + $(MKIDX_CMD) $(MANUAL_FILE).idx + $(LATEX_CMD) $(MANUAL_FILE) + + +clean: + rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl $(MANUAL_FILE).pdf diff --git a/documentation/latex/annotated.tex b/documentation/latex/annotated.tex new file mode 100644 index 00000000..0481edaf --- /dev/null +++ b/documentation/latex/annotated.tex @@ -0,0 +1,21 @@ +\doxysection{Class List} +Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\mbox{\hyperlink{classArray2D}{Array2D}} \\*This class represents a 2D array of double values }{\pageref{classArray2D}}{} +\item\contentsline{section}{\mbox{\hyperlink{classBoundary}{Boundary}} \\*Class responsible to caluclate boundary conditions }{\pageref{classBoundary}}{} +\item\contentsline{section}{\mbox{\hyperlink{classCentralDifferences}{Central\+Differences}} \\*Discretizes the problem using the central differences scheme }{\pageref{classCentralDifferences}}{} +\item\contentsline{section}{\mbox{\hyperlink{classComputation}{Computation}} \\*\doxylink{classComputation}{Computation} of Simulation }{\pageref{classComputation}}{} +\item\contentsline{section}{\mbox{\hyperlink{classDiscretization}{Discretization}} \\*Computes derivatives included in governing equations }{\pageref{classDiscretization}}{} +\item\contentsline{section}{\mbox{\hyperlink{classDonorCell}{Donor\+Cell}} \\*Discretizes the problem using the donor cell scheme }{\pageref{classDonorCell}}{} +\item\contentsline{section}{\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \\*\doxylink{classDiscretization}{Discretization} of a scalar function }{\pageref{classFieldVariable}}{} +\item\contentsline{section}{\mbox{\hyperlink{classFluidTracer}{Fluid\+Tracer}} }{\pageref{classFluidTracer}}{} +\item\contentsline{section}{\mbox{\hyperlink{classGaussSeidel}{Gauss\+Seidel}} \\*Standard Gauss-\/\+Seidel solver }{\pageref{classGaussSeidel}}{} +\item\contentsline{section}{\mbox{\hyperlink{structSettings_1_1LineContent}{Settings\+::\+Line\+Content}} \\*Contains the content of a single line in a file }{\pageref{structSettings_1_1LineContent}}{} +\item\contentsline{section}{\mbox{\hyperlink{classMask}{Mask}} }{\pageref{classMask}}{} +\item\contentsline{section}{\mbox{\hyperlink{classOutputWriter}{Output\+Writer}} \\*Inteface class for writing simulation data output }{\pageref{classOutputWriter}}{} +\item\contentsline{section}{\mbox{\hyperlink{classOutputWriterParaview}{Output\+Writer\+Paraview}} \\*Write \texorpdfstring{$\ast$}{*}.vti files that can be viewed with Para\+View }{\pageref{classOutputWriterParaview}}{} +\item\contentsline{section}{\mbox{\hyperlink{classOutputWriterText}{Output\+Writer\+Text}} \\*Write \texorpdfstring{$\ast$}{*}.txt files that are useful for debugging }{\pageref{classOutputWriterText}}{} +\item\contentsline{section}{\mbox{\hyperlink{classPressureSolver}{Pressure\+Solver}} \\*Solves the Poisson problem for the pressure }{\pageref{classPressureSolver}}{} +\item\contentsline{section}{\mbox{\hyperlink{structSettings}{Settings}} \\*All settings that parametrize a simulation run }{\pageref{structSettings}}{} +\item\contentsline{section}{\mbox{\hyperlink{classSOR}{SOR}} \\*Successive over-\/relaxation solver }{\pageref{classSOR}}{} +\item\contentsline{section}{\mbox{\hyperlink{classStaggeredGrid}{Staggered\+Grid}} \\*Create field variables and define limits for the indices }{\pageref{classStaggeredGrid}}{} +\end{DoxyCompactList} diff --git a/documentation/latex/array2D_8h_source.tex b/documentation/latex/array2D_8h_source.tex new file mode 100644 index 00000000..346059ad --- /dev/null +++ b/documentation/latex/array2D_8h_source.tex @@ -0,0 +1,52 @@ +\doxysection{array2\+D.\+h} +\hypertarget{array2D_8h_source}{}\label{array2D_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/storage/array2D.h@{/home/jonat/Documents/01\_Studium/NumSim/src/storage/array2D.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ } +\DoxyCodeLine{00007\ } + + + + + + +\DoxyCodeLine{00015\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classArray2D}{Array2D}}} +\DoxyCodeLine{00016\ \{} +\DoxyCodeLine{00017\ \textcolor{keyword}{public}:} + + + + +\DoxyCodeLine{00023\ \ \ \ \ \mbox{\hyperlink{classArray2D_a16521417dfdf67ec694bfb7747df9000}{Array2D}}(std::array\ \mbox{\hyperlink{classArray2D_accf87be860645d6c50d6ba6fa39ec6f9}{size}});} +\DoxyCodeLine{00024\ } + + + + + + +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keywordtype}{double}\ \&\mbox{\hyperlink{classArray2D_a9d49e5544f4acf51a57dcbb0ed1bb0f8}{operator()}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j);} +\DoxyCodeLine{00033\ } + + + + + + +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classArray2D_a9d49e5544f4acf51a57dcbb0ed1bb0f8}{operator()}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00042\ } + + +\DoxyCodeLine{00046\ \ \ \ \ std::array\ \mbox{\hyperlink{classArray2D_accf87be860645d6c50d6ba6fa39ec6f9}{size}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00048\ \textcolor{keyword}{protected}:} +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keyword}{const}\ std::array\ \mbox{\hyperlink{classArray2D_a75bc7a1ff6f218c38f6ab94ec34e9472}{size\_}};\ } +\DoxyCodeLine{00050\ \ \ \ \ std::vector\ \mbox{\hyperlink{classArray2D_af1572f75d219caab4b2372a98341b991}{data\_}};\ \ \ \ \ \ } +\DoxyCodeLine{00051\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/boundary_8h_source.tex b/documentation/latex/boundary_8h_source.tex new file mode 100644 index 00000000..c1ef33d1 --- /dev/null +++ b/documentation/latex/boundary_8h_source.tex @@ -0,0 +1,105 @@ +\doxysection{boundary.\+h} +\hypertarget{boundary_8h_source}{}\label{boundary_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/boundary/boundary.h@{/home/jonat/Documents/01\_Studium/NumSim/src/boundary/boundary.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}mask.h"{}}} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}../discretization/discretization.h"{}}} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}../settings\_parser/settings.h"{}}} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00008\ } + + + + +\DoxyCodeLine{00014\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classBoundary}{Boundary}}} +\DoxyCodeLine{00015\ \{} +\DoxyCodeLine{00016\ \textcolor{keyword}{public}:} + + + + + + +\DoxyCodeLine{00024\ \ \ \ \ \mbox{\hyperlink{classBoundary_a4c78a28ad0839810f15229382f642cf1}{Boundary}}(std::shared\_ptr\ mask,\ std::shared\_ptr\ discretization,\ \mbox{\hyperlink{structSettings}{Settings}}\ settings);} +\DoxyCodeLine{00025\ } + + +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classBoundary_a77c90b2a43220ce9796d098158e4376d}{setPressureBoundaryValues}}();} +\DoxyCodeLine{00030\ } + + + + +\DoxyCodeLine{00036\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classBoundary_ac603742c37221bd82cbb545b6cdbe6cb}{setPressureSurfaceBC}}();} +\DoxyCodeLine{00037\ } + + +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classBoundary_ab7e15ee44237de051ff8347f2f9c770b}{setVelocityBoundaryValues}}();} +\DoxyCodeLine{00042\ } + + + + + + +\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classBoundary_ab7e15ee44237de051ff8347f2f9c770b}{setVelocityBoundaryValues}}(\textcolor{keywordtype}{double}\ dt);} +\DoxyCodeLine{00051\ } + + +\DoxyCodeLine{00055\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classBoundary_ac76b887d65491d38c093ca50333697a9}{doCalculateF}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00056\ } + + +\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classBoundary_aacf325c02e71925b7847d7189282b5c1}{doCalculateG}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00061\ } + + +\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classBoundary_a9910a68c5dec5845ef4cdde98e680155}{updateBoundary}}();} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00067\ \ \ \ \ std::shared\_ptr\ \mbox{\hyperlink{classBoundary_a25d33b12fbdf312cf319713ff88b3d38}{mask\_}};\ } +\DoxyCodeLine{00068\ } +\DoxyCodeLine{00069\ \textcolor{keyword}{private}:} + + +\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keywordtype}{void}\ createBoundaryCellsLists();} +\DoxyCodeLine{00074\ } + + +\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keywordtype}{void}\ setPressureDomainBC();} +\DoxyCodeLine{00079\ } + + +\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keywordtype}{void}\ setPressureObstacleBC();} +\DoxyCodeLine{00084\ } + + +\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keywordtype}{void}\ setVelocityDomainBC();} +\DoxyCodeLine{00089\ } + + +\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keywordtype}{void}\ setVelocityObstacleBC();} +\DoxyCodeLine{00094\ } + + +\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keywordtype}{void}\ setVelocitySurfaceBC();} +\DoxyCodeLine{00099\ } + + +\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keywordtype}{void}\ updateVelocitySurfaceBC(\textcolor{keywordtype}{double}\ dt);} +\DoxyCodeLine{00104\ } + + +\DoxyCodeLine{00108\ \ \ \ \ \textcolor{keywordtype}{void}\ setAirCellsZero();} +\DoxyCodeLine{00109\ } +\DoxyCodeLine{00110\ \ \ \ \ std::shared\_ptr\ discretization\_;\ } +\DoxyCodeLine{00111\ \ \ \ \ \mbox{\hyperlink{structSettings}{Settings}}\ settings\_;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00112\ } +\DoxyCodeLine{00113\ \ \ \ \ std::vector\ domainBoundaryCells\_;\ \ \ } +\DoxyCodeLine{00114\ \ \ \ \ std::vector\ obstacleBoundaryCells\_;\ } +\DoxyCodeLine{00115\ \ \ \ \ std::vector\ fluidBoundaryCells\_;\ \ \ \ } +\DoxyCodeLine{00116\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/central__differences_8h_source.tex b/documentation/latex/central__differences_8h_source.tex new file mode 100644 index 00000000..07dcef1d --- /dev/null +++ b/documentation/latex/central__differences_8h_source.tex @@ -0,0 +1,45 @@ +\doxysection{central\+\_\+differences.\+h} +\hypertarget{central__differences_8h_source}{}\label{central__differences_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/discretization/central\_differences.h@{/home/jonat/Documents/01\_Studium/NumSim/src/discretization/central\_differences.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}discretization.h"{}}} +\DoxyCodeLine{00006\ } + + + + + + +\DoxyCodeLine{00014\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classCentralDifferences}{CentralDifferences}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classDiscretization}{Discretization}}} +\DoxyCodeLine{00015\ \{} +\DoxyCodeLine{00016\ \textcolor{keyword}{public}:} + + + + + +\DoxyCodeLine{00023\ \ \ \ \ \mbox{\hyperlink{classCentralDifferences_ab055731e615298f745364c54f86fc191}{CentralDifferences}}(std::array\ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{nCells}},\ std::array\ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{meshWidth}});} +\DoxyCodeLine{00024\ } + + + +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classCentralDifferences_adb4502f473cc047a433db596146672e4}{computeDu2Dx}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const\ override};} + + + +\DoxyCodeLine{00034\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classCentralDifferences_a66eb9b800b9a9ac6f81fc719a42eb0ee}{computeDv2Dy}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const\ override};} + + + +\DoxyCodeLine{00039\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classCentralDifferences_a9bd7ac3bfd709991525ec57de10ed2e1}{computeDuvDx}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const\ override};} + + + +\DoxyCodeLine{00044\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classCentralDifferences_a4184367de8d48e678edfb078a19fc0a4}{computeDuvDy}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const\ override};} +\DoxyCodeLine{00045\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/classArray2D.eps b/documentation/latex/classArray2D.eps new file mode 100644 index 00000000..fc8663d7 --- /dev/null +++ b/documentation/latex/classArray2D.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 416.666656 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.200000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(Array2D) cw +(FieldVariable) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (Array2D) 0.000000 1.000000 box + (FieldVariable) 0.000000 0.000000 box + +% ----- relations ----- + +solid +1 0.000000 0.250000 out +solid +0 0.000000 0.750000 in diff --git a/documentation/latex/classArray2D.pdf b/documentation/latex/classArray2D.pdf new file mode 100644 index 00000000..52b4c5fd Binary files /dev/null and b/documentation/latex/classArray2D.pdf differ diff --git a/documentation/latex/classArray2D.tex b/documentation/latex/classArray2D.tex new file mode 100644 index 00000000..c4552f97 --- /dev/null +++ b/documentation/latex/classArray2D.tex @@ -0,0 +1,104 @@ +\doxysection{Array2D Class Reference} +\hypertarget{classArray2D}{}\label{classArray2D}\index{Array2D@{Array2D}} + + +This class represents a 2D array of double values. + + + + +{\ttfamily \#include $<$array2\+D.\+h$>$} + +Inheritance diagram for Array2D\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classArray2D} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classArray2D_a16521417dfdf67ec694bfb7747df9000}{Array2D}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classArray2D_accf87be860645d6c50d6ba6fa39ec6f9}{size}}) +\begin{DoxyCompactList}\small\item\em constructor. \end{DoxyCompactList}\item +double \& \mbox{\hyperlink{classArray2D_a9d49e5544f4acf51a57dcbb0ed1bb0f8}{operator()}} (int i, int j) +\begin{DoxyCompactList}\small\item\em set array value. Overloads the () operator \end{DoxyCompactList}\item +double \mbox{\hyperlink{classArray2D_af745718ec25b815051de2d0c3c94e0d2}{operator()}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em get array value. Overloads the () operator \end{DoxyCompactList}\item +\Hypertarget{classArray2D_accf87be860645d6c50d6ba6fa39ec6f9}\label{classArray2D_accf87be860645d6c50d6ba6fa39ec6f9} +std\+::array$<$ int, 2 $>$ {\bfseries size} () const +\begin{DoxyCompactList}\small\item\em get size of array in x and y direction \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Protected Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classArray2D_a75bc7a1ff6f218c38f6ab94ec34e9472}\label{classArray2D_a75bc7a1ff6f218c38f6ab94ec34e9472} +const std\+::array$<$ int, 2 $>$ {\bfseries size\+\_\+} +\begin{DoxyCompactList}\small\item\em size of array in x and y direction \end{DoxyCompactList}\item +\Hypertarget{classArray2D_af1572f75d219caab4b2372a98341b991}\label{classArray2D_af1572f75d219caab4b2372a98341b991} +std\+::vector$<$ double $>$ {\bfseries data\+\_\+} +\begin{DoxyCompactList}\small\item\em storage array values, in row-\/major order \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This class represents a 2D array of double values. + +Internally they are stored consecutively in memory. The entries can be accessed by two indices i,j. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classArray2D_a16521417dfdf67ec694bfb7747df9000}\label{classArray2D_a16521417dfdf67ec694bfb7747df9000} +\index{Array2D@{Array2D}!Array2D@{Array2D}} +\index{Array2D@{Array2D}!Array2D@{Array2D}} +\doxysubsubsection{\texorpdfstring{Array2D()}{Array2D()}} +{\footnotesize\ttfamily Array2\+D\+::\+Array2D (\begin{DoxyParamCaption}\item[{std\+::array$<$ int, 2 $>$}]{size }\end{DoxyParamCaption})} + + + +constructor. + + +\begin{DoxyParams}{Parameters} +{\em size} & size of array in x and y direction \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classArray2D_a9d49e5544f4acf51a57dcbb0ed1bb0f8}\label{classArray2D_a9d49e5544f4acf51a57dcbb0ed1bb0f8} +\index{Array2D@{Array2D}!operator()@{operator()}} +\index{operator()@{operator()}!Array2D@{Array2D}} +\doxysubsubsection{\texorpdfstring{operator()()}{operator()()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily double \& Array2\+D\+::operator() (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption})} + + + +set array value. Overloads the () operator + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction \\ +\hline +\end{DoxyParams} +\Hypertarget{classArray2D_af745718ec25b815051de2d0c3c94e0d2}\label{classArray2D_af745718ec25b815051de2d0c3c94e0d2} +\index{Array2D@{Array2D}!operator()@{operator()}} +\index{operator()@{operator()}!Array2D@{Array2D}} +\doxysubsubsection{\texorpdfstring{operator()()}{operator()()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily double Array2\+D\+::operator() (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +get array value. Overloads the () operator + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction \\ +\hline +\end{DoxyParams} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/storage/array2\+D.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/storage/array2\+D.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classBoundary.tex b/documentation/latex/classBoundary.tex new file mode 100644 index 00000000..cb619376 --- /dev/null +++ b/documentation/latex/classBoundary.tex @@ -0,0 +1,102 @@ +\doxysection{Boundary Class Reference} +\hypertarget{classBoundary}{}\label{classBoundary}\index{Boundary@{Boundary}} + + +Class responsible to caluclate boundary conditions. + + + + +{\ttfamily \#include $<$boundary.\+h$>$} + +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classBoundary_a4c78a28ad0839810f15229382f642cf1}{Boundary}} (std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classMask}{Mask}} $>$ mask, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization, \mbox{\hyperlink{structSettings}{Settings}} settings) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +\Hypertarget{classBoundary_a77c90b2a43220ce9796d098158e4376d}\label{classBoundary_a77c90b2a43220ce9796d098158e4376d} +void {\bfseries set\+Pressure\+Boundary\+Values} () +\begin{DoxyCompactList}\small\item\em calculates and sets the pressure boundary values for obstacles and domain boundary \end{DoxyCompactList}\item +void \mbox{\hyperlink{classBoundary_ac603742c37221bd82cbb545b6cdbe6cb}{set\+Pressure\+Surface\+BC}} () +\begin{DoxyCompactList}\small\item\em calculates and sets the pressure boundary values for surface boundary \end{DoxyCompactList}\item +\Hypertarget{classBoundary_ab7e15ee44237de051ff8347f2f9c770b}\label{classBoundary_ab7e15ee44237de051ff8347f2f9c770b} +void {\bfseries set\+Velocity\+Boundary\+Values} () +\begin{DoxyCompactList}\small\item\em calculates and sets the velocity boundary values for surface, obstacle and domain boundary \end{DoxyCompactList}\item +void \mbox{\hyperlink{classBoundary_a81d6f13c90f37e63fc0cad27a6999915}{set\+Velocity\+Boundary\+Values}} (double dt) +\begin{DoxyCompactList}\small\item\em overloaded function that sets velocity boundary \end{DoxyCompactList}\item +\Hypertarget{classBoundary_ac76b887d65491d38c093ca50333697a9}\label{classBoundary_ac76b887d65491d38c093ca50333697a9} +bool {\bfseries do\+CalculateF} (int i, int j) const +\begin{DoxyCompactList}\small\item\em returns true if cell left and rigt of F value are fluid (not a boundary value) \end{DoxyCompactList}\item +\Hypertarget{classBoundary_aacf325c02e71925b7847d7189282b5c1}\label{classBoundary_aacf325c02e71925b7847d7189282b5c1} +bool {\bfseries do\+CalculateG} (int i, int j) const +\begin{DoxyCompactList}\small\item\em returns true if cell top and bottom of G value are fluid (not a boundary value) \end{DoxyCompactList}\item +\Hypertarget{classBoundary_a9910a68c5dec5845ef4cdde98e680155}\label{classBoundary_a9910a68c5dec5845ef4cdde98e680155} +void {\bfseries update\+Boundary} () +\begin{DoxyCompactList}\small\item\em updates fluid boundary cell list \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classBoundary_a25d33b12fbdf312cf319713ff88b3d38}\label{classBoundary_a25d33b12fbdf312cf319713ff88b3d38} +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classMask}{Mask}} $>$ {\bfseries mask\+\_\+} +\begin{DoxyCompactList}\small\item\em shared pointer to mask entity \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Class responsible to caluclate boundary conditions. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classBoundary_a4c78a28ad0839810f15229382f642cf1}\label{classBoundary_a4c78a28ad0839810f15229382f642cf1} +\index{Boundary@{Boundary}!Boundary@{Boundary}} +\index{Boundary@{Boundary}!Boundary@{Boundary}} +\doxysubsubsection{\texorpdfstring{Boundary()}{Boundary()}} +{\footnotesize\ttfamily Boundary\+::\+Boundary (\begin{DoxyParamCaption}\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classMask}{Mask}} $>$}]{mask, }\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$}]{discretization, }\item[{\mbox{\hyperlink{structSettings}{Settings}}}]{settings }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em discretization} & instance of \doxylink{classDiscretization}{Discretization} holding the needed field variables for rhs and p \\ +\hline +{\em mask} & instance of mask holding the boundary condition enums for each cell tolerance for the solver \\ +\hline +{\em settings} & holding the necessary domainn boundary condition \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classBoundary_ac603742c37221bd82cbb545b6cdbe6cb}\label{classBoundary_ac603742c37221bd82cbb545b6cdbe6cb} +\index{Boundary@{Boundary}!setPressureSurfaceBC@{setPressureSurfaceBC}} +\index{setPressureSurfaceBC@{setPressureSurfaceBC}!Boundary@{Boundary}} +\doxysubsubsection{\texorpdfstring{setPressureSurfaceBC()}{setPressureSurfaceBC()}} +{\footnotesize\ttfamily void Boundary\+::set\+Pressure\+Surface\+BC (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +calculates and sets the pressure boundary values for surface boundary + +Only needs to be set once -\/\texorpdfstring{$>$}{>} no need to update each solver iteration \Hypertarget{classBoundary_a81d6f13c90f37e63fc0cad27a6999915}\label{classBoundary_a81d6f13c90f37e63fc0cad27a6999915} +\index{Boundary@{Boundary}!setVelocityBoundaryValues@{setVelocityBoundaryValues}} +\index{setVelocityBoundaryValues@{setVelocityBoundaryValues}!Boundary@{Boundary}} +\doxysubsubsection{\texorpdfstring{setVelocityBoundaryValues()}{setVelocityBoundaryValues()}} +{\footnotesize\ttfamily void Boundary\+::set\+Velocity\+Boundary\+Values (\begin{DoxyParamCaption}\item[{double}]{dt }\end{DoxyParamCaption})} + + + +overloaded function that sets velocity boundary + +necessary when fluid tracker is used + + +\begin{DoxyParams}{Parameters} +{\em dt} & current time step \\ +\hline +\end{DoxyParams} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/boundary/boundary.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/boundary/boundary.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classCentralDifferences.eps b/documentation/latex/classCentralDifferences.eps new file mode 100644 index 00000000..04ccd50f --- /dev/null +++ b/documentation/latex/classCentralDifferences.eps @@ -0,0 +1,203 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 472.440948 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.058333 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 3 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(CentralDifferences) cw +(Discretization) cw +(StaggeredGrid) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (CentralDifferences) 0.000000 0.000000 box + (Discretization) 0.000000 1.000000 box + (StaggeredGrid) 0.000000 2.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in +solid +0 0.000000 1.000000 out +solid +1 0.000000 2.000000 in diff --git a/documentation/latex/classCentralDifferences.pdf b/documentation/latex/classCentralDifferences.pdf new file mode 100644 index 00000000..1bb78bc3 Binary files /dev/null and b/documentation/latex/classCentralDifferences.pdf differ diff --git a/documentation/latex/classCentralDifferences.tex b/documentation/latex/classCentralDifferences.tex new file mode 100644 index 00000000..c4ba71b1 --- /dev/null +++ b/documentation/latex/classCentralDifferences.tex @@ -0,0 +1,244 @@ +\doxysection{Central\+Differences Class Reference} +\hypertarget{classCentralDifferences}{}\label{classCentralDifferences}\index{CentralDifferences@{CentralDifferences}} + + +Discretizes the problem using the central differences scheme. + + + + +{\ttfamily \#include $<$central\+\_\+differences.\+h$>$} + +Inheritance diagram for Central\+Differences\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=3.000000cm]{classCentralDifferences} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classCentralDifferences_ab055731e615298f745364c54f86fc191}{Central\+Differences}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{n\+Cells}}, std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{mesh\+Width}}) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classCentralDifferences_adb4502f473cc047a433db596146672e4}{compute\+Du2\+Dx}} (int i, int j) const override +\begin{DoxyCompactList}\small\item\em Calculate first derivative of u\texorpdfstring{$^\wedge$}{\string^}2 with respect to x with the central differences Scheme. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classCentralDifferences_a66eb9b800b9a9ac6f81fc719a42eb0ee}{compute\+Dv2\+Dy}} (int i, int j) const override +\begin{DoxyCompactList}\small\item\em Calculate first derivative of v\texorpdfstring{$^\wedge$}{\string^}2 with respect to y with the central differences Scheme. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classCentralDifferences_a9bd7ac3bfd709991525ec57de10ed2e1}{compute\+Duv\+Dx}} (int i, int j) const override +\begin{DoxyCompactList}\small\item\em Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to x with the central differences Scheme. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classCentralDifferences_a4184367de8d48e678edfb078a19fc0a4}{compute\+Duv\+Dy}} (int i, int j) const override +\begin{DoxyCompactList}\small\item\em Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to y with the central differences Scheme. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classDiscretization}{Discretization}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classDiscretization_a4fb8cc9823938e7c2dec329b906a462c}{Discretization}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{n\+Cells}}, std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{mesh\+Width}}) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+D2u\+Dx2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of u with respect to x. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+D2u\+Dy2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of u with respect to y. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+D2v\+Dx2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of v with respect to x. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+D2v\+Dy2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of v with respect to y. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+Dp\+Dx} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate first derivative of p with respect to x. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+Dp\+Dy} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate first derivative of p with respect to y. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classStaggeredGrid}{Staggered\+Grid}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classStaggeredGrid_aec0990b64c559b1690f21b48fb2d13b1}{Staggered\+Grid}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{n\+Cells}}, std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{mesh\+Width}}) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +const std\+::array$<$ double, 2 $>$ {\bfseries mesh\+Width} () const +\begin{DoxyCompactList}\small\item\em Get the length of a single cell in x and y directions. \end{DoxyCompactList}\item +const std\+::array$<$ int, 2 $>$ {\bfseries n\+Cells} () const +\begin{DoxyCompactList}\small\item\em Get number of cells in x and y directions. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries u} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable u. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries v} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable v. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries p} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable p. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries rhs} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable rhs. \end{DoxyCompactList}\item +double {\bfseries u} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of u in element (i,j), declared constant. \end{DoxyCompactList}\item +double \& {\bfseries u} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of u in element (i,j) \end{DoxyCompactList}\item +double {\bfseries v} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of v in element (i,j), declared constant. \end{DoxyCompactList}\item +double \& {\bfseries v} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of v in element (i,j) \end{DoxyCompactList}\item +double {\bfseries p} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of p in element (i,j), declared constant. \end{DoxyCompactList}\item +double \& {\bfseries p} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of p in element (i,j) \end{DoxyCompactList}\item +double \& {\bfseries f} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of f in element (i,j) \end{DoxyCompactList}\item +double \& {\bfseries g} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of g in element (i,j) \end{DoxyCompactList}\item +double \& {\bfseries rhs} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of rhs in element (i,j) \end{DoxyCompactList}\item +double {\bfseries dx} () const +\begin{DoxyCompactList}\small\item\em Get the mesh width in x-\/direction. \end{DoxyCompactList}\item +double {\bfseries dy} () const +\begin{DoxyCompactList}\small\item\em Get the mesh width in y-\/direction. \end{DoxyCompactList}\item +int {\bfseries u\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for u in x direction \end{DoxyCompactList}\item +int {\bfseries u\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for u in x direction \end{DoxyCompactList}\item +int {\bfseries u\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for u in y direction \end{DoxyCompactList}\item +int {\bfseries u\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for u in y direction \end{DoxyCompactList}\item +int {\bfseries v\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for v in x direction \end{DoxyCompactList}\item +int {\bfseries v\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for v in x direction \end{DoxyCompactList}\item +int {\bfseries v\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for v in y direction \end{DoxyCompactList}\item +int {\bfseries v\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for v in y direction \end{DoxyCompactList}\item +int {\bfseries p\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for p in x direction \end{DoxyCompactList}\item +int {\bfseries p\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for p in x direction \end{DoxyCompactList}\item +int {\bfseries p\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for p in y direction \end{DoxyCompactList}\item +int {\bfseries p\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for p in y direction \end{DoxyCompactList}\item +int {\bfseries f\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for f in x direction \end{DoxyCompactList}\item +int {\bfseries f\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for f in x direction \end{DoxyCompactList}\item +int {\bfseries f\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for f in y direction \end{DoxyCompactList}\item +int {\bfseries f\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for f in y direction \end{DoxyCompactList}\item +int {\bfseries g\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for g in x direction \end{DoxyCompactList}\item +int {\bfseries g\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for g in x direction \end{DoxyCompactList}\item +int {\bfseries g\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for g in y direction \end{DoxyCompactList}\item +int {\bfseries g\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for g in y direction \end{DoxyCompactList}\item +int {\bfseries rhs\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries rhs\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries rhs\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for rhs in y direction \end{DoxyCompactList}\item +int {\bfseries rhs\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for rhs in y direction \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classStaggeredGrid}{Staggered\+Grid}}} +\begin{DoxyCompactItemize} +\item +const std\+::array$<$ int, 2 $>$ {\bfseries n\+Cells\+\_\+} +\begin{DoxyCompactList}\small\item\em array containing number of cells in x and y directions \end{DoxyCompactList}\item +const std\+::array$<$ double, 2 $>$ {\bfseries mesh\+Width\+\_\+} +\begin{DoxyCompactList}\small\item\em array containing the sizes of cell edges in x and y directions \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries u\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable u \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries v\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable v \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries p\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable p \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries f\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable f \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries g\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable g \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries rhs\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable rhs \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Discretizes the problem using the central differences scheme. + +Implements the first derivatives of u\texorpdfstring{$^\wedge$}{\string^}2, v\texorpdfstring{$^\wedge$}{\string^}2 and u\texorpdfstring{$\ast$}{*}v according to the central differences scheme + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classCentralDifferences_ab055731e615298f745364c54f86fc191}\label{classCentralDifferences_ab055731e615298f745364c54f86fc191} +\index{CentralDifferences@{CentralDifferences}!CentralDifferences@{CentralDifferences}} +\index{CentralDifferences@{CentralDifferences}!CentralDifferences@{CentralDifferences}} +\doxysubsubsection{\texorpdfstring{CentralDifferences()}{CentralDifferences()}} +{\footnotesize\ttfamily Central\+Differences\+::\+Central\+Differences (\begin{DoxyParamCaption}\item[{std\+::array$<$ int, 2 $>$}]{n\+Cells, }\item[{std\+::array$<$ double, 2 $>$}]{mesh\+Width }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em n\+Cells} & array containing number of cells in x and y directions \\ +\hline +{\em mesh\+Width} & array containing the length of a single cell in x and y directions \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classCentralDifferences_adb4502f473cc047a433db596146672e4}\label{classCentralDifferences_adb4502f473cc047a433db596146672e4} +\index{CentralDifferences@{CentralDifferences}!computeDu2Dx@{computeDu2Dx}} +\index{computeDu2Dx@{computeDu2Dx}!CentralDifferences@{CentralDifferences}} +\doxysubsubsection{\texorpdfstring{computeDu2Dx()}{computeDu2Dx()}} +{\footnotesize\ttfamily double Central\+Differences\+::compute\+Du2\+Dx (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Calculate first derivative of u\texorpdfstring{$^\wedge$}{\string^}2 with respect to x with the central differences Scheme. + + + +Implements \mbox{\hyperlink{classDiscretization_acca6bf193e0e91f645d292527299254b}{Discretization}}. + +\Hypertarget{classCentralDifferences_a9bd7ac3bfd709991525ec57de10ed2e1}\label{classCentralDifferences_a9bd7ac3bfd709991525ec57de10ed2e1} +\index{CentralDifferences@{CentralDifferences}!computeDuvDx@{computeDuvDx}} +\index{computeDuvDx@{computeDuvDx}!CentralDifferences@{CentralDifferences}} +\doxysubsubsection{\texorpdfstring{computeDuvDx()}{computeDuvDx()}} +{\footnotesize\ttfamily double Central\+Differences\+::compute\+Duv\+Dx (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to x with the central differences Scheme. + + + +Implements \mbox{\hyperlink{classDiscretization_ab1c2aa237e13e7c4c9edd429de656795}{Discretization}}. + +\Hypertarget{classCentralDifferences_a4184367de8d48e678edfb078a19fc0a4}\label{classCentralDifferences_a4184367de8d48e678edfb078a19fc0a4} +\index{CentralDifferences@{CentralDifferences}!computeDuvDy@{computeDuvDy}} +\index{computeDuvDy@{computeDuvDy}!CentralDifferences@{CentralDifferences}} +\doxysubsubsection{\texorpdfstring{computeDuvDy()}{computeDuvDy()}} +{\footnotesize\ttfamily double Central\+Differences\+::compute\+Duv\+Dy (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to y with the central differences Scheme. + + + +Implements \mbox{\hyperlink{classDiscretization_a0bab86aef10a72e01b4f8102a3c91f84}{Discretization}}. + +\Hypertarget{classCentralDifferences_a66eb9b800b9a9ac6f81fc719a42eb0ee}\label{classCentralDifferences_a66eb9b800b9a9ac6f81fc719a42eb0ee} +\index{CentralDifferences@{CentralDifferences}!computeDv2Dy@{computeDv2Dy}} +\index{computeDv2Dy@{computeDv2Dy}!CentralDifferences@{CentralDifferences}} +\doxysubsubsection{\texorpdfstring{computeDv2Dy()}{computeDv2Dy()}} +{\footnotesize\ttfamily double Central\+Differences\+::compute\+Dv2\+Dy (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Calculate first derivative of v\texorpdfstring{$^\wedge$}{\string^}2 with respect to y with the central differences Scheme. + + + +Implements \mbox{\hyperlink{classDiscretization_a69ba136ab7f8c09d805afca159cab428}{Discretization}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/central\+\_\+differences.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/central\+\_\+differences.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classComputation.tex b/documentation/latex/classComputation.tex new file mode 100644 index 00000000..ad2cec7e --- /dev/null +++ b/documentation/latex/classComputation.tex @@ -0,0 +1,50 @@ +\doxysection{Computation Class Reference} +\hypertarget{classComputation}{}\label{classComputation}\index{Computation@{Computation}} + + +\doxylink{classComputation}{Computation} of Simulation. + + + + +{\ttfamily \#include $<$computation.\+h$>$} + +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{classComputation_a4a344479797b15bd5c9ed2f262657339}{initialize}} (int argc, char \texorpdfstring{$\ast$}{*}argv\mbox{[}$\,$\mbox{]}) +\begin{DoxyCompactList}\small\item\em Initialize the simulation with settings from .txt file. \end{DoxyCompactList}\item +\Hypertarget{classComputation_ad20ce6e82ec9a918e6ac03840bc688d5}\label{classComputation_ad20ce6e82ec9a918e6ac03840bc688d5} +void {\bfseries run\+Simulation} () +\begin{DoxyCompactList}\small\item\em run the whole simulation until t\+\_\+end \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\doxylink{classComputation}{Computation} of Simulation. + +Combines discretization, pressure solver and outputwriter + +\doxysubsection{Member Function Documentation} +\Hypertarget{classComputation_a4a344479797b15bd5c9ed2f262657339}\label{classComputation_a4a344479797b15bd5c9ed2f262657339} +\index{Computation@{Computation}!initialize@{initialize}} +\index{initialize@{initialize}!Computation@{Computation}} +\doxysubsubsection{\texorpdfstring{initialize()}{initialize()}} +{\footnotesize\ttfamily void Computation\+::initialize (\begin{DoxyParamCaption}\item[{int}]{argc, }\item[{char \texorpdfstring{$\ast$}{*}}]{argv\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})} + + + +Initialize the simulation with settings from .txt file. + + +\begin{DoxyParams}{Parameters} +{\em argc} & counts of CLI commands \\ +\hline +{\em argv} & values of CLI commands, expect settings.\+txt filename \\ +\hline +\end{DoxyParams} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/computation.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/computation.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classDiscretization.eps b/documentation/latex/classDiscretization.eps new file mode 100644 index 00000000..486eee2b --- /dev/null +++ b/documentation/latex/classDiscretization.eps @@ -0,0 +1,209 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 236.220474 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 2.116667 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 3 def +/cols 2 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(Discretization) cw +(StaggeredGrid) cw +(CentralDifferences) cw +(DonorCell) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (Discretization) 0.500000 1.000000 box + (StaggeredGrid) 0.500000 2.000000 box + (CentralDifferences) 0.000000 0.000000 box + (DonorCell) 1.000000 0.000000 box + +% ----- relations ----- + +solid +0 0.500000 1.000000 out +solid +1 0.500000 2.000000 in +solid +1 0.500000 0.250000 out +solid +0.000000 1.000000 1.000000 conn +solid +0 0.000000 0.750000 in +solid +0 1.000000 0.750000 in diff --git a/documentation/latex/classDiscretization.pdf b/documentation/latex/classDiscretization.pdf new file mode 100644 index 00000000..916f9eb2 Binary files /dev/null and b/documentation/latex/classDiscretization.pdf differ diff --git a/documentation/latex/classDiscretization.tex b/documentation/latex/classDiscretization.tex new file mode 100644 index 00000000..6bfc98ce --- /dev/null +++ b/documentation/latex/classDiscretization.tex @@ -0,0 +1,245 @@ +\doxysection{Discretization Class Reference} +\hypertarget{classDiscretization}{}\label{classDiscretization}\index{Discretization@{Discretization}} + + +Computes derivatives included in governing equations. + + + + +{\ttfamily \#include $<$discretization.\+h$>$} + +Inheritance diagram for Discretization\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=3.000000cm]{classDiscretization} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classDiscretization_a4fb8cc9823938e7c2dec329b906a462c}{Discretization}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{n\+Cells}}, std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{mesh\+Width}}) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +virtual double \mbox{\hyperlink{classDiscretization_acca6bf193e0e91f645d292527299254b}{compute\+Du2\+Dx}} (int i, int j) const =0 +\begin{DoxyCompactList}\small\item\em Calculate first derivative of u\texorpdfstring{$^\wedge$}{\string^}2 with respect to x. \end{DoxyCompactList}\item +virtual double \mbox{\hyperlink{classDiscretization_a69ba136ab7f8c09d805afca159cab428}{compute\+Dv2\+Dy}} (int i, int j) const =0 +\begin{DoxyCompactList}\small\item\em Calculate first derivative of v\texorpdfstring{$^\wedge$}{\string^}2 with respect to y. \end{DoxyCompactList}\item +virtual double \mbox{\hyperlink{classDiscretization_ab1c2aa237e13e7c4c9edd429de656795}{compute\+Duv\+Dx}} (int i, int j) const =0 +\begin{DoxyCompactList}\small\item\em Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to x. \end{DoxyCompactList}\item +virtual double \mbox{\hyperlink{classDiscretization_a0bab86aef10a72e01b4f8102a3c91f84}{compute\+Duv\+Dy}} (int i, int j) const =0 +\begin{DoxyCompactList}\small\item\em Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to y. \end{DoxyCompactList}\item +\Hypertarget{classDiscretization_a6986501b0b5c96699ff3ac843c1a6ca2}\label{classDiscretization_a6986501b0b5c96699ff3ac843c1a6ca2} +virtual double {\bfseries compute\+D2u\+Dx2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of u with respect to x. \end{DoxyCompactList}\item +\Hypertarget{classDiscretization_a446aabc55a9fb4b5cb2f476babc532f9}\label{classDiscretization_a446aabc55a9fb4b5cb2f476babc532f9} +virtual double {\bfseries compute\+D2u\+Dy2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of u with respect to y. \end{DoxyCompactList}\item +\Hypertarget{classDiscretization_a5119047788a34eadf37480e913bdc8ea}\label{classDiscretization_a5119047788a34eadf37480e913bdc8ea} +virtual double {\bfseries compute\+D2v\+Dx2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of v with respect to x. \end{DoxyCompactList}\item +\Hypertarget{classDiscretization_a56678582a049b1b141621e41afff1438}\label{classDiscretization_a56678582a049b1b141621e41afff1438} +virtual double {\bfseries compute\+D2v\+Dy2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of v with respect to y. \end{DoxyCompactList}\item +\Hypertarget{classDiscretization_aed3ad75ad6e647d14f118a12652c01b2}\label{classDiscretization_aed3ad75ad6e647d14f118a12652c01b2} +virtual double {\bfseries compute\+Dp\+Dx} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate first derivative of p with respect to x. \end{DoxyCompactList}\item +\Hypertarget{classDiscretization_a859f4dc33f0ea91f5e6537be09ce4999}\label{classDiscretization_a859f4dc33f0ea91f5e6537be09ce4999} +virtual double {\bfseries compute\+Dp\+Dy} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate first derivative of p with respect to y. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classStaggeredGrid}{Staggered\+Grid}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classStaggeredGrid_aec0990b64c559b1690f21b48fb2d13b1}{Staggered\+Grid}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{n\+Cells}}, std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{mesh\+Width}}) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +const std\+::array$<$ double, 2 $>$ {\bfseries mesh\+Width} () const +\begin{DoxyCompactList}\small\item\em Get the length of a single cell in x and y directions. \end{DoxyCompactList}\item +const std\+::array$<$ int, 2 $>$ {\bfseries n\+Cells} () const +\begin{DoxyCompactList}\small\item\em Get number of cells in x and y directions. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries u} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable u. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries v} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable v. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries p} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable p. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries rhs} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable rhs. \end{DoxyCompactList}\item +double {\bfseries u} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of u in element (i,j), declared constant. \end{DoxyCompactList}\item +double \& {\bfseries u} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of u in element (i,j) \end{DoxyCompactList}\item +double {\bfseries v} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of v in element (i,j), declared constant. \end{DoxyCompactList}\item +double \& {\bfseries v} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of v in element (i,j) \end{DoxyCompactList}\item +double {\bfseries p} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of p in element (i,j), declared constant. \end{DoxyCompactList}\item +double \& {\bfseries p} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of p in element (i,j) \end{DoxyCompactList}\item +double \& {\bfseries f} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of f in element (i,j) \end{DoxyCompactList}\item +double \& {\bfseries g} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of g in element (i,j) \end{DoxyCompactList}\item +double \& {\bfseries rhs} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of rhs in element (i,j) \end{DoxyCompactList}\item +double {\bfseries dx} () const +\begin{DoxyCompactList}\small\item\em Get the mesh width in x-\/direction. \end{DoxyCompactList}\item +double {\bfseries dy} () const +\begin{DoxyCompactList}\small\item\em Get the mesh width in y-\/direction. \end{DoxyCompactList}\item +int {\bfseries u\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for u in x direction \end{DoxyCompactList}\item +int {\bfseries u\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for u in x direction \end{DoxyCompactList}\item +int {\bfseries u\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for u in y direction \end{DoxyCompactList}\item +int {\bfseries u\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for u in y direction \end{DoxyCompactList}\item +int {\bfseries v\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for v in x direction \end{DoxyCompactList}\item +int {\bfseries v\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for v in x direction \end{DoxyCompactList}\item +int {\bfseries v\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for v in y direction \end{DoxyCompactList}\item +int {\bfseries v\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for v in y direction \end{DoxyCompactList}\item +int {\bfseries p\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for p in x direction \end{DoxyCompactList}\item +int {\bfseries p\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for p in x direction \end{DoxyCompactList}\item +int {\bfseries p\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for p in y direction \end{DoxyCompactList}\item +int {\bfseries p\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for p in y direction \end{DoxyCompactList}\item +int {\bfseries f\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for f in x direction \end{DoxyCompactList}\item +int {\bfseries f\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for f in x direction \end{DoxyCompactList}\item +int {\bfseries f\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for f in y direction \end{DoxyCompactList}\item +int {\bfseries f\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for f in y direction \end{DoxyCompactList}\item +int {\bfseries g\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for g in x direction \end{DoxyCompactList}\item +int {\bfseries g\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for g in x direction \end{DoxyCompactList}\item +int {\bfseries g\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for g in y direction \end{DoxyCompactList}\item +int {\bfseries g\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for g in y direction \end{DoxyCompactList}\item +int {\bfseries rhs\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries rhs\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries rhs\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for rhs in y direction \end{DoxyCompactList}\item +int {\bfseries rhs\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for rhs in y direction \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classStaggeredGrid}{Staggered\+Grid}}} +\begin{DoxyCompactItemize} +\item +const std\+::array$<$ int, 2 $>$ {\bfseries n\+Cells\+\_\+} +\begin{DoxyCompactList}\small\item\em array containing number of cells in x and y directions \end{DoxyCompactList}\item +const std\+::array$<$ double, 2 $>$ {\bfseries mesh\+Width\+\_\+} +\begin{DoxyCompactList}\small\item\em array containing the sizes of cell edges in x and y directions \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries u\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable u \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries v\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable v \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries p\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable p \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries f\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable f \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries g\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable g \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries rhs\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable rhs \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Computes derivatives included in governing equations. + +Interface for the discretization. Computes the needed derivatives to solve the Poisson and continuity equations. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classDiscretization_a4fb8cc9823938e7c2dec329b906a462c}\label{classDiscretization_a4fb8cc9823938e7c2dec329b906a462c} +\index{Discretization@{Discretization}!Discretization@{Discretization}} +\index{Discretization@{Discretization}!Discretization@{Discretization}} +\doxysubsubsection{\texorpdfstring{Discretization()}{Discretization()}} +{\footnotesize\ttfamily Discretization\+::\+Discretization (\begin{DoxyParamCaption}\item[{std\+::array$<$ int, 2 $>$}]{n\+Cells, }\item[{std\+::array$<$ double, 2 $>$}]{mesh\+Width }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em n\+Cells} & array containing number of cells in x and y directions \\ +\hline +{\em mesh\+Width} & array containing the length of a single cell in x and y directions \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classDiscretization_acca6bf193e0e91f645d292527299254b}\label{classDiscretization_acca6bf193e0e91f645d292527299254b} +\index{Discretization@{Discretization}!computeDu2Dx@{computeDu2Dx}} +\index{computeDu2Dx@{computeDu2Dx}!Discretization@{Discretization}} +\doxysubsubsection{\texorpdfstring{computeDu2Dx()}{computeDu2Dx()}} +{\footnotesize\ttfamily virtual double Discretization\+::compute\+Du2\+Dx (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}} + + + +Calculate first derivative of u\texorpdfstring{$^\wedge$}{\string^}2 with respect to x. + + + +Implemented in \mbox{\hyperlink{classCentralDifferences_adb4502f473cc047a433db596146672e4}{Central\+Differences}}, and \mbox{\hyperlink{classDonorCell_a265bdaf46ed8ba46a42ef0cb03807175}{Donor\+Cell}}. + +\Hypertarget{classDiscretization_ab1c2aa237e13e7c4c9edd429de656795}\label{classDiscretization_ab1c2aa237e13e7c4c9edd429de656795} +\index{Discretization@{Discretization}!computeDuvDx@{computeDuvDx}} +\index{computeDuvDx@{computeDuvDx}!Discretization@{Discretization}} +\doxysubsubsection{\texorpdfstring{computeDuvDx()}{computeDuvDx()}} +{\footnotesize\ttfamily virtual double Discretization\+::compute\+Duv\+Dx (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}} + + + +Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to x. + + + +Implemented in \mbox{\hyperlink{classCentralDifferences_a9bd7ac3bfd709991525ec57de10ed2e1}{Central\+Differences}}, and \mbox{\hyperlink{classDonorCell_ae41b5f85743ca7f148bd829561bd9cb5}{Donor\+Cell}}. + +\Hypertarget{classDiscretization_a0bab86aef10a72e01b4f8102a3c91f84}\label{classDiscretization_a0bab86aef10a72e01b4f8102a3c91f84} +\index{Discretization@{Discretization}!computeDuvDy@{computeDuvDy}} +\index{computeDuvDy@{computeDuvDy}!Discretization@{Discretization}} +\doxysubsubsection{\texorpdfstring{computeDuvDy()}{computeDuvDy()}} +{\footnotesize\ttfamily virtual double Discretization\+::compute\+Duv\+Dy (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}} + + + +Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to y. + + + +Implemented in \mbox{\hyperlink{classCentralDifferences_a4184367de8d48e678edfb078a19fc0a4}{Central\+Differences}}, and \mbox{\hyperlink{classDonorCell_a285562312f08efde26afd160174d2843}{Donor\+Cell}}. + +\Hypertarget{classDiscretization_a69ba136ab7f8c09d805afca159cab428}\label{classDiscretization_a69ba136ab7f8c09d805afca159cab428} +\index{Discretization@{Discretization}!computeDv2Dy@{computeDv2Dy}} +\index{computeDv2Dy@{computeDv2Dy}!Discretization@{Discretization}} +\doxysubsubsection{\texorpdfstring{computeDv2Dy()}{computeDv2Dy()}} +{\footnotesize\ttfamily virtual double Discretization\+::compute\+Dv2\+Dy (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}} + + + +Calculate first derivative of v\texorpdfstring{$^\wedge$}{\string^}2 with respect to y. + + + +Implemented in \mbox{\hyperlink{classCentralDifferences_a66eb9b800b9a9ac6f81fc719a42eb0ee}{Central\+Differences}}, and \mbox{\hyperlink{classDonorCell_a01dcfb7fcf356d5ee412107a30c26fb3}{Donor\+Cell}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/discretization.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/discretization.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classDonorCell.eps b/documentation/latex/classDonorCell.eps new file mode 100644 index 00000000..b2ede092 --- /dev/null +++ b/documentation/latex/classDonorCell.eps @@ -0,0 +1,203 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 588.235291 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 0.850000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 3 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(DonorCell) cw +(Discretization) cw +(StaggeredGrid) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (DonorCell) 0.000000 0.000000 box + (Discretization) 0.000000 1.000000 box + (StaggeredGrid) 0.000000 2.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in +solid +0 0.000000 1.000000 out +solid +1 0.000000 2.000000 in diff --git a/documentation/latex/classDonorCell.pdf b/documentation/latex/classDonorCell.pdf new file mode 100644 index 00000000..1396d56d Binary files /dev/null and b/documentation/latex/classDonorCell.pdf differ diff --git a/documentation/latex/classDonorCell.tex b/documentation/latex/classDonorCell.tex new file mode 100644 index 00000000..393f7201 --- /dev/null +++ b/documentation/latex/classDonorCell.tex @@ -0,0 +1,246 @@ +\doxysection{Donor\+Cell Class Reference} +\hypertarget{classDonorCell}{}\label{classDonorCell}\index{DonorCell@{DonorCell}} + + +Discretizes the problem using the donor cell scheme. + + + + +{\ttfamily \#include $<$donor\+\_\+cell.\+h$>$} + +Inheritance diagram for Donor\+Cell\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=3.000000cm]{classDonorCell} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classDonorCell_a4896ad035a5ac50c85e2b66d442a5312}{Donor\+Cell}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{n\+Cells}}, std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{mesh\+Width}}, double alpha) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classDonorCell_a265bdaf46ed8ba46a42ef0cb03807175}{compute\+Du2\+Dx}} (int i, int j) const override +\begin{DoxyCompactList}\small\item\em Calculate first derivative of u\texorpdfstring{$^\wedge$}{\string^}2 with respect to x with the donor cell Scheme. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classDonorCell_a01dcfb7fcf356d5ee412107a30c26fb3}{compute\+Dv2\+Dy}} (int i, int j) const override +\begin{DoxyCompactList}\small\item\em Calculate first derivative of v\texorpdfstring{$^\wedge$}{\string^}2 with respect to y with the donor cell Scheme. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classDonorCell_ae41b5f85743ca7f148bd829561bd9cb5}{compute\+Duv\+Dx}} (int i, int j) const override +\begin{DoxyCompactList}\small\item\em Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to x with the donor cell Scheme. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classDonorCell_a285562312f08efde26afd160174d2843}{compute\+Duv\+Dy}} (int i, int j) const override +\begin{DoxyCompactList}\small\item\em Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to y with the donor cell Scheme. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classDiscretization}{Discretization}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classDiscretization_a4fb8cc9823938e7c2dec329b906a462c}{Discretization}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{n\+Cells}}, std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{mesh\+Width}}) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+D2u\+Dx2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of u with respect to x. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+D2u\+Dy2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of u with respect to y. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+D2v\+Dx2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of v with respect to x. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+D2v\+Dy2} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate second derivative of v with respect to y. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+Dp\+Dx} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate first derivative of p with respect to x. \end{DoxyCompactList}\item +virtual double {\bfseries compute\+Dp\+Dy} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Calculate first derivative of p with respect to y. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classStaggeredGrid}{Staggered\+Grid}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classStaggeredGrid_aec0990b64c559b1690f21b48fb2d13b1}{Staggered\+Grid}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{n\+Cells}}, std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{mesh\+Width}}) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +const std\+::array$<$ double, 2 $>$ {\bfseries mesh\+Width} () const +\begin{DoxyCompactList}\small\item\em Get the length of a single cell in x and y directions. \end{DoxyCompactList}\item +const std\+::array$<$ int, 2 $>$ {\bfseries n\+Cells} () const +\begin{DoxyCompactList}\small\item\em Get number of cells in x and y directions. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries u} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable u. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries v} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable v. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries p} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable p. \end{DoxyCompactList}\item +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries rhs} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable rhs. \end{DoxyCompactList}\item +double {\bfseries u} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of u in element (i,j), declared constant. \end{DoxyCompactList}\item +double \& {\bfseries u} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of u in element (i,j) \end{DoxyCompactList}\item +double {\bfseries v} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of v in element (i,j), declared constant. \end{DoxyCompactList}\item +double \& {\bfseries v} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of v in element (i,j) \end{DoxyCompactList}\item +double {\bfseries p} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of p in element (i,j), declared constant. \end{DoxyCompactList}\item +double \& {\bfseries p} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of p in element (i,j) \end{DoxyCompactList}\item +double \& {\bfseries f} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of f in element (i,j) \end{DoxyCompactList}\item +double \& {\bfseries g} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of g in element (i,j) \end{DoxyCompactList}\item +double \& {\bfseries rhs} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of rhs in element (i,j) \end{DoxyCompactList}\item +double {\bfseries dx} () const +\begin{DoxyCompactList}\small\item\em Get the mesh width in x-\/direction. \end{DoxyCompactList}\item +double {\bfseries dy} () const +\begin{DoxyCompactList}\small\item\em Get the mesh width in y-\/direction. \end{DoxyCompactList}\item +int {\bfseries u\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for u in x direction \end{DoxyCompactList}\item +int {\bfseries u\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for u in x direction \end{DoxyCompactList}\item +int {\bfseries u\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for u in y direction \end{DoxyCompactList}\item +int {\bfseries u\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for u in y direction \end{DoxyCompactList}\item +int {\bfseries v\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for v in x direction \end{DoxyCompactList}\item +int {\bfseries v\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for v in x direction \end{DoxyCompactList}\item +int {\bfseries v\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for v in y direction \end{DoxyCompactList}\item +int {\bfseries v\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for v in y direction \end{DoxyCompactList}\item +int {\bfseries p\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for p in x direction \end{DoxyCompactList}\item +int {\bfseries p\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for p in x direction \end{DoxyCompactList}\item +int {\bfseries p\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for p in y direction \end{DoxyCompactList}\item +int {\bfseries p\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for p in y direction \end{DoxyCompactList}\item +int {\bfseries f\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for f in x direction \end{DoxyCompactList}\item +int {\bfseries f\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for f in x direction \end{DoxyCompactList}\item +int {\bfseries f\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for f in y direction \end{DoxyCompactList}\item +int {\bfseries f\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for f in y direction \end{DoxyCompactList}\item +int {\bfseries g\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for g in x direction \end{DoxyCompactList}\item +int {\bfseries g\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for g in x direction \end{DoxyCompactList}\item +int {\bfseries g\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for g in y direction \end{DoxyCompactList}\item +int {\bfseries g\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for g in y direction \end{DoxyCompactList}\item +int {\bfseries rhs\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries rhs\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries rhs\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for rhs in y direction \end{DoxyCompactList}\item +int {\bfseries rhs\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for rhs in y direction \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classStaggeredGrid}{Staggered\+Grid}}} +\begin{DoxyCompactItemize} +\item +const std\+::array$<$ int, 2 $>$ {\bfseries n\+Cells\+\_\+} +\begin{DoxyCompactList}\small\item\em array containing number of cells in x and y directions \end{DoxyCompactList}\item +const std\+::array$<$ double, 2 $>$ {\bfseries mesh\+Width\+\_\+} +\begin{DoxyCompactList}\small\item\em array containing the sizes of cell edges in x and y directions \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries u\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable u \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries v\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable v \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries p\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable p \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries f\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable f \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries g\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable g \end{DoxyCompactList}\item +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries rhs\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable rhs \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Discretizes the problem using the donor cell scheme. + +Implements the first derivatives of u\texorpdfstring{$^\wedge$}{\string^}2, v\texorpdfstring{$^\wedge$}{\string^}2 and u\texorpdfstring{$\ast$}{*}v according to the donor cell scheme + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classDonorCell_a4896ad035a5ac50c85e2b66d442a5312}\label{classDonorCell_a4896ad035a5ac50c85e2b66d442a5312} +\index{DonorCell@{DonorCell}!DonorCell@{DonorCell}} +\index{DonorCell@{DonorCell}!DonorCell@{DonorCell}} +\doxysubsubsection{\texorpdfstring{DonorCell()}{DonorCell()}} +{\footnotesize\ttfamily Donor\+Cell\+::\+Donor\+Cell (\begin{DoxyParamCaption}\item[{std\+::array$<$ int, 2 $>$}]{n\+Cells, }\item[{std\+::array$<$ double, 2 $>$}]{mesh\+Width, }\item[{double}]{alpha }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em n\+Cells} & array containing number of cells in x and y directions \\ +\hline +{\em mesh\+Width} & array containing the length of a single cell in x and y directions \\ +\hline +{\em alpha} & weight factor between central differences and donor cell schemes \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classDonorCell_a265bdaf46ed8ba46a42ef0cb03807175}\label{classDonorCell_a265bdaf46ed8ba46a42ef0cb03807175} +\index{DonorCell@{DonorCell}!computeDu2Dx@{computeDu2Dx}} +\index{computeDu2Dx@{computeDu2Dx}!DonorCell@{DonorCell}} +\doxysubsubsection{\texorpdfstring{computeDu2Dx()}{computeDu2Dx()}} +{\footnotesize\ttfamily double Donor\+Cell\+::compute\+Du2\+Dx (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Calculate first derivative of u\texorpdfstring{$^\wedge$}{\string^}2 with respect to x with the donor cell Scheme. + + + +Implements \mbox{\hyperlink{classDiscretization_acca6bf193e0e91f645d292527299254b}{Discretization}}. + +\Hypertarget{classDonorCell_ae41b5f85743ca7f148bd829561bd9cb5}\label{classDonorCell_ae41b5f85743ca7f148bd829561bd9cb5} +\index{DonorCell@{DonorCell}!computeDuvDx@{computeDuvDx}} +\index{computeDuvDx@{computeDuvDx}!DonorCell@{DonorCell}} +\doxysubsubsection{\texorpdfstring{computeDuvDx()}{computeDuvDx()}} +{\footnotesize\ttfamily double Donor\+Cell\+::compute\+Duv\+Dx (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to x with the donor cell Scheme. + + + +Implements \mbox{\hyperlink{classDiscretization_ab1c2aa237e13e7c4c9edd429de656795}{Discretization}}. + +\Hypertarget{classDonorCell_a285562312f08efde26afd160174d2843}\label{classDonorCell_a285562312f08efde26afd160174d2843} +\index{DonorCell@{DonorCell}!computeDuvDy@{computeDuvDy}} +\index{computeDuvDy@{computeDuvDy}!DonorCell@{DonorCell}} +\doxysubsubsection{\texorpdfstring{computeDuvDy()}{computeDuvDy()}} +{\footnotesize\ttfamily double Donor\+Cell\+::compute\+Duv\+Dy (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Calculate first derivative of u\texorpdfstring{$\ast$}{*}v with respect to y with the donor cell Scheme. + + + +Implements \mbox{\hyperlink{classDiscretization_a0bab86aef10a72e01b4f8102a3c91f84}{Discretization}}. + +\Hypertarget{classDonorCell_a01dcfb7fcf356d5ee412107a30c26fb3}\label{classDonorCell_a01dcfb7fcf356d5ee412107a30c26fb3} +\index{DonorCell@{DonorCell}!computeDv2Dy@{computeDv2Dy}} +\index{computeDv2Dy@{computeDv2Dy}!DonorCell@{DonorCell}} +\doxysubsubsection{\texorpdfstring{computeDv2Dy()}{computeDv2Dy()}} +{\footnotesize\ttfamily double Donor\+Cell\+::compute\+Dv2\+Dy (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +Calculate first derivative of v\texorpdfstring{$^\wedge$}{\string^}2 with respect to y with the donor cell Scheme. + + + +Implements \mbox{\hyperlink{classDiscretization_a69ba136ab7f8c09d805afca159cab428}{Discretization}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/donor\+\_\+cell.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/donor\+\_\+cell.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classFieldVariable.eps b/documentation/latex/classFieldVariable.eps new file mode 100644 index 00000000..0a27d91c --- /dev/null +++ b/documentation/latex/classFieldVariable.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 416.666656 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.200000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(FieldVariable) cw +(Array2D) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (FieldVariable) 0.000000 0.000000 box + (Array2D) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/documentation/latex/classFieldVariable.pdf b/documentation/latex/classFieldVariable.pdf new file mode 100644 index 00000000..773f3f4e Binary files /dev/null and b/documentation/latex/classFieldVariable.pdf differ diff --git a/documentation/latex/classFieldVariable.tex b/documentation/latex/classFieldVariable.tex new file mode 100644 index 00000000..8e431433 --- /dev/null +++ b/documentation/latex/classFieldVariable.tex @@ -0,0 +1,110 @@ +\doxysection{Field\+Variable Class Reference} +\hypertarget{classFieldVariable}{}\label{classFieldVariable}\index{FieldVariable@{FieldVariable}} + + +\doxylink{classDiscretization}{Discretization} of a scalar function. + + + + +{\ttfamily \#include $<$field\+\_\+variable.\+h$>$} + +Inheritance diagram for Field\+Variable\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classFieldVariable} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classFieldVariable_aa0985778bc6331b74904a03c3ef67a98}{Field\+Variable}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classArray2D_accf87be860645d6c50d6ba6fa39ec6f9}{size}}, std\+::array$<$ double, 2 $>$ origin, std\+::array$<$ double, 2 $>$ mesh\+Width) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classFieldVariable_a2949624f1d2d7e29872f743db0b1d83b}{interpolate\+At}} (double x, double y) const +\begin{DoxyCompactList}\small\item\em Interpolates value of field variable in domain using x and y coordinates. \end{DoxyCompactList}\item +double \mbox{\hyperlink{classFieldVariable_a55168fd422c70c8386ba311909427cf7}{find\+Abs\+Max}} () const +\begin{DoxyCompactList}\small\item\em Find point in \doxylink{classArray2D}{Array2D} of Fieldvariable with maximum value. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classArray2D}{Array2D}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classArray2D_a16521417dfdf67ec694bfb7747df9000}{Array2D}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classArray2D_accf87be860645d6c50d6ba6fa39ec6f9}{size}}) +\begin{DoxyCompactList}\small\item\em constructor. \end{DoxyCompactList}\item +double \& \mbox{\hyperlink{classArray2D_a9d49e5544f4acf51a57dcbb0ed1bb0f8}{operator()}} (int i, int j) +\begin{DoxyCompactList}\small\item\em set array value. Overloads the () operator \end{DoxyCompactList}\item +double \mbox{\hyperlink{classArray2D_af745718ec25b815051de2d0c3c94e0d2}{operator()}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em get array value. Overloads the () operator \end{DoxyCompactList}\item +std\+::array$<$ int, 2 $>$ {\bfseries size} () const +\begin{DoxyCompactList}\small\item\em get size of array in x and y direction \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classArray2D}{Array2D}}} +\begin{DoxyCompactItemize} +\item +const std\+::array$<$ int, 2 $>$ {\bfseries size\+\_\+} +\begin{DoxyCompactList}\small\item\em size of array in x and y direction \end{DoxyCompactList}\item +std\+::vector$<$ double $>$ {\bfseries data\+\_\+} +\begin{DoxyCompactList}\small\item\em storage array values, in row-\/major order \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\doxylink{classDiscretization}{Discretization} of a scalar function. + +A field variable is the discretization of a scalar function f(x) with x in the computational domain. More specifically, a scalar value is stored at discrete nodes/points. The nodes are arranged in an equidistant mesh with specified mesh width. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classFieldVariable_aa0985778bc6331b74904a03c3ef67a98}\label{classFieldVariable_aa0985778bc6331b74904a03c3ef67a98} +\index{FieldVariable@{FieldVariable}!FieldVariable@{FieldVariable}} +\index{FieldVariable@{FieldVariable}!FieldVariable@{FieldVariable}} +\doxysubsubsection{\texorpdfstring{FieldVariable()}{FieldVariable()}} +{\footnotesize\ttfamily Field\+Variable\+::\+Field\+Variable (\begin{DoxyParamCaption}\item[{std\+::array$<$ int, 2 $>$}]{size, }\item[{std\+::array$<$ double, 2 $>$}]{origin, }\item[{std\+::array$<$ double, 2 $>$}]{mesh\+Width }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em size} & number of cells in x and y direction \\ +\hline +{\em origin} & orgin of Fieldvariable relative to domain origin \\ +\hline +{\em meshwidth} & mesh width in x and y direction \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classFieldVariable_a55168fd422c70c8386ba311909427cf7}\label{classFieldVariable_a55168fd422c70c8386ba311909427cf7} +\index{FieldVariable@{FieldVariable}!findAbsMax@{findAbsMax}} +\index{findAbsMax@{findAbsMax}!FieldVariable@{FieldVariable}} +\doxysubsubsection{\texorpdfstring{findAbsMax()}{findAbsMax()}} +{\footnotesize\ttfamily double Field\+Variable\+::find\+Abs\+Max (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} + + + +Find point in \doxylink{classArray2D}{Array2D} of Fieldvariable with maximum value. + +Finds maximum by iterating through all values in Fiel\+Variable \Hypertarget{classFieldVariable_a2949624f1d2d7e29872f743db0b1d83b}\label{classFieldVariable_a2949624f1d2d7e29872f743db0b1d83b} +\index{FieldVariable@{FieldVariable}!interpolateAt@{interpolateAt}} +\index{interpolateAt@{interpolateAt}!FieldVariable@{FieldVariable}} +\doxysubsubsection{\texorpdfstring{interpolateAt()}{interpolateAt()}} +{\footnotesize\ttfamily double Field\+Variable\+::interpolate\+At (\begin{DoxyParamCaption}\item[{double}]{x, }\item[{double}]{y }\end{DoxyParamCaption}) const} + + + +Interpolates value of field variable in domain using x and y coordinates. + +Interpolates by using bilinear interpolation. + + +\begin{DoxyParams}{Parameters} +{\em x} & x postion of point to interpolate \\ +\hline +{\em y} & y postion of point to interpolate \\ +\hline +\end{DoxyParams} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/storage/field\+\_\+variable.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/storage/field\+\_\+variable.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classFluidTracer.tex b/documentation/latex/classFluidTracer.tex new file mode 100644 index 00000000..14a43eb4 --- /dev/null +++ b/documentation/latex/classFluidTracer.tex @@ -0,0 +1,111 @@ +\doxysection{Fluid\+Tracer Class Reference} +\hypertarget{classFluidTracer}{}\label{classFluidTracer}\index{FluidTracer@{FluidTracer}} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classFluidTracer_a0a1c9fde640a129696e5c47869948939}\label{classFluidTracer_a0a1c9fde640a129696e5c47869948939} +{\bfseries Fluid\+Tracer} (int num\+Particlesper\+Cell, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classMask}{Mask}} $>$ mask) +\item +\Hypertarget{classFluidTracer_ad7f2ef5ef8d806b87c6478e85159a873}\label{classFluidTracer_ad7f2ef5ef8d806b87c6478e85159a873} +{\bfseries Fluid\+Tracer} (std\+::vector$<$ double $>$ x, std\+::vector$<$ double $>$ y, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classMask}{Mask}} $>$ mask) +\item +void \mbox{\hyperlink{classFluidTracer_aba4d452f26e9276b91256dd251789b90}{move\+Particles}} (double dt) +\begin{DoxyCompactList}\small\item\em Update the position of the particles according to the velocity field and sets mask accordingly. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classFluidTracer_ace163e1fe040acbd4c3122f082b08eea}{create\+Particles}} (double position\+SourceX, double position\+SourceY) +\begin{DoxyCompactList}\small\item\em can be used to create a source cell for particles \end{DoxyCompactList}\item +int \mbox{\hyperlink{classFluidTracer_adc687a4988f532e21e13c9aa0591d658}{get\+Number\+Of\+Particles}} () const +\begin{DoxyCompactList}\small\item\em Total number of Particles. \end{DoxyCompactList}\item +int \mbox{\hyperlink{classFluidTracer_a95d6d49d957b2639169c136addf52719}{get\+Number\+Of\+Particles}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Particles of specified cell. \end{DoxyCompactList}\item +std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classFluidTracer_a37ee0325d6af08be6eba8b073162342e}{get\+Particle\+Position}} (int i) const +\begin{DoxyCompactList}\small\item\em Get the Particle Position, index starts at 0. \end{DoxyCompactList}\item +\Hypertarget{classFluidTracer_a0a9c3c092d01327d636ef39b8dd36ed8}\label{classFluidTracer_a0a9c3c092d01327d636ef39b8dd36ed8} +std\+::array$<$ int, 2 $>$ {\bfseries cell\+Of\+Particle} (int i) +\item +\Hypertarget{classFluidTracer_a052e1ab909459100cd6a6cd8e9064ba6}\label{classFluidTracer_a052e1ab909459100cd6a6cd8e9064ba6} +int {\bfseries val2\+CellX} (double x\+Val) +\item +\Hypertarget{classFluidTracer_a7bc97a7586fa8d900a6269e77c9ccba1}\label{classFluidTracer_a7bc97a7586fa8d900a6269e77c9ccba1} +int {\bfseries val2\+CellY} (double y\+Val) +\item +\Hypertarget{classFluidTracer_a8306a4cff0036da1fcf695713f9f4226}\label{classFluidTracer_a8306a4cff0036da1fcf695713f9f4226} +std\+::array$<$ double, 2 $>$ {\bfseries update\+Particle} (int i, std\+::array$<$ int, 2 $>$ idx, double dt, std\+::array$<$ double, 2 $>$ vel, int depth) +\item +\Hypertarget{classFluidTracer_acdaf955221e204e107513b0e29738d53}\label{classFluidTracer_acdaf955221e204e107513b0e29738d53} +std\+::array$<$ double, 2 $>$ {\bfseries move\+Particles} (double dt, std\+::array$<$ double, 2 $>$ vel) +\item +\Hypertarget{classFluidTracer_aadad02de7f9431b76f0a86053dcc784f}\label{classFluidTracer_aadad02de7f9431b76f0a86053dcc784f} +void {\bfseries print\+Particles} () +\end{DoxyCompactItemize} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classFluidTracer_ace163e1fe040acbd4c3122f082b08eea}\label{classFluidTracer_ace163e1fe040acbd4c3122f082b08eea} +\index{FluidTracer@{FluidTracer}!createParticles@{createParticles}} +\index{createParticles@{createParticles}!FluidTracer@{FluidTracer}} +\doxysubsubsection{\texorpdfstring{createParticles()}{createParticles()}} +{\footnotesize\ttfamily void Fluid\+Tracer\+::create\+Particles (\begin{DoxyParamCaption}\item[{double}]{position\+SourceX, }\item[{double}]{position\+SourceY }\end{DoxyParamCaption})} + + + +can be used to create a source cell for particles + +fills the cell homogenously with particles by cell \Hypertarget{classFluidTracer_adc687a4988f532e21e13c9aa0591d658}\label{classFluidTracer_adc687a4988f532e21e13c9aa0591d658} +\index{FluidTracer@{FluidTracer}!getNumberOfParticles@{getNumberOfParticles}} +\index{getNumberOfParticles@{getNumberOfParticles}!FluidTracer@{FluidTracer}} +\doxysubsubsection{\texorpdfstring{getNumberOfParticles()}{getNumberOfParticles()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily int Fluid\+Tracer\+::get\+Number\+Of\+Particles (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} + + + +Total number of Particles. + +\begin{DoxyReturn}{Returns} +int +\end{DoxyReturn} +\Hypertarget{classFluidTracer_a95d6d49d957b2639169c136addf52719}\label{classFluidTracer_a95d6d49d957b2639169c136addf52719} +\index{FluidTracer@{FluidTracer}!getNumberOfParticles@{getNumberOfParticles}} +\index{getNumberOfParticles@{getNumberOfParticles}!FluidTracer@{FluidTracer}} +\doxysubsubsection{\texorpdfstring{getNumberOfParticles()}{getNumberOfParticles()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily int Fluid\+Tracer\+::get\+Number\+Of\+Particles (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +Particles of specified cell. + +uses mask Grid \Hypertarget{classFluidTracer_a37ee0325d6af08be6eba8b073162342e}\label{classFluidTracer_a37ee0325d6af08be6eba8b073162342e} +\index{FluidTracer@{FluidTracer}!getParticlePosition@{getParticlePosition}} +\index{getParticlePosition@{getParticlePosition}!FluidTracer@{FluidTracer}} +\doxysubsubsection{\texorpdfstring{getParticlePosition()}{getParticlePosition()}} +{\footnotesize\ttfamily std\+::array$<$ double, 2 $>$ Fluid\+Tracer\+::get\+Particle\+Position (\begin{DoxyParamCaption}\item[{int}]{i }\end{DoxyParamCaption}) const} + + + +Get the Particle Position, index starts at 0. + +\begin{DoxyReturn}{Returns} +std\+::array$<$double, 2$>$ +\end{DoxyReturn} +\Hypertarget{classFluidTracer_aba4d452f26e9276b91256dd251789b90}\label{classFluidTracer_aba4d452f26e9276b91256dd251789b90} +\index{FluidTracer@{FluidTracer}!moveParticles@{moveParticles}} +\index{moveParticles@{moveParticles}!FluidTracer@{FluidTracer}} +\doxysubsubsection{\texorpdfstring{moveParticles()}{moveParticles()}} +{\footnotesize\ttfamily void Fluid\+Tracer\+::move\+Particles (\begin{DoxyParamCaption}\item[{double}]{dt }\end{DoxyParamCaption})} + + + +Update the position of the particles according to the velocity field and sets mask accordingly. + +get the velocity field \$u\$ and \$v\$ Checks for collision with border or obstacle and reflects the particle at this position Update the mask where there are new Air or Fluid cells + + +\begin{DoxyParams}{Parameters} +{\em dt} & \\ +\hline +\end{DoxyParams} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/surface/fluid\+\_\+tracer.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/surface/fluid\+\_\+tracer.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classGaussSeidel.eps b/documentation/latex/classGaussSeidel.eps new file mode 100644 index 00000000..3e8f9980 --- /dev/null +++ b/documentation/latex/classGaussSeidel.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 370.370361 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.350000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(GaussSeidel) cw +(PressureSolver) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (GaussSeidel) 0.000000 0.000000 box + (PressureSolver) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/documentation/latex/classGaussSeidel.pdf b/documentation/latex/classGaussSeidel.pdf new file mode 100644 index 00000000..c28a0d3d Binary files /dev/null and b/documentation/latex/classGaussSeidel.pdf differ diff --git a/documentation/latex/classGaussSeidel.tex b/documentation/latex/classGaussSeidel.tex new file mode 100644 index 00000000..793a64c2 --- /dev/null +++ b/documentation/latex/classGaussSeidel.tex @@ -0,0 +1,111 @@ +\doxysection{Gauss\+Seidel Class Reference} +\hypertarget{classGaussSeidel}{}\label{classGaussSeidel}\index{GaussSeidel@{GaussSeidel}} + + +Standard Gauss-\/\+Seidel solver. + + + + +{\ttfamily \#include $<$gauss\+\_\+seidel.\+h$>$} + +Inheritance diagram for Gauss\+Seidel\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classGaussSeidel} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classGaussSeidel_af31cc1ace2d616ebb8e0592c06865b9c}{Gauss\+Seidel}} (const std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ \&data, double epsilon, int maximum\+Number\+Of\+Iterations, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$ boundary) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classGaussSeidel_a6f0eb0c6938a64f8ded186f88170a04b}{solve}} () override +\begin{DoxyCompactList}\small\item\em override function that starts solver. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classPressureSolver}{Pressure\+Solver}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classPressureSolver_a10803d8c3d7f3810fc0ba059acf04058}{Pressure\+Solver}} (std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization, double epsilon, int maximum\+Number\+Of\+Iterations, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$ boundary) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Public Attributes inherited from \mbox{\hyperlink{classPressureSolver}{Pressure\+Solver}}} +\begin{DoxyCompactItemize} +\item +double {\bfseries dx2} +\item +double {\bfseries dy2} +\begin{DoxyCompactList}\small\item\em squared mesh widths \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Protected Member Functions inherited from \mbox{\hyperlink{classPressureSolver}{Pressure\+Solver}}} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{classPressureSolver_a458c383fcacaf54c1a333a271049ca93}{set\+Boundary\+Values}} () +\begin{DoxyCompactList}\small\item\em Set the \doxylink{classBoundary}{Boundary} Values. \end{DoxyCompactList}\item +double {\bfseries calculate\+Residuum} () +\begin{DoxyCompactList}\small\item\em calculate residuum of current time step \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classPressureSolver}{Pressure\+Solver}}} +\begin{DoxyCompactItemize} +\item +int {\bfseries i\+\_\+beg} +\begin{DoxyCompactList}\small\item\em begin of loop for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries i\+\_\+end} +\begin{DoxyCompactList}\small\item\em end of loop for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries j\+\_\+beg} +\begin{DoxyCompactList}\small\item\em begin of loop for rhs in y direction \end{DoxyCompactList}\item +int {\bfseries j\+\_\+end} +\begin{DoxyCompactList}\small\item\em end of loop for rhs in y direction \end{DoxyCompactList}\item +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ {\bfseries discretization\+\_\+} +\begin{DoxyCompactList}\small\item\em object holding the needed field variables for rhs and p \end{DoxyCompactList}\item +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$ {\bfseries boundary\+\_\+} +\begin{DoxyCompactList}\small\item\em object managing boundary for obstacle and surface tension \end{DoxyCompactList}\item +double {\bfseries epsilon\+\_\+} +\begin{DoxyCompactList}\small\item\em tolerance for the solver \end{DoxyCompactList}\item +int {\bfseries maximum\+Number\+Of\+Iterations\+\_\+} +\begin{DoxyCompactList}\small\item\em maximum number of iterations \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Standard Gauss-\/\+Seidel solver. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classGaussSeidel_af31cc1ace2d616ebb8e0592c06865b9c}\label{classGaussSeidel_af31cc1ace2d616ebb8e0592c06865b9c} +\index{GaussSeidel@{GaussSeidel}!GaussSeidel@{GaussSeidel}} +\index{GaussSeidel@{GaussSeidel}!GaussSeidel@{GaussSeidel}} +\doxysubsubsection{\texorpdfstring{GaussSeidel()}{GaussSeidel()}} +{\footnotesize\ttfamily Gauss\+Seidel\+::\+Gauss\+Seidel (\begin{DoxyParamCaption}\item[{const std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ \&}]{data, }\item[{double}]{epsilon, }\item[{int}]{maximum\+Number\+Of\+Iterations, }\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$}]{boundary }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em data} & instance of \doxylink{classDiscretization}{Discretization} holding the needed field variables for rhs and p \\ +\hline +{\em epsilon} & tolerance for the solver \\ +\hline +{\em maximum\+Number\+Of\+Iterations} & maximum of iteration \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classGaussSeidel_a6f0eb0c6938a64f8ded186f88170a04b}\label{classGaussSeidel_a6f0eb0c6938a64f8ded186f88170a04b} +\index{GaussSeidel@{GaussSeidel}!solve@{solve}} +\index{solve@{solve}!GaussSeidel@{GaussSeidel}} +\doxysubsubsection{\texorpdfstring{solve()}{solve()}} +{\footnotesize\ttfamily void Gauss\+Seidel\+::solve (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +override function that starts solver. + + + +Implements \mbox{\hyperlink{classPressureSolver_a504ac61a1317650e0eb70d6a93212ca0}{Pressure\+Solver}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/solver/gauss\+\_\+seidel.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/solver/gauss\+\_\+seidel.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classMask.tex b/documentation/latex/classMask.tex new file mode 100644 index 00000000..11c07bdf --- /dev/null +++ b/documentation/latex/classMask.tex @@ -0,0 +1,339 @@ +\doxysection{Mask Class Reference} +\hypertarget{classMask}{}\label{classMask}\index{Mask@{Mask}} +\doxysubsubsection*{Public Types} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classMask_ad74a26afe88ebadafebd733837f3252a}\label{classMask_ad74a26afe88ebadafebd733837f3252a} +enum \mbox{\hyperlink{classMask_ad74a26afe88ebadafebd733837f3252a}{Cell\+Type}} \{ \newline +{\bfseries FLUID\+\_\+\+DROPLET} = 0 +, {\bfseries FLUID\+\_\+\+SINGLE\+\_\+\+LEFT} = 1 +, {\bfseries FLUID\+\_\+\+SINGLE\+\_\+\+TOP} = 2 +, {\bfseries FLUID\+\_\+\+SINGLE\+\_\+\+RIGHT} = 4 +, \newline +{\bfseries FLUID\+\_\+\+SINGLE\+\_\+\+BOTTOM} = 8 +, {\bfseries FLUID\+\_\+\+CORNER\+\_\+\+BOTTOM\+\_\+\+LEFT} = 6 +, {\bfseries FLUID\+\_\+\+CORNER\+\_\+\+TOP\+\_\+\+LEFT} = 12 +, {\bfseries FLUID\+\_\+\+CORNER\+\_\+\+TOP\+\_\+\+RIGHT} = 9 +, \newline +{\bfseries FLUID\+\_\+\+CORNER\+\_\+\+BOTTOM\+\_\+\+RIGHT} = 3 +, {\bfseries FLUID\+\_\+\+COLUMN\+\_\+\+HORIZONTAL} = 5 +, {\bfseries FLUID\+\_\+\+COLUMN\+\_\+\+VERTICAL} = 10 +, {\bfseries FLUID\+\_\+\+BORDER\+\_\+\+LEFT} = 14 +, \newline +{\bfseries FLUID\+\_\+\+BORDER\+\_\+\+TOP} = 13 +, {\bfseries FLUID\+\_\+\+BORDER\+\_\+\+RIGHT} = 11 +, {\bfseries FLUID\+\_\+\+BORDER\+\_\+\+BOTTOM} = 7 +, {\bfseries FLUID} = 15 +, \newline +{\bfseries FLUID\+\_\+\+TYPE} = 50 +, {\bfseries AIR} = 64 +, {\bfseries OBSTACLE} = 99 +, {\bfseries OBSTACLE\+\_\+\+INSIDE} = 100 +, \newline +{\bfseries OBSTACLE\+\_\+\+BORDER\+\_\+\+LEFT} = 101 +, {\bfseries OBSTACLE\+\_\+\+BORDER\+\_\+\+TOP} = 102 +, {\bfseries OBSTACLE\+\_\+\+CORNER\+\_\+\+TOP\+\_\+\+LEFT} = 103 +, {\bfseries OBSTACLE\+\_\+\+BORDER\+\_\+\+RIGHT} = 104 +, \newline +{\bfseries OBSTACLE\+\_\+\+CORNER\+\_\+\+TOP\+\_\+\+RIGHT} = 106 +, {\bfseries OBSTACLE\+\_\+\+BORDER\+\_\+\+BOTTOM} = 108 +, {\bfseries OBSTACLE\+\_\+\+CORNER\+\_\+\+BOTTOM\+\_\+\+LEFT} = 109 +, {\bfseries OBSTACLE\+\_\+\+CORNER\+\_\+\+BOTTOM\+\_\+\+RIGHT} = 112 +, \newline +{\bfseries DOMAIN\+\_\+\+BOUNDARY} = 200 +, {\bfseries DOMAIN\+\_\+\+LEFT\+\_\+\+NOSLIP} = 201 +, {\bfseries DOMAIN\+\_\+\+TOP\+\_\+\+NOSLIP} = 202 +, {\bfseries DOMAIN\+\_\+\+RIGHT\+\_\+\+NOSLIP} = 203 +, \newline +{\bfseries DOMAIN\+\_\+\+BOTTOM\+\_\+\+NOSLIP} = 204 +, {\bfseries DOMAIN\+\_\+\+LEFT\+\_\+\+PRESSURE} = 205 +, {\bfseries DOMAIN\+\_\+\+TOP\+\_\+\+PRESSURE} = 206 +, {\bfseries DOMAIN\+\_\+\+RIGHT\+\_\+\+PRESSURE} = 207 +, \newline +{\bfseries DOMAIN\+\_\+\+BOTTOM\+\_\+\+PRESSURE} = 208 + \} +\begin{DoxyCompactList}\small\item\em \texorpdfstring{$<$}{<} enums used to encode cell type and boundary condition \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classMask_a5d65d3a108a79864bc69994f5e56f6c3}{Mask}} (\mbox{\hyperlink{structSettings}{Settings}} settings) +\begin{DoxyCompactList}\small\item\em constructor. \end{DoxyCompactList}\item +int \& \mbox{\hyperlink{classMask_a6d612f1ac2185304b3ad7432d90dcd2b}{operator()}} (int i, int j) +\begin{DoxyCompactList}\small\item\em set array value. Overloads the () operator \end{DoxyCompactList}\item +int \mbox{\hyperlink{classMask_a154acb41f2695c2a6ace82b5ebccbb1c}{operator()}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em get array value. Overloads the () operator \end{DoxyCompactList}\item +\Hypertarget{classMask_aafa0857af35b02ba6070e76f82d51c7b}\label{classMask_aafa0857af35b02ba6070e76f82d51c7b} +std\+::array$<$ int, 2 $>$ {\bfseries size} () const +\begin{DoxyCompactList}\small\item\em get size of array in x and y direction \end{DoxyCompactList}\item +\Hypertarget{classMask_ac30997cdd83faef98290733acb325cf8}\label{classMask_ac30997cdd83faef98290733acb325cf8} +void {\bfseries reset\+Mask} () +\begin{DoxyCompactList}\small\item\em sets all not obstacle cells to air \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classMask_aadacef52f95b796920864b8519d0594b}{is\+Fluid}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Cell at (i,j) is fluid or not. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classMask_a53e4e7c0b29234856cbee33386cc5c18}{is\+Obstacle}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em True if Cell at (i,j) is either obstacle or boundary. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classMask_a7eb34f789ef96c622ab93718d5278d77}{is\+Air}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Cell at (i,j) is a air cell or not. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classMask_a5f3d53087eb5a1d9427716804e280751}{is\+Inner\+Fluid}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Cell at (i,j) is a inner fluid cell or not. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classMask_a9f76177c70d7cab7f268c8fd9a102e73}{is\+Domain\+Boundary}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Cecks if cell at index is domain boundary. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classMask_ada8b2531a4a16703f145fd6f708f21ff}{is\+Obstacle\+Boundary}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Cecks if cell at index is obstacle boundary. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classMask_a2ffcf2b70edede392422ea692e49d313}{is\+Fluid\+Boundary}} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Cecks if cell at index is fluid boundary. \end{DoxyCompactList}\item +int \mbox{\hyperlink{classMask_a3471a6026ce7eab118f660557a8abac6}{get\+Number\+Of\+Fluid\+Cells}} () const +\begin{DoxyCompactList}\small\item\em number of fluid cells \end{DoxyCompactList}\item +void \mbox{\hyperlink{classMask_a75a1750221e41c1b34f80d4d352163ac}{make\+Rectangular\+Obstacle}} () +\begin{DoxyCompactList}\small\item\em creates rectangulat objecct inside domain \end{DoxyCompactList}\item +void \mbox{\hyperlink{classMask_ad69aefd91f740d6758cdedf0df8c8ca6}{create\+Mask\+From\+PNGBit\+Map}} () +\begin{DoxyCompactList}\small\item\em creates mask by reading in bitmap \end{DoxyCompactList}\item +void \mbox{\hyperlink{classMask_aacf4d2cfe1362df85ed08fd3b0fc6d6b}{set\+Domain\+BC}} () +\begin{DoxyCompactList}\small\item\em sets enums for all cells that belong to domain boundary \end{DoxyCompactList}\item +\Hypertarget{classMask_a644a84aca88442b72b5cd87ee80f1724}\label{classMask_a644a84aca88442b72b5cd87ee80f1724} +void {\bfseries set\+Obstacle\+BC} () +\begin{DoxyCompactList}\small\item\em sets enums for all cells that belong to an obstacle \end{DoxyCompactList}\item +\Hypertarget{classMask_a41bf0aa100e2554eaea3ab29a999c0ee}\label{classMask_a41bf0aa100e2554eaea3ab29a999c0ee} +void {\bfseries set\+Fluid\+BC} () +\begin{DoxyCompactList}\small\item\em sets enums for all fluid cells that belong are located at a surface \end{DoxyCompactList}\item +\Hypertarget{classMask_a372d2a81ff261f126b11fdfcfd2f845e}\label{classMask_a372d2a81ff261f126b11fdfcfd2f845e} +void {\bfseries print\+Mask} () const +\begin{DoxyCompactList}\small\item\em print mask enums to terminal \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Protected Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classMask_a84bff46271e16eb8639c1831403c1bb9}\label{classMask_a84bff46271e16eb8639c1831403c1bb9} +std\+::array$<$ int, 2 $>$ {\bfseries size\+\_\+} +\begin{DoxyCompactList}\small\item\em size of array in x and y direction \end{DoxyCompactList}\item +\Hypertarget{classMask_acdb73aee935b502fecc8de6bf1e32a09}\label{classMask_acdb73aee935b502fecc8de6bf1e32a09} +std\+::vector$<$ int $>$ {\bfseries data\+\_\+} +\begin{DoxyCompactList}\small\item\em storage array values, in row-\/major order \end{DoxyCompactList}\item +\Hypertarget{classMask_a3c5a51f6d03bb4a5e1742537a22ec441}\label{classMask_a3c5a51f6d03bb4a5e1742537a22ec441} +std\+::vector$<$ int $>$ {\bfseries boundary\+\_\+list} +\begin{DoxyCompactList}\small\item\em stores the indices of the boundary cells \end{DoxyCompactList}\item +\Hypertarget{classMask_acb8b165d56689722fd836569e066fdd4}\label{classMask_acb8b165d56689722fd836569e066fdd4} +\mbox{\hyperlink{structSettings}{Settings}} {\bfseries settings\+\_\+} +\begin{DoxyCompactList}\small\item\em settings entity \end{DoxyCompactList}\item +\Hypertarget{classMask_abe4f6f251b0517f01d0f58f9042d3af4}\label{classMask_abe4f6f251b0517f01d0f58f9042d3af4} +int {\bfseries forbidden\+Obstacle\+Fluid\+Combinations} \mbox{[}7\mbox{]} = \{105, 107, 110, 111, 113, 114, 115\} +\begin{DoxyCompactList}\small\item\em enums that singnal forbidden obstacle -\/ fluid cell combinations \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classMask_a5d65d3a108a79864bc69994f5e56f6c3}\label{classMask_a5d65d3a108a79864bc69994f5e56f6c3} +\index{Mask@{Mask}!Mask@{Mask}} +\index{Mask@{Mask}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{Mask()}{Mask()}} +{\footnotesize\ttfamily Mask\+::\+Mask (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structSettings}{Settings}}}]{settings }\end{DoxyParamCaption})} + + + +constructor. + + +\begin{DoxyParams}{Parameters} +{\em setting} & settings containing necessary user input \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classMask_ad69aefd91f740d6758cdedf0df8c8ca6}\label{classMask_ad69aefd91f740d6758cdedf0df8c8ca6} +\index{Mask@{Mask}!createMaskFromPNGBitMap@{createMaskFromPNGBitMap}} +\index{createMaskFromPNGBitMap@{createMaskFromPNGBitMap}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{createMaskFromPNGBitMap()}{createMaskFromPNGBitMap()}} +{\footnotesize\ttfamily void Mask\+::create\+Mask\+From\+PNGBit\+Map (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +creates mask by reading in bitmap + +path to bitmap saved as png is specified in settings file by user \Hypertarget{classMask_a3471a6026ce7eab118f660557a8abac6}\label{classMask_a3471a6026ce7eab118f660557a8abac6} +\index{Mask@{Mask}!getNumberOfFluidCells@{getNumberOfFluidCells}} +\index{getNumberOfFluidCells@{getNumberOfFluidCells}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{getNumberOfFluidCells()}{getNumberOfFluidCells()}} +{\footnotesize\ttfamily int Mask\+::get\+Number\+Of\+Fluid\+Cells (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} + + + +number of fluid cells + +not efficient but is only used once in the creation of the fluid tracer \Hypertarget{classMask_a7eb34f789ef96c622ab93718d5278d77}\label{classMask_a7eb34f789ef96c622ab93718d5278d77} +\index{Mask@{Mask}!isAir@{isAir}} +\index{isAir@{isAir}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{isAir()}{isAir()}} +{\footnotesize\ttfamily bool Mask\+::is\+Air (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +Cell at (i,j) is a air cell or not. + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction\\ +\hline +\end{DoxyParams} +If i and j are out of bond returns false \Hypertarget{classMask_a9f76177c70d7cab7f268c8fd9a102e73}\label{classMask_a9f76177c70d7cab7f268c8fd9a102e73} +\index{Mask@{Mask}!isDomainBoundary@{isDomainBoundary}} +\index{isDomainBoundary@{isDomainBoundary}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{isDomainBoundary()}{isDomainBoundary()}} +{\footnotesize\ttfamily bool Mask\+::is\+Domain\+Boundary (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +Cecks if cell at index is domain boundary. + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction \\ +\hline +\end{DoxyParams} +\Hypertarget{classMask_aadacef52f95b796920864b8519d0594b}\label{classMask_aadacef52f95b796920864b8519d0594b} +\index{Mask@{Mask}!isFluid@{isFluid}} +\index{isFluid@{isFluid}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{isFluid()}{isFluid()}} +{\footnotesize\ttfamily bool Mask\+::is\+Fluid (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +Cell at (i,j) is fluid or not. + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction\\ +\hline +\end{DoxyParams} +If i and j are out of bond returns false \Hypertarget{classMask_a2ffcf2b70edede392422ea692e49d313}\label{classMask_a2ffcf2b70edede392422ea692e49d313} +\index{Mask@{Mask}!isFluidBoundary@{isFluidBoundary}} +\index{isFluidBoundary@{isFluidBoundary}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{isFluidBoundary()}{isFluidBoundary()}} +{\footnotesize\ttfamily bool Mask\+::is\+Fluid\+Boundary (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +Cecks if cell at index is fluid boundary. + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction \\ +\hline +\end{DoxyParams} +\Hypertarget{classMask_a5f3d53087eb5a1d9427716804e280751}\label{classMask_a5f3d53087eb5a1d9427716804e280751} +\index{Mask@{Mask}!isInnerFluid@{isInnerFluid}} +\index{isInnerFluid@{isInnerFluid}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{isInnerFluid()}{isInnerFluid()}} +{\footnotesize\ttfamily bool Mask\+::is\+Inner\+Fluid (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +Cell at (i,j) is a inner fluid cell or not. + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction\\ +\hline +\end{DoxyParams} +Checks if fluid is sourrounded by only fluid cells If i and j are out of bond returns false \Hypertarget{classMask_a53e4e7c0b29234856cbee33386cc5c18}\label{classMask_a53e4e7c0b29234856cbee33386cc5c18} +\index{Mask@{Mask}!isObstacle@{isObstacle}} +\index{isObstacle@{isObstacle}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{isObstacle()}{isObstacle()}} +{\footnotesize\ttfamily bool Mask\+::is\+Obstacle (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +True if Cell at (i,j) is either obstacle or boundary. + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction \\ +\hline +\end{DoxyParams} +\Hypertarget{classMask_ada8b2531a4a16703f145fd6f708f21ff}\label{classMask_ada8b2531a4a16703f145fd6f708f21ff} +\index{Mask@{Mask}!isObstacleBoundary@{isObstacleBoundary}} +\index{isObstacleBoundary@{isObstacleBoundary}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{isObstacleBoundary()}{isObstacleBoundary()}} +{\footnotesize\ttfamily bool Mask\+::is\+Obstacle\+Boundary (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +Cecks if cell at index is obstacle boundary. + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction \\ +\hline +\end{DoxyParams} +\Hypertarget{classMask_a75a1750221e41c1b34f80d4d352163ac}\label{classMask_a75a1750221e41c1b34f80d4d352163ac} +\index{Mask@{Mask}!makeRectangularObstacle@{makeRectangularObstacle}} +\index{makeRectangularObstacle@{makeRectangularObstacle}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{makeRectangularObstacle()}{makeRectangularObstacle()}} +{\footnotesize\ttfamily void Mask\+::make\+Rectangular\+Obstacle (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +creates rectangulat objecct inside domain + +location and size are specified in settings file by user \Hypertarget{classMask_a6d612f1ac2185304b3ad7432d90dcd2b}\label{classMask_a6d612f1ac2185304b3ad7432d90dcd2b} +\index{Mask@{Mask}!operator()@{operator()}} +\index{operator()@{operator()}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{operator()()}{operator()()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily int \& Mask\+::operator() (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption})} + + + +set array value. Overloads the () operator + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction \\ +\hline +\end{DoxyParams} +\Hypertarget{classMask_a154acb41f2695c2a6ace82b5ebccbb1c}\label{classMask_a154acb41f2695c2a6ace82b5ebccbb1c} +\index{Mask@{Mask}!operator()@{operator()}} +\index{operator()@{operator()}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{operator()()}{operator()()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily int Mask\+::operator() (\begin{DoxyParamCaption}\item[{int}]{i, }\item[{int}]{j }\end{DoxyParamCaption}) const} + + + +get array value. Overloads the () operator + + +\begin{DoxyParams}{Parameters} +{\em i} & index in x direction \\ +\hline +{\em j} & index in y direction \\ +\hline +\end{DoxyParams} +\Hypertarget{classMask_aacf4d2cfe1362df85ed08fd3b0fc6d6b}\label{classMask_aacf4d2cfe1362df85ed08fd3b0fc6d6b} +\index{Mask@{Mask}!setDomainBC@{setDomainBC}} +\index{setDomainBC@{setDomainBC}!Mask@{Mask}} +\doxysubsubsection{\texorpdfstring{setDomainBC()}{setDomainBC()}} +{\footnotesize\ttfamily void Mask\+::set\+Domain\+BC (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +sets enums for all cells that belong to domain boundary + +type of domain boundary condition is specified in settings file by user + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/boundary/mask.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/boundary/mask.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classOutputWriter.eps b/documentation/latex/classOutputWriter.eps new file mode 100644 index 00000000..b542206f --- /dev/null +++ b/documentation/latex/classOutputWriter.eps @@ -0,0 +1,203 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 138.888885 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 3.600000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 2 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OutputWriter) cw +(OutputWriterParaview) cw +(OutputWriterText) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OutputWriter) 0.500000 1.000000 box + (OutputWriterParaview) 0.000000 0.000000 box + (OutputWriterText) 1.000000 0.000000 box + +% ----- relations ----- + +solid +1 0.500000 0.250000 out +solid +0.000000 1.000000 1.000000 conn +solid +0 0.000000 0.750000 in +solid +0 1.000000 0.750000 in diff --git a/documentation/latex/classOutputWriter.pdf b/documentation/latex/classOutputWriter.pdf new file mode 100644 index 00000000..7bd006b2 Binary files /dev/null and b/documentation/latex/classOutputWriter.pdf differ diff --git a/documentation/latex/classOutputWriter.tex b/documentation/latex/classOutputWriter.tex new file mode 100644 index 00000000..8ec274d1 --- /dev/null +++ b/documentation/latex/classOutputWriter.tex @@ -0,0 +1,84 @@ +\doxysection{Output\+Writer Class Reference} +\hypertarget{classOutputWriter}{}\label{classOutputWriter}\index{OutputWriter@{OutputWriter}} + + +Inteface class for writing simulation data output. + + + + +{\ttfamily \#include $<$output\+\_\+writer.\+h$>$} + +Inheritance diagram for Output\+Writer\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classOutputWriter} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classOutputWriter_a4f3180552b8102c27e087357b9cdd1f7}{Output\+Writer}} (std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +virtual void \mbox{\hyperlink{classOutputWriter_ac625c204affdc05919388a3549c2e945}{write\+File}} (double current\+Time)=0 +\begin{DoxyCompactList}\small\item\em Write current velocities to file. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Protected Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classOutputWriter_a0587b2dc160a9b1393411433dfc23b68}\label{classOutputWriter_a0587b2dc160a9b1393411433dfc23b68} +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ {\bfseries discretization\+\_\+} +\begin{DoxyCompactList}\small\item\em shared pointer, discretization object containing data to be written to file \end{DoxyCompactList}\item +\Hypertarget{classOutputWriter_a69d167e2526407602dce26ca7a2b9248}\label{classOutputWriter_a69d167e2526407602dce26ca7a2b9248} +int {\bfseries file\+No\+\_\+} +\begin{DoxyCompactList}\small\item\em a counter that increments for every file written to disk \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Inteface class for writing simulation data output. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classOutputWriter_a4f3180552b8102c27e087357b9cdd1f7}\label{classOutputWriter_a4f3180552b8102c27e087357b9cdd1f7} +\index{OutputWriter@{OutputWriter}!OutputWriter@{OutputWriter}} +\index{OutputWriter@{OutputWriter}!OutputWriter@{OutputWriter}} +\doxysubsubsection{\texorpdfstring{OutputWriter()}{OutputWriter()}} +{\footnotesize\ttfamily Output\+Writer\+::\+Output\+Writer (\begin{DoxyParamCaption}\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$}]{discretization }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em discretization} & discretization object containing data to be written to file \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classOutputWriter_ac625c204affdc05919388a3549c2e945}\label{classOutputWriter_ac625c204affdc05919388a3549c2e945} +\index{OutputWriter@{OutputWriter}!writeFile@{writeFile}} +\index{writeFile@{writeFile}!OutputWriter@{OutputWriter}} +\doxysubsubsection{\texorpdfstring{writeFile()}{writeFile()}} +{\footnotesize\ttfamily virtual void Output\+Writer\+::write\+File (\begin{DoxyParamCaption}\item[{double}]{current\+Time }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}} + + + +Write current velocities to file. + +Filename is output\+\_\+$<$file\+No\+\_\+$>$.\+vti + + +\begin{DoxyParams}{Parameters} +{\em current\+Time} & current time of simulation \\ +\hline +\end{DoxyParams} + + +Implemented in \mbox{\hyperlink{classOutputWriterParaview_a9e203b63d0e2f26ad53d18ee1821c6bb}{Output\+Writer\+Paraview}}, and \mbox{\hyperlink{classOutputWriterText_a25a12ea2524fc34e9acb19ef1f4c7431}{Output\+Writer\+Text}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/output\+\_\+writer/output\+\_\+writer.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/output\+\_\+writer/output\+\_\+writer.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classOutputWriterParaview.eps b/documentation/latex/classOutputWriterParaview.eps new file mode 100644 index 00000000..f7ed431b --- /dev/null +++ b/documentation/latex/classOutputWriterParaview.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 277.777771 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.800000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OutputWriterParaview) cw +(OutputWriter) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OutputWriterParaview) 0.000000 0.000000 box + (OutputWriter) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/documentation/latex/classOutputWriterParaview.pdf b/documentation/latex/classOutputWriterParaview.pdf new file mode 100644 index 00000000..09a47e0a Binary files /dev/null and b/documentation/latex/classOutputWriterParaview.pdf differ diff --git a/documentation/latex/classOutputWriterParaview.tex b/documentation/latex/classOutputWriterParaview.tex new file mode 100644 index 00000000..dd2a4447 --- /dev/null +++ b/documentation/latex/classOutputWriterParaview.tex @@ -0,0 +1,88 @@ +\doxysection{Output\+Writer\+Paraview Class Reference} +\hypertarget{classOutputWriterParaview}{}\label{classOutputWriterParaview}\index{OutputWriterParaview@{OutputWriterParaview}} + + +Write \texorpdfstring{$\ast$}{*}.vti files that can be viewed with Para\+View. + + + + +{\ttfamily \#include $<$output\+\_\+writer\+\_\+paraview.\+h$>$} + +Inheritance diagram for Output\+Writer\+Paraview\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classOutputWriterParaview} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classOutputWriterParaview_ab2d30ea87bf48abef82f95976c662cc1}{Output\+Writer\+Paraview}} (std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classMask}{Mask}} $>$ mask, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classFluidTracer}{Fluid\+Tracer}} $>$ fluid\+Tracer) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classOutputWriterParaview_a9e203b63d0e2f26ad53d18ee1821c6bb}{write\+File}} (double current\+Time) +\begin{DoxyCompactList}\small\item\em Write current velocities to file, filename is output\+\_\+$<$count$>$.\+vti. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classOutputWriter}{Output\+Writer}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classOutputWriter_a4f3180552b8102c27e087357b9cdd1f7}{Output\+Writer}} (std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classOutputWriter}{Output\+Writer}}} +\begin{DoxyCompactItemize} +\item +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ {\bfseries discretization\+\_\+} +\begin{DoxyCompactList}\small\item\em shared pointer, discretization object containing data to be written to file \end{DoxyCompactList}\item +int {\bfseries file\+No\+\_\+} +\begin{DoxyCompactList}\small\item\em a counter that increments for every file written to disk \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Write \texorpdfstring{$\ast$}{*}.vti files that can be viewed with Para\+View. + +The mesh that can be visualized in Para\+View corresponds to the mesh of the computational domain. All values are given for the nodes of the mesh, i.\+e., the corners of each cell. This means, values will be interpolated because the values are stored at positions given by the staggered grid. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classOutputWriterParaview_ab2d30ea87bf48abef82f95976c662cc1}\label{classOutputWriterParaview_ab2d30ea87bf48abef82f95976c662cc1} +\index{OutputWriterParaview@{OutputWriterParaview}!OutputWriterParaview@{OutputWriterParaview}} +\index{OutputWriterParaview@{OutputWriterParaview}!OutputWriterParaview@{OutputWriterParaview}} +\doxysubsubsection{\texorpdfstring{OutputWriterParaview()}{OutputWriterParaview()}} +{\footnotesize\ttfamily Output\+Writer\+Paraview\+::\+Output\+Writer\+Paraview (\begin{DoxyParamCaption}\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$}]{discretization, }\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classMask}{Mask}} $>$}]{mask, }\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classFluidTracer}{Fluid\+Tracer}} $>$}]{fluid\+Tracer }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em discretization} & shared pointer to the discretization object that will contain all the data to be written to the file \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classOutputWriterParaview_a9e203b63d0e2f26ad53d18ee1821c6bb}\label{classOutputWriterParaview_a9e203b63d0e2f26ad53d18ee1821c6bb} +\index{OutputWriterParaview@{OutputWriterParaview}!writeFile@{writeFile}} +\index{writeFile@{writeFile}!OutputWriterParaview@{OutputWriterParaview}} +\doxysubsubsection{\texorpdfstring{writeFile()}{writeFile()}} +{\footnotesize\ttfamily void Output\+Writer\+Paraview\+::write\+File (\begin{DoxyParamCaption}\item[{double}]{current\+Time }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}} + + + +Write current velocities to file, filename is output\+\_\+$<$count$>$.\+vti. + + +\begin{DoxyParams}{Parameters} +{\em current\+Time} & current time in simulation \\ +\hline +\end{DoxyParams} + + +Implements \mbox{\hyperlink{classOutputWriter_ac625c204affdc05919388a3549c2e945}{Output\+Writer}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/output\+\_\+writer/output\+\_\+writer\+\_\+paraview.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/output\+\_\+writer/output\+\_\+writer\+\_\+paraview.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classOutputWriterText.eps b/documentation/latex/classOutputWriterText.eps new file mode 100644 index 00000000..3d9f5696 --- /dev/null +++ b/documentation/latex/classOutputWriterText.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 350.877197 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.425000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OutputWriterText) cw +(OutputWriter) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OutputWriterText) 0.000000 0.000000 box + (OutputWriter) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/documentation/latex/classOutputWriterText.pdf b/documentation/latex/classOutputWriterText.pdf new file mode 100644 index 00000000..a9f292f1 Binary files /dev/null and b/documentation/latex/classOutputWriterText.pdf differ diff --git a/documentation/latex/classOutputWriterText.tex b/documentation/latex/classOutputWriterText.tex new file mode 100644 index 00000000..3dcd30b7 --- /dev/null +++ b/documentation/latex/classOutputWriterText.tex @@ -0,0 +1,85 @@ +\doxysection{Output\+Writer\+Text Class Reference} +\hypertarget{classOutputWriterText}{}\label{classOutputWriterText}\index{OutputWriterText@{OutputWriterText}} + + +Write \texorpdfstring{$\ast$}{*}.txt files that are useful for debugging. + + + + +{\ttfamily \#include $<$output\+\_\+writer\+\_\+text.\+h$>$} + +Inheritance diagram for Output\+Writer\+Text\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classOutputWriterText} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{classOutputWriterText_a25a12ea2524fc34e9acb19ef1f4c7431}{write\+File}} (double current\+Time) +\begin{DoxyCompactList}\small\item\em Write current velocities to file. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classOutputWriterText_a3480b58a23fd158f16d0ef9c1b67cbfd}{write\+Pressure\+File}} () +\begin{DoxyCompactList}\small\item\em Write only current values of pressure to file. \end{DoxyCompactList}\item +\Hypertarget{classOutputWriterText_a4f3180552b8102c27e087357b9cdd1f7}\label{classOutputWriterText_a4f3180552b8102c27e087357b9cdd1f7} +{\bfseries Output\+Writer} (std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization) +\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classOutputWriter}{Output\+Writer}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classOutputWriter_a4f3180552b8102c27e087357b9cdd1f7}{Output\+Writer}} (std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classOutputWriter}{Output\+Writer}}} +\begin{DoxyCompactItemize} +\item +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ {\bfseries discretization\+\_\+} +\begin{DoxyCompactList}\small\item\em shared pointer, discretization object containing data to be written to file \end{DoxyCompactList}\item +int {\bfseries file\+No\+\_\+} +\begin{DoxyCompactList}\small\item\em a counter that increments for every file written to disk \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Write \texorpdfstring{$\ast$}{*}.txt files that are useful for debugging. + +All values are written to the file as they are stored in the field variables, no interpolation takes place. + +\doxysubsection{Member Function Documentation} +\Hypertarget{classOutputWriterText_a25a12ea2524fc34e9acb19ef1f4c7431}\label{classOutputWriterText_a25a12ea2524fc34e9acb19ef1f4c7431} +\index{OutputWriterText@{OutputWriterText}!writeFile@{writeFile}} +\index{writeFile@{writeFile}!OutputWriterText@{OutputWriterText}} +\doxysubsubsection{\texorpdfstring{writeFile()}{writeFile()}} +{\footnotesize\ttfamily void Output\+Writer\+Text\+::write\+File (\begin{DoxyParamCaption}\item[{double}]{current\+Time }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}} + + + +Write current velocities to file. + +Filename is output\+\_\+$<$count$>$.\+vti + + +\begin{DoxyParams}{Parameters} +{\em current\+Time} & current time of simulation \\ +\hline +\end{DoxyParams} + + +Implements \mbox{\hyperlink{classOutputWriter_ac625c204affdc05919388a3549c2e945}{Output\+Writer}}. + +\Hypertarget{classOutputWriterText_a3480b58a23fd158f16d0ef9c1b67cbfd}\label{classOutputWriterText_a3480b58a23fd158f16d0ef9c1b67cbfd} +\index{OutputWriterText@{OutputWriterText}!writePressureFile@{writePressureFile}} +\index{writePressureFile@{writePressureFile}!OutputWriterText@{OutputWriterText}} +\doxysubsubsection{\texorpdfstring{writePressureFile()}{writePressureFile()}} +{\footnotesize\ttfamily void Output\+Writer\+Text\+::write\+Pressure\+File (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Write only current values of pressure to file. + +Filename is pressure\+\_\+$<$count$>$.\+txt + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/output\+\_\+writer/output\+\_\+writer\+\_\+text.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/output\+\_\+writer/output\+\_\+writer\+\_\+text.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classPressureSolver.eps b/documentation/latex/classPressureSolver.eps new file mode 100644 index 00000000..d140d710 --- /dev/null +++ b/documentation/latex/classPressureSolver.eps @@ -0,0 +1,203 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 185.185181 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 2.700000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 2 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(PressureSolver) cw +(GaussSeidel) cw +(SOR) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (PressureSolver) 0.500000 1.000000 box + (GaussSeidel) 0.000000 0.000000 box + (SOR) 1.000000 0.000000 box + +% ----- relations ----- + +solid +1 0.500000 0.250000 out +solid +0.000000 1.000000 1.000000 conn +solid +0 0.000000 0.750000 in +solid +0 1.000000 0.750000 in diff --git a/documentation/latex/classPressureSolver.pdf b/documentation/latex/classPressureSolver.pdf new file mode 100644 index 00000000..898f1bd9 Binary files /dev/null and b/documentation/latex/classPressureSolver.pdf differ diff --git a/documentation/latex/classPressureSolver.tex b/documentation/latex/classPressureSolver.tex new file mode 100644 index 00000000..e14bfc05 --- /dev/null +++ b/documentation/latex/classPressureSolver.tex @@ -0,0 +1,130 @@ +\doxysection{Pressure\+Solver Class Reference} +\hypertarget{classPressureSolver}{}\label{classPressureSolver}\index{PressureSolver@{PressureSolver}} + + +Solves the Poisson problem for the pressure. + + + + +{\ttfamily \#include $<$pressure\+\_\+solver.\+h$>$} + +Inheritance diagram for Pressure\+Solver\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classPressureSolver} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classPressureSolver_a10803d8c3d7f3810fc0ba059acf04058}{Pressure\+Solver}} (std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization, double epsilon, int maximum\+Number\+Of\+Iterations, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$ boundary) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +virtual void \mbox{\hyperlink{classPressureSolver_a504ac61a1317650e0eb70d6a93212ca0}{solve}} ()=0 +\begin{DoxyCompactList}\small\item\em virtual function that starts solver. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classPressureSolver_a3c97c6f37cf2bdb3985f90afa6923f93}\label{classPressureSolver_a3c97c6f37cf2bdb3985f90afa6923f93} +double {\bfseries dx2} +\item +\Hypertarget{classPressureSolver_a25b7ff50bdaea53d1b5c7a5cf735c5b5}\label{classPressureSolver_a25b7ff50bdaea53d1b5c7a5cf735c5b5} +double {\bfseries dy2} +\begin{DoxyCompactList}\small\item\em squared mesh widths \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Protected Member Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{classPressureSolver_a458c383fcacaf54c1a333a271049ca93}{set\+Boundary\+Values}} () +\begin{DoxyCompactList}\small\item\em Set the \doxylink{classBoundary}{Boundary} Values. \end{DoxyCompactList}\item +\Hypertarget{classPressureSolver_afc51f4315c483988aeec327a16c5bb90}\label{classPressureSolver_afc51f4315c483988aeec327a16c5bb90} +double {\bfseries calculate\+Residuum} () +\begin{DoxyCompactList}\small\item\em calculate residuum of current time step \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Protected Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classPressureSolver_af3ac2e53c6f49b9a362415a89595a7f0}\label{classPressureSolver_af3ac2e53c6f49b9a362415a89595a7f0} +int {\bfseries i\+\_\+beg} +\begin{DoxyCompactList}\small\item\em begin of loop for rhs in x direction \end{DoxyCompactList}\item +\Hypertarget{classPressureSolver_a41b263980e55591d1ffdc4837c252a61}\label{classPressureSolver_a41b263980e55591d1ffdc4837c252a61} +int {\bfseries i\+\_\+end} +\begin{DoxyCompactList}\small\item\em end of loop for rhs in x direction \end{DoxyCompactList}\item +\Hypertarget{classPressureSolver_aa309af30e5e63e09b77900091e562235}\label{classPressureSolver_aa309af30e5e63e09b77900091e562235} +int {\bfseries j\+\_\+beg} +\begin{DoxyCompactList}\small\item\em begin of loop for rhs in y direction \end{DoxyCompactList}\item +\Hypertarget{classPressureSolver_ac2402794034dd74073700998ee2860bf}\label{classPressureSolver_ac2402794034dd74073700998ee2860bf} +int {\bfseries j\+\_\+end} +\begin{DoxyCompactList}\small\item\em end of loop for rhs in y direction \end{DoxyCompactList}\item +\Hypertarget{classPressureSolver_af579ecebaaa8b11914293ef18af5fdc6}\label{classPressureSolver_af579ecebaaa8b11914293ef18af5fdc6} +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ {\bfseries discretization\+\_\+} +\begin{DoxyCompactList}\small\item\em object holding the needed field variables for rhs and p \end{DoxyCompactList}\item +\Hypertarget{classPressureSolver_a0b17b46580d259e4bb3a05486bc06a60}\label{classPressureSolver_a0b17b46580d259e4bb3a05486bc06a60} +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$ {\bfseries boundary\+\_\+} +\begin{DoxyCompactList}\small\item\em object managing boundary for obstacle and surface tension \end{DoxyCompactList}\item +\Hypertarget{classPressureSolver_a22b723f3b3ba54e47f36cfc2b9576749}\label{classPressureSolver_a22b723f3b3ba54e47f36cfc2b9576749} +double {\bfseries epsilon\+\_\+} +\begin{DoxyCompactList}\small\item\em tolerance for the solver \end{DoxyCompactList}\item +\Hypertarget{classPressureSolver_af3b02d29bf1b21ad8b7e6edf8c2f4e87}\label{classPressureSolver_af3b02d29bf1b21ad8b7e6edf8c2f4e87} +int {\bfseries maximum\+Number\+Of\+Iterations\+\_\+} +\begin{DoxyCompactList}\small\item\em maximum number of iterations \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Solves the Poisson problem for the pressure. + +Interface for the pressure solver. It computes the pressure field variable such that the continuity equation is fulfilled. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classPressureSolver_a10803d8c3d7f3810fc0ba059acf04058}\label{classPressureSolver_a10803d8c3d7f3810fc0ba059acf04058} +\index{PressureSolver@{PressureSolver}!PressureSolver@{PressureSolver}} +\index{PressureSolver@{PressureSolver}!PressureSolver@{PressureSolver}} +\doxysubsubsection{\texorpdfstring{PressureSolver()}{PressureSolver()}} +{\footnotesize\ttfamily Pressure\+Solver\+::\+Pressure\+Solver (\begin{DoxyParamCaption}\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$}]{discretization, }\item[{double}]{epsilon, }\item[{int}]{maximum\+Number\+Of\+Iterations, }\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$}]{boundary }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em discretization} & instance of \doxylink{classDiscretization}{Discretization} holding the needed field variables for rhs and p \\ +\hline +{\em epsilon} & tolerance for the solver \\ +\hline +{\em maximum\+Number\+Of\+Iterations} & maximum of iteration \\ +\hline +{\em boundary} & object managing boundary for obstacle and surface tension \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classPressureSolver_a458c383fcacaf54c1a333a271049ca93}\label{classPressureSolver_a458c383fcacaf54c1a333a271049ca93} +\index{PressureSolver@{PressureSolver}!setBoundaryValues@{setBoundaryValues}} +\index{setBoundaryValues@{setBoundaryValues}!PressureSolver@{PressureSolver}} +\doxysubsubsection{\texorpdfstring{setBoundaryValues()}{setBoundaryValues()}} +{\footnotesize\ttfamily void Pressure\+Solver\+::set\+Boundary\+Values (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}} + + + +Set the \doxylink{classBoundary}{Boundary} Values. + +Account for homogenous Neuman BC Has to be called every iteration \Hypertarget{classPressureSolver_a504ac61a1317650e0eb70d6a93212ca0}\label{classPressureSolver_a504ac61a1317650e0eb70d6a93212ca0} +\index{PressureSolver@{PressureSolver}!solve@{solve}} +\index{solve@{solve}!PressureSolver@{PressureSolver}} +\doxysubsubsection{\texorpdfstring{solve()}{solve()}} +{\footnotesize\ttfamily virtual void Pressure\+Solver\+::solve (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}} + + + +virtual function that starts solver. + + + +Implemented in \mbox{\hyperlink{classGaussSeidel_a6f0eb0c6938a64f8ded186f88170a04b}{Gauss\+Seidel}}, and \mbox{\hyperlink{classSOR_a860992d85d8aacf114a3a02b5831f728}{SOR}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/solver/pressure\+\_\+solver.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/solver/pressure\+\_\+solver.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classSOR.eps b/documentation/latex/classSOR.eps new file mode 100644 index 00000000..3f4e542f --- /dev/null +++ b/documentation/latex/classSOR.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 370.370361 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.350000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(SOR) cw +(PressureSolver) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (SOR) 0.000000 0.000000 box + (PressureSolver) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/documentation/latex/classSOR.pdf b/documentation/latex/classSOR.pdf new file mode 100644 index 00000000..d3259877 Binary files /dev/null and b/documentation/latex/classSOR.pdf differ diff --git a/documentation/latex/classSOR.tex b/documentation/latex/classSOR.tex new file mode 100644 index 00000000..c881c325 --- /dev/null +++ b/documentation/latex/classSOR.tex @@ -0,0 +1,113 @@ +\doxysection{SOR Class Reference} +\hypertarget{classSOR}{}\label{classSOR}\index{SOR@{SOR}} + + +Successive over-\/relaxation solver. + + + + +{\ttfamily \#include $<$sor.\+h$>$} + +Inheritance diagram for SOR\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classSOR} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classSOR_a357cfea8935f4b2dfee06f2d8e1461a8}{SOR}} (const std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ \&data, double epsilon, int maximum\+Number\+Of\+Iterations, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$ boundary, double omega) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classSOR_a860992d85d8aacf114a3a02b5831f728}{solve}} () override +\begin{DoxyCompactList}\small\item\em override function that starts solver. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classPressureSolver}{Pressure\+Solver}}} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classPressureSolver_a10803d8c3d7f3810fc0ba059acf04058}{Pressure\+Solver}} (std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ discretization, double epsilon, int maximum\+Number\+Of\+Iterations, std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$ boundary) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Additional Inherited Members} +\doxysubsection*{Public Attributes inherited from \mbox{\hyperlink{classPressureSolver}{Pressure\+Solver}}} +\begin{DoxyCompactItemize} +\item +double {\bfseries dx2} +\item +double {\bfseries dy2} +\begin{DoxyCompactList}\small\item\em squared mesh widths \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Protected Member Functions inherited from \mbox{\hyperlink{classPressureSolver}{Pressure\+Solver}}} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{classPressureSolver_a458c383fcacaf54c1a333a271049ca93}{set\+Boundary\+Values}} () +\begin{DoxyCompactList}\small\item\em Set the \doxylink{classBoundary}{Boundary} Values. \end{DoxyCompactList}\item +double {\bfseries calculate\+Residuum} () +\begin{DoxyCompactList}\small\item\em calculate residuum of current time step \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classPressureSolver}{Pressure\+Solver}}} +\begin{DoxyCompactItemize} +\item +int {\bfseries i\+\_\+beg} +\begin{DoxyCompactList}\small\item\em begin of loop for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries i\+\_\+end} +\begin{DoxyCompactList}\small\item\em end of loop for rhs in x direction \end{DoxyCompactList}\item +int {\bfseries j\+\_\+beg} +\begin{DoxyCompactList}\small\item\em begin of loop for rhs in y direction \end{DoxyCompactList}\item +int {\bfseries j\+\_\+end} +\begin{DoxyCompactList}\small\item\em end of loop for rhs in y direction \end{DoxyCompactList}\item +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ {\bfseries discretization\+\_\+} +\begin{DoxyCompactList}\small\item\em object holding the needed field variables for rhs and p \end{DoxyCompactList}\item +std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$ {\bfseries boundary\+\_\+} +\begin{DoxyCompactList}\small\item\em object managing boundary for obstacle and surface tension \end{DoxyCompactList}\item +double {\bfseries epsilon\+\_\+} +\begin{DoxyCompactList}\small\item\em tolerance for the solver \end{DoxyCompactList}\item +int {\bfseries maximum\+Number\+Of\+Iterations\+\_\+} +\begin{DoxyCompactList}\small\item\em maximum number of iterations \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Successive over-\/relaxation solver. + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classSOR_a357cfea8935f4b2dfee06f2d8e1461a8}\label{classSOR_a357cfea8935f4b2dfee06f2d8e1461a8} +\index{SOR@{SOR}!SOR@{SOR}} +\index{SOR@{SOR}!SOR@{SOR}} +\doxysubsubsection{\texorpdfstring{SOR()}{SOR()}} +{\footnotesize\ttfamily SOR\+::\+SOR (\begin{DoxyParamCaption}\item[{const std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classDiscretization}{Discretization}} $>$ \&}]{data, }\item[{double}]{epsilon, }\item[{int}]{maximum\+Number\+Of\+Iterations, }\item[{std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{classBoundary}{Boundary}} $>$}]{boundary, }\item[{double}]{omega }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em data} & instance of \doxylink{classDiscretization}{Discretization} holding the needed field variables for rhs and p \\ +\hline +{\em epsilon} & tolerance for the solver \\ +\hline +{\em maximum\+Number\+Of\+Iterations} & maximum of iteration \\ +\hline +{\em omega} & relaxation factor \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\Hypertarget{classSOR_a860992d85d8aacf114a3a02b5831f728}\label{classSOR_a860992d85d8aacf114a3a02b5831f728} +\index{SOR@{SOR}!solve@{solve}} +\index{solve@{solve}!SOR@{SOR}} +\doxysubsubsection{\texorpdfstring{solve()}{solve()}} +{\footnotesize\ttfamily void SOR\+::solve (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}} + + + +override function that starts solver. + + + +Implements \mbox{\hyperlink{classPressureSolver_a504ac61a1317650e0eb70d6a93212ca0}{Pressure\+Solver}}. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/solver/sor.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/solver/sor.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/classStaggeredGrid.eps b/documentation/latex/classStaggeredGrid.eps new file mode 100644 index 00000000..67d46456 --- /dev/null +++ b/documentation/latex/classStaggeredGrid.eps @@ -0,0 +1,209 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 236.220474 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 2.116667 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 3 def +/cols 2 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(StaggeredGrid) cw +(Discretization) cw +(CentralDifferences) cw +(DonorCell) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (StaggeredGrid) 0.500000 2.000000 box + (Discretization) 0.500000 1.000000 box + (CentralDifferences) 0.000000 0.000000 box + (DonorCell) 1.000000 0.000000 box + +% ----- relations ----- + +solid +1 0.500000 1.250000 out +solid +0 0.500000 1.750000 in +solid +1 0.500000 0.250000 out +solid +0.000000 1.000000 1.000000 conn +solid +0 0.000000 0.750000 in +solid +0 1.000000 0.750000 in diff --git a/documentation/latex/classStaggeredGrid.pdf b/documentation/latex/classStaggeredGrid.pdf new file mode 100644 index 00000000..a7d31548 Binary files /dev/null and b/documentation/latex/classStaggeredGrid.pdf differ diff --git a/documentation/latex/classStaggeredGrid.tex b/documentation/latex/classStaggeredGrid.tex new file mode 100644 index 00000000..00141d27 --- /dev/null +++ b/documentation/latex/classStaggeredGrid.tex @@ -0,0 +1,203 @@ +\doxysection{Staggered\+Grid Class Reference} +\hypertarget{classStaggeredGrid}{}\label{classStaggeredGrid}\index{StaggeredGrid@{StaggeredGrid}} + + +Create field variables and define limits for the indices. + + + + +{\ttfamily \#include $<$staggered\+\_\+grid.\+h$>$} + +Inheritance diagram for Staggered\+Grid\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=3.000000cm]{classStaggeredGrid} +\end{center} +\end{figure} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classStaggeredGrid_aec0990b64c559b1690f21b48fb2d13b1}{Staggered\+Grid}} (std\+::array$<$ int, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{n\+Cells}}, std\+::array$<$ double, 2 $>$ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{mesh\+Width}}) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}\label{classStaggeredGrid_a330856d4efe952771daf0753ef84068e} +const std\+::array$<$ double, 2 $>$ {\bfseries mesh\+Width} () const +\begin{DoxyCompactList}\small\item\em Get the length of a single cell in x and y directions. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}\label{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf} +const std\+::array$<$ int, 2 $>$ {\bfseries n\+Cells} () const +\begin{DoxyCompactList}\small\item\em Get number of cells in x and y directions. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a87cee12621c641ab143a8b1a61b2ef7e}\label{classStaggeredGrid_a87cee12621c641ab143a8b1a61b2ef7e} +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries u} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable u. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a26e478abba632554652c9e05a279d1ca}\label{classStaggeredGrid_a26e478abba632554652c9e05a279d1ca} +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries v} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable v. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_aafe6e0bb3509f6aad272b94f74e7ffec}\label{classStaggeredGrid_aafe6e0bb3509f6aad272b94f74e7ffec} +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries p} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable p. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a3f36422a02b9b18d1577d61e406f08cf}\label{classStaggeredGrid_a3f36422a02b9b18d1577d61e406f08cf} +const \mbox{\hyperlink{classFieldVariable}{Field\+Variable}} \& {\bfseries rhs} () const +\begin{DoxyCompactList}\small\item\em Get a reference to the field variable rhs. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a0324ce4d1fe2343d8aa9514e460cc556}\label{classStaggeredGrid_a0324ce4d1fe2343d8aa9514e460cc556} +double {\bfseries u} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of u in element (i,j), declared constant. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a0ed62d6752b6b2b3ead5f654b515cd12}\label{classStaggeredGrid_a0ed62d6752b6b2b3ead5f654b515cd12} +double \& {\bfseries u} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of u in element (i,j) \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_ac052d8803ff950aee04b86ac026c516b}\label{classStaggeredGrid_ac052d8803ff950aee04b86ac026c516b} +double {\bfseries v} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of v in element (i,j), declared constant. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a7746f703f32c2f20a4c77246eebac697}\label{classStaggeredGrid_a7746f703f32c2f20a4c77246eebac697} +double \& {\bfseries v} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of v in element (i,j) \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_aa6a5d99d9b4fbd9bd9cfa6ec071918f9}\label{classStaggeredGrid_aa6a5d99d9b4fbd9bd9cfa6ec071918f9} +double {\bfseries p} (int i, int j) const +\begin{DoxyCompactList}\small\item\em Access value of p in element (i,j), declared constant. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_aa09a4ca67141589bae153797fbc4f3c5}\label{classStaggeredGrid_aa09a4ca67141589bae153797fbc4f3c5} +double \& {\bfseries p} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of p in element (i,j) \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_adb05c59512dc8993367e4beddba05785}\label{classStaggeredGrid_adb05c59512dc8993367e4beddba05785} +double \& {\bfseries f} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of f in element (i,j) \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_aaf849bec40f7fa7c68823038f0877341}\label{classStaggeredGrid_aaf849bec40f7fa7c68823038f0877341} +double \& {\bfseries g} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of g in element (i,j) \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a761ea51f1e8fd1290b3adfe09942b0d3}\label{classStaggeredGrid_a761ea51f1e8fd1290b3adfe09942b0d3} +double \& {\bfseries rhs} (int i, int j) +\begin{DoxyCompactList}\small\item\em Access value of rhs in element (i,j) \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_aec8490affea703cdd73b1febaed68968}\label{classStaggeredGrid_aec8490affea703cdd73b1febaed68968} +double {\bfseries dx} () const +\begin{DoxyCompactList}\small\item\em Get the mesh width in x-\/direction. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_abde2da10e0c130fb0f206de64c9b4956}\label{classStaggeredGrid_abde2da10e0c130fb0f206de64c9b4956} +double {\bfseries dy} () const +\begin{DoxyCompactList}\small\item\em Get the mesh width in y-\/direction. \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a31e2d3a0b6e03685380810a7c2f323e1}\label{classStaggeredGrid_a31e2d3a0b6e03685380810a7c2f323e1} +int {\bfseries u\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for u in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a641e473d72e1d02ba3de1c16e9d0d332}\label{classStaggeredGrid_a641e473d72e1d02ba3de1c16e9d0d332} +int {\bfseries u\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for u in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a9b0e97704e1871441a8e713ecaa2cff5}\label{classStaggeredGrid_a9b0e97704e1871441a8e713ecaa2cff5} +int {\bfseries u\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for u in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a3393aa91b17054d2d700de308ae25632}\label{classStaggeredGrid_a3393aa91b17054d2d700de308ae25632} +int {\bfseries u\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for u in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_ace7bf8cb1d279131739d5d12de302d09}\label{classStaggeredGrid_ace7bf8cb1d279131739d5d12de302d09} +int {\bfseries v\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for v in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_aa5a44aa088b5a7923fa952af1ecb5778}\label{classStaggeredGrid_aa5a44aa088b5a7923fa952af1ecb5778} +int {\bfseries v\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for v in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a7f8468d672411c0e3a5eeb67788fc826}\label{classStaggeredGrid_a7f8468d672411c0e3a5eeb67788fc826} +int {\bfseries v\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for v in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_ab67e8d9d8d76d34fb02d4d644f0b3795}\label{classStaggeredGrid_ab67e8d9d8d76d34fb02d4d644f0b3795} +int {\bfseries v\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for v in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a9922c955707f2a31a4a27d1d696f002e}\label{classStaggeredGrid_a9922c955707f2a31a4a27d1d696f002e} +int {\bfseries p\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for p in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a34f16fdf87971fe84ffc3c84722bb2c7}\label{classStaggeredGrid_a34f16fdf87971fe84ffc3c84722bb2c7} +int {\bfseries p\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for p in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_ae4c9ba16c5635dc1ffaa264fbcc3e034}\label{classStaggeredGrid_ae4c9ba16c5635dc1ffaa264fbcc3e034} +int {\bfseries p\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for p in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_ad9928ee522eedb7d7fd48ca0b92f2795}\label{classStaggeredGrid_ad9928ee522eedb7d7fd48ca0b92f2795} +int {\bfseries p\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for p in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a5cc368f9ede58a3cb689705df998f750}\label{classStaggeredGrid_a5cc368f9ede58a3cb689705df998f750} +int {\bfseries f\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for f in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a8162b849231354ba73aacb085b5cd665}\label{classStaggeredGrid_a8162b849231354ba73aacb085b5cd665} +int {\bfseries f\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for f in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_ab92aca90331200d0cc7bc0c0a857b4ef}\label{classStaggeredGrid_ab92aca90331200d0cc7bc0c0a857b4ef} +int {\bfseries f\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for f in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a7ac43ac86231987bc0bf6565589d52e1}\label{classStaggeredGrid_a7ac43ac86231987bc0bf6565589d52e1} +int {\bfseries f\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for f in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a061fb6d6948cdc3054171dd60842a8c3}\label{classStaggeredGrid_a061fb6d6948cdc3054171dd60842a8c3} +int {\bfseries g\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for g in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_aebc76693e5dd61db521d6763236bf664}\label{classStaggeredGrid_aebc76693e5dd61db521d6763236bf664} +int {\bfseries g\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for g in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a18ca3a121787b19c18886b0945aca2e3}\label{classStaggeredGrid_a18ca3a121787b19c18886b0945aca2e3} +int {\bfseries g\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for g in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a7a29456e1bce9efffa27de0b41957b50}\label{classStaggeredGrid_a7a29456e1bce9efffa27de0b41957b50} +int {\bfseries g\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for g in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_ad5c16b00d9dbf0f115e1ded81203edce}\label{classStaggeredGrid_ad5c16b00d9dbf0f115e1ded81203edce} +int {\bfseries rhs\+IBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for rhs in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_ae11e8842fdd508b914dc8f24b09b36a9}\label{classStaggeredGrid_ae11e8842fdd508b914dc8f24b09b36a9} +int {\bfseries rhs\+IEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for rhs in x direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a28c36939e3d3cc8df76e7aa91f0e0804}\label{classStaggeredGrid_a28c36939e3d3cc8df76e7aa91f0e0804} +int {\bfseries rhs\+JBegin} () const +\begin{DoxyCompactList}\small\item\em first valid index for rhs in y direction \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a953ec890a986473bffe87ea26dfcd782}\label{classStaggeredGrid_a953ec890a986473bffe87ea26dfcd782} +int {\bfseries rhs\+JEnd} () const +\begin{DoxyCompactList}\small\item\em one after last valid index for rhs in y direction \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Protected Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{classStaggeredGrid_acacffb5739539d9015c986080bb5ed44}\label{classStaggeredGrid_acacffb5739539d9015c986080bb5ed44} +const std\+::array$<$ int, 2 $>$ {\bfseries n\+Cells\+\_\+} +\begin{DoxyCompactList}\small\item\em array containing number of cells in x and y directions \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a9603c3334440aab082dda48947e5ce6e}\label{classStaggeredGrid_a9603c3334440aab082dda48947e5ce6e} +const std\+::array$<$ double, 2 $>$ {\bfseries mesh\+Width\+\_\+} +\begin{DoxyCompactList}\small\item\em array containing the sizes of cell edges in x and y directions \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_adcef36b4ce8cc6843a2b6f603b62c763}\label{classStaggeredGrid_adcef36b4ce8cc6843a2b6f603b62c763} +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries u\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable u \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a20ec43568fe937b194561e21a0b84ad9}\label{classStaggeredGrid_a20ec43568fe937b194561e21a0b84ad9} +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries v\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable v \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a2ea3c93dd401ac06461ade9a74e76459}\label{classStaggeredGrid_a2ea3c93dd401ac06461ade9a74e76459} +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries p\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable p \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a94933ac0c6e0d2a794f46c7a97d72f75}\label{classStaggeredGrid_a94933ac0c6e0d2a794f46c7a97d72f75} +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries f\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable f \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a5f5c88f603d4e503cba4c44ed43de46a}\label{classStaggeredGrid_a5f5c88f603d4e503cba4c44ed43de46a} +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries g\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable g \end{DoxyCompactList}\item +\Hypertarget{classStaggeredGrid_a496206955162452a0629a7742fe92a84}\label{classStaggeredGrid_a496206955162452a0629a7742fe92a84} +\mbox{\hyperlink{classFieldVariable}{Field\+Variable}} {\bfseries rhs\+\_\+} +\begin{DoxyCompactList}\small\item\em instance of the field variable rhs \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Create field variables and define limits for the indices. + +Create the necessary u, v, p, f, g, rhs field variables and define the first valid index for each of the field variables, as well as the (one after) last valid index + +\doxysubsection{Constructor \& Destructor Documentation} +\Hypertarget{classStaggeredGrid_aec0990b64c559b1690f21b48fb2d13b1}\label{classStaggeredGrid_aec0990b64c559b1690f21b48fb2d13b1} +\index{StaggeredGrid@{StaggeredGrid}!StaggeredGrid@{StaggeredGrid}} +\index{StaggeredGrid@{StaggeredGrid}!StaggeredGrid@{StaggeredGrid}} +\doxysubsubsection{\texorpdfstring{StaggeredGrid()}{StaggeredGrid()}} +{\footnotesize\ttfamily Staggered\+Grid\+::\+Staggered\+Grid (\begin{DoxyParamCaption}\item[{std\+::array$<$ int, 2 $>$}]{n\+Cells, }\item[{std\+::array$<$ double, 2 $>$}]{mesh\+Width }\end{DoxyParamCaption})} + + + +Constructor. + + +\begin{DoxyParams}{Parameters} +{\em n\+Cells} & array containing number of cells in x and y directions \\ +\hline +{\em mesh\+Width} & array containing the length of a single cell in x and y directions \\ +\hline +\end{DoxyParams} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/staggered\+\_\+grid.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/staggered\+\_\+grid.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/computation_8h_source.tex b/documentation/latex/computation_8h_source.tex new file mode 100644 index 00000000..67652684 --- /dev/null +++ b/documentation/latex/computation_8h_source.tex @@ -0,0 +1,90 @@ +\doxysection{computation.\+h} +\hypertarget{computation_8h_source}{}\label{computation_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/computation.h@{/home/jonat/Documents/01\_Studium/NumSim/src/computation.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}discretization/discretization.h"{}}} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}discretization/donor\_cell.h"{}}} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}discretization/central\_differences.h"{}}} +\DoxyCodeLine{00006\ } +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ "{}solver/pressure\_solver.h"{}}} +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ "{}solver/sor.h"{}}} +\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ "{}solver/gauss\_seidel.h"{}}} +\DoxyCodeLine{00010\ } +\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ "{}output\_writer/output\_writer\_paraview.h"{}}} +\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ "{}output\_writer/output\_writer\_text.h"{}}} +\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ "{}settings\_parser/settings.h"{}}} +\DoxyCodeLine{00014\ } +\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ "{}boundary/boundary.h"{}}} +\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ "{}boundary/mask.h"{}}} +\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ "{}surface/fluid\_tracer.h"{}}} +\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00019\ } +\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00023\ } + + + + + +\DoxyCodeLine{00030\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classComputation}{Computation}}} +\DoxyCodeLine{00031\ \{} +\DoxyCodeLine{00032\ \textcolor{keyword}{public}:} + + + + + +\DoxyCodeLine{00039\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classComputation_a4a344479797b15bd5c9ed2f262657339}{initialize}}(\textcolor{keywordtype}{int}\ argc,\ \textcolor{keywordtype}{char}\ *argv[]);} +\DoxyCodeLine{00040\ } + + + +\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classComputation_ad20ce6e82ec9a918e6ac03840bc688d5}{runSimulation}}();} +\DoxyCodeLine{00046\ } +\DoxyCodeLine{00047\ \textcolor{keyword}{private}:} + + + + +\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keywordtype}{void}\ computeTimeStepWidth(\textcolor{keywordtype}{double}\ currentTime);} +\DoxyCodeLine{00054\ } + + +\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keywordtype}{void}\ applyBoundaryValues();} +\DoxyCodeLine{00059\ } + + +\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keywordtype}{void}\ computePreliminaryVelocities();} +\DoxyCodeLine{00064\ } + + +\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keywordtype}{void}\ computeRightHandSide();} +\DoxyCodeLine{00069\ } + + +\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keywordtype}{void}\ computePressure();} +\DoxyCodeLine{00074\ } + + + +\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordtype}{void}\ computeVelocities();} +\DoxyCodeLine{00080\ } +\DoxyCodeLine{00081\ \ \ \ \ \mbox{\hyperlink{structSettings}{Settings}}\ settings\_;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00082\ \ \ \ \ std::shared\_ptr\ discretization\_;\ } +\DoxyCodeLine{00083\ } +\DoxyCodeLine{00084\ \ \ \ \ std::shared\_ptr\ mask\_;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00085\ \ \ \ \ std::shared\_ptr\ boundary\_;\ \ \ \ \ \ \ } +\DoxyCodeLine{00086\ \ \ \ \ std::shared\_ptr\ fluidTracer\_;\ } +\DoxyCodeLine{00087\ } +\DoxyCodeLine{00088\ \ \ \ \ std::unique\_ptr\ pressureSolver\_;\ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00089\ \ \ \ \ std::unique\_ptr\ outputWriterParaview\_;\ } +\DoxyCodeLine{00090\ \ \ \ \ std::unique\_ptr\ outputWriterText\_;\ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00091\ \ \ \ \ std::array\ meshWidth\_;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keywordtype}{double}\ dt\_;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00093\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/discretization_8h_source.tex b/documentation/latex/discretization_8h_source.tex new file mode 100644 index 00000000..f34c7087 --- /dev/null +++ b/documentation/latex/discretization_8h_source.tex @@ -0,0 +1,66 @@ +\doxysection{discretization.\+h} +\hypertarget{discretization_8h_source}{}\label{discretization_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/discretization/discretization.h@{/home/jonat/Documents/01\_Studium/NumSim/src/discretization/discretization.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}staggered\_grid.h"{}}} +\DoxyCodeLine{00006\ } + + + + + + + +\DoxyCodeLine{00015\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classDiscretization}{Discretization}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classStaggeredGrid}{StaggeredGrid}}} +\DoxyCodeLine{00016\ \{} +\DoxyCodeLine{00017\ \textcolor{keyword}{public}:} + + + + + +\DoxyCodeLine{00024\ \ \ \ \ \mbox{\hyperlink{classDiscretization_a4fb8cc9823938e7c2dec329b906a462c}{Discretization}}(std::array\ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{nCells}},\ std::array\ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{meshWidth}});} +\DoxyCodeLine{00025\ } + + +\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_acca6bf193e0e91f645d292527299254b}{computeDu2Dx}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const}\ =\ 0;} + + +\DoxyCodeLine{00033\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_a69ba136ab7f8c09d805afca159cab428}{computeDv2Dy}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const}\ =\ 0;} +\DoxyCodeLine{00034\ } + + +\DoxyCodeLine{00038\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_ab1c2aa237e13e7c4c9edd429de656795}{computeDuvDx}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const}\ =\ 0;} + + +\DoxyCodeLine{00042\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_a0bab86aef10a72e01b4f8102a3c91f84}{computeDuvDy}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const}\ =\ 0;} +\DoxyCodeLine{00043\ } + + +\DoxyCodeLine{00047\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_a6986501b0b5c96699ff3ac843c1a6ca2}{computeD2uDx2}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_a446aabc55a9fb4b5cb2f476babc532f9}{computeD2uDy2}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00055\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_a5119047788a34eadf37480e913bdc8ea}{computeD2vDx2}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00059\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_a56678582a049b1b141621e41afff1438}{computeD2vDy2}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00060\ } + + +\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_aed3ad75ad6e647d14f118a12652c01b2}{computeDpDx}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDiscretization_a859f4dc33f0ea91f5e6537be09ce4999}{computeDpDy}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00069\ } +\DoxyCodeLine{00070\ } +\DoxyCodeLine{00071\ \};} +\DoxyCodeLine{00072\ } + +\end{DoxyCode} diff --git a/documentation/latex/donor__cell_8h_source.tex b/documentation/latex/donor__cell_8h_source.tex new file mode 100644 index 00000000..2f3f8718 --- /dev/null +++ b/documentation/latex/donor__cell_8h_source.tex @@ -0,0 +1,50 @@ +\doxysection{donor\+\_\+cell.\+h} +\hypertarget{donor__cell_8h_source}{}\label{donor__cell_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/discretization/donor\_cell.h@{/home/jonat/Documents/01\_Studium/NumSim/src/discretization/donor\_cell.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ "{}discretization.h"{}}} +\DoxyCodeLine{00007\ } + + + + + + +\DoxyCodeLine{00015\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classDonorCell}{DonorCell}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classDiscretization}{Discretization}}} +\DoxyCodeLine{00016\ \{} +\DoxyCodeLine{00017\ \textcolor{keyword}{public}:} + + + + + + +\DoxyCodeLine{00025\ \ \ \ \ \mbox{\hyperlink{classDonorCell_a4896ad035a5ac50c85e2b66d442a5312}{DonorCell}}(std::array\ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{nCells}},\ std::array\ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{meshWidth}},\ \textcolor{keywordtype}{double}\ alpha);} +\DoxyCodeLine{00026\ } + + + +\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDonorCell_a265bdaf46ed8ba46a42ef0cb03807175}{computeDu2Dx}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const\ override};} + + + +\DoxyCodeLine{00036\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDonorCell_a01dcfb7fcf356d5ee412107a30c26fb3}{computeDv2Dy}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const\ override};} + + + +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDonorCell_ae41b5f85743ca7f148bd829561bd9cb5}{computeDuvDx}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const\ override};} + + + +\DoxyCodeLine{00046\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classDonorCell_a285562312f08efde26afd160174d2843}{computeDuvDy}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const\ override};} +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00048\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ alpha\_;\ } +\DoxyCodeLine{00050\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/doxygen.sty b/documentation/latex/doxygen.sty new file mode 100644 index 00000000..4bfc17fa --- /dev/null +++ b/documentation/latex/doxygen.sty @@ -0,0 +1,694 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{doxygen} + +% Packages used by this style file +\RequirePackage{alltt} +%%\RequirePackage{array} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{calc} +\RequirePackage{float} +%%\RequirePackage{ifthen} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{verbatim} +\RequirePackage[table]{xcolor} +\RequirePackage{longtable_doxygen} +\RequirePackage{tabu_doxygen} +\RequirePackage{fancyvrb} +\RequirePackage{tabularx} +\RequirePackage{multicol} +\RequirePackage{multirow} +\RequirePackage{hanging} +\RequirePackage{ifpdf} +\RequirePackage{adjustbox} +\RequirePackage{amssymb} +\RequirePackage{stackengine} +\RequirePackage{enumitem} +\RequirePackage{alphalph} +\RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis + +%---------- Internal commands used in this style file ---------------- + +\newcommand{\ensurespace}[1]{% + \begingroup% + \setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@% + \penalty -100\vskip\z@\@plus -\dimen@% + \vskip\dimen@% + \penalty 9999% + \vskip -\dimen@% + \vskip\z@skip% hide the previous |\vskip| from |\addvspace| + \endgroup% +} + +\newcommand{\DoxyHorRuler}[1]{% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{#1=0}% + {% + \hrule% + }% + {% + \hrulefilll% + }% +} +\newcommand{\DoxyLabelFont}{} +\newcommand{\entrylabel}[1]{% + {% + \parbox[b]{\labelwidth-4pt}{% + \makebox[0pt][l]{\DoxyLabelFont#1}% + \vspace{1.5\baselineskip}% + }% + }% +} + +\newenvironment{DoxyDesc}[1]{% + \ensurespace{4\baselineskip}% + \begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + %\setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + }% + \item[#1]% +}{% + \end{list}% +} + +\newsavebox{\xrefbox} +\newlength{\xreflength} +\newcommand{\xreflabel}[1]{% + \sbox{\xrefbox}{#1}% + \setlength{\xreflength}{\wd\xrefbox}% + \ifthenelse{\xreflength>\labelwidth}{% + \begin{minipage}{\textwidth}% + \setlength{\parindent}{0pt}% + \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}% + \end{minipage}% + }{% + \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}% + }% +} + +%---------- Commands used by doxygen LaTeX output generator ---------- + +% Used by
     ... 
    +\newenvironment{DoxyPre}{% + \small% + \begin{alltt}% +}{% + \end{alltt}% + \normalsize% +} +% Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output. +\newlength{\CodeWidthChar} +\newlength{\CodeHeightChar} +\settowidth{\CodeWidthChar}{?} +\settoheight{\CodeHeightChar}{?} +% Necessary for hanging indent +\newlength{\DoxyCodeWidth} + +\newcommand\DoxyCodeLine[1]{ + \ifthenelse{\equal{\detokenize{#1}}{}} + { + \vspace*{\baselineskip} + } + { + \hangpara{\DoxyCodeWidth}{1}{#1}\par + } +} + +\newcommand\NiceSpace{% + \discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}% +} + +% Used by @code ... @endcode +\newenvironment{DoxyCode}[1]{% + \par% + \scriptsize% + \normalfont\ttfamily% + \rightskip0pt plus 1fil% + \settowidth{\DoxyCodeWidth}{000000}% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{\equal{#1}{0}} + { + {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces% + } + { + {\lccode`~32 \lowercase{\global\let~}}\obeyspaces% + } + +}{% + \normalfont% + \normalsize% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% +} + +% Redefining not defined characters, i.e. "Replacement Character" in tex output. +\def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{% + \textcolor{white}{\sffamily\bfseries\small ?}}{% + \rotatebox{45}{$\blacksquare$}}}} + +% Used by @example, @include, @includelineno and @dontinclude +\newenvironment{DoxyCodeInclude}[1]{% + \DoxyCode{#1}% +}{% + \endDoxyCode% +} + +% Used by @verbatim ... @endverbatim +\newenvironment{DoxyVerb}{% + \par% + \footnotesize% + \verbatim% +}{% + \endverbatim% + \normalsize% +} + +% Used by @verbinclude +\newenvironment{DoxyVerbInclude}{% + \DoxyVerb% +}{% + \endDoxyVerb% +} + +% Used by numbered lists (using '-#' or
      ...
    ) +\setlistdepth{12} +\newlist{DoxyEnumerate}{enumerate}{12} +\setlist[DoxyEnumerate,1]{label=\arabic*.} +\setlist[DoxyEnumerate,2]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,3]{label=\roman*.} +\setlist[DoxyEnumerate,4]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,5]{label=\arabic*.} +\setlist[DoxyEnumerate,6]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,7]{label=\roman*.} +\setlist[DoxyEnumerate,8]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,9]{label=\arabic*.} +\setlist[DoxyEnumerate,10]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,11]{label=\roman*.} +\setlist[DoxyEnumerate,12]{label=\enumAlphAlphcnt*.} + +% Used by bullet lists (using '-', @li, @arg, or
      ...
    ) +\setlistdepth{12} +\newlist{DoxyItemize}{itemize}{12} +\setlist[DoxyItemize]{label=\textperiodcentered} + +\setlist[DoxyItemize,1]{label=\textbullet} +\setlist[DoxyItemize,2]{label=\normalfont\bfseries \textendash} +\setlist[DoxyItemize,3]{label=\textasteriskcentered} +\setlist[DoxyItemize,4]{label=\textperiodcentered} + +% Used by description lists (using
    ...
    ) +\newenvironment{DoxyDescription}{% + \description% +}{% + \enddescription% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if caption is specified) +\newenvironment{DoxyImage}{% + \begin{figure}[H]% + \centering% +}{% + \end{figure}% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if no caption is specified) +\newenvironment{DoxyImageNoCaption}{% + \begin{center}% +}{% + \end{center}% +} + +% Used by @image +% (only if inline is specified) +\newenvironment{DoxyInlineImage}{% +}{% +} + +% Used by @attention +\newenvironment{DoxyAttention}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @author and @authors +\newenvironment{DoxyAuthor}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @date +\newenvironment{DoxyDate}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @invariant +\newenvironment{DoxyInvariant}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @note +\newenvironment{DoxyNote}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @post +\newenvironment{DoxyPostcond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @pre +\newenvironment{DoxyPrecond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @copyright +\newenvironment{DoxyCopyright}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @remark +\newenvironment{DoxyRemark}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @return and @returns +\newenvironment{DoxyReturn}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @since +\newenvironment{DoxySince}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @see +\newenvironment{DoxySeeAlso}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @version +\newenvironment{DoxyVersion}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @warning +\newenvironment{DoxyWarning}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @par and @paragraph +\newenvironment{DoxyParagraph}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by parameter lists +\newenvironment{DoxyParams}[2][]{% + \tabulinesep=1mm% + \par% + \ifthenelse{\equal{#1}{}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description + {\ifthenelse{\equal{#1}{1}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc + } + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields of simple structs +\newenvironment{DoxyFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields simple class style enums +\newenvironment{DoxyEnumFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for parameters within a detailed function description +\newenvironment{DoxyParamCaption}{% + \renewcommand{\item}[2][]{\\ \hspace*{2.0cm} ##1 {\em ##2}}% +}{% +} + +% Used by return value lists +\newenvironment{DoxyRetVals}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by exception lists +\newenvironment{DoxyExceptions}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by template parameter lists +\newenvironment{DoxyTemplParams}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for member lists +\newenvironment{DoxyCompactItemize}{% + \begin{itemize}% + \setlength{\itemsep}{-3pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \setlength{\partopsep}{0pt}% +}{% + \end{itemize}% +} + +% Used for member descriptions +\newenvironment{DoxyCompactList}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + \setlength{\itemsep}{0pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \renewcommand{\makelabel}{\hfill}% + }% +}{% + \end{list}% +} + +% Used for reference lists (@bug, @deprecated, @todo, etc.) +\newenvironment{DoxyRefList}{% + \begin{list}{}{% + \setlength{\labelwidth}{10pt}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \renewcommand{\makelabel}{\xreflabel}% + }% +}{% + \end{list}% +} + +% Used by @bug, @deprecated, @todo, etc. +\newenvironment{DoxyRefDesc}[1]{% + \begin{list}{}{% + \renewcommand\makelabel[1]{\textbf{##1}}% + \settowidth\labelwidth{\makelabel{#1}}% + \setlength\leftmargin{\labelwidth+\labelsep}% + }% +}{% + \end{list}% +} + +% Used by parameter lists and simple sections +\newenvironment{Desc} +{\begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + \setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + } +}{% + \end{list}% +} + +% Used by tables +\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}% +\newenvironment{TabularC}[1]% +{\tabulinesep=1mm +\begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}% +{\end{longtabu*}\par}% + +\newenvironment{TabularNC}[1]% +{\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}% +{\end{tabu}\par}% + +% Used for member group headers +\newenvironment{Indent}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + }% + \item[]\ignorespaces% +}{% + \unskip% + \end{list}% +} + +% Used when hyperlinks are turned on +\newcommand{\doxylink}[2]{% + \mbox{\hyperlink{#1}{#2}}% +} + +% Used when hyperlinks are turned on +% Third argument is the SectionType, see the doxygen internal +% documentation for the values (relevant: Page ... Subsubsection). +\newcommand{\doxysectlink}[3]{% + \mbox{\hyperlink{#1}{#2}}% +} +% Used when hyperlinks are turned off +\newcommand{\doxyref}[3]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used when hyperlinks are turned off +% Fourth argument is the SectionType, see the doxygen internal +% documentation for the values (relevant: Page ... Subsubsection). +\newcommand{\doxysectref}[4]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used to link to a table when hyperlinks are turned on +\newcommand{\doxytablelink}[2]{% + \ref{#1}% +} + +% Used to link to a table when hyperlinks are turned off +\newcommand{\doxytableref}[3]{% + \ref{#3}% +} + +% Used by @addindex +\newcommand{\lcurly}{\{} +\newcommand{\rcurly}{\}} + +% Colors used for syntax highlighting +\definecolor{comment}{rgb}{0.5,0.0,0.0} +\definecolor{keyword}{rgb}{0.0,0.5,0.0} +\definecolor{keywordtype}{rgb}{0.38,0.25,0.125} +\definecolor{keywordflow}{rgb}{0.88,0.5,0.0} +\definecolor{preprocessor}{rgb}{0.5,0.38,0.125} +\definecolor{stringliteral}{rgb}{0.0,0.125,0.25} +\definecolor{charliteral}{rgb}{0.0,0.5,0.5} +\definecolor{xmlcdata}{rgb}{0.0,0.0,0.0} +\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0} +\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43} +\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0} +\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0} + +% Color used for table heading +\newcommand{\tableheadbgcolor}{lightgray}% + +% Version of hypertarget with correct landing location +\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}} + +% possibility to have sections etc. be within the margins +% unfortunately had to copy part of book.cls and add \raggedright +\makeatletter +\newcounter{subsubsubsection}[subsubsection] +\newcounter{subsubsubsubsection}[subsubsubsection] +\newcounter{subsubsubsubsubsection}[subsubsubsubsection] +\newcounter{subsubsubsubsubsubsection}[subsubsubsubsubsection] +\renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}} +\renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}} +\renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsubsection.\arabic{subsubsubsubsubsection}} +\renewcommand{\thesubsubsubsubsubsubsection}{\thesubsubsubsubsubsection.\arabic{subsubsubsubsubsubsection}} +\newcommand{\subsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsubsectionmark}[1]{} +\newcommand{\subsubsubsubsubsubsectionmark}[1]{} +\def\toclevel@subsubsubsection{4} +\def\toclevel@subsubsubsubsection{5} +\def\toclevel@subsubsubsubsubsection{6} +\def\toclevel@subsubsubsubsubsubsection{7} +\def\toclevel@paragraph{8} +\def\toclevel@subparagraph{9} + +\newcommand\doxysection{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\raggedright\normalfont\Large\bfseries}} +\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\large\bfseries}} +\newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsection{\@startsection{subsubsubsection}{4}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsection{\@startsection{subsubsubsubsection}{5}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsubsection{\@startsection{subsubsubsubsubsection}{6}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubsubsubsubsubsubsection{\@startsection{subsubsubsubsubsubsection}{7}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxyparagraph{\@startsection{paragraph}{8}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubparagraph{\@startsection{subparagraph}{9}{\parindent}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} + +\newcommand\l@subsubsubsection{\@dottedtocline{4}{6.1em}{7.8em}} +\newcommand\l@subsubsubsubsection{\@dottedtocline{5}{6.1em}{9.4em}} +\newcommand\l@subsubsubsubsubsection{\@dottedtocline{6}{6.1em}{11em}} +\newcommand\l@subsubsubsubsubsubsection{\@dottedtocline{7}{6.1em}{12.6em}} +\renewcommand\l@paragraph{\@dottedtocline{8}{6.1em}{14.2em}} +\renewcommand\l@subparagraph{\@dottedtocline{9}{6.1em}{15.8em}} +\makeatother +% the sectsty doesn't look to be maintained but gives, in our case, some warning like: +% LaTeX Warning: Command \underline has changed. +% Check if current package is valid. +% unfortunately had to copy the relevant part +\newcommand*{\doxypartfont} [1] + {\gdef\SS@partnumberfont{\SS@sectid{0}\SS@nopart\SS@makeulinepartchap#1} + \gdef\SS@parttitlefont{\SS@sectid{0}\SS@titlepart\SS@makeulinepartchap#1}} +\newcommand*{\doxychapterfont} [1] + {\gdef\SS@chapnumfont{\SS@sectid{1}\SS@nopart\SS@makeulinepartchap#1} + \gdef\SS@chaptitlefont{\SS@sectid{1}\SS@titlepart\SS@makeulinepartchap#1}} +\newcommand*{\doxysectionfont} [1] + {\gdef\SS@sectfont{\SS@sectid{2}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubsectionfont} [1] + {\gdef\SS@subsectfont{\SS@sectid{3}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubsubsectionfont} [1] + {\gdef\SS@subsubsectfont{\SS@sectid{4}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxyparagraphfont} [1] + {\gdef\SS@parafont{\SS@sectid{5}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxysubparagraphfont} [1] + {\gdef\SS@subparafont{\SS@sectid{6}\SS@rr\SS@makeulinesect#1}} +\newcommand*{\doxyminisecfont} [1] + {\gdef\SS@minisecfont{\SS@sectid{7}\SS@rr\SS@makeulinepartchap#1}} +\newcommand*{\doxyallsectionsfont} [1] {\doxypartfont{#1}% + \doxychapterfont{#1}% + \doxysectionfont{#1}% + \doxysubsectionfont{#1}% + \doxysubsubsectionfont{#1}% + \doxyparagraphfont{#1}% + \doxysubparagraphfont{#1}% + \doxyminisecfont{#1}}% +% Define caption that is also suitable in a table +\makeatletter +\def\doxyfigcaption{% +\H@refstepcounter{figure}% +\@dblarg{\@caption{figure}}} +\makeatother + +% Define alpha enumarative names for counters > 26 +\makeatletter +\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname} +\def\@enumalphalphcnt#1{\alphalph{#1}} +\def\enumAlphAlphcnt#1{\expandafter\@enumAlphAlphcnt\csname c@#1\endcsname} +\def\@enumAlphAlphcnt#1{\AlphAlph{#1}} +\makeatother +\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{aa} +\AddEnumerateCounter{\enumAlphAlphcnt}{\@enumAlphAlphcnt}{AA} diff --git a/documentation/latex/etoc_doxygen.sty b/documentation/latex/etoc_doxygen.sty new file mode 100644 index 00000000..5f7e1274 --- /dev/null +++ b/documentation/latex/etoc_doxygen.sty @@ -0,0 +1,2178 @@ +%% +%% This is file etoc_doxygen.sty +%% +%% Apart from this header notice and the renaming from etoc to +%% etoc_doxygen (also in \ProvidesPackage) it is an identical +%% copy of +%% +%% etoc.sty +%% +%% at version 1.2b of 2023/07/01. +%% +%% This file has been provided to Doxygen team courtesy of the +%% author for benefit of users having a LaTeX installation not +%% yet providing version 1.2a or later of etoc, whose +%% deeplevels feature is required. +%% +%% The original source etoc.dtx (only of the latest version at +%% any given time) is available at +%% +%% https://ctan.org/pkg/etoc +%% +%% and contains the terms for copying and modification as well +%% as author contact information. +%% +%% In brief any modified versions of this file must be renamed +%% with new filenames distinct from etoc.sty. +%% +%% Package: etoc +%% Version: 1.2b +%% License: LPPL 1.3c +%% Copyright (C) 2012-2023 Jean-Francois B. +\NeedsTeXFormat{LaTeX2e}[2003/12/01] +\ProvidesPackage{etoc_doxygen}[2023/07/01 v1.2b Completely customisable TOCs (JFB)] +\newif\ifEtoc@oldLaTeX +\@ifl@t@r\fmtversion{2020/10/01} + {} + {\Etoc@oldLaTeXtrue + \PackageInfo{etoc}{Old LaTeX (\fmtversion) detected!\MessageBreak + Since 1.1a (2023/01/14), etoc prefers LaTeX at least\MessageBreak + as recent as 2020-10-01, for reasons of the .toc file,\MessageBreak + and used to require it (from 1.1a to 1.2).\MessageBreak + This etoc (1.2b) does not *require* it, but has not been\MessageBreak + tested thoroughly on old LaTeX (especially if document\MessageBreak + does not use hyperref) and retrofitting was done only\MessageBreak + on basis of author partial remembrances of old context.\MessageBreak + Reported}} +\RequirePackage{kvoptions} +\SetupKeyvalOptions{prefix=Etoc@} +\newif\ifEtoc@lof +\DeclareVoidOption{lof}{\Etoc@loftrue + \PackageInfo{etoc}{Experimental support for \string\locallistoffigures.\MessageBreak + Barely tested, use at own risk}% +} +\newif\ifEtoc@lot +\DeclareVoidOption{lot}{\Etoc@lottrue + \PackageInfo{etoc}{Experimental support for \string\locallistoftables.\MessageBreak + Barely tested, use at own risk}% +} +\@ifclassloaded{memoir}{ +\PackageInfo{etoc} + {As this is with memoir class, all `...totoc' options\MessageBreak + are set true by default. Reported} +\DeclareBoolOption[true]{maintoctotoc} +\DeclareBoolOption[true]{localtoctotoc} +\DeclareBoolOption[true]{localloftotoc} +\DeclareBoolOption[true]{locallottotoc} +}{ +\DeclareBoolOption[false]{maintoctotoc} +\DeclareBoolOption[false]{localtoctotoc} +\DeclareBoolOption[false]{localloftotoc} +\DeclareBoolOption[false]{locallottotoc} +} +\DeclareBoolOption[true]{ouroboros} +\DeclareBoolOption[false]{deeplevels} +\DeclareDefaultOption{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}} +\ProcessKeyvalOptions* +\DisableKeyvalOption[action=error,package=etoc]{etoc}{lof} +\DisableKeyvalOption[action=error,package=etoc]{etoc}{lot} +\DisableKeyvalOption[action=error,package=etoc]{etoc}{deeplevels} +\def\etocsetup#1{\setkeys{etoc}{#1}} +\def\etocifmaintoctotoc{\ifEtoc@maintoctotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocaltoctotoc{\ifEtoc@localtoctotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocalloftotoc{\ifEtoc@localloftotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\def\etociflocallottotoc{\ifEtoc@locallottotoc + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\RequirePackage{multicol} +\def\etoc@{\etoc@} +\long\def\Etoc@gobtoetoc@ #1\etoc@{} +\newtoks\Etoc@toctoks +\def\Etoc@par{\par} +\def\etocinline{\def\Etoc@par{}} +\let\etocnopar\etocinline +\def\etocdisplay{\def\Etoc@par{\par}} +\let\Etoc@global\@empty +\def\etocglobaldefs{\let\Etoc@global\global\let\tof@global\global} +\def\etoclocaldefs {\let\Etoc@global\@empty\let\tof@global\@empty} +\newif\ifEtoc@numbered +\newif\ifEtoc@hyperref +\newif\ifEtoc@parskip +\newif\ifEtoc@tocwithid +\newif\ifEtoc@standardlines +\newif\ifEtoc@etocstyle +\newif\ifEtoc@classstyle +\newif\ifEtoc@keeporiginaltoc +\newif\ifEtoc@skipprefix +\newif\ifEtoc@isfirst +\newif\ifEtoc@localtoc +\newif\ifEtoc@skipthisone +\newif\ifEtoc@stoptoc +\newif\ifEtoc@notactive +\newif\ifEtoc@mustclosegroup +\newif\ifEtoc@isemptytoc +\newif\ifEtoc@checksemptiness +\def\etocchecksemptiness {\Etoc@checksemptinesstrue } +\def\etocdoesnotcheckemptiness {\Etoc@checksemptinessfalse } +\newif\ifEtoc@notocifnotoc +\def\etocnotocifnotoc {\Etoc@checksemptinesstrue\Etoc@notocifnotoctrue } +\newcounter{etoc@tocid} +\def\Etoc@tocext{toc} +\def\Etoc@lofext{lof} +\def\Etoc@lotext{lot} +\let\Etoc@currext\Etoc@tocext +\def\etocifislocal{\ifEtoc@localtoc\expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi + } +\def\etocifislocaltoc{\etocifislocal{\ifx\Etoc@currext\Etoc@tocext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\def\etocifislocallof{\etocifislocal{\ifx\Etoc@currext\Etoc@lofext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\def\etocifislocallot{\etocifislocal{\ifx\Etoc@currext\Etoc@lotext + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% + {\@secondoftwo}% + } +\expandafter\def\csname Etoc@-3@@\endcsname {-\thr@@} +\expandafter\def\csname Etoc@-2@@\endcsname {-\tw@} +\expandafter\let\csname Etoc@-1@@\endcsname \m@ne +\expandafter\let\csname Etoc@0@@\endcsname \z@ +\expandafter\let\csname Etoc@1@@\endcsname \@ne +\expandafter\let\csname Etoc@2@@\endcsname \tw@ +\expandafter\let\csname Etoc@3@@\endcsname \thr@@ +\expandafter\chardef\csname Etoc@4@@\endcsname 4 +\expandafter\chardef\csname Etoc@5@@\endcsname 5 +\expandafter\chardef\csname Etoc@6@@\endcsname 6 +\ifEtoc@deeplevels + \expandafter\chardef\csname Etoc@7@@\endcsname 7 + \expandafter\chardef\csname Etoc@8@@\endcsname 8 + \expandafter\chardef\csname Etoc@9@@\endcsname 9 + \expandafter\chardef\csname Etoc@10@@\endcsname 10 + \expandafter\chardef\csname Etoc@11@@\endcsname 11 + \expandafter\chardef\csname Etoc@12@@\endcsname 12 +\fi +\expandafter\let\expandafter\Etoc@maxlevel + \csname Etoc@\ifEtoc@deeplevels12\else6\fi @@\endcsname +\edef\etocthemaxlevel{\number\Etoc@maxlevel} +\@ifclassloaded{memoir}{\def\Etoc@minf{-\thr@@}}{\def\Etoc@minf{-\tw@}} +\let\Etoc@none@@ \Etoc@minf +\expandafter\let\expandafter\Etoc@all@@ + \csname Etoc@\ifEtoc@deeplevels11\else5\fi @@\endcsname +\let\Etoc@dolevels\@empty +\def\Etoc@newlevel #1{\expandafter\def\expandafter\Etoc@dolevels\expandafter + {\Etoc@dolevels\Etoc@do{#1}}} +\ifdefined\expanded + \def\etocsetlevel#1#2{\expanded{\noexpand\etoc@setlevel{#1}{#2}}}% +\else + \def\etocsetlevel#1#2{{\edef\Etoc@tmp{\noexpand\etoc@setlevel{#1}{#2}}\expandafter}\Etoc@tmp}% +\fi +\def\etoc@setlevel#1#2{% + \edef\Etoc@tmp{\the\numexpr#2}% + \if1\ifnum\Etoc@tmp>\Etoc@maxlevel0\fi\unless\ifnum\Etoc@minf<\Etoc@tmp;\fi1% + \ifEtoc@deeplevels + \in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,% + .7,.8,.9,.10,.11,.12,}% + \else + \in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,}% + \fi + \ifin@\else\if\@car#1\@nil @\in@true\fi\fi + \ifin@ + \PackageWarning{etoc} + {Sorry, but `#1' is forbidden as level name.\MessageBreak + \if\@car#1\@nil @% + (because of the @ as first character)\MessageBreak\fi + Reported}% + \else + \etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}% + \expandafter\let\csname Etoc@#1@@\expandafter\endcsname + \csname Etoc@\Etoc@tmp @@\endcsname + \expandafter\edef\csname Etoc@@#1@@\endcsname + {\expandafter\noexpand\csname Etoc@#1@@\endcsname}% + \expandafter\edef\csname toclevel@@#1\endcsname + {\expandafter\noexpand\csname toclevel@#1\endcsname}% + \fi + \else + \PackageWarning{etoc} + {Argument `\detokenize{#2}' of \string\etocsetlevel\space should + represent one of\MessageBreak + \ifnum\Etoc@minf=-\thr@@-2, \fi-1, 0, 1, 2, \ifEtoc@deeplevels ...\else3, 4\fi, + \the\numexpr\Etoc@maxlevel-1, or \number\Etoc@maxlevel\space + but evaluates to \Etoc@tmp.\MessageBreak + The level of `#1' will be set to \number\Etoc@maxlevel.\MessageBreak + Tables of contents will ignore `#1' as long\MessageBreak + as its level is \number\Etoc@maxlevel\space (=\string\etocthemaxlevel).% + \MessageBreak + Reported}% + \etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}% + \expandafter\let\csname Etoc@#1@@\endcsname\Etoc@maxlevel + \fi +} +\def\etoclevel#1{\csname Etoc@#1@@\endcsname} +\def\etocthelevel#1{\number\csname Etoc@#1@@\endcsname} +\def\etocifunknownlevelTF#1{\@ifundefined{Etoc@#1@@}} +\@ifclassloaded{memoir}{\etocsetlevel{book}{-2}}{} +\etocsetlevel{part}{-1} +\etocsetlevel{chapter}{0} +\etocsetlevel{section}{1} +\etocsetlevel{subsection}{2} +\etocsetlevel{subsubsection}{3} +\etocsetlevel{paragraph}{4} +\etocsetlevel{subparagraph}{5} +\ifdefined\c@chapter + \etocsetlevel{appendix}{0} +\else + \etocsetlevel{appendix}{1} +\fi +\def\Etoc@do#1{\@namedef{l@@#1}{\csname l@#1\endcsname}} +\Etoc@dolevels +\let\Etoc@figure@@\Etoc@maxlevel +\let\Etoc@table@@ \Etoc@maxlevel +\let\Etoc@gobblethreeorfour\@gobblefour +\ifdefined\@gobblethree + \let\Etoc@gobblethree\@gobblethree +\else + \long\def\Etoc@gobblethree#1#2#3{}% +\fi +\AtBeginDocument{% +\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}% +\@ifpackageloaded{hyperref} + {\Etoc@hyperreftrue} + {\ifEtoc@oldLaTeX + \let\Etoc@gobblethreeorfour\Etoc@gobblethree + \let\Etoc@etoccontentsline@fourargs\Etoc@etoccontentsline@ + \long\def\Etoc@etoccontentsline@#1#2#3{% + \Etoc@etoccontentsline@fourargs{#1}{#2}{#3}{}% + }% + \fi + }% +} +\def\etocskipfirstprefix {\global\Etoc@skipprefixtrue } +\def\Etoc@updatestackofends#1\etoc@{\gdef\Etoc@stackofends{#1}} +\def\Etoc@stackofends{{-3}{}} +\def\Etoc@doendsandbegin{% + \expandafter\Etoc@traversestackofends\Etoc@stackofends\etoc@ +} +\def\Etoc@traversestackofends#1{% + \ifnum#1>\Etoc@level + \csname Etoc@end@#1\endcsname + \expandafter\Etoc@traversestackofends + \else + \Etoc@traversestackofends@done{#1}% + \fi +} +\def\Etoc@traversestackofends@done#1#2{#2% + \ifnum#1<\Etoc@level + \csname Etoc@begin@\the\numexpr\Etoc@level\endcsname + \Etoc@global\Etoc@isfirsttrue + \edef\Etoc@tmp{{\the\numexpr\Etoc@level}}% + \else + \Etoc@global\Etoc@isfirstfalse + \let\Etoc@tmp\@empty + \fi + \expandafter\Etoc@updatestackofends\Etoc@tmp{#1}% +} +\def\Etoc@etoccontentsline #1{% + \let\Etoc@next\Etoc@gobblethreeorfour + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \Etoc@skipthisonefalse + \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname + \if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi + \ifEtoc@localtoc + \ifEtoc@stoptoc + \Etoc@skipthisonetrue + \else + \ifEtoc@notactive + \Etoc@skipthisonetrue + \else + \unless\ifnum\Etoc@level>\etoclocaltop + \Etoc@skipthisonetrue + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \ifEtoc@skipthisone + \else + \unless\ifnum\Etoc@level>\c@tocdepth + \ifEtoc@standardlines + \let\Etoc@next\Etoc@savedcontentsline + \else + \let\Etoc@next\Etoc@etoccontentsline@ + \fi + \fi + \fi + \fi + \Etoc@next{#1}% +} +\def\Etoc@etoccontentsline@ #1#2#3#4{% + \Etoc@doendsandbegin + \Etoc@global\edef\Etoc@prefix {\expandafter\noexpand + \csname Etoc@prefix@\the\numexpr\Etoc@level\endcsname }% + \Etoc@global\edef\Etoc@contents{\expandafter\noexpand + \csname Etoc@contents@\the\numexpr\Etoc@level\endcsname }% + \ifEtoc@skipprefix \Etoc@global\def\Etoc@prefix{\@empty}\fi + \global\Etoc@skipprefixfalse + \Etoc@lxyz{#2}{#3}{#4}% + \Etoc@prefix + \Etoc@contents +} +\def\Etoc@lxyz #1#2#3{% + \ifEtoc@hyperref + \Etoc@global\def\etocthelink##1{\hyperlink{#3}{##1}}% + \else + \Etoc@global\let\etocthelink\@firstofone + \fi + \Etoc@global\def\etocthepage {#2}% + \ifEtoc@hyperref + \ifx\etocthepage\@empty + \Etoc@global\let\etocthelinkedpage\@empty + \else + \Etoc@global\def\etocthelinkedpage{\hyperlink {#3}{#2}}% + \fi + \else + \Etoc@global\let\etocthelinkedpage\etocthepage + \fi + \Etoc@global\def\etocthename{#1}% + \futurelet\Etoc@getnb@token\Etoc@@getnb #1\hspace\etoc@ + \ifEtoc@hyperref + \def\Etoc@tmp##1##2{\Etoc@global\def##2{\hyperlink{#3}{##1}}}% + \expandafter\Etoc@tmp\expandafter{\etocthename}\etocthelinkedname + \ifEtoc@numbered + \expandafter\Etoc@tmp\expandafter{\etocthenumber}\etocthelinkednumber + \else + \Etoc@global\let\etocthelinkednumber\@empty + \fi + \else + \Etoc@global\let\etocthelinkedname \etocthename + \Etoc@global\let\etocthelinkednumber\etocthenumber + \fi + \Etoc@global\expandafter\let\csname etoclink \endcsname \etocthelink + \Etoc@global\expandafter\let\csname etocname \endcsname \etocthename + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthenumber + \Etoc@global\expandafter\let\csname etocpage \endcsname \etocthepage + \ifEtoc@hyperref + \Etoc@lxyz@linktoc + \fi +} +\def\Etoc@lxyz@linktoc{% + \ifcase\Hy@linktoc + \or + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \or % page + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \else % all + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \fi +} +\def\Etoc@@getnb {% + \let\Etoc@next\Etoc@getnb + \ifx\Etoc@getnb@token\@sptoken\let\Etoc@next\Etoc@getnb@nonbr\fi + \ifx\Etoc@getnb@token\bgroup \let\Etoc@next\Etoc@getnb@nonbr\fi + \Etoc@next +} +\def\Etoc@getnb #1{% + \in@{#1}{\numberline\chapternumberline\partnumberline\booknumberline}% + \ifin@ + \let\Etoc@next\Etoc@getnb@nmbrd + \else + \ifnum\Etoc@level=\m@ne + \let\Etoc@next\Etoc@@getit + \else + \let\Etoc@next\Etoc@getnb@nonbr + \fi + \in@{#1}{\nonumberline}% + \ifin@ + \let\Etoc@next\Etoc@getnb@nonumberline + \fi + \fi + \Etoc@next #1% +} +\def\Etoc@getnb@nmbrd #1#2{% + \Etoc@global\Etoc@numberedtrue + \Etoc@global\def\etocthenumber {#2}% + \Etoc@getnb@nmbrd@getname\@empty +}% +\def\Etoc@getnb@nmbrd@getname #1\hspace\etoc@ {% + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}% +} +\def\Etoc@getnb@nonbr #1\etoc@ {% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty +} +\def\Etoc@getnb@nonumberline #1\hspace\etoc@ {% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{\@gobble#1}% +} +\def\Etoc@@getit #1\hspace#2{% + \ifx\etoc@#2% + \Etoc@global\Etoc@numberedfalse + \Etoc@global\let\etocthenumber \@empty + \else + \Etoc@global\Etoc@numberedtrue + \Etoc@global\def\etocthenumber {#1}% + \expandafter\Etoc@getit@getname \expandafter\@empty + \fi +} +\def\Etoc@getit@getname #1\hspace\etoc@ {% + \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}% +} +\let\etocthename \@empty +\let\etocthenumber \@empty +\let\etocthepage \@empty +\let\etocthelinkedname \@empty +\let\etocthelinkednumber \@empty +\let\etocthelinkedpage \@empty +\let\etocthelink \@firstofone +\DeclareRobustCommand*{\etocname} {} +\DeclareRobustCommand*{\etocnumber}{} +\DeclareRobustCommand*{\etocpage} {} +\DeclareRobustCommand*{\etoclink} {\@firstofone} +\DeclareRobustCommand*{\etocifnumbered} + {\ifEtoc@numbered\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\expandafter\let\expandafter\etocxifnumbered\csname etocifnumbered \endcsname +\DeclareRobustCommand*{\etociffirst} + {\ifEtoc@isfirst\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\expandafter\let\expandafter\etocxiffirst\csname etociffirst \endcsname +\def\Etoc@readtoc {% + \ifeof \Etoc@tf + \else + \read \Etoc@tf to \Etoc@buffer + \Etoc@toctoks=\expandafter\expandafter\expandafter + {\expandafter\the\expandafter\Etoc@toctoks\Etoc@buffer}% + \expandafter\Etoc@readtoc + \fi +} +\Etoc@toctoks {}% (superfluous, but for clarity) +\AtBeginDocument{\IfFileExists{\jobname.toc} + {{\endlinechar=\m@ne + \makeatletter + \newread\Etoc@tf + \openin\Etoc@tf\@filef@und + \Etoc@readtoc + \global\Etoc@toctoks=\expandafter{\the\Etoc@toctoks}% + \closein\Etoc@tf}} + {\typeout{No file \jobname.toc.}}} +\def\Etoc@openouttoc{% + \ifEtoc@hyperref + \ifx\hyper@last\@undefined + \IfFileExists{\jobname .toc} + {\Hy@WarningNoLine + {old toc file detected; run LaTeX again (cheers from `etoc')}% + \global\Etoc@toctoks={}% + } + {}% + \fi + \fi + \if@filesw + \newwrite \tf@toc + \immediate \openout \tf@toc \jobname .toc\relax + \fi + \global\let\Etoc@openouttoc\empty +} +\def\Etoc@toctoc{% + \gdef\Etoc@stackofends{{-3}{}}% + \global\let\Etoc@level\Etoc@minf + \global\let\Etoc@virtualtop\Etoc@minf + \the\Etoc@toctoks + \ifEtoc@notactive + \else + \gdef\Etoc@level{-\thr@@}% + \Etoc@doendsandbegin + \fi +} +\def\Etoc@@startlocaltoc#1#2{% + \ifEtoc@localtoc + \ifnum #1=#2\relax + \global\let\etoclocaltop\Etoc@virtualtop + \Etoc@@startlocaltochook + \etoclocaltableofcontentshook + \ifEtoc@etocstyle + \etocetoclocaltocmaketitle + \fi + \ifx\Etoc@aftertitlehook\@empty + \else + \ifEtoc@localtoctotoc + \ifEtoc@ouroboros + \else + \let\Etoc@tmp\contentsline + \def\contentsline{\let\contentsline\Etoc@tmp\Etoc@gobblethreeorfour}% + \fi + \fi + \fi + \global\Etoc@notactivefalse + \fi + \fi +} +\let\etoc@startlocaltoc\@gobble +\let\Etoc@@startlocaltoc@toc\Etoc@@startlocaltoc +\let\Etoc@@startlocaltochook\@empty +\unless\ifEtoc@deeplevels + \def\etocdivisionnameatlevel#1{% + \ifcase\numexpr#1\relax + \ifdefined\c@chapter chapter\else section\fi% + \or section% + \or subsection% + \or subsubsection% + \or paragraph% + \or subparagraph% + \or empty% + \else\ifnum\numexpr#1<\m@ne + book% + \else + part% + \fi + \fi + } +\else + \def\etocdivisionnameatlevel#1{% + \ifcase\numexpr#1\relax + \ifdefined\c@chapter chapter\else section\fi% + \or section% + \or subsection% + \or subsubsection% + \or subsubsubsection% + \or subsubsubsubsection% + \or subsubsubsubsubsection% + \or subsubsubsubsubsubsection% + \or paragraph% + \or subparagraph% + \else\ifnum\numexpr#1>\z@ + empty% + \else\ifnum\numexpr#1=\m@ne + part% + \else + book% + \fi\fi + \fi + } +\fi +\def\etoclocalheadtotoc#1#2{\addcontentsline{toc}{@#1}{#2}} +\def\etocglobalheadtotoc{\addcontentsline{toc}} +\providecommand*\UseName{\@nameuse} +\def\etocetoclocaltocmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\localcontentsname}% + \if@noskipsec\leavevmode\par\fi + \etociflocaltoctotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\localcontentsname}% + }% + }% + {}% +}% +\def\localcontentsname {\contentsname}% +\let\etoclocaltableofcontentshook\@empty +\if1\ifEtoc@lof0\fi\ifEtoc@lot0\fi1% +\else +\AtBeginDocument{% + \let\Etoc@originaladdcontentsline\addcontentsline + \def\addcontentsline{\Etoc@hackedaddcontentsline}% +}% +\fi +\ifEtoc@lof + \ifEtoc@lot + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lof,.lot,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} + \else + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lof,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} + \fi +\else + \def\Etoc@hackedaddcontentsline#1{% + \expanded{\noexpand\in@{.#1,}}{.lot,}% + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}} +\fi +\def\Etoc@hackedaddcontentsline@i#1#2#3{% + \expanded{\noexpand\in@{.#1;#2,}}{.lof;figure,.lot;table,}% + \ifin@ + \addtocontents {toc}{% + \protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% + \fi + \Etoc@originaladdcontentsline{#1}{#2}{#3}% +} +\unless\ifdefined\expanded + \def\Etoc@hackedaddcontentsline#1{% + {\edef\Etoc@tmp{\noexpand\in@{.#1,}{\ifEtoc@lof.lof,\fi\ifEtoc@lot.lot,\fi}}\expandafter}% + \Etoc@tmp + \ifin@\expandafter\Etoc@hackedaddcontentsline@i + \else\expandafter\Etoc@originaladdcontentsline + \fi {#1}% + } + \def\Etoc@hackedaddcontentsline@i#1#2#3{% + {\edef\Etoc@tmp{\noexpand\in@{.#1;#2,}}\expandafter}% + \Etoc@tmp{.lof;figure,.lot;table,}% + \ifin@ + \addtocontents {toc}{% + \protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% + \fi + \Etoc@originaladdcontentsline{#1}{#2}{#3}% + } +\fi +\def\Etoc@@startlocallistof#1#2#3{% + \ifEtoc@localtoc + \ifnum #2=#3\relax + \global\let\etoclocaltop\Etoc@virtualtop + \global\Etoc@notactivefalse + \Etoc@@startlocaltochook + \csname etoclocallistof#1shook\endcsname + \ifEtoc@etocstyle + \csname etocetoclistof#1smaketitle\endcsname + \fi + \fi + \fi +} +\def\Etoc@@startlocallistof@setlevels#1{% + \ifnum\etoclocaltop<\z@ + \expandafter\let\csname Etoc@#1@@\endcsname\@ne + \else + \expandafter\let\csname Etoc@#1@@\expandafter\endcsname + \csname Etoc@\the\numexpr\etoclocaltop+\@ne @@\endcsname + \fi + \def\Etoc@do##1{% + \ifnum\etoclevel{##1}>\etoclocaltop + \expandafter\let\csname Etoc@##1@@\endcsname\Etoc@maxlevel + \fi}% + \Etoc@dolevels +} +\def\etoclocallistoffigureshook{\etocstandardlines} +\def\etoclocallistoftableshook {\etocstandardlines} +\def\locallistfigurename{\listfigurename} +\def\locallisttablename {\listtablename} +\def\etocetoclistoffiguresmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallistfigurename}% + \ifnum\etoclocaltop>\tw@\mbox{}\par\fi + \etociflocalloftotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\locallistfigurename}% + }% + }% + {}% +}% +\def\etocetoclistoftablesmaketitle{% + \UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallisttablename}% + \ifnum\etoclocaltop>\tw@\mbox{}\par\fi + \etociflocallottotoc + {\etocifisstarred + {}% star variant, do not add to toc + {\etoclocalheadtotoc + {\etocdivisionnameatlevel{\etoclocaltop+1}}% + {\locallisttablename}% + }% + }% + {}% +}% +\let\Etoc@listofreset\@empty +\ifEtoc@lof + \def\locallistoffigures{% + \def\Etoc@listofreset{% + \let\Etoc@currext\Etoc@tocext + \let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc + \let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty + \let\Etoc@listofhook\@empty + }% + \let\Etoc@currext\Etoc@lofext + \def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{figure}}% + \def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{figure}}% + \def\Etoc@listofhook{% + \def\Etoc@do####1{% + \expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel + }% + \Etoc@dolevels + }% + \localtableofcontents + } +\else + \def\locallistoffigures{% + \PackageError{etoc}{% + \string\locallistoffigures \on@line\space but\MessageBreak + package was loaded without `lof' option}% + {Try again with \string\usepackage[lof]{etoc}}% + } +\fi +\ifEtoc@lot + \def\locallistoftables{% + \def\Etoc@listofreset{% + \let\Etoc@currext\Etoc@tocext + \let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc + \let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty + \let\Etoc@listofhook\@empty + }% + \let\Etoc@currext\Etoc@lotext + \def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{table}}% + \def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{table}}% + \def\Etoc@listofhook{% + \def\Etoc@do####1{% + \expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel + }% + \Etoc@dolevels + }% + \localtableofcontents + } +\else + \def\locallistoftables{% + \PackageError{etoc}{% + \string\locallistoftable \on@line\space but\MessageBreak + package was loaded without `lot' option}% + {Try again with \string\usepackage[lot]{etoc}}% + } +\fi +\def\Etoc@checkifempty {% + \global\Etoc@isemptytoctrue + \global\Etoc@stoptocfalse + \global\let\Etoc@level\Etoc@minf + \global\let\Etoc@virtualtop\Etoc@minf + \gdef\Etoc@stackofends{{-3}{}}% + \begingroup + \ifEtoc@localtoc + \def\etoc@startlocaltoc##1{% + \ifnum##1=\Etoc@tocid\relax + \global\let\etoclocaltop\Etoc@virtualtop + \Etoc@@startlocaltochook + \global\Etoc@notactivefalse + \fi + }% + \let\contentsline\Etoc@testingcontentslinelocal + \else + \let\contentsline\Etoc@testingcontentsline + \fi + \Etoc@storetocdepth + \let\Etoc@setlocaltop@doendsandbegin\@empty + \the\Etoc@toctoks + \Etoc@restoretocdepth + \endgroup +} +\DeclareRobustCommand*\etocifwasempty + {\ifEtoc@isemptytoc\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi } +\expandafter\let\expandafter\etocxifwasempty\csname etocifwasempty \endcsname +\def\Etoc@testingcontentslinelocal #1{% + \ifEtoc@stoptoc + \else + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname + \if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi + \ifEtoc@notactive + \else + \ifnum\Etoc@level>\etoclocaltop + \unless\ifnum\Etoc@level>\c@tocdepth + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \fi + \else + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \Etoc@gobblethreeorfour{}% +} +\def\Etoc@testingcontentsline #1{% + \ifEtoc@stoptoc + \else + \ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel + \else + \unless\ifnum\csname Etoc@#1@@\endcsname>\c@tocdepth + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \Etoc@gobblethreeorfour{}% +} +\def\Etoc@localtableofcontents#1{% + \gdef\etoclocaltop{-\@m}% + \Etoc@localtoctrue + \global\Etoc@isemptytocfalse + \edef\Etoc@tocid{#1}% + \ifnum\Etoc@tocid<\@ne + \setbox0\hbox{\ref{Unknown toc ref \@secondoftwo#1. \space Rerun LaTeX}}% + \global\Etoc@stoptoctrue + \gdef\etoclocaltop{-\thr@@}% + \Etoc@tableofcontents + \expandafter\Etoc@gobtoetoc@ + \fi + \global\Etoc@notactivetrue + \ifEtoc@checksemptiness + \Etoc@checkifempty + \fi + \ifEtoc@isemptytoc + \ifEtoc@notactive + \setbox0\hbox{\ref{Unknown toc ID \number\Etoc@tocid. \space Rerun LaTeX}}% + \global\Etoc@isemptytocfalse + \global\Etoc@stoptoctrue + \gdef\etoclocaltop{-\thr@@}% + \Etoc@tableofcontents + \expandafter\expandafter\expandafter\Etoc@gobtoetoc@ + \fi + \else + \global\Etoc@stoptocfalse + \global\Etoc@notactivetrue + \edef\etoc@startlocaltoc##1% + {\noexpand\Etoc@@startlocaltoc{##1}{\Etoc@tocid}}% + \Etoc@tableofcontents + \fi + \@gobble\etoc@ + \endgroup\ifEtoc@mustclosegroup\endgroup\fi + \Etoc@tocdepthreset + \Etoc@listofreset + \etocaftertochook +}% \Etoc@localtableofcontents +\def\Etoc@getref #1{% + \@ifundefined{r@#1} + {0} + {\expandafter\Etoc@getref@i\romannumeral-`0% + \expandafter\expandafter\expandafter + \@car\csname r@#1\endcsname0\@nil\@etoc + }% +} +\def\Etoc@getref@i#1#2\@etoc{\ifnum9<1\string#1 #1#2\else 0\fi} +\def\Etoc@ref#1{\Etoc@localtableofcontents{\Etoc@getref{#1}}} +\def\Etoc@label#1{\label{#1}\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} +\@firstofone{\def\Etoc@again} {\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} +\def\Etoc@dothis #1#2\etoc@ {\fi #1} +\def\Etoc@t@bleofcontents{% + \gdef\etoclocaltop{-\@M}% + \ifx\Etoc@nexttoken\label\Etoc@dothis{\expandafter\Etoc@label\@gobble}\fi + \ifx\Etoc@nexttoken\@sptoken\Etoc@dothis{\Etoc@again}\fi + \ifx\Etoc@nexttoken\ref\Etoc@dothis{\expandafter\Etoc@ref\@gobble}\fi + \ifEtoc@tocwithid\Etoc@dothis{\Etoc@localtableofcontents{\c@etoc@tocid}}\fi + \global\Etoc@isemptytocfalse + \ifEtoc@checksemptiness\Etoc@checkifempty\fi + \ifEtoc@isemptytoc + \ifEtoc@notocifnotoc + \expandafter\expandafter\expandafter\@gobble + \fi + \fi + \Etoc@tableofcontents + \endgroup + \ifEtoc@mustclosegroup\endgroup\fi + \Etoc@tocdepthreset + \Etoc@listofreset + \etocaftertochook + \@gobble\etoc@ + }% \Etoc@t@bleofcontents +\def\Etoc@table@fcontents{% + \refstepcounter{etoc@tocid}% + \Etoc@tocwithidfalse + \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents +} +\def\Etoc@localtable@fcontents{% + \refstepcounter{etoc@tocid}% + \addtocontents{toc}{\string\etoc@startlocaltoc{\the\c@etoc@tocid}}% + \Etoc@tocwithidtrue + \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents +} +\def\etoctableofcontents{% + \Etoc@openouttoc + \Etoc@tocdepthset + \begingroup + \@ifstar + {\let\Etoc@aftertitlehook\@empty\Etoc@table@fcontents} + {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@table@fcontents}% +}% \etoctableofcontents +\def\etocifisstarred{\ifx\Etoc@aftertitlehook\@empty + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo + \fi} +\let\etocoriginaltableofcontents\tableofcontents +\let\tableofcontents\etoctableofcontents +\let\Etoc@listofhook\@empty +\newcommand*\localtableofcontents{% + \Etoc@openouttoc + \Etoc@tocdepthset + \begingroup + \Etoc@listofhook + \@ifstar + {\let\Etoc@aftertitlehook\@empty\Etoc@localtable@fcontents} + {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@localtable@fcontents}% +}% \localtableofcontents +\newcommand*\localtableofcontentswithrelativedepth[1]{% + \def\Etoc@@startlocaltochook{% + \global\c@tocdepth\numexpr\etoclocaltop+#1\relax + }% + \def\Etoc@listofreset{\let\Etoc@@startlocaltochook\@empty + \let\Etoc@listofreset\@empty}% + \localtableofcontents +}% \localtableofcontentswithrelativedepth +\newcommand\etocsettocstyle[2]{% + \Etoc@etocstylefalse + \Etoc@classstylefalse + \def\Etoc@tableofcontents@user@before{#1}% + \def\Etoc@tableofcontents@user@after {#2}% +}% +\def\etocstoretocstyleinto#1{% +%% \@ifdefinable#1{% + \edef#1{\noexpand\Etoc@etocstylefalse\noexpand\Etoc@classstylefalse + \def\noexpand\Etoc@tableofcontents@user@before{% + \unexpanded\expandafter{\Etoc@tableofcontents@user@before}% + }% + \def\noexpand\Etoc@tableofcontents@user@after{% + \unexpanded\expandafter{\Etoc@tableofcontents@user@after}% + }% + }% +%% }% +}% +\def\Etoc@tableofcontents {% + \Etoc@tableofcontents@etoc@before + \ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi + \Etoc@tableofcontents@user@before + \Etoc@tableofcontents@contents + \ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi + \Etoc@tableofcontents@user@after + \Etoc@tableofcontents@etoc@after + \@gobble\etoc@ +} +\def\Etoc@tableofcontents@etoc@before{% + \ifnum\c@tocdepth>\Etoc@minf + \else + \expandafter\Etoc@gobtoetoc@ + \fi + \Etoc@par + \Etoc@beforetitlehook + \etocbeforetitlehook + \Etoc@storetocdepth + \let\Etoc@savedcontentsline\contentsline + \let\contentsline\Etoc@etoccontentsline + \ifEtoc@standardlines + \else + \def\Etoc@do##1{% + \expandafter\def\csname etocsaved##1tocline\endcsname + {\PackageError{etoc}{% + \expandafter\string\csname etocsaved##1tocline\endcsname\space + has been deprecated\MessageBreak + at 1.1a and is removed at 1.2.\MessageBreak + Use \expandafter\string\csname l@##1\endcsname\space directly.\MessageBreak + Reported \on@line}% + {I will use \expandafter\string + \csname l@##1\endcsname\space myself for this time.% + }% + \csname l@##1\endcsname + }% + }% + \Etoc@dolevels + \fi +}% +\def\Etoc@tableofcontents@contents{% + \Etoc@tocdepthset + \ifEtoc@parskip\parskip\z@skip\fi + \Etoc@aftertitlehook + \gdef\etoclocaltop{-\thr@@}% + \Etoc@toctoc + \etocaftercontentshook +}% +\def\Etoc@tableofcontents@etoc@after{% + \@nobreakfalse + \Etoc@restoretocdepth + \ifx\Etoc@global\global + \@ifundefined{tof@finish} + {} + {\ifx\tof@finish\@empty + \else + \global\let\contentsline\Etoc@savedcontentsline + \fi + }% + \fi +} +\def\etocsetstyle#1{\ifcsname Etoc@#1@@\endcsname + \expandafter\Etoc@setstyle@a + \else + \expandafter\Etoc@setstyle@error + \fi {#1}% +} +\def\Etoc@setstyle@error #1{% + \PackageWarning{etoc}{`#1' is unknown to etoc. \space Did you\MessageBreak + forget some \string\etocsetlevel{#1}{}?\MessageBreak + Reported}% + \@gobblefour +} +\def\Etoc@setstyle@a #1{% + \edef\Etoc@tmp{\the\numexpr\csname Etoc@#1@@\endcsname}% + \if1\unless\ifnum\Etoc@tmp<\Etoc@maxlevel 0\fi + \unless\ifnum\Etoc@tmp>\Etoc@minf 0\fi1% + \Etoc@standardlinesfalse + \expandafter\Etoc@setstyle@b\expandafter\Etoc@tmp + \else + \ifnum\Etoc@tmp=\Etoc@maxlevel + \in@{.#1,}{.figure,.table,}% + \ifin@ + \PackageWarning{etoc} + {You can not use \string\etocsetstyle\space with `#1'.\MessageBreak + Check the package documentation (in particular about\MessageBreak + \string\etoclocallistoffigureshook/\string\etoclocallistoftableshook)% + \MessageBreak on how to customize + figure and table entries in local\MessageBreak lists. Reported}% + \else + \PackageInfo{etoc} + {Attempt to set the style of `#1',\MessageBreak + whose level is currently the maximal one \etocthemaxlevel,\MessageBreak + which is never displayed. \space This will be ignored\MessageBreak + but note that we do quit compatibility mode.\MessageBreak + Reported}% + \Etoc@standardlinesfalse + \fi + \else + \PackageWarning{etoc}{This should not happen. Reported}% + \fi + \expandafter\@gobblefour + \fi +} +\long\def\Etoc@setstyle@b#1#2#3#4#5{% + \expandafter\def\csname Etoc@begin@#1\endcsname {#2}% + \expandafter\def\csname Etoc@prefix@#1\endcsname {#3}% + \expandafter\def\csname Etoc@contents@#1\endcsname {#4}% + \expandafter\def\csname Etoc@end@#1\endcsname {#5}% +} +\def\Etoc@setstyle@e#1{% + \expandafter\let\csname Etoc@begin@#1\endcsname \@empty + \expandafter\let\csname Etoc@prefix@#1\endcsname \@empty + \expandafter\let\csname Etoc@contents@#1\endcsname \@empty + \expandafter\let\csname Etoc@end@#1\endcsname \@empty +} +\def\Etoc@storelines@a#1{% + \noexpand\Etoc@setstyle@b{#1}% + {\expandafter\Etoc@expandonce\csname Etoc@begin@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@prefix@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@contents@#1\endcsname}% + {\expandafter\Etoc@expandonce\csname Etoc@end@#1\endcsname}% +} +\def\Etoc@expandonce#1{\unexpanded\expandafter{#1}} +\def\etocstorelinestylesinto#1{% + \edef#1{\Etoc@storelines@a{-2}\Etoc@storelines@a{-1}\Etoc@storelines@a{0}% + \Etoc@storelines@a {1}\Etoc@storelines@a {2}\Etoc@storelines@a{3}% + \Etoc@storelines@a {4}\Etoc@storelines@a {5}% + \ifEtoc@deeplevels + \Etoc@storelines@a{6}\Etoc@storelines@a{7}\Etoc@storelines@a{8}% + \Etoc@storelines@a{9}\Etoc@storelines@a{10}\Etoc@storelines@a{11}% + \fi + }% +} +\def\etocstorethislinestyleinto#1#2{% + \edef#2{\expandafter\Etoc@storelines@a\expandafter{\number\etoclevel{#1}}}% +}% +\def\etocfontminustwo {\normalfont \LARGE \bfseries} +\def\etocfontminusone {\normalfont \large \bfseries} +\def\etocfontzero {\normalfont \large \bfseries} +\def\etocfontone {\normalfont \normalsize \bfseries} +\def\etocfonttwo {\normalfont \normalsize} +\def\etocfontthree {\normalfont \footnotesize} +\def\etocsepminustwo {4ex \@plus .5ex \@minus .5ex} +\def\etocsepminusone {4ex \@plus .5ex \@minus .5ex} +\def\etocsepzero {2.5ex \@plus .4ex \@minus .4ex} +\def\etocsepone {1.5ex \@plus .3ex \@minus .3ex} +\def\etocseptwo {.5ex \@plus .1ex \@minus .1ex} +\def\etocsepthree {.25ex \@plus .05ex \@minus .05ex} +\def\etocbaselinespreadminustwo {1} +\def\etocbaselinespreadminusone {1} +\def\etocbaselinespreadzero {1} +\def\etocbaselinespreadone {1} +\def\etocbaselinespreadtwo {1} +\def\etocbaselinespreadthree {.9} +\def\etocminustwoleftmargin {1.5em plus 0.5fil} +\def\etocminustworightmargin {1.5em plus -0.5fil} +\def\etocminusoneleftmargin {1em} +\def\etocminusonerightmargin {1em} +\def\etoctoclineleaders + {\hbox{\normalfont\normalsize\hb@xt@2ex {\hss.\hss}}} +\def\etocabbrevpagename {p.~} +\def\etocpartname {Part} +\def\etocbookname {Book} +\def\etocdefaultlines{% + \Etoc@standardlinesfalse + \etocdefaultlines@setbook + \etocdefaultlines@setpart + \etocdefaultlines@setchapter + \etocdefaultlines@setsection + \etocdefaultlines@setsubsection + \etocdefaultlines@setsubsubsection + \etocdefaultlines@setdeeperones +} +\def\etocnoprotrusion{\leavevmode\kern-\p@\kern\p@} +\@ifclassloaded{memoir}{% + \def\etocdefaultlines@setbook{% + \Etoc@setstyle@b + {-2}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@secpenalty} + {\begingroup + \etocfontminustwo + \addvspace{\etocsepminustwo}% + \parindent \z@ + \leftskip \etocminustwoleftmargin + \rightskip \etocminustworightmargin + \parfillskip \@flushglue + \vbox{\etocifnumbered{\etoclink{\etocbookname\enspace\etocthenumber:\quad}}{}% + \etocname + \baselineskip\etocbaselinespreadminustwo\baselineskip + \par}% + \addpenalty\@M\addvspace{\etocsepminusone}% + \endgroup} + {}% + } + }{\let\etocdefaultlines@setbook\@empty} +\def\etocdefaultlines@setpart{% +\Etoc@setstyle@b + {-1}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@secpenalty} + {\begingroup + \etocfontminusone + \addvspace{\etocsepminusone}% + \parindent \z@ + \leftskip \etocminusoneleftmargin + \rightskip \etocminusonerightmargin + \parfillskip \@flushglue + \vbox{\etocifnumbered{\etoclink{\etocpartname\enspace\etocthenumber.\quad}}{}% + \etocname + \baselineskip\etocbaselinespreadminusone\baselineskip + \par}% + \addpenalty\@M\addvspace{\etocsepzero}% + \endgroup} + {}% +} +\def\etocdefaultlines@setchapter{% +\Etoc@setstyle@b + {0}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfontzero + \addvspace{\etocsepzero}% + \parindent \z@ \parfillskip \@flushglue + \vbox{\etocifnumbered{\etocnumber.\enspace}{}\etocname + \baselineskip\etocbaselinespreadzero\baselineskip + \par}% + \endgroup} + {\addpenalty{-\@highpenalty}\addvspace{\etocsepminusone}}% +} +\def\etocdefaultlines@setsection{% +\Etoc@setstyle@b + {1}% + {\addpenalty\@M\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfontone + \addvspace{\etocsepone}% + \parindent \z@ \parfillskip \z@ + \setbox\z@\vbox{\parfillskip\@flushglue + \etocname\par + \setbox\tw@\lastbox + \global\setbox\@ne\hbox{\unhbox\tw@\ }}% + \dimen\z@=\wd\@ne + \setbox\z@=\etoctoclineleaders + \advance\dimen\z@\wd\z@ + \etocifnumbered + {\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}} + {\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}% + \advance\dimen\z@\wd\tw@ + \ifdim\dimen\z@ < \linewidth + \vbox{\etocname~% + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip + \par}% + \else + \vbox{\etocname~% + \leaders\copy\z@\hfil\break + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip + \par}% + \fi + \endgroup} + {\addpenalty\@secpenalty\addvspace{\etocsepzero}}% +} +\def\etocdefaultlines@setsubsection{% +\Etoc@setstyle@b + {2}% + {\addpenalty\@medpenalty\etocskipfirstprefix} + {\addpenalty\@itempenalty} + {\begingroup + \etocfonttwo + \addvspace{\etocseptwo}% + \parindent \z@ \parfillskip \z@ + \setbox\z@\vbox{\parfillskip\@flushglue + \etocname\par\setbox\tw@\lastbox + \global\setbox\@ne\hbox{\unhbox\tw@}}% + \dimen\z@=\wd\@ne + \setbox\z@=\etoctoclineleaders + \advance\dimen\z@\wd\z@ + \etocifnumbered + {\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}} + {\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}% + \advance\dimen\z@\wd\tw@ + \ifdim\dimen\z@ < \linewidth + \vbox{\etocname~% + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip + \par}% + \else + \vbox{\etocname~% + \leaders\copy\z@\hfil\break + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip + \par}% + \fi + \endgroup} + {\addpenalty\@secpenalty\addvspace{\etocsepone}}% +} +\def\etocdefaultlines@setsubsubsection{% +\Etoc@setstyle@b + {3}% + {\addpenalty\@M + \etocfontthree + \vspace{\etocsepthree}% + \noindent + \etocskipfirstprefix} + {\allowbreak\,--\,} + {\etocname} + {.\hfil + \begingroup + \baselineskip\etocbaselinespreadthree\baselineskip + \par + \endgroup + \addpenalty{-\@highpenalty}} +} +\def\etocdefaultlines@setdeeperones{% +\Etoc@setstyle@e{4}% +\Etoc@setstyle@e{5}% +\ifEtoc@deeplevels + \Etoc@setstyle@e{6}% + \Etoc@setstyle@e{7}% + \Etoc@setstyle@e{8}% + \Etoc@setstyle@e{9}% + \Etoc@setstyle@e{10}% + \Etoc@setstyle@e{11}% +\fi +} +\def\etocabovetocskip{3.5ex \@plus 1ex \@minus .2ex} +\def\etocbelowtocskip{3.5ex \@plus 1ex \@minus .2ex} +\def\etoccolumnsep{2em} +\def\etocmulticolsep{0ex} +\def\etocmulticolpretolerance{-1} +\def\etocmulticoltolerance{200} +\def\etocdefaultnbcol{2} +\def\etocinnertopsep{2ex} +\newcommand\etocmulticolstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle + {\let\etocoldpar\par + \addvspace{\etocabovetocskip}% + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[#2\etocoldpar\addvspace{\etocinnertopsep}]} + {#2\ifvmode\else\begingroup\interlinepenalty\@M\parskip\z@skip + \@@par\endgroup + \fi + \nobreak\addvspace{\etocinnertopsep}% + \pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}% + }% + {\ifnum #1>\@ne + \expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}}% + \addvspace{\etocbelowtocskip}}% +} +\def\etocinnerbottomsep{3.5ex} +\def\etocinnerleftsep{2em} +\def\etocinnerrightsep{2em} +\def\etoctoprule{\hrule} +\def\etocleftrule{\vrule} +\def\etocrightrule{\vrule} +\def\etocbottomrule{\hrule} +\def\etoctoprulecolorcmd{\relax} +\def\etocbottomrulecolorcmd{\relax} +\def\etocleftrulecolorcmd{\relax} +\def\etocrightrulecolorcmd{\relax} +\def\etoc@ruledheading #1{% + \hb@xt@\linewidth{\color@begingroup + \hss #1\hss\hskip-\linewidth + \etoctoprulecolorcmd\leaders\etoctoprule\hss + \phantom{#1}% + \leaders\etoctoprule\hss\color@endgroup}% + \nointerlineskip\nobreak\vskip\etocinnertopsep} +\newcommand*\etocruledstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle + {\addvspace{\etocabovetocskip}% + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[\etoc@ruledheading{#2}]} + {\etoc@ruledheading{#2}% + \pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}}% + \addvspace{\etocbelowtocskip}}} +\def\etocframedmphook{\relax} +\long\def\etocbkgcolorcmd{\relax} +\long\def\Etoc@relax{\relax} +\newbox\etoc@framed@titlebox +\newbox\etoc@framed@contentsbox +\newcommand*\etocframedstyle[2][\etocdefaultnbcol]{% +\etocsettocstyle{% + \addvspace{\etocabovetocskip}% + \sbox\z@{#2}% + \dimen\z@\dp\z@ + \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi + \setbox\etoc@framed@titlebox=\hb@xt@\linewidth{\color@begingroup + \hss + \ifx\etocbkgcolorcmd\Etoc@relax + \else + \sbox\tw@{\color{white}% + \vrule\@width\wd\z@\@height\ht\z@\@depth\dimen\z@}% + \ifdim\wd\z@<\linewidth \dp\tw@\z@\fi + \box\tw@ + \hskip-\wd\z@ + \fi + \copy\z@ + \hss + \hskip-\linewidth + \etoctoprulecolorcmd\leaders\etoctoprule\hss + \hskip\wd\z@ + \etoctoprulecolorcmd\leaders\etoctoprule\hss\color@endgroup}% + \setbox\z@\hbox{\etocleftrule\etocrightrule}% + \dimen\tw@\linewidth\advance\dimen\tw@-\wd\z@ + \advance\dimen\tw@-\etocinnerleftsep + \advance\dimen\tw@-\etocinnerrightsep + \setbox\etoc@framed@contentsbox=\vbox\bgroup + \hsize\dimen\tw@ + \kern\dimen\z@ + \vskip\etocinnertopsep + \hbox\bgroup + \begin{minipage}{\hsize}% + \etocframedmphook + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}} + {\pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\expandafter\@firstofone + \else \expandafter\@gobble + \fi + {\end{multicols}\unskip }% + \end{minipage}% + \egroup + \vskip\etocinnerbottomsep + \egroup + \vbox{\hsize\linewidth + \ifx\etocbkgcolorcmd\Etoc@relax + \else + \kern\ht\etoc@framed@titlebox + \kern\dp\etoc@framed@titlebox + \hb@xt@\linewidth{\color@begingroup + \etocleftrulecolorcmd\etocleftrule + \etocbkgcolorcmd + \leaders\vrule + \@height\ht\etoc@framed@contentsbox + \@depth\dp\etoc@framed@contentsbox + \hss + \etocrightrulecolorcmd\etocrightrule + \color@endgroup}\nointerlineskip + \vskip-\dp\etoc@framed@contentsbox + \vskip-\ht\etoc@framed@contentsbox + \vskip-\dp\etoc@framed@titlebox + \vskip-\ht\etoc@framed@titlebox + \fi + \box\etoc@framed@titlebox\nointerlineskip + \hb@xt@\linewidth{\color@begingroup + {\etocleftrulecolorcmd\etocleftrule}% + \hss\box\etoc@framed@contentsbox\hss + \etocrightrulecolorcmd\etocrightrule\color@endgroup} + \nointerlineskip + \vskip\ht\etoc@framed@contentsbox + \vskip\dp\etoc@framed@contentsbox + \hb@xt@\linewidth{\color@begingroup\etocbottomrulecolorcmd + \leaders\etocbottomrule\hss\color@endgroup}} + \addvspace{\etocbelowtocskip}}} +\newcommand\etoc@multicoltoc[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \tableofcontents} +\newcommand\etoc@multicoltoci[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \tableofcontents*} +\newcommand\etoc@local@multicoltoc[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \localtableofcontents} +\newcommand\etoc@local@multicoltoci[2][\etocdefaultnbcol]{% + \etocmulticolstyle[#1]{#2}% + \localtableofcontents*} +\newcommand*\etoc@ruledtoc[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \tableofcontents} +\newcommand*\etoc@ruledtoci[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \tableofcontents*} +\newcommand*\etoc@local@ruledtoc[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \localtableofcontents} +\newcommand*\etoc@local@ruledtoci[2][\etocdefaultnbcol]{% + \etocruledstyle[#1]{#2}% + \localtableofcontents*} +\newcommand*\etoc@framedtoc[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \tableofcontents} +\newcommand*\etoc@framedtoci[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \tableofcontents*} +\newcommand*\etoc@local@framedtoc[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \localtableofcontents} +\newcommand*\etoc@local@framedtoci[2][\etocdefaultnbcol]{% + \etocframedstyle[#1]{#2}% + \localtableofcontents*} +\def\etocmulticol{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@multicoltoci} + {\etoc@multicoltoc}} +\def\etocruled{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@ruledtoci} + {\etoc@ruledtoc}} +\def\etocframed{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@framedtoci} + {\etoc@framedtoc}} +\def\etoclocalmulticol{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@multicoltoci} + {\etoc@local@multicoltoc}} +\def\etoclocalruled{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@ruledtoci} + {\etoc@local@ruledtoc}} +\def\etoclocalframed{\begingroup + \Etoc@mustclosegrouptrue + \@ifstar + {\etoc@local@framedtoci} + {\etoc@local@framedtoc}} +\def\etocmemoirtoctotocfmt #1#2{% + \PackageWarning{etoc} + {\string\etocmemoirtoctotocfmt\space is deprecated.\MessageBreak + Use in its place \string\etocsettoclineforclasstoc,\MessageBreak + and \string\etocsettoclineforclasslistof{toc} (or {lof}, {lot}). + I will do this now.\MessageBreak + Reported}% + \etocsettoclineforclasstoc{#1}{#2}% + \etocsettoclineforclasslistof{toc}{#1}{#2}% +} +\def\etocsettoclineforclasstoc #1#2{% + \def\etocclassmaintocaddtotoc{\etocglobalheadtotoc{#1}{#2}}% +} +\def\etocsettoclineforclasslistof #1#2#3{% + \@namedef{etocclasslocal#1addtotoc}{\etoclocalheadtotoc{#2}{#3}}% +} +\let\etocclasslocaltocaddtotoc\@empty +\let\etocclasslocallofaddtotoc\@empty +\let\etocclasslocallotaddtotoc\@empty +\ifdefined\c@chapter + \def\etocclasslocaltocmaketitle{\section*{\localcontentsname}} + \def\etocclasslocallofmaketitle{\section*{\locallistfigurename}} + \def\etocclasslocallotmaketitle{\section*{\locallisttablename}} + \etocsettoclineforclasstoc {chapter}{\contentsname} + \etocsettoclineforclasslistof{toc}{section}{\localcontentsname} + \etocsettoclineforclasslistof{lof}{section}{\locallistfigurename} + \etocsettoclineforclasslistof{lot}{section}{\locallisttablename} +\else + \def\etocclasslocaltocmaketitle{\subsection*{\localcontentsname}}% + \def\etocclasslocallofmaketitle{\subsection*{\locallistfigurename}}% + \def\etocclasslocallotmaketitle{\subsection*{\locallisttablename}}% + \etocsettoclineforclasstoc {section}{\contentsname} + \etocsettoclineforclasslistof{toc}{subsection}{\localcontentsname} + \etocsettoclineforclasslistof{lof}{subsection}{\locallistfigurename} + \etocsettoclineforclasslistof{lot}{subsection}{\locallisttablename} +\fi +\def\etocclasslocalperhapsaddtotoc #1{% + \etocifisstarred + {} + {\csname ifEtoc@local#1totoc\endcsname + \csname etocclasslocal#1addtotoc\endcsname + \fi + }% +} +\def\etocarticlestyle{% + \etocsettocstyle + {\ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \section *{\contentsname + \@mkboth {\MakeUppercase \contentsname} + {\MakeUppercase \contentsname}}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + } + {}% +} +\def\etocarticlestylenomarks{% + \etocsettocstyle + {\ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \section *{\contentsname}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + } + {}% +} +\def\etocbookstyle{% + \etocsettocstyle + {\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \chapter *{\contentsname + \@mkboth {\MakeUppercase \contentsname} + {\MakeUppercase \contentsname}}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + }% + {\if@restonecol \twocolumn \fi}% +} +\def\etocbookstylenomarks{% + \etocsettocstyle + {\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \chapter *{\contentsname}% + \etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}% + \fi + }% + {\if@restonecol \twocolumn \fi}% +} +\let\etocreportstyle\etocbookstyle +\let\etocreportstylenomarks\etocbookstylenomarks +\def\etocmemoirstyle{% + \etocsettocstyle + {\ensureonecol \par \begingroup \phantomsection + \ifx\Etoc@aftertitlehook\@empty + \else + \ifmem@em@starred@listof + \else + \ifEtoc@localtoc + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \ifEtoc@maintoctotoc + \etocclassmaintocaddtotoc + \fi + \fi + \fi + \fi + \ifEtoc@localtoc + \@namedef{@\Etoc@currext maketitle}{% + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + }% + \fi + \@nameuse {@\Etoc@currext maketitle} %<< space token here from memoir code + \ifx\Etoc@aftertitlehook\@empty + \else + \Etoc@aftertitlehook \let \Etoc@aftertitlehook \relax + \fi + \parskip \cftparskip \@nameuse {cft\Etoc@currext beforelisthook}% + }% + {\@nameuse {cft\Etoc@currext afterlisthook}% + \endgroup\restorefromonecol + }% +} +\let\Etoc@beforetitlehook\@empty +\if1\@ifclassloaded{scrartcl}0{\@ifclassloaded{scrbook}0{\@ifclassloaded{scrreprt}01}}% +\expandafter\@gobble +\else + \ifdefined\setuptoc + \def\Etoc@beforetitlehook{% + \ifEtoc@localtoc + \etocclasslocalperhapsaddtotoc\Etoc@currext + \setuptoc{\Etoc@currext}{leveldown}% + \else + \etocifisstarred{}{\etocifmaintoctotoc{\setuptoc{toc}{totoc}}}% + \fi + }% + \fi +\expandafter\@firstofone +\fi +{\def\etocclasslocalperhapsaddtotoc #1{% + \etocifisstarred + {}% + {\csname ifEtoc@local#1totoc\endcsname + \setuptoc{\Etoc@currext}{totoc}% + \fi + }% + }% +} +\ifdefined\Iftocfeature + \def\etoc@Iftocfeature{\Iftocfeature}% +\else + \def\etoc@Iftocfeature{\iftocfeature}% +\fi +\def\etocscrartclstyle{% + \etocsettocstyle + {\ifx\Etoc@currext\Etoc@tocext + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi + {\let\if@dynlist\if@tocleft}% + \edef\@currext{\Etoc@currext}% + \@ifundefined{listof\@currext name}% + {\def\list@fname{\listofname~\@currext}}% + {\expandafter\let\expandafter\list@fname + \csname listof\@currext name\endcsname}% + \etoc@Iftocfeature {\@currext}{onecolumn} + {\etoc@Iftocfeature {\@currext}{leveldown} + {} + {\if@twocolumn \aftergroup \twocolumn \onecolumn \fi }} + {}% + \etoc@Iftocfeature {\@currext}{numberline}% + {\def \nonumberline {\numberline {}}}{}% + \expandafter\tocbasic@listhead\expandafter {\list@fname}% + \begingroup \expandafter \expandafter \expandafter + \endgroup \expandafter + \ifx + \csname microtypesetup\endcsname \relax + \else + \etoc@Iftocfeature {\@currext}{noprotrusion}{} + {\microtypesetup {protrusion=false}% + \PackageInfo {tocbasic}% + {character protrusion at \@currext\space deactivated}}% + \fi + \etoc@Iftocfeature{\@currext}{noparskipfake}{}{% + \ifvmode \@tempskipa\lastskip \vskip-\lastskip + \addtolength{\@tempskipa}{\parskip}\vskip\@tempskipa\fi + }% + \setlength {\parskip }{\z@ }% + \setlength {\parindent }{\z@ }% + \setlength {\parfillskip }{\z@ \@plus 1fil}% + \csname tocbasic@@before@hook\endcsname + \csname tb@\@currext @before@hook\endcsname + }% end of before_toc + {% start of after_toc + \providecommand\tocbasic@end@toc@file{}\tocbasic@end@toc@file + \edef\@currext{\Etoc@currext}% + \csname tb@\@currext @after@hook\endcsname + \csname tocbasic@@after@hook\endcsname + }% end of after_toc +} +\let\etocscrbookstyle\etocscrartclstyle +\let\etocscrreprtstyle\etocscrartclstyle +\def\etocclasstocstyle{\etocarticlestyle} +\newcommand*\etocmarkboth[1]{% + \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} +\newcommand*\etocmarkbothnouc[1]{\@mkboth{#1}{#1}} +\newcommand\etoctocstyle[3][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3}}} +\newcommand\etoctocstylewithmarks[4][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3\etocmarkboth{#4}}}} +\newcommand\etoctocstylewithmarksnouc[4][section]{\etocmulticolstyle[#2]% + {\csname #1\endcsname *{#3\etocmarkbothnouc{#4}}}} +\def\Etoc@redefetocstylesforchapters{% + \renewcommand\etoctocstylewithmarks[4][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkboth{##4}}}% + } + \renewcommand\etoctocstylewithmarksnouc[4][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkbothnouc{##4}}}% + } + \renewcommand\etoctocstyle[3][chapter]{% + \etocmulticolstyle[##2]{\csname ##1\endcsname *{##3}} + } +} +\@ifclassloaded{scrartcl} + {\renewcommand*\etocclasstocstyle{\etocscrartclstyle}}{} +\@ifclassloaded{book} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocbookstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{report} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocreportstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{scrbook} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocscrbookstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{scrreprt} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocscrreprtstyle} + \Etoc@redefetocstylesforchapters}{} +\@ifclassloaded{memoir} + {\renewcommand*\etocfontone{\normalfont\normalsize} + \renewcommand*\etocclasstocstyle{\etocmemoirstyle} + \Etoc@redefetocstylesforchapters}{} +\def\etoctocloftstyle {% + \etocsettocstyle{% + \@cfttocstart + \par + \begingroup + \parindent\z@ \parskip\cftparskip + \@nameuse{@cftmake\Etoc@currext title}% + \ifEtoc@localtoc + \etoctocloftlocalperhapsaddtotoc\Etoc@currext + \else + \etocifisstarred {}{\ifEtoc@maintoctotoc\@cftdobibtoc\fi}% + \fi + }% + {% + \endgroup + \@cfttocfinish + }% +} +\def\etoctocloftlocalperhapsaddtotoc#1{% + \etocifisstarred + {}% + {\csname ifEtoc@local#1totoc\endcsname + \ifdefined\c@chapter\def\@tocextra{@section}\else\def\@tocextra{@subsection}\fi + \csname @cftdobib#1\endcsname + \fi + }% +} +\def\etoctocbibindstyle {% + \etocsettocstyle {% + \toc@start + \ifEtoc@localtoc + \@nameuse{etocclasslocal\Etoc@currext maketitle}% + \etocclasslocalperhapsaddtotoc\Etoc@currext + \else + \etoc@tocbibind@dotoctitle + \fi + }% + {\toc@finish}% +} +\def\etoc@tocbibind@dotoctitle {% + \if@bibchapter + \etocifisstarred + {\chapter*{\contentsname}\prw@mkboth{\contentsname} % id. + }% + {\ifEtoc@maintoctotoc + \toc@chapter{\contentsname} %<-space from original + \else + \chapter*{\contentsname}\prw@mkboth{\contentsname} % id. + \fi + }% + \else + \etocifisstarred + {\@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} %<-space + } + {\ifEtoc@maintoctotoc + \toc@section{\@tocextra}{\contentsname} %<-space from original + \else + \@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} % id. + \fi + }% + \fi +}% +\@ifclassloaded{memoir} +{} +{% memoir not loaded + \@ifpackageloaded{tocloft} + {\if@cftnctoc\else + \ifEtoc@keeporiginaltoc + \else + \AtBeginDocument{\let\tableofcontents\etoctableofcontents}% + \fi + \fi } + {\AtBeginDocument + {\@ifpackageloaded{tocloft} + {\if@cftnctoc\else + \PackageWarningNoLine {etoc} + {Package `tocloft' was loaded after `etoc'.\MessageBreak + To prevent it from overwriting \protect\tableofcontents, it will\MessageBreak + be tricked into believing to have been loaded with its\MessageBreak + option `titles'. \space But this will cause the `tocloft'\MessageBreak + customization of the titles of the main list of figures\MessageBreak + and list of tables to not apply either.\MessageBreak + You should load `tocloft' before `etoc'.}% + \AtEndDocument{\PackageWarning{etoc} + {Please load `tocloft' before `etoc'!\@gobbletwo}}% + \fi + \@cftnctoctrue }% + {}% + }% + }% +} +\@ifclassloaded{memoir} +{} +{% memoir not loaded + \AtBeginDocument{% + \@ifpackageloaded{tocloft} + {% + \def\etocclasstocstyle{% + \etoctocloftstyle + \Etoc@classstyletrue + }% + \ifEtoc@etocstyle + \ifEtoc@classstyle + \etocclasstocstyle + \Etoc@etocstyletrue + \fi + \else + \ifEtoc@classstyle + \etocclasstocstyle + \fi + \fi + }% + {% no tocloft + \@ifpackageloaded {tocbibind} + {\if@dotoctoc + \def\etocclasstocstyle{% + \etoctocbibindstyle + \Etoc@classstyletrue + }% + \ifEtoc@etocstyle + \ifEtoc@classstyle + \etocclasstocstyle + \Etoc@etocstyletrue + \fi + \else + \ifEtoc@classstyle + \etocclasstocstyle + \fi + \fi + \ifEtoc@keeporiginaltoc + \else + \let\tableofcontents\etoctableofcontents + \fi + }% + {}% + }% + \@ifpackageloaded{tocbibind} + {% tocbibind, perhaps with tocloft + \if@dotoctoc + \ifEtoc@keeporiginaltoc + \else + \let\tableofcontents\etoctableofcontents + \fi + \etocsetup{maintoctotoc,localtoctotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) the options `maintoctotoc' and\MessageBreak + `localtoctotoc' to true as tocbibind was detected and\MessageBreak + found to be configured for `TOC to toc'.\MessageBreak + Reported at begin document}% + \fi + \if@dotoclof + \ifEtoc@lof + \etocsetup{localloftotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) `localloftotoc=true' as the\MessageBreak + package tocbibind was detected and is configured for\MessageBreak + `LOF to toc'. Reported at begin document}% + \fi + \fi + \if@dotoclot + \ifEtoc@lot + \etocsetup{locallottotoc}% + \PackageInfo{etoc}{% + Setting (or re-setting) `locallottotoc=true' as the\MessageBreak + package tocbibind was detected and is configured for\MessageBreak + `LOT to toc'. Reported at begin document}% + \fi + \fi + }% end of tocbibind branch + {}% + }% end of at begin document +}% end of not with memoir branch +\def\Etoc@addtocontents #1#2{% + \addtocontents {toc}{% + \protect\contentsline{#1}{#2}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}% + \ifdefined\protected@file@percent\protected@file@percent\fi + }% +} +\def\Etoc@addcontentsline@ #1#2#3{% + \@namedef{toclevel@#1}{#3}\addcontentsline {toc}{#1}{#2}% +} +\DeclareRobustCommand*{\etoctoccontentsline} + {\@ifstar{\Etoc@addcontentsline@}{\Etoc@addtocontents}} +\def\Etoc@addtocontents@immediately#1#2{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \Etoc@addtocontents{#1}{#2}% + \endgroup +} +\def\Etoc@addcontentsline@@immediately#1#2#3{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \Etoc@addcontentsline@{#1}{#2}{#3}% + \endgoroup +} +\DeclareRobustCommand*{\etocimmediatetoccontentsline} + {\@ifstar{\Etoc@addcontentsline@@immediately}{\Etoc@addtocontents@immediately}} +\def\Etoc@storetocdepth {\xdef\Etoc@savedtocdepth{\number\c@tocdepth}} +\def\Etoc@restoretocdepth {\global\c@tocdepth\Etoc@savedtocdepth\relax} +\def\etocobeytoctocdepth {\def\etoc@settocdepth + {\afterassignment\Etoc@@nottoodeep \global\c@tocdepth}} +\def\Etoc@@nottoodeep {\ifnum\Etoc@savedtocdepth<\c@tocdepth + \global\c@tocdepth\Etoc@savedtocdepth\relax\fi } +\def\etocignoretoctocdepth {\let\etoc@settocdepth\@gobble } +\def\etocsettocdepth {\futurelet\Etoc@nexttoken\Etoc@set@tocdepth } +\def\Etoc@set@tocdepth {\ifx\Etoc@nexttoken\bgroup + \expandafter\Etoc@set@tocdepth@ + \else\expandafter\Etoc@set@toctocdepth + \fi } +\def\Etoc@set@tocdepth@ #1{\@ifundefined {Etoc@#1@@} + {\PackageWarning{etoc} + {Unknown sectioning unit #1, \protect\etocsettocdepth\space ignored}} + {\global\c@tocdepth\csname Etoc@#1@@\endcsname}% +} +\def\Etoc@set@toctocdepth #1#{\Etoc@set@toctocdepth@ } +\def\Etoc@set@toctocdepth@ #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocsettocdepth.toc ignored}}% + {\addtocontents {toc} + {\protect\etoc@settocdepth\expandafter\protect\csname Etoc@#1@@\endcsname}}% +} +\def\etocimmediatesettocdepth #1#{\Etoc@set@toctocdepth@immediately} +\def\Etoc@set@toctocdepth@immediately #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocimmediatesettocdepth.toc ignored}}% + {\begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc} + {\protect\etoc@settocdepth\expandafter\protect + \csname Etoc@#1@@\endcsname}% + \endgroup + }% +} +\def\etocdepthtag #1#{\Etoc@depthtag } +\def\Etoc@depthtag #1{\addtocontents {toc}{\protect\etoc@depthtag {#1}}} +\def\etocimmediatedepthtag #1#{\Etoc@depthtag@immediately } +\def\Etoc@depthtag@immediately #1{% + \begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc}{\protect\etoc@depthtag {#1}}% + \endgroup +} +\def\etocignoredepthtags {\let\etoc@depthtag \@gobble } +\def\etocobeydepthtags {\let\etoc@depthtag \Etoc@depthtag@ } +\def\Etoc@depthtag@ #1{\@ifundefined{Etoc@depthof@#1}% + {}% ignore in silence if tag has no associated depth + {\afterassignment\Etoc@@nottoodeep + \global\c@tocdepth\csname Etoc@depthof@#1\endcsname}% +} +\def\etocsettagdepth #1#2{\@ifundefined{Etoc@#2@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #2, \protect\etocsettagdepth\space ignored}}% + {\@namedef{Etoc@depthof@#1}{\@nameuse{Etoc@#2@@}}}% +} +\def\Etoc@tocvsec@err #1{\PackageError {etoc} + {The command \protect#1\space is incompatible with `etoc'} + {Use \protect\etocsettocdepth.toc as replacement}% +}% +\AtBeginDocument {% + \@ifclassloaded{memoir} + {\PackageInfo {etoc} + {Regarding `memoir' class command \protect\settocdepth, consider\MessageBreak + \protect\etocsettocdepth.toc as a drop-in replacement with more\MessageBreak + capabilities (see `etoc' manual). \space + Also, \protect\etocsettocdepth\MessageBreak + and \protect\etocsetnexttocdepth\space should be used in place of\MessageBreak + `memoir' command \protect\maxtocdepth\@gobble}% + }% + {\@ifpackageloaded {tocvsec2}{% + \def\maxtocdepth #1{\Etoc@tocvsec@err \maxtocdepth }% + \def\settocdepth #1{\Etoc@tocvsec@err \settocdepth }% + \def\resettocdepth {\@ifstar {\Etoc@tocvsec@err \resettocdepth }% + {\Etoc@tocvsec@err \resettocdepth }% + }% + \def\save@tocdepth #1#2#3{}% + \let\reset@tocdepth\relax + \let\remax@tocdepth\relax + \let\tableofcontents\etoctableofcontents + \PackageWarningNoLine {etoc} + {Package `tocvsec2' detected and its modification of\MessageBreak + \protect\tableofcontents\space reverted. \space Use + \protect\etocsettocdepth.toc\MessageBreak as a replacement + for `tocvsec2' toc-related commands}% + }% tocvsec2 loaded + {}% tocvsec2 not loaded + }% +}% +\def\invisibletableofcontents {\etocsetnexttocdepth {-3}\tableofcontents }% +\def\invisiblelocaltableofcontents + {\etocsetnexttocdepth {-3}\localtableofcontents }% +\def\etocsetnexttocdepth #1{% + \@ifundefined{Etoc@#1@@} + {\PackageWarning{etoc} + {Unknown sectioning unit #1, \protect\etocsetnextocdepth\space ignored}} + {\Etoc@setnexttocdepth{\csname Etoc@#1@@\endcsname}}% +}% +\def\Etoc@setnexttocdepth#1{% + \def\Etoc@tocdepthset{% + \Etoc@tocdepthreset + \edef\Etoc@tocdepthreset {% + \global\c@tocdepth\the\c@tocdepth\space + \global\let\noexpand\Etoc@tocdepthreset\noexpand\@empty + }% + \global\c@tocdepth#1% + \global\let\Etoc@tocdepthset\@empty + }% +}% +\let\Etoc@tocdepthreset\@empty +\let\Etoc@tocdepthset \@empty +\def\etocsetlocaltop #1#{\Etoc@set@localtop}% +\def\Etoc@set@localtop #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocsetlocaltop.toc ignored}}% + {\addtocontents {toc} + {\protect\etoc@setlocaltop\expandafter\protect\csname Etoc@#1@@\endcsname}}% +}% +\def\etocimmediatesetlocaltop #1#{\Etoc@set@localtop@immediately}% +\def\Etoc@set@localtop@immediately #1{% + \@ifundefined{Etoc@#1@@}% + {\PackageWarning{etoc} + {Unknown sectioning depth #1, \protect\etocimmediatesetlocaltop.toc ignored}}% + {\begingroup + \let\Etoc@originalwrite\write + \def\write{\immediate\Etoc@originalwrite}% + \addtocontents {toc} + {\protect\etoc@setlocaltop\expandafter\protect + \csname Etoc@#1@@\endcsname}% + \endgroup + }% +}% +\def\etoc@setlocaltop #1{% + \ifnum#1=\Etoc@maxlevel + \Etoc@skipthisonetrue + \else + \Etoc@skipthisonefalse + \global\let\Etoc@level #1% + \global\let\Etoc@virtualtop #1% + \ifEtoc@localtoc + \ifEtoc@stoptoc + \Etoc@skipthisonetrue + \else + \ifEtoc@notactive + \Etoc@skipthisonetrue + \else + \unless\ifnum\Etoc@level>\etoclocaltop + \Etoc@skipthisonetrue + \global\Etoc@stoptoctrue + \fi + \fi + \fi + \fi + \fi + \let\Etoc@next\@empty + \ifEtoc@skipthisone + \else + \ifnum\Etoc@level>\c@tocdepth + \else + \ifEtoc@standardlines + \else + \let\Etoc@next\Etoc@setlocaltop@doendsandbegin + \fi + \fi + \fi + \Etoc@next +}% +\def\Etoc@setlocaltop@doendsandbegin{% + \Etoc@doendsandbegin + \global\Etoc@skipprefixfalse +} +\addtocontents {toc}{\protect\@ifundefined{etoctocstyle}% + {\let\protect\etoc@startlocaltoc\protect\@gobble + \let\protect\etoc@settocdepth\protect\@gobble + \let\protect\etoc@depthtag\protect\@gobble + \let\protect\etoc@setlocaltop\protect\@gobble}{}}% +\def\etocstandardlines {\Etoc@standardlinestrue} +\def\etoctoclines {\Etoc@standardlinesfalse} +\etocdefaultlines +\etocstandardlines +\def\etocstandarddisplaystyle{% + \PackageWarningNoLine{etoc}{% + \string\etocstandarddisplaystyle \on@line\MessageBreak + is deprecated. \space Please use \string\etocclasstocstyle}% +} +\expandafter\def\expandafter\etocclasstocstyle\expandafter{% + \etocclasstocstyle + \Etoc@classstyletrue +} +\def\etocetoclocaltocstyle{\Etoc@etocstyletrue} +\def\etocusertocstyle{\Etoc@etocstylefalse} +\etocclasstocstyle +\etocetoclocaltocstyle +\etocobeytoctocdepth +\etocobeydepthtags +\let\etocbeforetitlehook \@empty +\let\etocaftertitlehook \@empty +\let\etocaftercontentshook \@empty +\let\etocaftertochook \@empty +\def\etockeeporiginaltableofcontents + {\Etoc@keeporiginaltoctrue\let\tableofcontents\etocoriginaltableofcontents}% +\endinput +%% +%% End of file `etoc.sty'. diff --git a/documentation/latex/field__variable_8h_source.tex b/documentation/latex/field__variable_8h_source.tex new file mode 100644 index 00000000..13accbe0 --- /dev/null +++ b/documentation/latex/field__variable_8h_source.tex @@ -0,0 +1,51 @@ +\doxysection{field\+\_\+variable.\+h} +\hypertarget{field__variable_8h_source}{}\label{field__variable_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/storage/field\_variable.h@{/home/jonat/Documents/01\_Studium/NumSim/src/storage/field\_variable.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ "{}array2D.h"{}}} +\DoxyCodeLine{00008\ } + + + + + + + +\DoxyCodeLine{00017\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classArray2D}{Array2D}}} +\DoxyCodeLine{00018\ \{} +\DoxyCodeLine{00019\ \textcolor{keyword}{public}:} + + + + + + +\DoxyCodeLine{00027\ \ \ \ \ \mbox{\hyperlink{classFieldVariable_aa0985778bc6331b74904a03c3ef67a98}{FieldVariable}}(std::array\ \mbox{\hyperlink{classArray2D_accf87be860645d6c50d6ba6fa39ec6f9}{size}},\ std::array\ origin,\ std::array\ meshWidth);} +\DoxyCodeLine{00028\ } + + + + + + + +\DoxyCodeLine{00037\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classFieldVariable_a2949624f1d2d7e29872f743db0b1d83b}{interpolateAt}}(\textcolor{keywordtype}{double}\ x,\ \textcolor{keywordtype}{double}\ y)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00038\ } + + + + +\DoxyCodeLine{00044\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classFieldVariable_a55168fd422c70c8386ba311909427cf7}{findAbsMax}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00047\ \ \ \ \ \textcolor{keyword}{const}\ std::array\ origin\_;\ \ \ \ } +\DoxyCodeLine{00048\ \ \ \ \ \textcolor{keyword}{const}\ std::array\ meshWidth\_;\ } +\DoxyCodeLine{00049\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/files.tex b/documentation/latex/files.tex new file mode 100644 index 00000000..17244b8a --- /dev/null +++ b/documentation/latex/files.tex @@ -0,0 +1,20 @@ +\doxysection{File List} +Here is a list of all documented files with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/\mbox{\hyperlink{computation_8h_source}{computation.\+h}} }{\pageref{computation_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/boundary/\mbox{\hyperlink{boundary_8h_source}{boundary.\+h}} }{\pageref{boundary_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/boundary/\mbox{\hyperlink{mask_8h_source}{mask.\+h}} }{\pageref{mask_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/\mbox{\hyperlink{central__differences_8h_source}{central\+\_\+differences.\+h}} }{\pageref{central__differences_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/\mbox{\hyperlink{discretization_8h_source}{discretization.\+h}} }{\pageref{discretization_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/\mbox{\hyperlink{donor__cell_8h_source}{donor\+\_\+cell.\+h}} }{\pageref{donor__cell_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/discretization/\mbox{\hyperlink{staggered__grid_8h_source}{staggered\+\_\+grid.\+h}} }{\pageref{staggered__grid_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/output\+\_\+writer/\mbox{\hyperlink{output__writer_8h_source}{output\+\_\+writer.\+h}} }{\pageref{output__writer_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/output\+\_\+writer/\mbox{\hyperlink{output__writer__paraview_8h_source}{output\+\_\+writer\+\_\+paraview.\+h}} }{\pageref{output__writer__paraview_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/output\+\_\+writer/\mbox{\hyperlink{output__writer__text_8h_source}{output\+\_\+writer\+\_\+text.\+h}} }{\pageref{output__writer__text_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/settings\+\_\+parser/\mbox{\hyperlink{settings_8h_source}{settings.\+h}} }{\pageref{settings_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/solver/\mbox{\hyperlink{gauss__seidel_8h_source}{gauss\+\_\+seidel.\+h}} }{\pageref{gauss__seidel_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/solver/\mbox{\hyperlink{pressure__solver_8h_source}{pressure\+\_\+solver.\+h}} }{\pageref{pressure__solver_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/solver/\mbox{\hyperlink{sor_8h_source}{sor.\+h}} }{\pageref{sor_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/storage/\mbox{\hyperlink{array2D_8h_source}{array2\+D.\+h}} }{\pageref{array2D_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/storage/\mbox{\hyperlink{field__variable_8h_source}{field\+\_\+variable.\+h}} }{\pageref{field__variable_8h_source}}{} +\item\contentsline{section}{/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/surface/\mbox{\hyperlink{fluid__tracer_8h_source}{fluid\+\_\+tracer.\+h}} }{\pageref{fluid__tracer_8h_source}}{} +\end{DoxyCompactList} diff --git a/documentation/latex/fluid__tracer_8h_source.tex b/documentation/latex/fluid__tracer_8h_source.tex new file mode 100644 index 00000000..fee85092 --- /dev/null +++ b/documentation/latex/fluid__tracer_8h_source.tex @@ -0,0 +1,110 @@ +\doxysection{fluid\+\_\+tracer.\+h} +\hypertarget{fluid__tracer_8h_source}{}\label{fluid__tracer_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/surface/fluid\_tracer.h@{/home/jonat/Documents/01\_Studium/NumSim/src/surface/fluid\_tracer.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00010\ } +\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ "{}../discretization/discretization.h"{}}} +\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ "{}../boundary/boundary.h"{}}} +\DoxyCodeLine{00013\ } +\DoxyCodeLine{00014\ } +\DoxyCodeLine{00015\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classFluidTracer}{FluidTracer}}\ \{} +\DoxyCodeLine{00016\ \ \ \ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classFluidTracer}{FluidTracer}}(\textcolor{keywordtype}{int}\ numParticlesperCell,} +\DoxyCodeLine{00018\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr\ discretization,} +\DoxyCodeLine{00019\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr\ mask);} +\DoxyCodeLine{00020\ } +\DoxyCodeLine{00021\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Mainly\ for\ testing\ purposes}} +\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classFluidTracer}{FluidTracer}}(std::vector\ x,\ std::vector\ y,} +\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr\ discretization,} +\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr\ mask);} +\DoxyCodeLine{00025\ } + + + + + + + + +\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classFluidTracer_aba4d452f26e9276b91256dd251789b90}{moveParticles}}(\textcolor{keywordtype}{double}\ dt);} +\DoxyCodeLine{00036\ } + + + + + +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classFluidTracer_ace163e1fe040acbd4c3122f082b08eea}{createParticles}}(\textcolor{keywordtype}{double}\ positionSourceX,\ \textcolor{keywordtype}{double}\ positionSourceY);} +\DoxyCodeLine{00044\ } + + + + +\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classFluidTracer_adc687a4988f532e21e13c9aa0591d658}{getNumberOfParticles}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00051\ } + + + + +\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classFluidTracer_adc687a4988f532e21e13c9aa0591d658}{getNumberOfParticles}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00058\ } +\DoxyCodeLine{00059\ } + + + + +\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ std::array\ \mbox{\hyperlink{classFluidTracer_a37ee0325d6af08be6eba8b073162342e}{getParticlePosition}}(\textcolor{keywordtype}{int}\ i)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00066\ } +\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ std::array\ cellOfParticle(\textcolor{keywordtype}{int}\ i);} +\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ val2CellX(\textcolor{keywordtype}{double}\ xVal);} +\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ val2CellY(\textcolor{keywordtype}{double}\ yVal);} +\DoxyCodeLine{00070\ } +\DoxyCodeLine{00071\ } +\DoxyCodeLine{00072\ } +\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Only\ test}} +\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ std::array\ updateParticle(\textcolor{keywordtype}{int}\ i,\ std::array\ idx,\ \textcolor{keywordtype}{double}\ dt,\ std::array\ vel,\ \textcolor{keywordtype}{int}\ depth);} +\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ std::array\ \mbox{\hyperlink{classFluidTracer_aba4d452f26e9276b91256dd251789b90}{moveParticles}}(\textcolor{keywordtype}{double}\ dt,\ std::array\ vel);} +\DoxyCodeLine{00076\ } +\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ printParticles();} +\DoxyCodeLine{00078\ } +\DoxyCodeLine{00079\ } +\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ initializeHomogenousParticleDistribution();} + + +\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ initializeFluidCell(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j,\ \textcolor{keywordtype}{int}\ idx);} +\DoxyCodeLine{00086\ } +\DoxyCodeLine{00087\ } +\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Helper\ for\ move\ Particles}} +\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ getThresholdParticlesFluidCell();} +\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ std::array\ updateParticle(\textcolor{keywordtype}{int}\ i,\ std::array\ idx,\ \textcolor{keywordtype}{double}\ dt,\ std::array\ vel);} +\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ resetVelocityInAirCells();} +\DoxyCodeLine{00092\ } +\DoxyCodeLine{00093\ } +\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ numParticles\_;} +\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ numParticlesPerCell\_;\ \textcolor{comment}{//\ \ }} +\DoxyCodeLine{00096\ } +\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ aspect\ ratio\ e.g.\ 1.0\ for\ square\ cells\ and\ 0.5\ for\ (dx\ =\ 2*dy)\ cells}} +\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ seedRelationDyDx\_;} +\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ how\ many\ particles\ are\ placed\ in\ each\ direction\ per\ cell}} +\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ n\_x,\ n\_y;} +\DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ inital\ count\ of\ fluid\ cells}} +\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ numFluidCells\_;} +\DoxyCodeLine{00103\ } +\DoxyCodeLine{00104\ \ \ \ \ \ \ \ \ std::shared\_ptr\ discretization\_;} +\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ std::shared\_ptr\ mask\_;} +\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ std::vector\ x\_;} +\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ std::vector\ y\_;} +\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ std::vector\ currentParticlesPerCell\_;} +\DoxyCodeLine{00109\ } +\DoxyCodeLine{00110\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/gauss__seidel_8h_source.tex b/documentation/latex/gauss__seidel_8h_source.tex new file mode 100644 index 00000000..f32a815c --- /dev/null +++ b/documentation/latex/gauss__seidel_8h_source.tex @@ -0,0 +1,34 @@ +\doxysection{gauss\+\_\+seidel.\+h} +\hypertarget{gauss__seidel_8h_source}{}\label{gauss__seidel_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/solver/gauss\_seidel.h@{/home/jonat/Documents/01\_Studium/NumSim/src/solver/gauss\_seidel.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}pressure\_solver.h"{}}} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ } + + + + +\DoxyCodeLine{00011\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classGaussSeidel}{GaussSeidel}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classPressureSolver}{PressureSolver}}} +\DoxyCodeLine{00012\ \{} +\DoxyCodeLine{00013\ } +\DoxyCodeLine{00014\ \textcolor{keyword}{public}:} + + + + + + +\DoxyCodeLine{00022\ \ \ \ \ \mbox{\hyperlink{classGaussSeidel_af31cc1ace2d616ebb8e0592c06865b9c}{GaussSeidel}}(\textcolor{keyword}{const}\ std::shared\_ptr\ \&data,} +\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ epsilon,} +\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ maximumNumberOfIterations,} +\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr\ boundary);} + + + +\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classGaussSeidel_a6f0eb0c6938a64f8ded186f88170a04b}{solve}}()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00031\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/hierarchy.tex b/documentation/latex/hierarchy.tex new file mode 100644 index 00000000..72064932 --- /dev/null +++ b/documentation/latex/hierarchy.tex @@ -0,0 +1,31 @@ +\doxysection{Class Hierarchy} +This inheritance list is sorted roughly, but not completely, alphabetically\+:\begin{DoxyCompactList} +\item \contentsline{section}{Array2D}{\pageref{classArray2D}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Field\+Variable}{\pageref{classFieldVariable}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Boundary}{\pageref{classBoundary}}{} +\item \contentsline{section}{Computation}{\pageref{classComputation}}{} +\item \contentsline{section}{Fluid\+Tracer}{\pageref{classFluidTracer}}{} +\item \contentsline{section}{Settings\+::Line\+Content}{\pageref{structSettings_1_1LineContent}}{} +\item \contentsline{section}{Mask}{\pageref{classMask}}{} +\item \contentsline{section}{Output\+Writer}{\pageref{classOutputWriter}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Output\+Writer\+Paraview}{\pageref{classOutputWriterParaview}}{} +\item \contentsline{section}{Output\+Writer\+Text}{\pageref{classOutputWriterText}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Pressure\+Solver}{\pageref{classPressureSolver}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Gauss\+Seidel}{\pageref{classGaussSeidel}}{} +\item \contentsline{section}{SOR}{\pageref{classSOR}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Settings}{\pageref{structSettings}}{} +\item \contentsline{section}{Staggered\+Grid}{\pageref{classStaggeredGrid}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Discretization}{\pageref{classDiscretization}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Central\+Differences}{\pageref{classCentralDifferences}}{} +\item \contentsline{section}{Donor\+Cell}{\pageref{classDonorCell}}{} +\end{DoxyCompactList} +\end{DoxyCompactList} +\end{DoxyCompactList} diff --git a/documentation/latex/longtable_doxygen.sty b/documentation/latex/longtable_doxygen.sty new file mode 100644 index 00000000..e94b78b6 --- /dev/null +++ b/documentation/latex/longtable_doxygen.sty @@ -0,0 +1,456 @@ +%% +%% This is file `longtable.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% longtable.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at http://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% Copyright 1993-2016 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. +%% -------------------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' +%% without such generated files. +%% +%% The list of all files belonging to the LaTeX `Tools Bundle' is +%% given in the file `manifest.txt'. +%% +%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle +\NeedsTeXFormat{LaTeX2e}[1995/06/01] +\ProvidesPackage{longtable_doxygen} + [2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen] +\def\LT@err{\PackageError{longtable}} +\def\LT@warn{\PackageWarning{longtable}} +\def\LT@final@warn{% + \AtEndDocument{% + \LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}% + \global\let\LT@final@warn\relax} +\DeclareOption{errorshow}{% + \def\LT@warn{\PackageInfo{longtable}}} +\DeclareOption{pausing}{% + \def\LT@warn#1{% + \LT@err{#1}{This is not really an error}}} +\DeclareOption{set}{} +\DeclareOption{final}{} +\ProcessOptions +\newskip\LTleft \LTleft=\fill +\newskip\LTright \LTright=\fill +\newskip\LTpre \LTpre=\bigskipamount +\newskip\LTpost \LTpost=\bigskipamount +\newcount\LTchunksize \LTchunksize=20 +\let\c@LTchunksize\LTchunksize +\newdimen\LTcapwidth \LTcapwidth=4in +\newbox\LT@head +\newbox\LT@firsthead +\newbox\LT@foot +\newbox\LT@lastfoot +\newcount\LT@cols +\newcount\LT@rows +\newcounter{LT@tables} +\newcounter{LT@chunks}[LT@tables] +\ifx\c@table\undefined + \newcounter{table} + \def\fnum@table{\tablename~\thetable} +\fi +\ifx\tablename\undefined + \def\tablename{Table} +\fi +\newtoks\LT@p@ftn +\mathchardef\LT@end@pen=30000 +\def\longtable{% + \par + \ifx\multicols\@undefined + \else + \ifnum\col@number>\@ne + \@twocolumntrue + \fi + \fi + \if@twocolumn + \LT@err{longtable not in 1-column mode}\@ehc + \fi + \begingroup + \@ifnextchar[\LT@array{\LT@array[x]}} +\def\LT@array[#1]#2{% + \refstepcounter{table}\stepcounter{LT@tables}% + \if l#1% + \LTleft\z@ \LTright\fill + \else\if r#1% + \LTleft\fill \LTright\z@ + \else\if c#1% + \LTleft\fill \LTright\fill + \fi\fi\fi + \let\LT@mcol\multicolumn + \let\LT@@tabarray\@tabarray + \let\LT@@hl\hline + \def\@tabarray{% + \let\hline\LT@@hl + \LT@@tabarray}% + \let\\\LT@tabularcr\let\tabularnewline\\% + \def\newpage{\noalign{\break}}% + \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}% + \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}% + \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption + \@tempdima\ht\strutbox + \let\@endpbox\LT@endpbox + \ifx\extrarowheight\@undefined + \let\@acol\@tabacol + \let\@classz\@tabclassz \let\@classiv\@tabclassiv + \def\@startpbox{\vtop\LT@startpbox}% + \let\@@startpbox\@startpbox + \let\@@endpbox\@endpbox + \let\LT@LL@FM@cr\@tabularcr + \else + \advance\@tempdima\extrarowheight + \col@sep\tabcolsep + \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr + \fi + \setbox\@arstrutbox\hbox{\vrule + \@height \arraystretch \@tempdima + \@depth \arraystretch \dp \strutbox + \@width \z@}% + \let\@sharp##\let\protect\relax + \begingroup + \@mkpream{#2}% + \xdef\LT@bchunk{% + \global\advance\c@LT@chunks\@ne + \global\LT@rows\z@\setbox\z@\vbox\bgroup + \LT@setprevdepth + \tabskip\LTleft \noexpand\halign to\hsize\bgroup + \tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}% + \endgroup + \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols + \LT@make@row + \m@th\let\par\@empty + \everycr{}\lineskip\z@\baselineskip\z@ + \LT@bchunk} +\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}} +\def\LT@start{% + \let\LT@start\endgraf + \endgraf\penalty\z@\vskip\LTpre + \dimen@\pagetotal + \advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \ht\LT@foot + \dimen@ii\vfuzz + \vfuzz\maxdimen + \setbox\tw@\copy\z@ + \setbox\tw@\vsplit\tw@ to \ht\@arstrutbox + \setbox\tw@\vbox{\unvbox\tw@}% + \vfuzz\dimen@ii + \advance\dimen@ \ht + \ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@\dp + \ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@ -\pagegoal + \ifdim \dimen@>\z@\vfil\break\fi + \global\@colroom\@colht + \ifvoid\LT@foot\else + \advance\vsize-\ht\LT@foot + \global\advance\@colroom-\ht\LT@foot + \dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@ + \maxdepth\z@ + \fi + \ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak + \output{\LT@output}} +\def\endlongtable{% + \crcr + \noalign{% + \let\LT@entry\LT@entry@chop + \xdef\LT@save@row{\LT@save@row}}% + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \if@filesw + {\let\LT@entry\LT@entry@write\immediate\write\@auxout{% + \gdef\expandafter\noexpand + \csname LT@\romannumeral\c@LT@tables\endcsname + {\LT@save@row}}}% + \fi + \ifx\LT@save@row\LT@@save@row + \else + \LT@warn{Column \@width s have changed\MessageBreak + in table \thetable}% + \LT@final@warn + \fi + \endgraf\penalty -\LT@end@pen + \endgroup + \global\@mparbottom\z@ + \pagegoal\vsize + \endgraf\penalty\z@\addvspace\LTpost + \ifvoid\footins\else\insert\footins{}\fi} +\def\LT@nofcols#1&{% + \futurelet\@let@token\LT@n@fcols} +\def\LT@n@fcols{% + \advance\LT@cols\@ne + \ifx\@let@token\LT@nofcols + \expandafter\@gobble + \else + \expandafter\LT@nofcols + \fi} +\def\LT@tabularcr{% + \relax\iffalse{\fi\ifnum0=`}\fi + \@ifstar + {\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr + \LT@t@bularcr}% + {\LT@t@bularcr}} +\let\LT@crcr\crcr +\let\LT@setprevdepth\relax +\def\LT@t@bularcr{% + \global\advance\LT@rows\@ne + \ifnum\LT@rows=\LTchunksize + \gdef\LT@setprevdepth{% + \prevdepth\z@\global + \global\let\LT@setprevdepth\relax}% + \expandafter\LT@xtabularcr + \else + \ifnum0=`{}\fi + \expandafter\LT@LL@FM@cr + \fi} +\def\LT@xtabularcr{% + \@ifnextchar[\LT@argtabularcr\LT@ntabularcr} +\def\LT@ntabularcr{% + \ifnum0=`{}\fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@argtabularcr[#1]{% + \ifnum0=`{}\fi + \ifdim #1>\z@ + \unskip\@xargarraycr{#1}% + \else + \@yargarraycr{#1}% + \fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@echunk{% + \crcr\LT@save@row\cr\egroup + \global\setbox\@ne\lastbox + \unskip + \egroup} +\def\LT@entry#1#2{% + \ifhmode\@firstofone{&}\fi\omit + \ifnum#1=\c@LT@chunks + \else + \kern#2\relax + \fi} +\def\LT@entry@chop#1#2{% + \noexpand\LT@entry + {\ifnum#1>\c@LT@chunks + 1}{0pt% + \else + #1}{#2% + \fi}} +\def\LT@entry@write{% + \noexpand\LT@entry^^J% + \@spaces} +\def\LT@kill{% + \LT@echunk + \LT@get@widths + \expandafter\LT@rebox\LT@bchunk} +\def\LT@rebox#1\bgroup{% + #1\bgroup + \unvbox\z@ + \unskip + \setbox\z@\lastbox} +\def\LT@blank@row{% + \xdef\LT@save@row{\expandafter\LT@build@blank + \romannumeral\number\LT@cols 001 }} +\def\LT@build@blank#1{% + \if#1m% + \noexpand\LT@entry{1}{0pt}% + \expandafter\LT@build@blank + \fi} +\def\LT@make@row{% + \global\expandafter\let\expandafter\LT@save@row + \csname LT@\romannumeral\c@LT@tables\endcsname + \ifx\LT@save@row\relax + \LT@blank@row + \else + {\let\LT@entry\or + \if!% + \ifcase\expandafter\expandafter\expandafter\LT@cols + \expandafter\@gobble\LT@save@row + \or + \else + \relax + \fi + !% + \else + \aftergroup\LT@blank@row + \fi}% + \fi} +\let\setlongtables\relax +\def\LT@get@widths{% + \setbox\tw@\hbox{% + \unhbox\@ne + \let\LT@old@row\LT@save@row + \global\let\LT@save@row\@empty + \count@\LT@cols + \loop + \unskip + \setbox\tw@\lastbox + \ifhbox\tw@ + \LT@def@row + \advance\count@\m@ne + \repeat}% + \ifx\LT@@save@row\@undefined + \let\LT@@save@row\LT@save@row + \fi} +\def\LT@def@row{% + \let\LT@entry\or + \edef\@tempa{% + \ifcase\expandafter\count@\LT@old@row + \else + {1}{0pt}% + \fi}% + \let\LT@entry\relax + \xdef\LT@save@row{% + \LT@entry + \expandafter\LT@max@sel\@tempa + \LT@save@row}} +\def\LT@max@sel#1#2{% + {\ifdim#2=\wd\tw@ + #1% + \else + \number\c@LT@chunks + \fi}% + {\the\wd\tw@}} +\def\LT@hline{% + \noalign{\ifnum0=`}\fi + \penalty\@M + \futurelet\@let@token\LT@@hline} +\def\LT@@hline{% + \ifx\@let@token\hline + \global\let\@gtempa\@gobble + \gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}% + \else + \global\let\@gtempa\@empty + \gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\LT@sep}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\penalty\@M}% + \@gtempa} +\def\LT@caption{% + \noalign\bgroup + \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n} +\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1\fnum@table{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}% + \fi} +\def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\@xdblarg{\LT@c@ption\@firstofone}}} +\def\LT@makecaption#1#2#3{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% + \sbox\@tempboxa{#1{#2: }#3}% + \ifdim\wd\@tempboxa>\hsize + #1{#2: }#3% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \endgraf\vskip\baselineskip}% + \hss}}} +\def\LT@output{% + \ifnum\outputpenalty <-\@Mi + \ifnum\outputpenalty > -\LT@end@pen + \LT@err{floats and marginpars not allowed in a longtable}\@ehc + \else + \setbox\z@\vbox{\unvbox\@cclv}% + \ifdim \ht\LT@lastfoot>\ht\LT@foot + \dimen@\pagegoal + \advance\dimen@-\ht\LT@lastfoot + \ifdim\dimen@<\ht\z@ + \setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}% + \@makecol + \@outputpage + \setbox\z@\vbox{\box\LT@head}% + \fi + \fi + \global\@colroom\@colht + \global\vsize\@colht + \vbox + {\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi}% + \fi + \else + \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}% + \@makecol + \@outputpage + \global\vsize\@colroom + \copy\LT@head\nobreak + \fi} +\def\LT@end@hd@ft#1{% + \LT@echunk + \ifx\LT@start\endgraf + \LT@err + {Longtable head or foot not at start of table}% + {Increase LTchunksize}% + \fi + \setbox#1\box\z@ + \LT@get@widths + \LT@bchunk} +\def\endfirsthead{\LT@end@hd@ft\LT@firsthead} +\def\endhead{\LT@end@hd@ft\LT@head} +\def\endfoot{\LT@end@hd@ft\LT@foot} +\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot} +\def\LT@startpbox#1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \vrule \@height \ht\@arstrutbox \@width \z@} +\def\LT@endpbox{% + \@finalstrut\@arstrutbox + \egroup + \the\LT@p@ftn + \global\LT@p@ftn{}% + \hfil} +%% added \long to prevent: +% LaTeX Warning: Command \LT@p@ftntext has changed. +% +% from the original repository (https://github.com/latex3/latex2e/blob/develop/required/tools/longtable.dtx): +% \changes{v4.15}{2021/03/28} +% {make long for gh/364} +% Inside the `p' column, just save up the footnote text in a token +% register. +\long\def\LT@p@ftntext#1{% + \edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}% + \global\LT@p@ftn\expandafter{\@tempa{#1}}}% + +\@namedef{ver@longtable.sty}{2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen} +\endinput +%% +%% End of file `longtable.sty'. diff --git a/documentation/latex/mask_8h_source.tex b/documentation/latex/mask_8h_source.tex new file mode 100644 index 00000000..36d99663 --- /dev/null +++ b/documentation/latex/mask_8h_source.tex @@ -0,0 +1,210 @@ +\doxysection{mask.\+h} +\hypertarget{mask_8h_source}{}\label{mask_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/boundary/mask.h@{/home/jonat/Documents/01\_Studium/NumSim/src/boundary/mask.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ } +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ "{}../settings\_parser/settings.h"{}}} +\DoxyCodeLine{00013\ } +\DoxyCodeLine{00014\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classMask}{Mask}}} +\DoxyCodeLine{00015\ \{} +\DoxyCodeLine{00016\ \textcolor{keyword}{public}:} + + + + +\DoxyCodeLine{00022\ \ \ \ \ \mbox{\hyperlink{classMask_a5d65d3a108a79864bc69994f5e56f6c3}{Mask}}(\mbox{\hyperlink{structSettings}{Settings}}\ settings);} +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \ \ \ \ \textcolor{keyword}{enum}\ \mbox{\hyperlink{classMask_ad74a26afe88ebadafebd733837f3252a}{CellType}}\ } +\DoxyCodeLine{00025\ \ \ \ \ \{} +\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ FLUID\_DROPLET\ =\ 0,} +\DoxyCodeLine{00027\ } +\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ FLUID\_SINGLE\_LEFT\ =\ 1,} +\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ FLUID\_SINGLE\_TOP\ =\ 2,} +\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ FLUID\_SINGLE\_RIGHT\ =\ 4,} +\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ FLUID\_SINGLE\_BOTTOM\ =\ 8,} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ FLUID\_CORNER\_BOTTOM\_LEFT\ =\ 6,} +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ FLUID\_CORNER\_TOP\_LEFT\ =\ 12,} +\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ FLUID\_CORNER\_TOP\_RIGHT\ =\ 9,} +\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ FLUID\_CORNER\_BOTTOM\_RIGHT\ =\ 3,} +\DoxyCodeLine{00037\ } +\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ FLUID\_COLUMN\_HORIZONTAL\ =\ 5,} +\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ FLUID\_COLUMN\_VERTICAL\ =\ 10,} +\DoxyCodeLine{00040\ } +\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ FLUID\_BORDER\_LEFT\ =\ 14,} +\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ FLUID\_BORDER\_TOP\ =\ 13,} +\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ FLUID\_BORDER\_RIGHT\ =\ 11,} +\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ FLUID\_BORDER\_BOTTOM\ =\ 7,} +\DoxyCodeLine{00045\ } +\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ FLUID\ =\ 15,} +\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ FLUID\_TYPE\ =\ 50,} +\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ AIR\ =\ 64,} +\DoxyCodeLine{00049\ } +\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ OBSTACLE\ =\ 99,} +\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ OBSTACLE\_INSIDE\ =\ 100,} +\DoxyCodeLine{00052\ } +\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ OBSTACLE\_BORDER\_LEFT\ =\ 101,} +\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ OBSTACLE\_BORDER\_TOP\ =\ 102,} +\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ OBSTACLE\_CORNER\_TOP\_LEFT\ =\ 103,} +\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ OBSTACLE\_BORDER\_RIGHT\ =\ 104,} +\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ OBSTACLE\_CORNER\_TOP\_RIGHT\ =\ 106,} +\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ OBSTACLE\_BORDER\_BOTTOM\ =\ 108,} +\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ OBSTACLE\_CORNER\_BOTTOM\_LEFT\ =\ 109,} +\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ OBSTACLE\_CORNER\_BOTTOM\_RIGHT\ =\ 112,} +\DoxyCodeLine{00061\ } +\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ DOMAIN\_BOUNDARY\ =\ 200,} +\DoxyCodeLine{00063\ } +\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ DOMAIN\_LEFT\_NOSLIP\ =\ 201,} +\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ DOMAIN\_TOP\_NOSLIP\ =\ 202,} +\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ DOMAIN\_RIGHT\_NOSLIP\ =\ 203,} +\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ DOMAIN\_BOTTOM\_NOSLIP\ =\ 204,} +\DoxyCodeLine{00068\ } +\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ DOMAIN\_LEFT\_PRESSURE\ =\ 205,} +\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ DOMAIN\_TOP\_PRESSURE\ =\ 206,} +\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ DOMAIN\_RIGHT\_PRESSURE\ =\ 207,} +\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ DOMAIN\_BOTTOM\_PRESSURE\ =\ 208,} +\DoxyCodeLine{00073\ \ \ \ \ \};} +\DoxyCodeLine{00074\ } + + + + + + +\DoxyCodeLine{00082\ \ \ \ \ \textcolor{keywordtype}{int}\ \&\mbox{\hyperlink{classMask_a6d612f1ac2185304b3ad7432d90dcd2b}{operator()}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j);} +\DoxyCodeLine{00083\ } + + + + + + +\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classMask_a6d612f1ac2185304b3ad7432d90dcd2b}{operator()}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00092\ } + + +\DoxyCodeLine{00096\ \ \ \ \ std::array\ \mbox{\hyperlink{classMask_aafa0857af35b02ba6070e76f82d51c7b}{size}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00097\ } + + + +\DoxyCodeLine{00102\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classMask_ac30997cdd83faef98290733acb325cf8}{resetMask}}();} +\DoxyCodeLine{00103\ } +\DoxyCodeLine{00104\ \ \ \ \ \textcolor{comment}{//\ ********************************************************}} +\DoxyCodeLine{00105\ \ \ \ \ \textcolor{comment}{//\ R\ E\ Q\ U\ E\ S\ T\ S}} +\DoxyCodeLine{00106\ } + + + + + + + +\DoxyCodeLine{00115\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classMask_aadacef52f95b796920864b8519d0594b}{isFluid}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00116\ } + + + + + +\DoxyCodeLine{00123\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classMask_a53e4e7c0b29234856cbee33386cc5c18}{isObstacle}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00124\ } + + + + + + + +\DoxyCodeLine{00133\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classMask_a7eb34f789ef96c622ab93718d5278d77}{isAir}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00134\ } + + + + + + + + +\DoxyCodeLine{00144\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classMask_a5f3d53087eb5a1d9427716804e280751}{isInnerFluid}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00145\ } + + + + + + +\DoxyCodeLine{00153\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classMask_a9f76177c70d7cab7f268c8fd9a102e73}{isDomainBoundary}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00154\ } + + + + + + +\DoxyCodeLine{00162\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classMask_ada8b2531a4a16703f145fd6f708f21ff}{isObstacleBoundary}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00163\ } + + + + + + +\DoxyCodeLine{00171\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classMask_a2ffcf2b70edede392422ea692e49d313}{isFluidBoundary}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} +\DoxyCodeLine{00172\ } + + + + + +\DoxyCodeLine{00179\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classMask_a3471a6026ce7eab118f660557a8abac6}{getNumberOfFluidCells}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00180\ } + + + + +\DoxyCodeLine{00186\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classMask_a75a1750221e41c1b34f80d4d352163ac}{makeRectangularObstacle}}();} +\DoxyCodeLine{00187\ } + + + + +\DoxyCodeLine{00193\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classMask_ad69aefd91f740d6758cdedf0df8c8ca6}{createMaskFromPNGBitMap}}();} +\DoxyCodeLine{00194\ } + + + + +\DoxyCodeLine{00200\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classMask_aacf4d2cfe1362df85ed08fd3b0fc6d6b}{setDomainBC}}();} +\DoxyCodeLine{00201\ } + + +\DoxyCodeLine{00205\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classMask_a644a84aca88442b72b5cd87ee80f1724}{setObstacleBC}}();} +\DoxyCodeLine{00206\ } + + +\DoxyCodeLine{00210\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classMask_a41bf0aa100e2554eaea3ab29a999c0ee}{setFluidBC}}();} +\DoxyCodeLine{00211\ } + + +\DoxyCodeLine{00215\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classMask_a372d2a81ff261f126b11fdfcfd2f845e}{printMask}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00216\ } +\DoxyCodeLine{00217\ \textcolor{keyword}{protected}:} +\DoxyCodeLine{00218\ \ \ \ \ std::array\ \mbox{\hyperlink{classMask_a84bff46271e16eb8639c1831403c1bb9}{size\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00219\ \ \ \ \ std::vector\ \mbox{\hyperlink{classMask_acdb73aee935b502fecc8de6bf1e32a09}{data\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00220\ \ \ \ \ std::vector\ \mbox{\hyperlink{classMask_a3c5a51f6d03bb4a5e1742537a22ec441}{boundary\_list}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00221\ \ \ \ \ \mbox{\hyperlink{structSettings}{Settings}}\ \mbox{\hyperlink{classMask_acb8b165d56689722fd836569e066fdd4}{settings\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00222\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classMask_abe4f6f251b0517f01d0f58f9042d3af4}{forbiddenObstacleFluidCombinations}}[7]\ =\ \{105,\ 107,\ 110,\ 111,\ 113,\ 114,\ 115\};\ } +\DoxyCodeLine{00223\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/output__writer_8h_source.tex b/documentation/latex/output__writer_8h_source.tex new file mode 100644 index 00000000..5fc08fc9 --- /dev/null +++ b/documentation/latex/output__writer_8h_source.tex @@ -0,0 +1,38 @@ +\doxysection{output\+\_\+writer.\+h} +\hypertarget{output__writer_8h_source}{}\label{output__writer_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/output\_writer/output\_writer.h@{/home/jonat/Documents/01\_Studium/NumSim/src/output\_writer/output\_writer.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}../discretization/discretization.h"{}}} +\DoxyCodeLine{00004\ } +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00008\ } + + + +\DoxyCodeLine{00013\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classOutputWriter}{OutputWriter}}} +\DoxyCodeLine{00014\ \{} +\DoxyCodeLine{00015\ \textcolor{keyword}{public}:} + + + + +\DoxyCodeLine{00021\ \ \ \mbox{\hyperlink{classOutputWriter_a4f3180552b8102c27e087357b9cdd1f7}{OutputWriter}}(std::shared\_ptr\ discretization);} +\DoxyCodeLine{00022\ } + + + + + + +\DoxyCodeLine{00030\ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classOutputWriter_ac625c204affdc05919388a3549c2e945}{writeFile}}(\textcolor{keywordtype}{double}\ currentTime)\ =\ 0;} +\DoxyCodeLine{00031\ } +\DoxyCodeLine{00032\ \textcolor{keyword}{protected}:} +\DoxyCodeLine{00033\ \ \ std::shared\_ptr\ \mbox{\hyperlink{classOutputWriter_a0587b2dc160a9b1393411433dfc23b68}{discretization\_}};\ } +\DoxyCodeLine{00034\ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classOutputWriter_a69d167e2526407602dce26ca7a2b9248}{fileNo\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00035\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/output__writer__paraview_8h_source.tex b/documentation/latex/output__writer__paraview_8h_source.tex new file mode 100644 index 00000000..5a40e003 --- /dev/null +++ b/documentation/latex/output__writer__paraview_8h_source.tex @@ -0,0 +1,51 @@ +\doxysection{output\+\_\+writer\+\_\+paraview.\+h} +\hypertarget{output__writer__paraview_8h_source}{}\label{output__writer__paraview_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/output\_writer/output\_writer\_paraview.h@{/home/jonat/Documents/01\_Studium/NumSim/src/output\_writer/output\_writer\_paraview.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}output\_writer.h"{}}} +\DoxyCodeLine{00004\ } +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00011\ } +\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ "{}../boundary/mask.h"{}}} +\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ "{}../surface/fluid\_tracer.h"{}}} +\DoxyCodeLine{00016\ } + + + + + + + +\DoxyCodeLine{00025\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classOutputWriterParaview}{OutputWriterParaview}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classOutputWriter}{OutputWriter}}} +\DoxyCodeLine{00026\ \{} +\DoxyCodeLine{00027\ \textcolor{keyword}{public}:} + + + + +\DoxyCodeLine{00033\ \ \ \mbox{\hyperlink{classOutputWriterParaview_ab2d30ea87bf48abef82f95976c662cc1}{OutputWriterParaview}}(std::shared\_ptr\ discretization,} +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr\ mask,} +\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr\ fluidTracer);} +\DoxyCodeLine{00036\ } + + + + +\DoxyCodeLine{00042\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classOutputWriterParaview_a9e203b63d0e2f26ad53d18ee1821c6bb}{writeFile}}(\textcolor{keywordtype}{double}\ currentTime);} +\DoxyCodeLine{00043\ } +\DoxyCodeLine{00044\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00045\ \ \ vtkSmartPointer\ vtkWriter\_;\ } +\DoxyCodeLine{00046\ \ \ std::shared\_ptr\ mask\_;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00047\ \ \ std::shared\_ptr\ fluidTracer\_;\ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00048\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/output__writer__text_8h_source.tex b/documentation/latex/output__writer__text_8h_source.tex new file mode 100644 index 00000000..8721f048 --- /dev/null +++ b/documentation/latex/output__writer__text_8h_source.tex @@ -0,0 +1,41 @@ +\doxysection{output\+\_\+writer\+\_\+text.\+h} +\hypertarget{output__writer__text_8h_source}{}\label{output__writer__text_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/output\_writer/output\_writer\_text.h@{/home/jonat/Documents/01\_Studium/NumSim/src/output\_writer/output\_writer\_text.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}output\_writer.h"{}}} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00008\ } + + + + + + +\DoxyCodeLine{00016\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classOutputWriterText}{OutputWriterText}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classOutputWriter}{OutputWriter}}} +\DoxyCodeLine{00017\ \{} +\DoxyCodeLine{00018\ \textcolor{keyword}{public}:} + + +\DoxyCodeLine{00022\ \ \ \textcolor{keyword}{using\ }\mbox{\hyperlink{classOutputWriter_a4f3180552b8102c27e087357b9cdd1f7}{OutputWriter::OutputWriter}};} +\DoxyCodeLine{00023\ } + + + + + + +\DoxyCodeLine{00031\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classOutputWriterText_a25a12ea2524fc34e9acb19ef1f4c7431}{writeFile}}(\textcolor{keywordtype}{double}\ currentTime);} +\DoxyCodeLine{00032\ } + + + + +\DoxyCodeLine{00038\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classOutputWriterText_a3480b58a23fd158f16d0ef9c1b67cbfd}{writePressureFile}}();} +\DoxyCodeLine{00039\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/pressure__solver_8h_source.tex b/documentation/latex/pressure__solver_8h_source.tex new file mode 100644 index 00000000..23e63aa9 --- /dev/null +++ b/documentation/latex/pressure__solver_8h_source.tex @@ -0,0 +1,70 @@ +\doxysection{pressure\+\_\+solver.\+h} +\hypertarget{pressure__solver_8h_source}{}\label{pressure__solver_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/solver/pressure\_solver.h@{/home/jonat/Documents/01\_Studium/NumSim/src/solver/pressure\_solver.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ } +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ "{}../storage/field\_variable.h"{}}} +\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ "{}../discretization/discretization.h"{}}} +\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ "{}../boundary/boundary.h"{}}} +\DoxyCodeLine{00010\ } +\DoxyCodeLine{00011\ } + + + + + + + +\DoxyCodeLine{00020\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classPressureSolver}{PressureSolver}}} +\DoxyCodeLine{00021\ \{} +\DoxyCodeLine{00022\ \textcolor{keyword}{public}:} + + + + + + + +\DoxyCodeLine{00031\ \ \ \ \ \mbox{\hyperlink{classPressureSolver_a10803d8c3d7f3810fc0ba059acf04058}{PressureSolver}}(std::shared\_ptr\ discretization,} +\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ epsilon,} +\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ maximumNumberOfIterations,} +\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr\ boundary);} +\DoxyCodeLine{00035\ \ } + + + +\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classPressureSolver_a504ac61a1317650e0eb70d6a93212ca0}{solve}}()\ =\ 0;} +\DoxyCodeLine{00041\ } +\DoxyCodeLine{00042\ \ \ \ \ \textcolor{keywordtype}{double}\ dx2,\ \mbox{\hyperlink{classPressureSolver_a25b7ff50bdaea53d1b5c7a5cf735c5b5}{dy2}};\ } +\DoxyCodeLine{00043\ } +\DoxyCodeLine{00044\ \textcolor{keyword}{protected}:} + + + + + +\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classPressureSolver_a458c383fcacaf54c1a333a271049ca93}{setBoundaryValues}}();} +\DoxyCodeLine{00052\ } + + +\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classPressureSolver_afc51f4315c483988aeec327a16c5bb90}{calculateResiduum}}();} +\DoxyCodeLine{00057\ } +\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classPressureSolver_af3ac2e53c6f49b9a362415a89595a7f0}{i\_beg}};\ } +\DoxyCodeLine{00059\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classPressureSolver_a41b263980e55591d1ffdc4837c252a61}{i\_end}};\ } +\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classPressureSolver_aa309af30e5e63e09b77900091e562235}{j\_beg}};\ } +\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classPressureSolver_ac2402794034dd74073700998ee2860bf}{j\_end}};\ } +\DoxyCodeLine{00062\ } +\DoxyCodeLine{00063\ \ \ \ \ std::shared\_ptr\ \mbox{\hyperlink{classPressureSolver_af579ecebaaa8b11914293ef18af5fdc6}{discretization\_}};\ } +\DoxyCodeLine{00064\ \ \ \ \ std::shared\_ptr\ \mbox{\hyperlink{classPressureSolver_a0b17b46580d259e4bb3a05486bc06a60}{boundary\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00065\ } +\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classPressureSolver_a22b723f3b3ba54e47f36cfc2b9576749}{epsilon\_}};\ } +\DoxyCodeLine{00067\ } +\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classPressureSolver_af3b02d29bf1b21ad8b7e6edf8c2f4e87}{maximumNumberOfIterations\_}};\ } +\DoxyCodeLine{00069\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/refman.tex b/documentation/latex/refman.tex new file mode 100644 index 00000000..f37c07a9 --- /dev/null +++ b/documentation/latex/refman.tex @@ -0,0 +1,262 @@ + % Handle batch mode + % to overcome problems with too many open files + \let\mypdfximage\pdfximage\def\pdfximage{\immediate\mypdfximage} + \pdfminorversion=7 + % Set document class depending on configuration + \documentclass[twoside]{book} + %% moved from doxygen.sty due to workaround for LaTex 2019 version and unmaintained tabu package + \usepackage{ifthen} + \ifx\requestedLaTeXdate\undefined + \usepackage{array} + \else + \usepackage{array}[=2016-10-06] + \fi + %% + % Packages required by doxygen + \makeatletter + \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} + % suppress package identification of infwarerr as it contains the word "warning" + \let\@@protected@wlog\protected@wlog + \def\protected@wlog#1{\wlog{package info suppressed}} + \RequirePackage{infwarerr} + \let\protected@wlog\@@protected@wlog + \makeatother + \IfFormatAtLeastTF{2016/01/01}{}{\usepackage{fixltx2e}} % for \textsubscript + \IfFormatAtLeastTF{2015/01/01}{\pdfsuppresswarningpagegroup=1}{} + \usepackage{doxygen} + \usepackage{graphicx} + \usepackage[utf8]{inputenc} + \usepackage{makeidx} + \PassOptionsToPackage{warn}{textcomp} + \usepackage{textcomp} + \usepackage[nointegrals]{wasysym} + \usepackage{ifxetex} + % NLS support packages + % Define default fonts + % Font selection + \usepackage[T1]{fontenc} + % set main and monospaced font + \usepackage[scaled=.90]{helvet} +\usepackage{courier} +\renewcommand{\familydefault}{\sfdefault} + \doxyallsectionsfont{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \renewcommand{\DoxyLabelFont}{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} + % Arguments of doxygenemoji: + % 1) '::' form of the emoji, already LaTeX-escaped + % 2) file with the name of the emoji without the .png extension + % in case image exist use this otherwise use the '::' form + \newcommand{\doxygenemoji}[2]{% + \IfFileExists{./#2.png}{\raisebox{-0.1em}{\includegraphics[height=0.9em]{./#2.png}}}{#1}% + } + % Page & text layout + \usepackage{geometry} + \geometry{% + a4paper,% + top=2.5cm,% + bottom=2.5cm,% + left=2.5cm,% + right=2.5cm% + } + \usepackage{changepage} + % Allow a bit of overflow to go unnoticed by other means + \tolerance=750 + \hfuzz=15pt + \hbadness=750 + \setlength{\emergencystretch}{15pt} + \setlength{\parindent}{0cm} + \newcommand{\doxynormalparskip}{\setlength{\parskip}{3ex plus 2ex minus 2ex}} + \newcommand{\doxytocparskip}{\setlength{\parskip}{1ex plus 0ex minus 0ex}} + \doxynormalparskip + % Redefine paragraph/subparagraph environments, using sectsty fonts + \makeatletter + \renewcommand{\paragraph}{% + \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@parafont% + }% + } + \renewcommand{\subparagraph}{% + \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@subparafont% + }% + } + \makeatother + \makeatletter + \newcommand\hrulefilll{\leavevmode\leaders\hrule\hskip 0pt plus 1filll\kern\z@} + \makeatother + % Headers & footers + \usepackage{fancyhdr} + \pagestyle{fancyplain} + \renewcommand{\footrulewidth}{0.4pt} + \fancypagestyle{fancyplain}{ + \fancyhf{} + \fancyhead[LE, RO]{\bfseries\thepage} + \fancyhead[LO]{\bfseries\rightmark} + \fancyhead[RE]{\bfseries\leftmark} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + } + \fancypagestyle{plain}{ + \fancyhf{} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + \renewcommand{\headrulewidth}{0pt} + } + \pagestyle{fancyplain} + \renewcommand{\chaptermark}[1]{% + \markboth{#1}{}% + } + \renewcommand{\sectionmark}[1]{% + \markright{\thesection\ #1}% + } + % ToC, LoF, LoT, bibliography, and index + % Indices & bibliography + \usepackage{natbib} + \usepackage[titles]{tocloft} + \setcounter{tocdepth}{3} + \setcounter{secnumdepth}{5} + % creating indexes + \makeindex + \usepackage{newunicodechar} + \makeatletter + \def\doxynewunicodechar#1#2{% + \@tempswafalse + \edef\nuc@tempa{\detokenize{#1}}% + \if\relax\nuc@tempa\relax + \nuc@emptyargerr + \else + \edef\@tempb{\expandafter\@car\nuc@tempa\@nil}% + \nuc@check + \if@tempswa + \@namedef{u8:\nuc@tempa}{#2}% + \fi + \fi + } + \makeatother + \doxynewunicodechar{⁻}{${}^{-}$}% Superscript minus + \doxynewunicodechar{²}{${}^{2}$}% Superscript two + \doxynewunicodechar{³}{${}^{3}$}% Superscript three + % Hyperlinks + % Hyperlinks (required, but should be loaded last) + \ifpdf + \usepackage[pdftex,pagebackref=true]{hyperref} + \else + \ifxetex + \usepackage[pagebackref=true]{hyperref} + \else + \usepackage[ps2pdf,pagebackref=true]{hyperref} + \fi + \fi + \hypersetup{% + colorlinks=true,% + linkcolor=blue,% + citecolor=blue,% + unicode,% + pdftitle={Num\+Sim},% + pdfsubject={Numerical Simulation of fluid-\/flow}% + } + % Custom commands used by the header + % Custom commands + \newcommand{\clearemptydoublepage}{% + \newpage{\pagestyle{empty}\cleardoublepage}% + } + % caption style definition + \usepackage{caption} + \captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top} + % in page table of contents + \IfFormatAtLeastTF{2023/05/01}{\usepackage[deeplevels]{etoc}}{\usepackage[deeplevels]{etoc_doxygen}} + \etocsettocstyle{\doxytocparskip}{\doxynormalparskip} + \etocsetlevel{subsubsubsection}{4} + \etocsetlevel{subsubsubsubsection}{5} + \etocsetlevel{subsubsubsubsubsection}{6} + \etocsetlevel{subsubsubsubsubsubsection}{7} + \etocsetlevel{paragraph}{8} + \etocsetlevel{subparagraph}{9} + % prevent numbers overlap the titles in toc + \renewcommand{\numberline}[1]{#1~} +% End of preamble, now comes the document contents +%===== C O N T E N T S ===== +\begin{document} + \raggedbottom + % Titlepage & ToC + % To avoid duplicate page anchors due to reuse of same numbers for + % the index (be it as roman numbers) + \hypersetup{pageanchor=false, + bookmarksnumbered=true, + pdfencoding=unicode + } + \pagenumbering{alph} + \begin{titlepage} + \vspace*{7cm} + \begin{center}% + {\Large Num\+Sim}\\ + [1ex]\large 1.\+0 \\ + \vspace*{1cm} + {\large Generated by Doxygen 1.10.0}\\ + \end{center} + \end{titlepage} + \clearemptydoublepage + \pagenumbering{roman} + \tableofcontents + \clearemptydoublepage + \pagenumbering{arabic} + % re-enable anchors again + \hypersetup{pageanchor=true} +%--- Begin generated contents --- +\chapter{Hierarchical Index} +\input{hierarchy} +\chapter{Class Index} +\input{annotated} +\chapter{File Index} +\input{files} +\chapter{Class Documentation} +\input{classArray2D} +\input{classBoundary} +\input{classCentralDifferences} +\input{classComputation} +\input{classDiscretization} +\input{classDonorCell} +\input{classFieldVariable} +\input{classFluidTracer} +\input{classGaussSeidel} +\input{structSettings_1_1LineContent} +\input{classMask} +\input{classOutputWriter} +\input{classOutputWriterParaview} +\input{classOutputWriterText} +\input{classPressureSolver} +\input{structSettings} +\input{classSOR} +\input{classStaggeredGrid} +\chapter{File Documentation} +\input{boundary_8h_source} +\input{mask_8h_source} +\input{computation_8h_source} +\input{central__differences_8h_source} +\input{discretization_8h_source} +\input{donor__cell_8h_source} +\input{staggered__grid_8h_source} +\input{output__writer_8h_source} +\input{output__writer__paraview_8h_source} +\input{output__writer__text_8h_source} +\input{settings_8h_source} +\input{gauss__seidel_8h_source} +\input{pressure__solver_8h_source} +\input{sor_8h_source} +\input{array2D_8h_source} +\input{field__variable_8h_source} +\input{fluid__tracer_8h_source} +%--- End generated contents --- +% Index + \backmatter + \newpage + \phantomsection + \clearemptydoublepage + \addcontentsline{toc}{chapter}{\indexname} + \printindex +% Required for some languages (in combination with latexdocumentpre from the header) +\end{document} diff --git a/documentation/latex/settings_8h_source.tex b/documentation/latex/settings_8h_source.tex new file mode 100644 index 00000000..165b262e --- /dev/null +++ b/documentation/latex/settings_8h_source.tex @@ -0,0 +1,113 @@ +\doxysection{settings.\+h} +\hypertarget{settings_8h_source}{}\label{settings_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/settings\_parser/settings.h@{/home/jonat/Documents/01\_Studium/NumSim/src/settings\_parser/settings.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00008\ } + + + +\DoxyCodeLine{00013\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structSettings}{Settings}}} +\DoxyCodeLine{00014\ \{} +\DoxyCodeLine{00015\ \ \ std::array\ \mbox{\hyperlink{structSettings_a43a0d2ee903496bfb86693a43a891a69}{nCells}};\ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00016\ \ \ std::array\ \mbox{\hyperlink{structSettings_a372a1549c306b12ca7bb0ed84f8a4cef}{physicalSize}};\ } +\DoxyCodeLine{00017\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_a8b8330dfa04fe849291d68eacbc8dfec}{re}}\ =\ 1000;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00018\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_a73cd9110793ede99e9ebe409e5e115fd}{endTime}}\ =\ 10.0;\ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00019\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_adaa611dc8c075474d40d7149afd310d1}{tau}}\ =\ 0.5;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00020\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_a988b93fdeb6c91932043b3f746b45e86}{maximumDt}}\ =\ 0.1;\ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00021\ } +\DoxyCodeLine{00022\ \ \ std::array\ \mbox{\hyperlink{structSettings_a1a21237c7f5b7585e5a3545c7d4a4e8c}{g}}\{0.,\ 0.\};\ } +\DoxyCodeLine{00023\ } +\DoxyCodeLine{00024\ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structSettings_a05bd5ffa1e1b48f5dc99878538596db3}{useDonorCell}}\ =\ \textcolor{keyword}{false};\ } +\DoxyCodeLine{00025\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_a8b3721d24a5417caa0f2ad6f5eb85782}{alpha}}\ =\ 0.5;\ \ \ \ \ \ \ \ } +\DoxyCodeLine{00026\ } +\DoxyCodeLine{00027\ \ \ \textcolor{comment}{//\ Boundary\ Conditions\ Type}} +\DoxyCodeLine{00028\ \ \ std::string\ BCTop\ =\ \textcolor{stringliteral}{"{}NoSlip"{}};} +\DoxyCodeLine{00029\ \ \ std::string\ BCRight\ =\ \textcolor{stringliteral}{"{}NoSlip"{}};} +\DoxyCodeLine{00030\ \ \ std::string\ BCBottom\ =\ \textcolor{stringliteral}{"{}NoSlip"{}};} +\DoxyCodeLine{00031\ \ \ std::string\ BCLeft\ =\ \textcolor{stringliteral}{"{}NoSlip"{}};} +\DoxyCodeLine{00032\ } +\DoxyCodeLine{00033\ \ \ \textcolor{comment}{//\ NoSlip\ boundary\ conditions}} +\DoxyCodeLine{00034\ \ \ std::array\ \mbox{\hyperlink{structSettings_a8887591c6c157d7006051aa95896c284}{NoSlipVelTop}};\ \ \ \ } +\DoxyCodeLine{00035\ \ \ std::array\ \mbox{\hyperlink{structSettings_a2508aa084fe48e78d72b06e67c5a2006}{NoSlipVelRight}};\ \ } +\DoxyCodeLine{00036\ \ \ std::array\ \mbox{\hyperlink{structSettings_a13e254a0439df7f7bd24ffe4f919a1a4}{NoSlipVelBottom}};\ } +\DoxyCodeLine{00037\ \ \ std::array\ \mbox{\hyperlink{structSettings_aafaec8c10a728a0f115f3bed43a1c478}{NoSlipVelLeft}};\ \ \ } +\DoxyCodeLine{00038\ } +\DoxyCodeLine{00039\ \ \ \textcolor{comment}{//\ Pressure\ boundary\ conditions}} +\DoxyCodeLine{00040\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_a5c8295a86e29ac27579058f07242e78c}{PressureTop}};\ \ \ \ } +\DoxyCodeLine{00041\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_a8e7d49e95d30c9390fc5039f9326df32}{PressureRight}};\ \ } +\DoxyCodeLine{00042\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_acae74bcd333251c982ea347b8eb52017}{PressureBottom}};\ } +\DoxyCodeLine{00043\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_a55f2fbdeb4d9c25bc679bd1fd42f1da7}{PressureLeft}};\ \ \ } +\DoxyCodeLine{00044\ } +\DoxyCodeLine{00045\ \ \ \textcolor{comment}{//\ Create\ rectangular\ obstacle\ in\ domain}} +\DoxyCodeLine{00046\ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structSettings_a9e871c2bbb7d1b0131eac1f30f4f7788}{createRectangularObject}}\ =\ \textcolor{keyword}{false};\ } +\DoxyCodeLine{00047\ } +\DoxyCodeLine{00048\ \ \ \textcolor{comment}{//\ Create\ domain\ from\ PNGBitmap}} +\DoxyCodeLine{00049\ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structSettings_a6300ad5a809cdaf480f4553c3e3dbf7c}{createDomainfromBitmap}}\ =\ \textcolor{keyword}{false};\ } +\DoxyCodeLine{00050\ \ \ std::string\ \mbox{\hyperlink{structSettings_a398d6490c8731b9b74115abc34700086}{pathToBitmap}};\ } +\DoxyCodeLine{00051\ } +\DoxyCodeLine{00052\ \ \ std::array\ \mbox{\hyperlink{structSettings_aff5a1563289e354946a164fd80da5bf6}{obstaclePosition}};\ } +\DoxyCodeLine{00053\ \ \ std::array\ \mbox{\hyperlink{structSettings_ae23782f18cddfea58cb843e98cb5854f}{obstacleDimension}};\ } +\DoxyCodeLine{00054\ } +\DoxyCodeLine{00055\ \ \ std::string\ \mbox{\hyperlink{structSettings_a888e2fca33db512d4e200b49f1f618f7}{pressureSolver}}\ =\ \textcolor{stringliteral}{"{}SOR"{}};\ \ } +\DoxyCodeLine{00056\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_af5ac13128e8c442ba45eedfab06ba14c}{omega}}\ =\ 1.0;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00057\ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structSettings_aa02bd91d026d9ded9e36004b41b068b1}{epsilon}}\ =\ 1e-\/5;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00058\ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{structSettings_ac118e1c6052e35fb0ee38547a85d84ba}{maximumNumberOfIterations}}\ =\ 1e5;\ } +\DoxyCodeLine{00059\ } +\DoxyCodeLine{00060\ } +\DoxyCodeLine{00061\ \ \ \textcolor{comment}{//\ Fluid\ Tracer}} +\DoxyCodeLine{00062\ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structSettings_a7f3405eef6ef103b60e7c2b01088c5ec}{useFluidTracer}}\ =\ \textcolor{keyword}{true};\ } +\DoxyCodeLine{00063\ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{structSettings_ab24c3f0faab5278e400792f8b172322a}{particlePerCell}}\ =\ 100;\ } + + + +\DoxyCodeLine{00068\ \ \ std::string\ \mbox{\hyperlink{structSettings_a70a321e56d7bc445f58a8662430fd68d}{fluidTracerMethod}}\ =\ \textcolor{stringliteral}{"{}single"{}};} +\DoxyCodeLine{00069\ \ \ \textcolor{comment}{//\ bool\ useParticleSource\ =\ false;\ //!<\ Enables\ virtual\ particles\ source}} +\DoxyCodeLine{00070\ \ \ \textcolor{comment}{//\ std::array\ particleSource\ =\ \{0.5,\ 0.5\};\ //!<\ Source\ of\ virtual\ particles}} +\DoxyCodeLine{00071\ } +\DoxyCodeLine{00072\ \ \ } +\DoxyCodeLine{00073\ } +\DoxyCodeLine{00074\ \ \ \textcolor{comment}{//\ Writer\ Options}} +\DoxyCodeLine{00075\ } + + + + +\DoxyCodeLine{00081\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{structSettings_a55f95e3b6e7379bef4f8399a2cd670cc}{loadFromFile}}(std::string\ filename);} +\DoxyCodeLine{00082\ } + + +\DoxyCodeLine{00086\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{structSettings_a68ce38117dcef2cbdd3bd17f127b3078}{printSettings}}();} +\DoxyCodeLine{00087\ } + + + +\DoxyCodeLine{00092\ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structSettings_1_1LineContent}{LineContent}}} +\DoxyCodeLine{00093\ \ \ \{} +\DoxyCodeLine{00094\ \ \ \ \ std::string\ \mbox{\hyperlink{structSettings_1_1LineContent_a2fa37c56a8ebe361c95b8332fa0262d3}{parameterName}};\ } +\DoxyCodeLine{00095\ \ \ \ \ std::string\ \mbox{\hyperlink{structSettings_1_1LineContent_a0bb96393366f2e5035379ab5b99d3ab2}{value}};\ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00096\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structSettings_1_1LineContent_aa2af8a274c468eb68c61cd93171748e5}{isContent}};\ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00097\ \ \ \};} +\DoxyCodeLine{00098\ } + + + + +\DoxyCodeLine{00104\ \ \ \mbox{\hyperlink{structSettings_1_1LineContent}{LineContent}}\ \mbox{\hyperlink{structSettings_a6dbc25f91b99664976cd4a0a8af153c9}{readSingleLine}}(std::string\ line);} +\DoxyCodeLine{00105\ } +\DoxyCodeLine{00106\ \ \ \textcolor{comment}{//\ sets\ the\ parameter\ to\ the\ corresponding\ value}} + + + + + +\DoxyCodeLine{00113\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{structSettings_a588f30eb8d791c03ec811360386bff0d}{setParameter}}(std::string\ parameterName,\ std::string\ value);} +\DoxyCodeLine{00114\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/sor_8h_source.tex b/documentation/latex/sor_8h_source.tex new file mode 100644 index 00000000..17ff2737 --- /dev/null +++ b/documentation/latex/sor_8h_source.tex @@ -0,0 +1,39 @@ +\doxysection{sor.\+h} +\hypertarget{sor_8h_source}{}\label{sor_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/solver/sor.h@{/home/jonat/Documents/01\_Studium/NumSim/src/solver/sor.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} +\DoxyCodeLine{00002\ } +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}pressure\_solver.h"{}}} +\DoxyCodeLine{00004\ } + + + + +\DoxyCodeLine{00010\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classSOR}{SOR}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classPressureSolver}{PressureSolver}}} +\DoxyCodeLine{00011\ \{} +\DoxyCodeLine{00012\ } +\DoxyCodeLine{00013\ \textcolor{keyword}{public}:} + + + + + + + +\DoxyCodeLine{00022\ \ \ \ \ \mbox{\hyperlink{classSOR_a357cfea8935f4b2dfee06f2d8e1461a8}{SOR}}(\textcolor{keyword}{const}\ std::shared\_ptr\ \&data,} +\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ epsilon,} +\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ maximumNumberOfIterations,} +\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ std::shared\_ptr\ boundary,} +\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ omega);} +\DoxyCodeLine{00027\ } + + + +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classSOR_a860992d85d8aacf114a3a02b5831f728}{solve}}()\ \textcolor{keyword}{override};} +\DoxyCodeLine{00033\ } +\DoxyCodeLine{00034\ \textcolor{keyword}{private}:} +\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keywordtype}{double}\ omega\_;\ } +\DoxyCodeLine{00036\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/staggered__grid_8h_source.tex b/documentation/latex/staggered__grid_8h_source.tex new file mode 100644 index 00000000..2c02da44 --- /dev/null +++ b/documentation/latex/staggered__grid_8h_source.tex @@ -0,0 +1,180 @@ +\doxysection{staggered\+\_\+grid.\+h} +\hypertarget{staggered__grid_8h_source}{}\label{staggered__grid_8h_source}\index{/home/jonat/Documents/01\_Studium/NumSim/src/discretization/staggered\_grid.h@{/home/jonat/Documents/01\_Studium/NumSim/src/discretization/staggered\_grid.h}} + +\begin{DoxyCode}{0} +\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ }} +\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}../storage/field\_variable.h"{}}} +\DoxyCodeLine{00005\ } + + + + + + + +\DoxyCodeLine{00014\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classStaggeredGrid}{StaggeredGrid}}} +\DoxyCodeLine{00015\ \{} +\DoxyCodeLine{00016\ \textcolor{keyword}{public}:} + + + + + +\DoxyCodeLine{00023\ \ \ \ \ \mbox{\hyperlink{classStaggeredGrid_aec0990b64c559b1690f21b48fb2d13b1}{StaggeredGrid}}(std::array\ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{nCells}},\ std::array\ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{meshWidth}});} +\DoxyCodeLine{00024\ } + + +\DoxyCodeLine{00028\ \ \ \ \ \textcolor{keyword}{const}\ std::array\ \mbox{\hyperlink{classStaggeredGrid_a330856d4efe952771daf0753ef84068e}{meshWidth}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{const}\ std::array\ \mbox{\hyperlink{classStaggeredGrid_af37816ccb2c46e4a514dedac261897bf}{nCells}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00033\ } + + +\DoxyCodeLine{00037\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \&\mbox{\hyperlink{classStaggeredGrid_a87cee12621c641ab143a8b1a61b2ef7e}{u}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \&\mbox{\hyperlink{classStaggeredGrid_a26e478abba632554652c9e05a279d1ca}{v}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \&\mbox{\hyperlink{classStaggeredGrid_aafe6e0bb3509f6aad272b94f74e7ffec}{p}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \&\mbox{\hyperlink{classStaggeredGrid_a3f36422a02b9b18d1577d61e406f08cf}{rhs}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00050\ } + + +\DoxyCodeLine{00054\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classStaggeredGrid_a87cee12621c641ab143a8b1a61b2ef7e}{u}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keywordtype}{double}\ \&\mbox{\hyperlink{classStaggeredGrid_a87cee12621c641ab143a8b1a61b2ef7e}{u}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j);} +\DoxyCodeLine{00059\ } + + +\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classStaggeredGrid_a26e478abba632554652c9e05a279d1ca}{v}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keywordtype}{double}\ \&\mbox{\hyperlink{classStaggeredGrid_a26e478abba632554652c9e05a279d1ca}{v}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j);} +\DoxyCodeLine{00068\ } + + +\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classStaggeredGrid_aafe6e0bb3509f6aad272b94f74e7ffec}{p}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keywordtype}{double}\ \&\mbox{\hyperlink{classStaggeredGrid_aafe6e0bb3509f6aad272b94f74e7ffec}{p}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j);} +\DoxyCodeLine{00077\ } + + +\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keywordtype}{double}\ \&\mbox{\hyperlink{classStaggeredGrid_adb05c59512dc8993367e4beddba05785}{f}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j);} + + +\DoxyCodeLine{00085\ \ \ \ \ \textcolor{keywordtype}{double}\ \&\mbox{\hyperlink{classStaggeredGrid_aaf849bec40f7fa7c68823038f0877341}{g}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j);} + + +\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keywordtype}{double}\ \&\mbox{\hyperlink{classStaggeredGrid_a3f36422a02b9b18d1577d61e406f08cf}{rhs}}(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j);} +\DoxyCodeLine{00090\ } + + +\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classStaggeredGrid_aec8490affea703cdd73b1febaed68968}{dx}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classStaggeredGrid_abde2da10e0c130fb0f206de64c9b4956}{dy}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00099\ } + + +\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a31e2d3a0b6e03685380810a7c2f323e1}{uIBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00107\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a641e473d72e1d02ba3de1c16e9d0d332}{uIEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00108\ } + + +\DoxyCodeLine{00112\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a9b0e97704e1871441a8e713ecaa2cff5}{uJBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00116\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a3393aa91b17054d2d700de308ae25632}{uJEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00117\ } + + +\DoxyCodeLine{00121\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_ace7bf8cb1d279131739d5d12de302d09}{vIBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00125\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_aa5a44aa088b5a7923fa952af1ecb5778}{vIEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00126\ } + + +\DoxyCodeLine{00130\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a7f8468d672411c0e3a5eeb67788fc826}{vJBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00134\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_ab67e8d9d8d76d34fb02d4d644f0b3795}{vJEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00135\ } + + +\DoxyCodeLine{00139\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a9922c955707f2a31a4a27d1d696f002e}{pIBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00143\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a34f16fdf87971fe84ffc3c84722bb2c7}{pIEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00144\ } + + +\DoxyCodeLine{00148\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_ae4c9ba16c5635dc1ffaa264fbcc3e034}{pJBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00152\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_ad9928ee522eedb7d7fd48ca0b92f2795}{pJEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00153\ } + + +\DoxyCodeLine{00157\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a5cc368f9ede58a3cb689705df998f750}{fIBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00161\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a8162b849231354ba73aacb085b5cd665}{fIEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00162\ } + + +\DoxyCodeLine{00166\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_ab92aca90331200d0cc7bc0c0a857b4ef}{fJBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00170\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a7ac43ac86231987bc0bf6565589d52e1}{fJEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00171\ } + + +\DoxyCodeLine{00175\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a061fb6d6948cdc3054171dd60842a8c3}{gIBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00179\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_aebc76693e5dd61db521d6763236bf664}{gIEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00180\ } + + +\DoxyCodeLine{00184\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a18ca3a121787b19c18886b0945aca2e3}{gJBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00188\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a7a29456e1bce9efffa27de0b41957b50}{gJEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00189\ } + + +\DoxyCodeLine{00193\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_ad5c16b00d9dbf0f115e1ded81203edce}{rhsIBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00197\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_ae11e8842fdd508b914dc8f24b09b36a9}{rhsIEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00198\ } + + +\DoxyCodeLine{00202\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a28c36939e3d3cc8df76e7aa91f0e0804}{rhsJBegin}}()\ \textcolor{keyword}{const};} + + +\DoxyCodeLine{00206\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classStaggeredGrid_a953ec890a986473bffe87ea26dfcd782}{rhsJEnd}}()\ \textcolor{keyword}{const};} +\DoxyCodeLine{00207\ } +\DoxyCodeLine{00208\ \textcolor{keyword}{protected}:} +\DoxyCodeLine{00209\ \ \ \ \ \textcolor{keyword}{const}\ std::array\ \mbox{\hyperlink{classStaggeredGrid_acacffb5739539d9015c986080bb5ed44}{nCells\_}};\ \ \ \ \ \ \ } +\DoxyCodeLine{00210\ \ \ \ \ \textcolor{keyword}{const}\ std::array\ \mbox{\hyperlink{classStaggeredGrid_a9603c3334440aab082dda48947e5ce6e}{meshWidth\_}};\ } +\DoxyCodeLine{00211\ \ \ \ \ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \mbox{\hyperlink{classStaggeredGrid_adcef36b4ce8cc6843a2b6f603b62c763}{u\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00212\ \ \ \ \ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \mbox{\hyperlink{classStaggeredGrid_a20ec43568fe937b194561e21a0b84ad9}{v\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00213\ \ \ \ \ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \mbox{\hyperlink{classStaggeredGrid_a2ea3c93dd401ac06461ade9a74e76459}{p\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00214\ \ \ \ \ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \mbox{\hyperlink{classStaggeredGrid_a94933ac0c6e0d2a794f46c7a97d72f75}{f\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00215\ \ \ \ \ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \mbox{\hyperlink{classStaggeredGrid_a5f5c88f603d4e503cba4c44ed43de46a}{g\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00216\ \ \ \ \ \mbox{\hyperlink{classFieldVariable}{FieldVariable}}\ \mbox{\hyperlink{classStaggeredGrid_a496206955162452a0629a7742fe92a84}{rhs\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } +\DoxyCodeLine{00217\ \};} + +\end{DoxyCode} diff --git a/documentation/latex/structSettings.tex b/documentation/latex/structSettings.tex new file mode 100644 index 00000000..6c77c425 --- /dev/null +++ b/documentation/latex/structSettings.tex @@ -0,0 +1,192 @@ +\doxysection{Settings Struct Reference} +\hypertarget{structSettings}{}\label{structSettings}\index{Settings@{Settings}} + + +All settings that parametrize a simulation run. + + + + +{\ttfamily \#include $<$settings.\+h$>$} + +\doxysubsubsection*{Classes} +\begin{DoxyCompactItemize} +\item +struct \mbox{\hyperlink{structSettings_1_1LineContent}{Line\+Content}} +\begin{DoxyCompactList}\small\item\em Contains the content of a single line in a file. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{structSettings_a55f95e3b6e7379bef4f8399a2cd670cc}{load\+From\+File}} (std\+::string filename) +\begin{DoxyCompactList}\small\item\em Parse a text file with settings. \end{DoxyCompactList}\item +\Hypertarget{structSettings_a68ce38117dcef2cbdd3bd17f127b3078}\label{structSettings_a68ce38117dcef2cbdd3bd17f127b3078} +void {\bfseries print\+Settings} () +\begin{DoxyCompactList}\small\item\em Print all setting to terminal. \end{DoxyCompactList}\item +\mbox{\hyperlink{structSettings_1_1LineContent}{Line\+Content}} \mbox{\hyperlink{structSettings_a6dbc25f91b99664976cd4a0a8af153c9}{read\+Single\+Line}} (std\+::string line) +\begin{DoxyCompactList}\small\item\em Reads one line of the settings file. \end{DoxyCompactList}\item +void \mbox{\hyperlink{structSettings_a588f30eb8d791c03ec811360386bff0d}{set\+Parameter}} (std\+::string parameter\+Name, std\+::string value) +\begin{DoxyCompactList}\small\item\em Sets the parameter to the corresponding value. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{structSettings_a43a0d2ee903496bfb86693a43a891a69}\label{structSettings_a43a0d2ee903496bfb86693a43a891a69} +std\+::array$<$ int, 2 $>$ {\bfseries n\+Cells} +\begin{DoxyCompactList}\small\item\em number of cells in x and y direction \end{DoxyCompactList}\item +\Hypertarget{structSettings_a372a1549c306b12ca7bb0ed84f8a4cef}\label{structSettings_a372a1549c306b12ca7bb0ed84f8a4cef} +std\+::array$<$ double, 2 $>$ {\bfseries physical\+Size} +\begin{DoxyCompactList}\small\item\em physical size of the domain \end{DoxyCompactList}\item +\Hypertarget{structSettings_a8b8330dfa04fe849291d68eacbc8dfec}\label{structSettings_a8b8330dfa04fe849291d68eacbc8dfec} +double {\bfseries re} = 1000 +\begin{DoxyCompactList}\small\item\em reynolds number \end{DoxyCompactList}\item +\Hypertarget{structSettings_a73cd9110793ede99e9ebe409e5e115fd}\label{structSettings_a73cd9110793ede99e9ebe409e5e115fd} +double {\bfseries end\+Time} = 10.\+0 +\begin{DoxyCompactList}\small\item\em end time of the simulation \end{DoxyCompactList}\item +\Hypertarget{structSettings_adaa611dc8c075474d40d7149afd310d1}\label{structSettings_adaa611dc8c075474d40d7149afd310d1} +double {\bfseries tau} = 0.\+5 +\begin{DoxyCompactList}\small\item\em safety factor for time step width \end{DoxyCompactList}\item +\Hypertarget{structSettings_a988b93fdeb6c91932043b3f746b45e86}\label{structSettings_a988b93fdeb6c91932043b3f746b45e86} +double {\bfseries maximum\+Dt} = 0.\+1 +\begin{DoxyCompactList}\small\item\em maximum time step width \end{DoxyCompactList}\item +\Hypertarget{structSettings_a1a21237c7f5b7585e5a3545c7d4a4e8c}\label{structSettings_a1a21237c7f5b7585e5a3545c7d4a4e8c} +std\+::array$<$ double, 2 $>$ {\bfseries g} \{0., 0.\} +\begin{DoxyCompactList}\small\item\em external forces \end{DoxyCompactList}\item +\Hypertarget{structSettings_a05bd5ffa1e1b48f5dc99878538596db3}\label{structSettings_a05bd5ffa1e1b48f5dc99878538596db3} +bool {\bfseries use\+Donor\+Cell} = false +\begin{DoxyCompactList}\small\item\em if the donor cell scheme schould be used \end{DoxyCompactList}\item +\Hypertarget{structSettings_a8b3721d24a5417caa0f2ad6f5eb85782}\label{structSettings_a8b3721d24a5417caa0f2ad6f5eb85782} +double {\bfseries alpha} = 0.\+5 +\begin{DoxyCompactList}\small\item\em factor for donor-\/cell scheme \end{DoxyCompactList}\item +\Hypertarget{structSettings_a90549573af4f6c2c60ac640321fe1956}\label{structSettings_a90549573af4f6c2c60ac640321fe1956} +std\+::string {\bfseries BCTop} = "{}No\+Slip"{} +\item +\Hypertarget{structSettings_a4f6f4dbc9e08834584809de5e553e5cd}\label{structSettings_a4f6f4dbc9e08834584809de5e553e5cd} +std\+::string {\bfseries BCRight} = "{}No\+Slip"{} +\item +\Hypertarget{structSettings_a8003d11fa49639f3f827123d42f5f0ce}\label{structSettings_a8003d11fa49639f3f827123d42f5f0ce} +std\+::string {\bfseries BCBottom} = "{}No\+Slip"{} +\item +\Hypertarget{structSettings_ac411ff66a486b89fba9dc520b6e305e3}\label{structSettings_ac411ff66a486b89fba9dc520b6e305e3} +std\+::string {\bfseries BCLeft} = "{}No\+Slip"{} +\item +\Hypertarget{structSettings_a8887591c6c157d7006051aa95896c284}\label{structSettings_a8887591c6c157d7006051aa95896c284} +std\+::array$<$ double, 2 $>$ {\bfseries No\+Slip\+Vel\+Top} +\begin{DoxyCompactList}\small\item\em prescribed values of u,v at top of domain \end{DoxyCompactList}\item +\Hypertarget{structSettings_a2508aa084fe48e78d72b06e67c5a2006}\label{structSettings_a2508aa084fe48e78d72b06e67c5a2006} +std\+::array$<$ double, 2 $>$ {\bfseries No\+Slip\+Vel\+Right} +\begin{DoxyCompactList}\small\item\em prescribed values of u,v at right of domain \end{DoxyCompactList}\item +\Hypertarget{structSettings_a13e254a0439df7f7bd24ffe4f919a1a4}\label{structSettings_a13e254a0439df7f7bd24ffe4f919a1a4} +std\+::array$<$ double, 2 $>$ {\bfseries No\+Slip\+Vel\+Bottom} +\begin{DoxyCompactList}\small\item\em prescribed values of u,v at bottom of domain \end{DoxyCompactList}\item +\Hypertarget{structSettings_aafaec8c10a728a0f115f3bed43a1c478}\label{structSettings_aafaec8c10a728a0f115f3bed43a1c478} +std\+::array$<$ double, 2 $>$ {\bfseries No\+Slip\+Vel\+Left} +\begin{DoxyCompactList}\small\item\em prescribed values of u,v at left of domain \end{DoxyCompactList}\item +\Hypertarget{structSettings_a5c8295a86e29ac27579058f07242e78c}\label{structSettings_a5c8295a86e29ac27579058f07242e78c} +double {\bfseries Pressure\+Top} +\begin{DoxyCompactList}\small\item\em prescribed pressure BC top of domain \end{DoxyCompactList}\item +\Hypertarget{structSettings_a8e7d49e95d30c9390fc5039f9326df32}\label{structSettings_a8e7d49e95d30c9390fc5039f9326df32} +double {\bfseries Pressure\+Right} +\begin{DoxyCompactList}\small\item\em prescribed pressure BC right of domain \end{DoxyCompactList}\item +\Hypertarget{structSettings_acae74bcd333251c982ea347b8eb52017}\label{structSettings_acae74bcd333251c982ea347b8eb52017} +double {\bfseries Pressure\+Bottom} +\begin{DoxyCompactList}\small\item\em prescribed pressure BC bottom of domain \end{DoxyCompactList}\item +\Hypertarget{structSettings_a55f2fbdeb4d9c25bc679bd1fd42f1da7}\label{structSettings_a55f2fbdeb4d9c25bc679bd1fd42f1da7} +double {\bfseries Pressure\+Left} +\begin{DoxyCompactList}\small\item\em prescribed pressure BC left of domain \end{DoxyCompactList}\item +\Hypertarget{structSettings_a9e871c2bbb7d1b0131eac1f30f4f7788}\label{structSettings_a9e871c2bbb7d1b0131eac1f30f4f7788} +bool {\bfseries create\+Rectangular\+Object} = false +\begin{DoxyCompactList}\small\item\em wheter a rectangular object in domain should be created \end{DoxyCompactList}\item +\Hypertarget{structSettings_a6300ad5a809cdaf480f4553c3e3dbf7c}\label{structSettings_a6300ad5a809cdaf480f4553c3e3dbf7c} +bool {\bfseries create\+Domainfrom\+Bitmap} = false +\begin{DoxyCompactList}\small\item\em wheter domain should be created from bitmap \end{DoxyCompactList}\item +\Hypertarget{structSettings_a398d6490c8731b9b74115abc34700086}\label{structSettings_a398d6490c8731b9b74115abc34700086} +std\+::string {\bfseries path\+To\+Bitmap} +\begin{DoxyCompactList}\small\item\em path to bitmap \end{DoxyCompactList}\item +\Hypertarget{structSettings_aff5a1563289e354946a164fd80da5bf6}\label{structSettings_aff5a1563289e354946a164fd80da5bf6} +std\+::array$<$ double, 2 $>$ {\bfseries obstacle\+Position} +\begin{DoxyCompactList}\small\item\em x and y position of rectangular object \end{DoxyCompactList}\item +\Hypertarget{structSettings_ae23782f18cddfea58cb843e98cb5854f}\label{structSettings_ae23782f18cddfea58cb843e98cb5854f} +std\+::array$<$ double, 2 $>$ {\bfseries obstacle\+Dimension} +\begin{DoxyCompactList}\small\item\em x and y dimension of rectangular object \end{DoxyCompactList}\item +\Hypertarget{structSettings_a888e2fca33db512d4e200b49f1f618f7}\label{structSettings_a888e2fca33db512d4e200b49f1f618f7} +std\+::string {\bfseries pressure\+Solver} = "{}SOR"{} +\begin{DoxyCompactList}\small\item\em which pressure solver to use, "{}\+Gauss\+Seidel"{} or "{}\+SOR"{} \end{DoxyCompactList}\item +\Hypertarget{structSettings_af5ac13128e8c442ba45eedfab06ba14c}\label{structSettings_af5ac13128e8c442ba45eedfab06ba14c} +double {\bfseries omega} = 1.\+0 +\begin{DoxyCompactList}\small\item\em overrelaxation factor \end{DoxyCompactList}\item +\Hypertarget{structSettings_aa02bd91d026d9ded9e36004b41b068b1}\label{structSettings_aa02bd91d026d9ded9e36004b41b068b1} +double {\bfseries epsilon} = 1e-\/5 +\begin{DoxyCompactList}\small\item\em tolerance for the residual in the pressure solver \end{DoxyCompactList}\item +\Hypertarget{structSettings_ac118e1c6052e35fb0ee38547a85d84ba}\label{structSettings_ac118e1c6052e35fb0ee38547a85d84ba} +int {\bfseries maximum\+Number\+Of\+Iterations} = 1e5 +\begin{DoxyCompactList}\small\item\em maximum number of iterations in the solver \end{DoxyCompactList}\item +\Hypertarget{structSettings_a7f3405eef6ef103b60e7c2b01088c5ec}\label{structSettings_a7f3405eef6ef103b60e7c2b01088c5ec} +bool {\bfseries use\+Fluid\+Tracer} = true +\begin{DoxyCompactList}\small\item\em Enables Open Surface Evolution. \end{DoxyCompactList}\item +\Hypertarget{structSettings_ab24c3f0faab5278e400792f8b172322a}\label{structSettings_ab24c3f0faab5278e400792f8b172322a} +int {\bfseries particle\+Per\+Cell} = 100 +\begin{DoxyCompactList}\small\item\em Initializes with given virtual particles per cell. \end{DoxyCompactList}\item +std\+::string \mbox{\hyperlink{structSettings_a70a321e56d7bc445f58a8662430fd68d}{fluid\+Tracer\+Method}} = "{}single"{} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +All settings that parametrize a simulation run. + +\doxysubsection{Member Function Documentation} +\Hypertarget{structSettings_a55f95e3b6e7379bef4f8399a2cd670cc}\label{structSettings_a55f95e3b6e7379bef4f8399a2cd670cc} +\index{Settings@{Settings}!loadFromFile@{loadFromFile}} +\index{loadFromFile@{loadFromFile}!Settings@{Settings}} +\doxysubsubsection{\texorpdfstring{loadFromFile()}{loadFromFile()}} +{\footnotesize\ttfamily void Settings\+::load\+From\+File (\begin{DoxyParamCaption}\item[{std\+::string}]{filename }\end{DoxyParamCaption})} + + + +Parse a text file with settings. + +Each line contains "{}$<$parameter\+Name$>$ = $<$value$>$"{} \Hypertarget{structSettings_a6dbc25f91b99664976cd4a0a8af153c9}\label{structSettings_a6dbc25f91b99664976cd4a0a8af153c9} +\index{Settings@{Settings}!readSingleLine@{readSingleLine}} +\index{readSingleLine@{readSingleLine}!Settings@{Settings}} +\doxysubsubsection{\texorpdfstring{readSingleLine()}{readSingleLine()}} +{\footnotesize\ttfamily \mbox{\hyperlink{structSettings_1_1LineContent}{Settings\+::\+Line\+Content}} Settings\+::read\+Single\+Line (\begin{DoxyParamCaption}\item[{std\+::string}]{line }\end{DoxyParamCaption})} + + + +Reads one line of the settings file. + + +\begin{DoxyParams}{Parameters} +{\em line} & line of file to read \\ +\hline +\end{DoxyParams} +\Hypertarget{structSettings_a588f30eb8d791c03ec811360386bff0d}\label{structSettings_a588f30eb8d791c03ec811360386bff0d} +\index{Settings@{Settings}!setParameter@{setParameter}} +\index{setParameter@{setParameter}!Settings@{Settings}} +\doxysubsubsection{\texorpdfstring{setParameter()}{setParameter()}} +{\footnotesize\ttfamily void Settings\+::set\+Parameter (\begin{DoxyParamCaption}\item[{std\+::string}]{parameter\+Name, }\item[{std\+::string}]{value }\end{DoxyParamCaption})} + + + +Sets the parameter to the corresponding value. + + +\begin{DoxyParams}{Parameters} +{\em parameter\+Name} & paramter name \\ +\hline +{\em value} & of parameter \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Data Documentation} +\Hypertarget{structSettings_a70a321e56d7bc445f58a8662430fd68d}\label{structSettings_a70a321e56d7bc445f58a8662430fd68d} +\index{Settings@{Settings}!fluidTracerMethod@{fluidTracerMethod}} +\index{fluidTracerMethod@{fluidTracerMethod}!Settings@{Settings}} +\doxysubsubsection{\texorpdfstring{fluidTracerMethod}{fluidTracerMethod}} +{\footnotesize\ttfamily std\+::string Settings\+::fluid\+Tracer\+Method = "{}single"{}} + +{\ttfamily single} -\/\texorpdfstring{$>$}{>} one virtual particles is enough for fluid cell {\ttfamily threshold} -\/\texorpdfstring{$>$}{>} aims at a constant amount of fluid cells + +The documentation for this struct was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/settings\+\_\+parser/settings.\+h\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/settings\+\_\+parser/settings.\+cpp\end{DoxyCompactItemize} diff --git a/documentation/latex/structSettings_1_1LineContent.tex b/documentation/latex/structSettings_1_1LineContent.tex new file mode 100644 index 00000000..30f38489 --- /dev/null +++ b/documentation/latex/structSettings_1_1LineContent.tex @@ -0,0 +1,31 @@ +\doxysection{Settings\+::Line\+Content Struct Reference} +\hypertarget{structSettings_1_1LineContent}{}\label{structSettings_1_1LineContent}\index{Settings::LineContent@{Settings::LineContent}} + + +Contains the content of a single line in a file. + + + + +{\ttfamily \#include $<$settings.\+h$>$} + +\doxysubsubsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\Hypertarget{structSettings_1_1LineContent_a2fa37c56a8ebe361c95b8332fa0262d3}\label{structSettings_1_1LineContent_a2fa37c56a8ebe361c95b8332fa0262d3} +std\+::string {\bfseries parameter\+Name} +\begin{DoxyCompactList}\small\item\em Name of parameter. \end{DoxyCompactList}\item +\Hypertarget{structSettings_1_1LineContent_a0bb96393366f2e5035379ab5b99d3ab2}\label{structSettings_1_1LineContent_a0bb96393366f2e5035379ab5b99d3ab2} +std\+::string {\bfseries value} +\begin{DoxyCompactList}\small\item\em value of the parameter \end{DoxyCompactList}\item +\Hypertarget{structSettings_1_1LineContent_aa2af8a274c468eb68c61cd93171748e5}\label{structSettings_1_1LineContent_aa2af8a274c468eb68c61cd93171748e5} +bool {\bfseries is\+Content} +\begin{DoxyCompactList}\small\item\em whether line is readable parameter or comment \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Contains the content of a single line in a file. + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +/home/jonat/\+Documents/01\+\_\+\+Studium/\+Num\+Sim/src/settings\+\_\+parser/settings.\+h\end{DoxyCompactItemize} diff --git a/documentation/latex/tabu_doxygen.sty b/documentation/latex/tabu_doxygen.sty new file mode 100644 index 00000000..3f17d1d0 --- /dev/null +++ b/documentation/latex/tabu_doxygen.sty @@ -0,0 +1,2557 @@ +%% +%% This is file `tabu.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% tabu.dtx (with options: `package') +%% +%% This is a generated file. +%% Copyright (FC) 2010-2011 - lppl +%% +%% tabu : 2011/02/26 v2.8 - tabu : Flexible LaTeX tabulars +%% +%% ********************************************************************************************** +%% \begin{tabu} { preamble } => default target: \linewidth or \linegoal +%% \begin{tabu} to { preamble } => target specified +%% \begin{tabu} spread { preamble } => target relative to the ``natural width'' +%% +%% tabu works in text and in math modes. +%% +%% X columns: automatic width adjustment + horizontal and vertical alignment +%% \begin{tabu} { X[4c] X[1c] X[-2ml] } +%% +%% Horizontal lines and / or leaders: +%% \hline\hline => double horizontal line +%% \firsthline\hline => for nested tabulars +%% \lasthline\hline => for nested tabulars +%% \tabucline[line spec]{column-column} => ``funny'' lines (dash/leader) +%% Automatic lines / leaders : +%% \everyrow{\hline\hline} +%% +%% Vertical lines and / or leaders: +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt blue] } +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt on 2pt off 4pt blue] } +%% +%% Fixed vertical spacing adjustment: +%% \extrarowheight= \extrarowdepth= +%% or: \extrarowsep= => may be prefixed by \global +%% +%% Dynamic vertical spacing adjustment: +%% \abovetabulinesep= \belowtabulinesep= +%% or: \tabulinesep= => may be prefixed by \global +%% +%% delarray.sty shortcuts: in math and text modes +%% \begin{tabu} .... \({ preamble }\) +%% +%% Algorithms reports: +%% \tracingtabu=1 \tracingtabu=2 +%% +%% ********************************************************************************************** +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% +%% This work consists of the main source file tabu.dtx +%% and the derived files +%% tabu.sty, tabu.pdf, tabu.ins +%% +%% tabu : Flexible LaTeX tabulars +%% lppl copyright 2010-2011 by FC +%% + +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{tabu_doxygen}[2011/02/26 v2.8 - flexible LaTeX tabulars (FC), frozen version for doxygen] +\RequirePackage{array}[2008/09/09] +\RequirePackage{varwidth}[2009/03/30] +\AtEndOfPackage{\tabu@AtEnd \let\tabu@AtEnd \@undefined} +\let\tabu@AtEnd\@empty +\def\TMP@EnsureCode#1={% + \edef\tabu@AtEnd{\tabu@AtEnd + \catcode#1 \the\catcode#1}% + \catcode#1=% +}% \TMP@EnsureCode +\TMP@EnsureCode 33 = 12 % ! +\TMP@EnsureCode 58 = 12 % : (for siunitx) +\TMP@EnsureCode124 = 12 % | +\TMP@EnsureCode 36 = 3 % $ = math shift +\TMP@EnsureCode 38 = 4 % & = tab alignment character +\TMP@EnsureCode 32 = 10 % space +\TMP@EnsureCode 94 = 7 % ^ +\TMP@EnsureCode 95 = 8 % _ +%% Constants -------------------------------------------------------- +\newcount \c@taburow \def\thetaburow {\number\c@taburow} +\newcount \tabu@nbcols +\newcount \tabu@cnt +\newcount \tabu@Xcol +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcount \tabu@alloc \tabu@alloc=\m@ne +\newcount \tabu@nested +\def\tabu@alloc@{\global\advance\tabu@alloc \@ne \tabu@nested\tabu@alloc} +\newdimen \tabu@target +\newdimen \tabu@spreadtarget +\newdimen \tabu@naturalX +\newdimen \tabucolX +\let\tabu@DELTA \@tempdimc +\let\tabu@thick \@tempdima +\let\tabu@on \@tempdimb +\let\tabu@off \@tempdimc +\newdimen \tabu@Xsum +\newdimen \extrarowdepth +\newdimen \abovetabulinesep +\newdimen \belowtabulinesep +\newdimen \tabustrutrule \tabustrutrule \z@ +\newtoks \tabu@thebody +\newtoks \tabu@footnotes +\newsavebox \tabu@box +\newsavebox \tabu@arstrutbox +\newsavebox \tabu@hleads +\newsavebox \tabu@vleads +\newif \iftabu@colortbl +\newif \iftabu@siunitx +\newif \iftabu@measuring +\newif \iftabu@spread +\newif \iftabu@negcoef +\newif \iftabu@everyrow +\def\tabu@everyrowtrue {\global\let\iftabu@everyrow \iftrue} +\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse} +\newif \iftabu@long +\newif \iftabuscantokens +\def\tabu@rescan {\tabu@verbatim \scantokens } +%% Utilities (for internal usage) ----------------------------------- +\def\tabu@gobblespace #1 {#1} +\def\tabu@gobbletoken #1#2{#1} +\def\tabu@gobbleX{\futurelet\@let@token \tabu@gobblex} +\def\tabu@gobblex{\if ^^J\noexpand\@let@token \expandafter\@gobble + \else\ifx \@sptoken\@let@token + \expandafter\tabu@gobblespace\expandafter\tabu@gobbleX + \fi\fi +}% \tabu@gobblex +\def\tabu@X{^^J} +{\obeyspaces +\global\let\tabu@spxiii= % saves an active space (for \ifx) +\gdef\tabu@@spxiii{ }} +\def\tabu@ifenvir {% only for \multicolumn + \expandafter\tabu@if@nvir\csname\@currenvir\endcsname +}% \tabu@ifenvir +\def\tabu@if@nvir #1{\csname @\ifx\tabu#1first\else + \ifx\longtabu#1first\else + second\fi\fi oftwo\endcsname +}% \tabu@ifenvir +\def\tabu@modulo #1#2{\numexpr\ifnum\numexpr#1=\z@ 0\else #1-(#1-(#2-1)/2)/(#2)*(#2)\fi} +{\catcode`\&=3 +\gdef\tabu@strtrim #1{% #1 = control sequence to trim + \ifodd 1\ifx #1\@empty \else \ifx #1\space \else 0\fi \fi + \let\tabu@c@l@r \@empty \let#1\@empty + \else \expandafter \tabu@trimspaces #1\@nnil + \fi +}% \tabu@strtrim +\gdef\tabu@trimspaces #1\@nnil{\let\tabu@c@l@r=#2\tabu@firstspace .#1& }% +\gdef\tabu@firstspace #1#2#3 &{\tabu@lastspace #2#3&} +\gdef\tabu@lastspace #1{\def #3{#1}% + \ifx #3\tabu@c@l@r \def\tabu@c@l@r{\protect\color{#1}}\expandafter\remove@to@nnil \fi + \tabu@trimspaces #1\@nnil} +}% \catcode +\def\tabu@sanitizearg #1#2{{% + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef#2{#1}\tabu@strtrim#2\@onelevel@sanitize#2% + \expandafter}\expandafter\def\expandafter#2\expandafter{#2}% +}% \tabu@sanitizearg +\def\tabu@textbar #1{\begingroup \endlinechar\m@ne \scantokens{\def\:{|}}% + \expandafter\endgroup \expandafter#1\:% !!! semi simple group !!! +}% \tabu@textbar +\def\tabu@everyrow@bgroup{\iftabu@everyrow \begingroup \else \noalign{\ifnum0=`}\fi \fi} +\def\tabu@everyrow@egroup{% + \iftabu@everyrow \expandafter \endgroup \the\toks@ + \else \ifnum0=`{\fi}% + \fi +}% \tabu@everyrow@egroup +\def\tabu@arstrut {\global\setbox\@arstrutbox \hbox{\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \z@}% +}% \tabu@arstrut +\def\tabu@rearstrut {% + \@tempdima \arraystretch\dimexpr\ht\strutbox+\extrarowheight \relax + \@tempdimb \arraystretch\dimexpr\dp\strutbox+\extrarowdepth \relax + \ifodd 1\ifdim \ht\@arstrutbox=\@tempdima + \ifdim \dp\@arstrutbox=\@tempdimb 0 \fi\fi + \tabu@mkarstrut + \fi +}% \tabu@rearstrut +\def\tabu@@DBG #1{\ifdim\tabustrutrule>\z@ \color{#1}\fi} +\def\tabu@DBG@arstrut {\global\setbox\@arstrutbox + \hbox to\z@{\hbox to\z@{\hss + {\tabu@DBG{cyan}\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \z@ + width \tabustrutrule}\kern-\tabustrutrule + {\tabu@DBG{pink}\vrule + height \z@ + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \tabustrutrule}}}% +}% \tabu@DBG@arstrut +\def\tabu@save@decl{\toks\count@ \expandafter{\the\toks\expandafter\count@ + \@nextchar}}% +\def\tabu@savedecl{\ifcat$\d@llarend\else + \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode +}% \tabu@savedecl +\def\tabu@finalstrut #1{\unskip\ifhmode\nobreak\fi\vrule height\z@ depth\z@ width\z@} +\newcommand*\tabuDisableCommands {\g@addto@macro\tabu@trialh@@k } +\let\tabu@trialh@@k \@empty +\def\tabu@nowrite #1#{{\afterassignment}\toks@} +\let\tabu@write\write +\let\tabu@immediate\immediate +\def\tabu@WRITE{\begingroup + \def\immediate\write{\aftergroup\endgroup + \tabu@immediate\tabu@write}% +}% \tabu@WRITE +\expandafter\def\expandafter\tabu@GenericError\expandafter{% + \expandafter\tabu@WRITE\GenericError} +\def\tabu@warn{\tabu@WRITE\PackageWarning{tabu}} +\def\tabu@noxfootnote [#1]{\@gobble} +\def\tabu@nocolor #1#{\@gobble} +\newcommand*\tabu@norowcolor[2][]{} +\def\tabu@maybesiunitx #1{\def\tabu@temp{#1}% + \futurelet\@let@token \tabu@m@ybesiunitx} +\def\tabu@m@ybesiunitx #1{\def\tabu@m@ybesiunitx {% + \ifx #1\@let@token \let\tabu@cellleft \@empty \let\tabu@cellright \@empty \fi + \tabu@temp}% \tabu@m@ybesiunitx +}\expandafter\tabu@m@ybesiunitx \csname siunitx_table_collect_begin:Nn\endcsname +\def\tabu@celllalign@def #1{\def\tabu@celllalign{\tabu@maybesiunitx{#1}}}% +%% Fixed vertical spacing adjustment: \extrarowsep ------------------ +\newcommand*\extrarowsep{\edef\tabu@C@extra{\the\numexpr\tabu@C@extra+1}% + \iftabu@everyrow \aftergroup\tabu@Gextra + \else \aftergroup\tabu@n@Gextra + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@extra} \tabu@extra +}% \extrarowsep +\def\tabu@extra {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setextrasep \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extra +\def\tabu@setextra #1#2{\def\tabu@temp{\tabu@extr@#1#2}\afterassignment\tabu@temp#2} +\def\tabu@extr@ #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extr@ +\def\tabu@setextrasep {\extrarowheight=\extrarowdepth + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth +}% \tabu@setextrasep +\def\tabu@Gextra{\ifx \tabu@G@extra\@empty \else {\tabu@Rextra}\fi} +\def\tabu@n@Gextra{\ifx \tabu@G@extra\@empty \else \noalign{\tabu@Rextra}\fi} +\def\tabu@Rextra{\tabu@Grestore \tabu@G@extra \tabu@C@extra} +\let\tabu@C@extra \z@ +\let\tabu@G@extra \@empty +%% Dynamic vertical spacing adjustment: \tabulinesep ---------------- +\newcommand*\tabulinesep{\edef\tabu@C@linesep{\the\numexpr\tabu@C@linesep+1}% + \iftabu@everyrow \aftergroup\tabu@Glinesep + \else \aftergroup\tabu@n@Glinesep + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@linesep} \tabu@linesep +}% \tabulinesep +\def\tabu@linesep {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setlinesep \abovetabulinesep + \fi \tabu@temp}% +}% \tabu@linesep +\def\tabu@setsep #1#2{\def\tabu@temp{\tabu@sets@p#1#2}\afterassignment\tabu@temp#2} +\def\tabu@sets@p #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep + \fi \tabu@temp}% +}% \tabu@sets@p +\def\tabu@setlinesep {\belowtabulinesep=\abovetabulinesep + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep +}% \tabu@setlinesep +\def\tabu@Glinesep{\ifx \tabu@G@linesep\@empty \else {\tabu@Rlinesep}\fi} +\def\tabu@n@Glinesep{\ifx \tabu@G@linesep\@empty \else \noalign{\tabu@Rlinesep}\fi} +\def\tabu@Rlinesep{\tabu@Grestore \tabu@G@linesep \tabu@C@linesep} +\let\tabu@C@linesep \z@ +\let\tabu@G@linesep \@empty +%% \global\extrarowsep and \global\tabulinesep ------------------- +\def\tabu@Gsave #1#2#3#4{\xdef#1{#1% + \toks#2{\toks\the\currentgrouplevel{\global#3\the#3\global#4\the#4}}}% +}% \tabu@Gsave +\def\tabu@Grestore#1#2{% + \toks#2{}#1\toks\currentgrouplevel\expandafter{\expandafter}\the\toks#2\relax + \ifcat$\the\toks\currentgrouplevel$\else + \global\let#1\@empty \global\let#2\z@ + \the\toks\currentgrouplevel + \fi +}% \tabu@Grestore +%% Setting code for every row --------------------------------------- +\newcommand*\everyrow{\tabu@everyrow@bgroup + \tabu@start \z@ \tabu@stop \z@ \tabu@evrstartstop +}% \everyrow +\def\tabu@evrstartstop {\@ifnextchar^% + {\afterassignment \tabu@evrstartstop \tabu@stop=}% + {\ifx ^\@let@token + \afterassignment\tabu@evrstartstop \tabu@start=% + \else \afterassignment\tabu@everyr@w \toks@ + \fi}% +}% \tabu@evrstartstop +\def\tabu@everyr@w {% + \xdef\tabu@everyrow{% + \noexpand\tabu@everyrowfalse + \let\noalign \relax + \noexpand\tabu@rowfontreset + \iftabu@colortbl \noexpand\tabu@rc@ \fi % \taburowcolors + \let\noexpand\tabu@docline \noexpand\tabu@docline@evr + \the\toks@ + \noexpand\tabu@evrh@@k + \noexpand\tabu@rearstrut + \global\advance\c@taburow \@ne}% + \iftabu@everyrow \toks@\expandafter + {\expandafter\def\expandafter\tabu@evr@L\expandafter{\the\toks@}\ignorespaces}% + \else \xdef\tabu@evr@G{\the\toks@}% + \fi + \tabu@everyrow@egroup +}% \tabu@everyr@w +\def\tabu@evr {\def\tabu@evrh@@k} % for internal use only +\tabu@evr{} +%% line style and leaders ------------------------------------------- +\newcommand*\newtabulinestyle [1]{% + {\@for \@tempa :=#1\do{\expandafter\tabu@newlinestyle \@tempa==\@nil}}% +}% \newtabulinestyle +\def\tabu@newlinestyle #1=#2=#3\@nil{\tabu@getline {#2}% + \tabu@sanitizearg {#1}\@tempa + \ifodd 1\ifx \@tempa\@empty \ifdefined\tabu@linestyle@ 0 \fi\fi + \global\expandafter\let + \csname tabu@linestyle@\@tempa \endcsname =\tabu@thestyle \fi +}% \tabu@newlinestyle +\newcommand*\tabulinestyle [1]{\tabu@everyrow@bgroup \tabu@getline{#1}% + \iftabu@everyrow + \toks@\expandafter{\expandafter \def \expandafter + \tabu@ls@L\expandafter{\tabu@thestyle}\ignorespaces}% + \gdef\tabu@ls@{\tabu@ls@L}% + \else + \global\let\tabu@ls@G \tabu@thestyle + \gdef\tabu@ls@{\tabu@ls@G}% + \fi + \tabu@everyrow@egroup +}% \tabulinestyle +\newcommand*\taburulecolor{\tabu@everyrow@bgroup \tabu@textbar \tabu@rulecolor} +\def\tabu@rulecolor #1{\toks@{}% + \def\tabu@temp #1##1#1{\tabu@ruledrsc{##1}}\@ifnextchar #1% + \tabu@temp + \tabu@rulearc +}% \tabu@rulecolor +\def\tabu@ruledrsc #1{\edef\tabu@temp{#1}\tabu@strtrim\tabu@temp + \ifx \tabu@temp\@empty \def\tabu@temp{\tabu@rule@drsc@ {}{}}% + \else \edef\tabu@temp{\noexpand\tabu@rule@drsc@ {}{\tabu@temp}}% + \fi + \tabu@temp +}% \tabu@ruledrsc@ +\def\tabu@ruledrsc@ #1#{\tabu@rule@drsc@ {#1}} +\def\tabu@rule@drsc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@{\let\CT@drsc@ \relax}% + \else \toks@{\def\CT@drsc@{\color #1{#2}}}% + \fi + \else + \ifx \\#1#2\\\global\let\CT@drsc@ \relax + \else \gdef\CT@drsc@{\color #1{#2}}% + \fi + \fi + \tabu@rulearc +}% \tabu@rule@drsc@ +\def\tabu@rulearc #1#{\tabu@rule@arc@ {#1}} +\def\tabu@rule@arc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@\expandafter{\the\toks@ \def\CT@arc@{}}% + \else \toks@\expandafter{\the\toks@ \def\CT@arc@{\color #1{#2}}}% + \fi + \toks@\expandafter{\the\toks@ + \let\tabu@arc@L \CT@arc@ + \let\tabu@drsc@L \CT@drsc@ + \ignorespaces}% + \else + \ifx \\#1#2\\\gdef\CT@arc@{}% + \else \gdef\CT@arc@{\color #1{#2}}% + \fi + \global\let\tabu@arc@G \CT@arc@ + \global\let\tabu@drsc@G \CT@drsc@ + \fi + \tabu@everyrow@egroup +}% \tabu@rule@arc@ +\def\taburowcolors {\tabu@everyrow@bgroup \@testopt \tabu@rowcolors 1} +\def\tabu@rowcolors [#1]#2#{\tabu@rowc@lors{#1}{#2}} +\def\tabu@rowc@lors #1#2#3{% + \toks@{}\@defaultunits \count@ =\number0#2\relax \@nnil + \@defaultunits \tabu@start =\number0#1\relax \@nnil + \ifnum \count@<\tw@ \count@=\tw@ \fi + \advance\tabu@start \m@ne + \ifnum \tabu@start<\z@ \tabu@start \z@ \fi + \tabu@rowcolorseries #3\in@..\in@ \@nnil +}% \tabu@rowcolors +\def\tabu@rowcolorseries #1..#2\in@ #3\@nnil {% + \ifx \in@#1\relax + \iftabu@everyrow \toks@{\def\tabu@rc@{}\let\tabu@rc@L \tabu@rc@}% + \else \gdef\tabu@rc@{}\global\let\tabu@rc@G \tabu@rc@ + \fi + \else + \ifx \\#2\\\tabu@rowcolorserieserror \fi + \tabu@sanitizearg{#1}\tabu@temp + \tabu@sanitizearg{#2}\@tempa + \advance\count@ \m@ne + \iftabu@everyrow + \def\tabu@rc@ ##1##2##3##4{\def\tabu@rc@{% + \ifnum ##2=\c@taburow + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{##3}{##4}\fi + \ifnum \c@taburow<##2 \else + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\z@ + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}\fi}% + }\edef\x{\noexpand\tabu@rc@ {\the\count@} + {\the\tabu@start} + {\tabu@temp} + {\@tempa}% + }\x + \toks@\expandafter{\expandafter\def\expandafter\tabu@rc@\expandafter{\tabu@rc@}}% + \toks@\expandafter{\the\toks@ \let\tabu@rc@L \tabu@rc@ \ignorespaces}% + \else % inside \noalign + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{\tabu@temp}{\@tempa}% + \expandafter\resetcolorseries\expandafter[\the\count@]{tabu@rcseries@\the\tabu@nested}% + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \let\noalign \relax \rowcolor{tabu@rc@\the\tabu@nested}% + \def\tabu@rc@ ##1##2{\gdef\tabu@rc@{% + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\@ne + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}}% + }\edef\x{\noexpand\tabu@rc@{\the\count@}{\the\c@taburow}}\x + \global\let\tabu@rc@G \tabu@rc@ + \fi + \fi + \tabu@everyrow@egroup +}% \tabu@rowcolorseries +\tabuDisableCommands {\let\tabu@rc@ \@empty } +\def\tabu@rowcolorserieserror {\PackageError{tabu} + {Invalid syntax for \string\taburowcolors + \MessageBreak Please look at the documentation!}\@ehd +}% \tabu@rowcolorserieserror +\newcommand*\tabureset {% + \tabulinesep=\z@ \extrarowsep=\z@ \extratabsurround=\z@ + \tabulinestyle{}\everyrow{}\taburulecolor||{}\taburowcolors{}% +}% \tabureset +%% Parsing the line styles ------------------------------------------ +\def\tabu@getline #1{\begingroup + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef\tabu@temp{#1}\tabu@sanitizearg{#1}\@tempa + \let\tabu@thestyle \relax + \ifcsname tabu@linestyle@\@tempa \endcsname + \edef\tabu@thestyle{\endgroup + \def\tabu@thestyle{\expandafter\noexpand + \csname tabu@linestyle@\@tempa\endcsname}% + }\tabu@thestyle + \else \expandafter\tabu@definestyle \tabu@temp \@nil + \fi +}% \tabu@getline +\def\tabu@definestyle #1#2\@nil {\endlinechar \m@ne \makeatletter + \tabu@thick \maxdimen \tabu@on \maxdimen \tabu@off \maxdimen + \let\tabu@c@lon \@undefined \let\tabu@c@loff \@undefined + \ifodd 1\ifcat .#1\else\ifcat\relax #1\else 0\fi\fi % catcode 12 or non expandable cs + \def\tabu@temp{\tabu@getparam{thick}}% + \else \def\tabu@temp{\tabu@getparam{thick}\maxdimen}% + \fi + {% + \let\tabu@ \relax + \def\:{\obeyspaces \tabu@oXIII \tabu@commaXIII \edef\:}% (space active \: happy ;-)) + \scantokens{\:{\tabu@temp #1#2 \tabu@\tabu@}}% + \expandafter}\expandafter + \def\expandafter\:\expandafter{\:}% line spec rewritten now ;-) + \def\;{\def\:}% + \scantokens\expandafter{\expandafter\;\expandafter{\:}}% space is now inactive (catcode 10) + \let\tabu@ \tabu@getcolor \:% all arguments are ready now ;-) + \ifdefined\tabu@c@lon \else \let\tabu@c@lon\@empty \fi + \ifx \tabu@c@lon\@empty \def\tabu@c@lon{\CT@arc@}\fi + \ifdefined\tabu@c@loff \else \let\tabu@c@loff \@empty \fi + \ifdim \tabu@on=\maxdimen \ifdim \tabu@off<\maxdimen + \tabu@on \tabulineon \fi\fi + \ifdim \tabu@off=\maxdimen \ifdim \tabu@on<\maxdimen + \tabu@off \tabulineoff \fi\fi + \ifodd 1\ifdim \tabu@off=\maxdimen \ifdim \tabu@on=\maxdimen 0 \fi\fi + \in@true % + \else \in@false % + \fi + \ifdim\tabu@thick=\maxdimen \def\tabu@thick{\arrayrulewidth}% + \else \edef\tabu@thick{\the\tabu@thick}% + \fi + \edef \tabu@thestyle ##1##2{\endgroup + \def\tabu@thestyle{% + \ifin@ \noexpand\tabu@leadersstyle {\tabu@thick} + {\the\tabu@on}{##1} + {\the\tabu@off}{##2}% + \else \noexpand\tabu@rulesstyle + {##1\vrule width \tabu@thick}% + {##1\leaders \hrule height \tabu@thick \hfil}% + \fi}% + }\expandafter \expandafter + \expandafter \tabu@thestyle \expandafter + \expandafter \expandafter + {\expandafter\tabu@c@lon\expandafter}\expandafter{\tabu@c@loff}% +}% \tabu@definestyle +{\catcode`\O=\active \lccode`\O=`\o \catcode`\,=\active + \lowercase{\gdef\tabu@oXIII {\catcode`\o=\active \let O=\tabu@oxiii}} + \gdef\tabu@commaXIII {\catcode`\,=\active \let ,=\space} +}% \catcode +\def\tabu@oxiii #1{% + \ifcase \ifx n#1\z@ \else + \ifx f#1\@ne\else + \tw@ \fi\fi + \expandafter\tabu@onxiii + \or \expandafter\tabu@ofxiii + \else o% + \fi#1}% +\def\tabu@onxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx \tabu@spxiii#2\@ne\else + \tw@ \fi\fi\fi + \tabu@getparam{on}#2\expandafter\@gobble + \or \expandafter\tabu@onxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}}% +\def\tabu@ofxiii #1#2{% + \ifx #2f\expandafter\tabu@offxiii + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@offxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx\tabu@spxiii#2\@ne \else + \tw@ \fi\fi\fi + \tabu@getparam{off}#2\expandafter\@gobble + \or \expandafter\tabu@offxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@getparam #1{\tabu@ \csname tabu@#1\endcsname=} +\def\tabu@getcolor #1{% \tabu@ <- \tabu@getcolor after \edef + \ifx \tabu@#1\else % no more spec + \let\tabu@theparam=#1\afterassignment \tabu@getc@l@r #1\fi +}% \tabu@getcolor +\def\tabu@getc@l@r #1\tabu@ {% + \def\tabu@temp{#1}\tabu@strtrim \tabu@temp + \ifx \tabu@temp\@empty + \else%\ifcsname \string\color@\tabu@temp \endcsname % if the color exists + \ifx \tabu@theparam \tabu@off \let\tabu@c@loff \tabu@c@l@r + \else \let\tabu@c@lon \tabu@c@l@r + \fi + %\else \tabu@warncolour{\tabu@temp}% + \fi%\fi + \tabu@ % next spec +}% \tabu@getc@l@r +\def\tabu@warncolour #1{\PackageWarning{tabu} + {Color #1 is not defined. Default color used}% +}% \tabu@warncolour +\def\tabu@leadersstyle #1#2#3#4#5{\def\tabu@leaders{{#1}{#2}{#3}{#4}{#5}}% + \ifx \tabu@leaders\tabu@leaders@G \else + \tabu@LEADERS{#1}{#2}{#3}{#4}{#5}\fi +}% \tabu@leadersstyle +\def\tabu@rulesstyle #1#2{\let\tabu@leaders \@undefined + \gdef\tabu@thevrule{#1}\gdef\tabu@thehrule{#2}% +}% \tabu@rulesstyle +%% The leaders boxes ------------------------------------------------ +\def\tabu@LEADERS #1#2#3#4#5{%% width, dash, dash color, gap, gap color + {\let\color \tabu@color % => during trials -> \color = \tabu@nocolor + {% % but the leaders boxes should have colors ! + \def\@therule{\vrule}\def\@thick{height}\def\@length{width}% + \def\@box{\hbox}\def\@unbox{\unhbox}\def\@elt{\wd}% + \def\@skip{\hskip}\def\@ss{\hss}\def\tabu@leads{\tabu@hleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thehleaders \tabu@theleaders + }% + {% + \def\@therule{\hrule}\def\@thick{width}\def\@length{height}% + \def\@box{\vbox}\def\@unbox{\unvbox}\def\@elt{\ht}% + \def\@skip{\vskip}\def\@ss{\vss}\def\tabu@leads{\tabu@vleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thevleaders \tabu@theleaders + }% + \gdef\tabu@leaders@G{{#1}{#2}{#3}{#4}{#5}}% + }% +}% \tabu@LEADERS +\def\tabu@therule #1#2{\@therule \@thick#1\@length\dimexpr#2/2 \@depth\z@} +\def\tabu@l@@d@rs #1#2#3#4#5{%% width, dash, dash color, gap, gap color + \global\setbox \tabu@leads=\@box{% + {#3\tabu@therule{#1}{#2}}% + \ifx\\#5\\\@skip#4\else{#5\tabu@therule{#1}{#4*2}}\fi + {#3\tabu@therule{#1}{#2}}}% + \global\setbox\tabu@leads=\@box to\@elt\tabu@leads{\@ss + {#3\tabu@therule{#1}{#2}}\@unbox\tabu@leads}% + \edef\tabu@theleaders ##1{\def\noexpand\tabu@theleaders {% + {##1\tabu@therule{#1}{#2}}% + \xleaders \copy\tabu@leads \@ss + \tabu@therule{0pt}{-#2}{##1\tabu@therule{#1}{#2}}}% + }\tabu@theleaders{#3}% +}% \tabu@l@@d@rs +%% \tabu \endtabu \tabu* \longtabu \endlongtabu \longtabu* ---------- +\newcommand*\tabu {\tabu@longfalse + \ifmmode \def\tabu@ {\array}\def\endtabu {\endarray}% + \else \def\tabu@ {\tabu@tabular}\def\endtabu {\endtabular}\fi + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endtabu*\endcsname{\endtabu}% + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {tabu} +\let\tabu@tabular \tabular % +\expandafter\def\csname tabu*\endcsname{\tabuscantokenstrue \tabu} +\newcommand*\longtabu {\tabu@longtrue + \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi + \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}% + \LTchunksize=\@M + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endlongtabu*\endcsname{\endlongtabu}% + \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array struts } + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {longtabu} +\expandafter\def\csname longtabu*\endcsname{\tabuscantokenstrue \longtabu} +\def\tabu@nolongtabu{\PackageError{tabu} + {longtabu requires the longtable package}\@ehd} +%% Read the target and then : \tabular or \@array ------------------ +\def\tabu@settarget {\futurelet\@let@token \tabu@sett@rget } +\def\tabu@sett@rget {\tabu@target \z@ + \ifcase \ifx \bgroup\@let@token \z@ \else + \ifx \@sptoken\@let@token \@ne \else + \if t\@let@token \tw@ \else + \if s\@let@token \thr@@\else + \z@\fi\fi\fi\fi + \expandafter\tabu@begin + \or \expandafter\tabu@gobblespace\expandafter\tabu@settarget + \or \expandafter\tabu@to + \or \expandafter\tabu@spread + \fi +}% \tabu@sett@rget +\def\tabu@to to{\def\tabu@halignto{to}\tabu@gettarget} +\def\tabu@spread spread{\tabu@spreadtrue\def\tabu@halignto{spread}\tabu@gettarget} +\def\tabu@gettarget {\afterassignment\tabu@linegoaltarget \tabu@target } +\def\tabu@linegoaltarget {\futurelet\tabu@temp \tabu@linegoalt@rget } +\def\tabu@linegoalt@rget {% + \ifx \tabu@temp\LNGL@setlinegoal + \LNGL@setlinegoal \expandafter \@firstoftwo \fi % @gobbles \LNGL@setlinegoal + \tabu@begin +}% \tabu@linegoalt@rget +\def\tabu@begin #1#{% + \iftabu@measuring \expandafter\tabu@nestedmeasure \fi + \ifdim \tabu@target=\z@ \let\tabu@halignto \@empty + \else \edef\tabu@halignto{\tabu@halignto\the\tabu@target}% + \fi + \@testopt \tabu@tabu@ \tabu@aligndefault #1\@nil +}% \tabu@begin +\long\def\tabu@tabu@ [#1]#2\@nil #3{\tabu@setup + \def\tabu@align {#1}\def\tabu@savedpream{\NC@find #3}% + \tabu@ [\tabu@align ]#2{#3\tabu@rewritefirst }% +}% \tabu@tabu@ +\def\tabu@nestedmeasure {% + \ifodd 1\iftabu@spread \else \ifdim\tabu@target=\z@ \else 0 \fi\fi\relax + \tabu@spreadtrue + \else \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}% + \expandafter\tabu@collectbody\expandafter\tabu@quickrule + \expandafter\endgroup + \fi +}% \tabu@nestedmeasure +\def\tabu@quickrule {\indent\vrule height\z@ depth\z@ width\tabu@target} +%% \tabu@setup \tabu@init \tabu@indent +\def\tabu@setup{\tabu@alloc@ + \ifcase \tabu@nested + \ifmmode \else \iftabu@spread\else \ifdim\tabu@target=\z@ + \let\tabu@afterendpar \par + \fi\fi\fi + \def\tabu@aligndefault{c}\tabu@init \tabu@indent + \else % + \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth + \fi + \let\tabu@thetarget \tabudefaulttarget \let\tabu@restored \@undefined + \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}% + \everycr{}\let\@startpbox \tabu@startpbox % for nested tabu inside longtabu... + \let\@endpbox \tabu@endpbox % idem " " " " " " + \let\@tabarray \tabu@tabarray % idem " " " " " " + \tabu@setcleanup \tabu@setreset +}% \tabu@setup +\def\tabu@init{\tabu@starttimer \tabu@measuringfalse + \edef\tabu@hfuzz {\the\dimexpr\hfuzz+1sp}\global\tabu@footnotes{}% + \let\firsthline \tabu@firsthline \let\lasthline \tabu@lasthline + \let\firstline \tabu@firstline \let\lastline \tabu@lastline + \let\hline \tabu@hline \let\@xhline \tabu@xhline + \let\color \tabu@color \let\@arstrutbox \tabu@arstrutbox + \iftabu@colortbl\else\let\LT@@hline \tabu@LT@@hline \fi + \tabu@trivlist % + \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext + \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering + \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft + \let\tabudecimal \tabu@tabudecimal \let\Centering \tabu@Centering + \let\RaggedRight \tabu@RaggedRight \let\RaggedLeft \tabu@RaggedLeft + \let\justifying \tabu@justifying \let\rowfont \tabu@rowfont + \let\fbox \tabu@fbox \let\color@b@x \tabu@color@b@x + \let\tabu@@everycr \everycr \let\tabu@@everypar \everypar + \let\tabu@prepnext@tokORI \prepnext@tok\let\prepnext@tok \tabu@prepnext@tok + \let\tabu@multicolumnORI\multicolumn \let\multicolumn \tabu@multicolumn + \let\tabu@startpbox \@startpbox % for nested tabu inside longtabu pfff !!! + \let\tabu@endpbox \@endpbox % idem " " " " " " " + \let\tabu@tabarray \@tabarray % idem " " " " " " " + \tabu@adl@fix \let\endarray \tabu@endarray % colortbl & arydshln (delarray) + \iftabu@colortbl\CT@everycr\expandafter{\expandafter\iftabu@everyrow \the\CT@everycr \fi}\fi +}% \tabu@init +\def\tabu@indent{% correction for indentation + \ifdim \parindent>\z@\ifx \linewidth\tabudefaulttarget + \everypar\expandafter{% + \the\everypar\everypar\expandafter{\the\everypar}% + \setbox\z@=\lastbox + \ifdim\wd\z@>\z@ \edef\tabu@thetarget + {\the\dimexpr -\wd\z@+\tabudefaulttarget}\fi + \box\z@}% + \fi\fi +}% \tabu@indent +\def\tabu@setcleanup {% saves last global assignments + \ifodd 1\ifmmode \else \iftabu@long \else 0\fi\fi\relax + \def\tabu@aftergroupcleanup{% + \def\tabu@aftergroupcleanup{\aftergroup\tabu@cleanup}}% + \else + \def\tabu@aftergroupcleanup{% + \aftergroup\aftergroup\aftergroup\tabu@cleanup + \let\tabu@aftergroupcleanup \relax}% + \fi + \let\tabu@arc@Gsave \tabu@arc@G + \let\tabu@arc@G \tabu@arc@L % + \let\tabu@drsc@Gsave \tabu@drsc@G + \let\tabu@drsc@G \tabu@drsc@L % + \let\tabu@ls@Gsave \tabu@ls@G + \let\tabu@ls@G \tabu@ls@L % + \let\tabu@rc@Gsave \tabu@rc@G + \let\tabu@rc@G \tabu@rc@L % + \let\tabu@evr@Gsave \tabu@evr@G + \let\tabu@evr@G \tabu@evr@L % + \let\tabu@celllalign@save \tabu@celllalign + \let\tabu@cellralign@save \tabu@cellralign + \let\tabu@cellleft@save \tabu@cellleft + \let\tabu@cellright@save \tabu@cellright + \let\tabu@@celllalign@save \tabu@@celllalign + \let\tabu@@cellralign@save \tabu@@cellralign + \let\tabu@@cellleft@save \tabu@@cellleft + \let\tabu@@cellright@save \tabu@@cellright + \let\tabu@rowfontreset@save \tabu@rowfontreset + \let\tabu@@rowfontreset@save\tabu@@rowfontreset + \let\tabu@rowfontreset \@empty + \edef\tabu@alloc@save {\the\tabu@alloc}% restore at \tabu@reset + \edef\c@taburow@save {\the\c@taburow}% + \edef\tabu@naturalX@save {\the\tabu@naturalX}% + \let\tabu@naturalXmin@save \tabu@naturalXmin + \let\tabu@naturalXmax@save \tabu@naturalXmax + \let\tabu@mkarstrut@save \tabu@mkarstrut + \edef\tabu@clarstrut{% + \extrarowheight \the\dimexpr \ht\@arstrutbox-\ht\strutbox \relax + \extrarowdepth \the\dimexpr \dp\@arstrutbox-\dp\strutbox \relax + \let\noexpand\@arraystretch \@ne \noexpand\tabu@rearstrut}% +}% \tabu@setcleanup +\def\tabu@cleanup {\begingroup + \globaldefs\@ne \tabu@everyrowtrue + \let\tabu@arc@G \tabu@arc@Gsave + \let\CT@arc@ \tabu@arc@G + \let\tabu@drsc@G \tabu@drsc@Gsave + \let\CT@drsc@ \tabu@drsc@G + \let\tabu@ls@G \tabu@ls@Gsave + \let\tabu@ls@ \tabu@ls@G + \let\tabu@rc@G \tabu@rc@Gsave + \let\tabu@rc@ \tabu@rc@G + \let\CT@do@color \relax + \let\tabu@evr@G \tabu@evr@Gsave + \let\tabu@celllalign \tabu@celllalign@save + \let\tabu@cellralign \tabu@cellralign@save + \let\tabu@cellleft \tabu@cellleft@save + \let\tabu@cellright \tabu@cellright@save + \let\tabu@@celllalign \tabu@@celllalign@save + \let\tabu@@cellralign \tabu@@cellralign@save + \let\tabu@@cellleft \tabu@@cellleft@save + \let\tabu@@cellright \tabu@@cellright@save + \let\tabu@rowfontreset \tabu@rowfontreset@save + \let\tabu@@rowfontreset \tabu@@rowfontreset@save + \tabu@naturalX =\tabu@naturalX@save + \let\tabu@naturalXmax \tabu@naturalXmax@save + \let\tabu@naturalXmin \tabu@naturalXmin@save + \let\tabu@mkarstrut \tabu@mkarstrut@save + \c@taburow =\c@taburow@save + \ifcase \tabu@nested \tabu@alloc \m@ne\fi + \endgroup % + \ifcase \tabu@nested + \the\tabu@footnotes \global\tabu@footnotes{}% + \tabu@afterendpar \tabu@elapsedtime + \fi + \tabu@clarstrut + \everyrow\expandafter {\tabu@evr@G}% +}% \tabu@cleanup +\let\tabu@afterendpar \relax +\def\tabu@setreset {% + \edef\tabu@savedparams {% \relax for \tabu@message@save + \ifmmode \col@sep \the\arraycolsep + \else \col@sep \the\tabcolsep \fi \relax + \arrayrulewidth \the\arrayrulewidth \relax + \doublerulesep \the\doublerulesep \relax + \extratabsurround \the\extratabsurround \relax + \extrarowheight \the\extrarowheight \relax + \extrarowdepth \the\extrarowdepth \relax + \abovetabulinesep \the\abovetabulinesep \relax + \belowtabulinesep \the\belowtabulinesep \relax + \def\noexpand\arraystretch{\arraystretch}% + \ifdefined\minrowclearance \minrowclearance\the\minrowclearance\relax\fi}% + \begingroup + \@temptokena\expandafter{\tabu@savedparams}% => only for \savetabu / \usetabu + \ifx \tabu@arc@L\relax \else \tabu@setsave \tabu@arc@L \fi + \ifx \tabu@drsc@L\relax \else \tabu@setsave \tabu@drsc@L \fi + \tabu@setsave \tabu@ls@L \tabu@setsave \tabu@evr@L + \expandafter \endgroup \expandafter + \def\expandafter\tabu@saved@ \expandafter{\the\@temptokena + \let\tabu@arc@G \tabu@arc@L + \let\tabu@drsc@G \tabu@drsc@L + \let\tabu@ls@G \tabu@ls@L + \let\tabu@rc@G \tabu@rc@L + \let\tabu@evr@G \tabu@evr@L}% + \def\tabu@reset{\tabu@savedparams + \tabu@everyrowtrue \c@taburow \z@ + \let\CT@arc@ \tabu@arc@L + \let\CT@drsc@ \tabu@drsc@L + \let\tabu@ls@ \tabu@ls@L + \let\tabu@rc@ \tabu@rc@L + \global\tabu@alloc \tabu@alloc@save + \everyrow\expandafter{\tabu@evr@L}}% +}% \tabu@reset +\def\tabu@setsave #1{\expandafter\tabu@sets@ve #1\@nil{#1}} +\long\def\tabu@sets@ve #1\@nil #2{\@temptokena\expandafter{\the\@temptokena \def#2{#1}}} +%% The Rewriting Process ------------------------------------------- +\def\tabu@newcolumntype #1{% + \expandafter\tabu@new@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@newcolumntype +\def\tabu@new@columntype #1#2#3{% + \def#1##1#3{\NC@{##1}}% + \let#2\relax \newcommand*#2% +}% \tabu@new@columntype +\def\tabu@privatecolumntype #1{% + \expandafter\tabu@private@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\expandafter\endcsname + \csname tabu@NC@find@\string#1\expandafter\endcsname + \csname tabu@NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@privatecolumntype +\def\tabu@private@columntype#1#2#3#4{% + \g@addto@macro\tabu@privatecolumns{\let#1#3\let#2#4}% + \tabu@new@columntype#3#4% +}% \tabu@private@columntype +\let\tabu@privatecolumns \@empty +\newcommand*\tabucolumn [1]{\expandafter \def \expandafter + \tabu@highprioritycolumns\expandafter{\tabu@highprioritycolumns + \NC@do #1}}% +\let\tabu@highprioritycolumns \@empty +%% The | ``column'' : rewriting process -------------------------- +\tabu@privatecolumntype |{\tabu@rewritevline} +\newcommand*\tabu@rewritevline[1][]{\tabu@vlinearg{#1}% + \expandafter \NC@find \tabu@rewritten} +\def\tabu@lines #1{% + \ifx|#1\else \tabu@privatecolumntype #1{\tabu@rewritevline}\fi + \NC@list\expandafter{\the\NC@list \NC@do #1}% +}% \tabu@lines@ +\def\tabu@vlinearg #1{% + \ifx\\#1\\\def\tabu@thestyle {\tabu@ls@}% + \else\tabu@getline {#1}% + \fi + \def\tabu@rewritten ##1{\def\tabu@rewritten{!{##1\tabu@thevline}}% + }\expandafter\tabu@rewritten\expandafter{\tabu@thestyle}% + \expandafter \tabu@keepls \tabu@thestyle \@nil +}% \tabu@vlinearg +\def\tabu@keepls #1\@nil{% + \ifcat $\@cdr #1\@nil $% + \ifx \relax#1\else + \ifx \tabu@ls@#1\else + \let#1\relax + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@savels\noexpand#1}\fi\fi\fi +}% \tabu@keepls +\def\tabu@thevline {\begingroup + \ifdefined\tabu@leaders + \setbox\@tempboxa=\vtop to\dimexpr + \ht\@arstrutbox+\dp\@arstrutbox{{\tabu@thevleaders}}% + \ht\@tempboxa=\ht\@arstrutbox \dp\@tempboxa=\dp\@arstrutbox + \box\@tempboxa + \else + \tabu@thevrule + \fi \endgroup +}% \tabu@thevline +\def\tabu@savels #1{% + \expandafter\let\csname\string#1\endcsname #1% + \expandafter\def\expandafter\tabu@reset\expandafter{\tabu@reset + \tabu@resetls#1}}% +\def\tabu@resetls #1{\expandafter\let\expandafter#1\csname\string#1\endcsname}% +%% \multicolumn inside tabu environment ----------------------------- +\tabu@newcolumntype \tabu@rewritemulticolumn{% + \aftergroup \tabu@endrewritemulticolumn % after \@mkpream group + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \tabu@savedecl + \tabu@privatecolumns + \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}% + \let\tabu@savels \relax + \NC@find +}% \tabu@rewritemulticolumn +\def\tabu@endrewritemulticolumn{\gdef\tabu@mkpreambuffer{}\endgroup} +\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI} +\long\def\tabu@multic@lumn #1#2#3{\multispan{#1}\begingroup + \tabu@everyrowtrue + \NC@list{\NC@do \tabu@rewritemulticolumn}% + \expandafter\@gobbletwo % gobbles \multispan{#1} + \tabu@multicolumnORI{#1}{\tabu@rewritemulticolumn #2}% + {\iftabuscantokens \tabu@rescan \else \expandafter\@firstofone \fi + {#3}}% +}% \tabu@multic@lumn +%% The X column(s): rewriting process ----------------------------- +\tabu@privatecolumntype X[1][]{\begingroup \tabu@siunitx{\endgroup \tabu@rewriteX {#1}}} +\def\tabu@nosiunitx #1{#1{}{}\expandafter \NC@find \tabu@rewritten } +\def\tabu@siunitx #1{\@ifnextchar \bgroup + {\tabu@rewriteX@Ss{#1}} + {\tabu@nosiunitx{#1}}} +\def\tabu@rewriteX@Ss #1#2{\@temptokena{}% + \@defaultunits \let\tabu@temp =#2\relax\@nnil + \ifodd 1\ifx S\tabu@temp \else \ifx s\tabu@temp \else 0 \fi\fi + \def\NC@find{\def\NC@find >####1####2<####3\relax{#1 {####1}{####3}% + }\expandafter\NC@find \the\@temptokena \relax + }\expandafter\NC@rewrite@S \@gobble #2\relax + \else \tabu@siunitxerror + \fi + \expandafter \NC@find \tabu@rewritten +}% \tabu@rewriteX@Ss +\def\tabu@siunitxerror {\PackageError{tabu}{Not a S nor s column ! + \MessageBreak X column can only embed siunitx S or s columns}\@ehd +}% \tabu@siunitxerror +\def\tabu@rewriteX #1#2#3{\tabu@Xarg {#1}{#2}{#3}% + \iftabu@measuring + \else \tabu@measuringtrue % first X column found in the preamble + \let\@halignto \relax \let\tabu@halignto \relax + \iftabu@spread \tabu@spreadtarget \tabu@target \tabu@target \z@ + \else \tabu@spreadtarget \z@ \fi + \ifdim \tabu@target=\z@ + \setlength\tabu@target \tabu@thetarget + \tabu@message{\tabu@message@defaulttarget}% + \else \tabu@message{\tabu@message@target}\fi + \fi +}% \tabu@rewriteX +\def\tabu@rewriteXrestore #1#2#3{\let\@halignto \relax + \def\tabu@rewritten{l}} +\def\tabu@Xarg #1#2#3{% + \advance\tabu@Xcol \@ne \let\tabu@Xlcr \@empty + \let\tabu@Xdisp \@empty \let\tabu@Xmath \@empty + \ifx\\#1\\% + \def\tabu@rewritten{p}\tabucolX \p@ % + \else + \let\tabu@rewritten \@empty \let\tabu@temp \@empty \tabucolX \z@ + \tabu@Xparse {}#1\relax + \fi + \tabu@Xrewritten{#2}{#3}% +}% \tabu@Xarg +\def\tabu@Xparse #1{\futurelet\@let@token \tabu@Xtest} +\expandafter\def\expandafter\tabu@Xparsespace\space{\tabu@Xparse{}} +\def\tabu@Xtest{% + \ifcase \ifx \relax\@let@token \z@ \else + \if ,\@let@token \m@ne\else + \if p\@let@token 1\else + \if m\@let@token 2\else + \if b\@let@token 3\else + \if l\@let@token 4\else + \if c\@let@token 5\else + \if r\@let@token 6\else + \if j\@let@token 7\else + \if L\@let@token 8\else + \if C\@let@token 9\else + \if R\@let@token 10\else + \if J\@let@token 11\else + \ifx \@sptoken\@let@token 12\else + \if .\@let@token 13\else + \if -\@let@token 13\else + \ifcat $\@let@token 14\else + 15\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \or \tabu@Xtype {p}% + \or \tabu@Xtype {m}% + \or \tabu@Xtype {b}% + \or \tabu@Xalign \raggedright\relax + \or \tabu@Xalign \centering\relax + \or \tabu@Xalign \raggedleft\relax + \or \tabu@Xalign \tabu@justify\relax + \or \tabu@Xalign \RaggedRight\raggedright + \or \tabu@Xalign \Centering\centering + \or \tabu@Xalign \RaggedLeft\raggedleft + \or \tabu@Xalign \justifying\tabu@justify + \or \expandafter \tabu@Xparsespace + \or \expandafter \tabu@Xcoef + \or \expandafter \tabu@Xm@th + \or \tabu@Xcoef{}% + \else\expandafter \tabu@Xparse + \fi +}% \tabu@Xtest +\def\tabu@Xalign #1#2{% + \ifx \tabu@Xlcr\@empty \else \PackageWarning{tabu} + {Duplicate horizontal alignment specification}\fi + \ifdefined#1\def\tabu@Xlcr{#1}\let#1\relax + \else \def\tabu@Xlcr{#2}\let#2\relax\fi + \expandafter\tabu@Xparse +}% \tabu@Xalign +\def\tabu@Xtype #1{% + \ifx \tabu@rewritten\@empty \else \PackageWarning{tabu} + {Duplicate vertical alignment specification}\fi + \def\tabu@rewritten{#1}\expandafter\tabu@Xparse +}% \tabu@Xtype +\def\tabu@Xcoef#1{\edef\tabu@temp{\tabu@temp#1}% + \afterassignment\tabu@Xc@ef \tabu@cnt\number\if-#10\fi +}% \tabu@Xcoef +\def\tabu@Xc@ef{\advance\tabucolX \tabu@temp\the\tabu@cnt\p@ + \tabu@Xparse{}% +}% \tabu@Xc@ef +\def\tabu@Xm@th #1{\futurelet \@let@token \tabu@Xd@sp} +\def\tabu@Xd@sp{\let\tabu@Xmath=$% + \ifx $\@let@token \def\tabu@Xdisp{\displaystyle}% + \expandafter\tabu@Xparse + \else \expandafter\tabu@Xparse\expandafter{\expandafter}% + \fi +}% \tabu@Xd@sp +\def\tabu@Xrewritten {% + \ifx \tabu@rewritten\@empty \def\tabu@rewritten{p}\fi + \ifdim \tabucolX<\z@ \tabu@negcoeftrue + \else\ifdim \tabucolX=\z@ \tabucolX \p@ + \fi\fi + \edef\tabu@temp{{\the\tabu@Xcol}{\tabu@strippt\tabucolX}}% + \edef\tabu@Xcoefs{\tabu@Xcoefs \tabu@ \tabu@temp}% + \edef\tabu@rewritten ##1##2{\def\noexpand\tabu@rewritten{% + >{\tabu@Xlcr \ifx$\tabu@Xmath$\tabu@Xdisp\fi ##1}% + \tabu@rewritten {\tabu@hsize \tabu@temp}% + <{##2\ifx$\tabu@Xmath$\fi}}% + }\tabu@rewritten +}% \tabu@Xrewritten +\def\tabu@hsize #1#2{% + \ifdim #2\p@<\z@ + \ifdim \tabucolX=\maxdimen \tabu@wd{#1}\else + \ifdim \tabu@wd{#1}<-#2\tabucolX \tabu@wd{#1}\else -#2\tabucolX\fi + \fi + \else #2\tabucolX + \fi +}% \tabu@hsize +%% \usetabu and \preamble: rewriting process --------------------- +\tabu@privatecolumntype \usetabu [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\let\tabu@rewriteX \tabu@rewriteXrestore + \csname tabu@saved@\string#1\expandafter\endcsname\expandafter\@ne}% + \fi +}% \NC@rewrite@\usetabu +\tabu@privatecolumntype \preamble [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\csname tabu@saved@\string#1\expandafter\endcsname\expandafter\z@}% + \fi +}% \NC@rewrite@\preamble +%% Controlling the rewriting process ------------------------------- +\tabu@newcolumntype \tabu@rewritefirst{% + \iftabu@long \aftergroup \tabu@longpream % + \else \aftergroup \tabu@pream + \fi + \let\tabu@ \relax \let\tabu@hsize \relax + \let\tabu@Xcoefs \@empty \let\tabu@savels \relax + \tabu@Xcol \z@ \tabu@cnt \tw@ + \gdef\tabu@mkpreambuffer{\tabu@{}}\tabu@measuringfalse + \global\setbox\@arstrutbox \box\@arstrutbox + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \NC@list\expandafter{\the\NC@list \NC@do X}% + \iftabu@siunitx % + \NC@list\expandafter{\the\NC@list \NC@do S\NC@do s}\fi + \NC@list\expandafter{\the\expandafter\NC@list \tabu@highprioritycolumns}% + \expandafter\def\expandafter\tabu@NC@list\expandafter{% + \the\expandafter\NC@list \tabu@NC@list}% % * | X S + \NC@list\expandafter{\expandafter \NC@do \expandafter\usetabu + \expandafter \NC@do \expandafter\preamble + \the\NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \tabu@savedecl + \tabu@privatecolumns + \edef\tabu@prev{\the\@temptokena}\NC@find \tabu@rewritemiddle +}% NC@rewrite@\tabu@rewritefirst +\tabu@newcolumntype \tabu@rewritemiddle{% + \edef\tabu@temp{\the\@temptokena}\NC@find \tabu@rewritelast +}% \NC@rewrite@\tabu@rewritemiddle +\tabu@newcolumntype \tabu@rewritelast{% + \ifx \tabu@temp\tabu@prev \advance\tabu@cnt \m@ne + \NC@list\expandafter{\tabu@NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \else \let\tabu@prev\tabu@temp + \fi + \ifcase \tabu@cnt \expandafter\tabu@endrewrite + \else \expandafter\NC@find \expandafter\tabu@rewritemiddle + \fi +}% \NC@rewrite@\tabu@rewritelast +%% Choosing the strategy -------------------------------------------- +\def\tabu@endrewrite {% + \let\tabu@temp \NC@find + \ifx \@arrayright\relax \let\@arrayright \@empty \fi + \count@=% + \ifx \@finalstrut\tabu@finalstrut \z@ % outer in mode 0 print + \iftabu@measuring + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@target \csname tabu@\the\tabu@nested.T\endcsname + \tabucolX \csname tabu@\the\tabu@nested.X\endcsname + \edef\@halignto {\ifx\@arrayright\@empty to\tabu@target\fi}}% + \fi + \else\iftabu@measuring 4 % X columns + \xdef\tabu@mkpreambuffer{\tabu@{\tabu@mkpreambuffer + \tabu@target \the\tabu@target + \tabu@spreadtarget \the\tabu@spreadtarget}% + \def\noexpand\tabu@Xcoefs{\tabu@Xcoefs}% + \edef\tabu@halignto{\ifx \@arrayright\@empty to\tabu@target\fi}}% + \let\tabu@Xcoefs \relax + \else\ifcase\tabu@nested \thr@@ % outer, no X + \global\let\tabu@afterendpar \relax + \else \@ne % inner, no X, outer in mode 1 or 2 + \fi + \ifdefined\tabu@usetabu + \else \ifdim\tabu@target=\z@ + \else \let\tabu@temp \tabu@extracolsep + \fi\fi + \fi + \fi + \xdef\tabu@mkpreambuffer{\count@ \the\count@ \tabu@mkpreambuffer}% + \tabu@temp +}% \tabu@endrewrite +\def\tabu@extracolsep{\@defaultunits \expandafter\let + \expandafter\tabu@temp \expandafter=\the\@temptokena \relax\@nnil + \ifx \tabu@temp\@sptoken + \expandafter\tabu@gobblespace \expandafter\tabu@extracolsep + \else + \edef\tabu@temp{\noexpand\NC@find + \if |\noexpand\tabu@temp @% + \else\if !\noexpand\tabu@temp @% + \else !% + \fi\fi + {\noexpand\extracolsep\noexpand\@flushglue}}% + \fi + \tabu@temp +}% \tabu@extrac@lsep +%% Implementing the strategy ---------------------------------------- +\long\def\tabu@pream #1\@preamble {% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \ifdefined\tabu@usetabu \tabu@usetabu \tabu@target \z@ \fi + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\tabu@aftergroupcleanup}% + \tabu@thebody =\expandafter{\the\expandafter\tabu@thebody + \@preamble}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@pream +\long\def\tabu@longpream #1\LT@bchunk #2\LT@bchunk{% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\LT@bchunk #2\tabu@aftergroupcleanup \LT@bchunk}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@longpream +\def\tabu@select {% + \ifnum\tabu@nested>\z@ \tabuscantokensfalse \fi + \ifnum \count@=\@ne \iftabu@measuring \count@=\tw@ \fi\fi + \ifcase \count@ + \global\let\tabu@elapsedtime \relax + \tabu@seteverycr + \expandafter \tabuthepreamble % vertical adjustment (inherited from outer) + \or % exit in vertical measure + struts per cell because no X and outer in mode 3 + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \tabu@seteverycr + \expandafter \tabuthepreamble + \or % exit without measure because no X and outer in mode 4 + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@seteverycr + \expandafter \tabuthepreamble + \else % needs trials + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@savecounters + \expandafter \tabu@setstrategy + \fi +}% \tabu@select +\def\tabu@@ {\gdef\tabu@mkpreambuffer} +%% Protections to set up before trials ------------------------------ +\def\tabu@setstrategy {\begingroup % + \tabu@trialh@@k \tabu@cnt \z@ % number of trials + \hbadness \@M \let\hbadness \@tempcnta + \hfuzz \maxdimen \let\hfuzz \@tempdima + \let\write \tabu@nowrite\let\GenericError \tabu@GenericError + \let\savetabu \@gobble \let\tabudefaulttarget \linewidth + \let\@footnotetext \@gobble \let\@xfootnote \tabu@xfootnote + \let\color \tabu@nocolor\let\rowcolor \tabu@norowcolor + \let\tabu@aftergroupcleanup \relax % only after the last trial + \tabu@mkpreambuffer + \ifnum \count@>\thr@@ \let\@halignto \@empty \tabucolX@init + \def\tabu@lasttry{\m@ne\p@}\fi + \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\iftabuscantokens \endlinechar=10 \obeyspaces \fi % + \tabu@collectbody \tabu@strategy % +}% \tabu@setstrategy +\def\tabu@savecounters{% + \def\@elt ##1{\csname c@##1\endcsname\the\csname c@##1\endcsname}% + \edef\tabu@clckpt {\begingroup \globaldefs=\@ne \cl@@ckpt \endgroup}\let\@elt \relax +}% \tabu@savecounters +\def\tabucolX@init {% \tabucolX <= \tabu@target / (sum coefs > 0) + \dimen@ \z@ \tabu@Xsum \z@ \tabucolX \z@ \let\tabu@ \tabu@Xinit \tabu@Xcoefs + \ifdim \dimen@>\z@ + \@tempdima \dimexpr \tabu@target *\p@/\dimen@ + \tabu@hfuzz\relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \fi +}% \tabucolX@init +\def\tabu@Xinit #1#2{\tabu@Xcol #1 \advance \tabu@Xsum + \ifdim #2\p@>\z@ #2\p@ \advance\dimen@ #2\p@ + \else -#2\p@ \tabu@negcoeftrue + \@tempdima \dimexpr \tabu@target*\p@/\dimexpr-#2\p@\relax \relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \tabu@wddef{#1}{0pt}% + \fi +}% \tabu@Xinit +%% Collecting the environment body ---------------------------------- +\long\def\tabu@collectbody #1#2\end #3{% + \edef\tabu@stack{\tabu@pushbegins #2\begin\end\expandafter\@gobble\tabu@stack}% + \ifx \tabu@stack\@empty + \toks@\expandafter{\expandafter\tabu@thebody\expandafter{\the\toks@ #2}% + \def\tabu@end@envir{\end{#3}}% + \iftabuscantokens + \iftabu@long \def\tabu@endenvir {\end{#3}\tabu@gobbleX}% + \else \def\tabu@endenvir {\let\endarray \@empty + \end{#3}\tabu@gobbleX}% + \fi + \else \def\tabu@endenvir {\end{#3}}\fi}% + \let\tabu@collectbody \tabu@endofcollect + \else\def\tabu@temp{#3}% + \ifx \tabu@temp\@empty \toks@\expandafter{\the\toks@ #2\end }% + \else \ifx\tabu@temp\tabu@@spxiii \toks@\expandafter{\the\toks@ #2\end #3}% + \else \ifx\tabu@temp\tabu@X \toks@\expandafter{\the\toks@ #2\end #3}% + \else \toks@\expandafter{\the\toks@ #2\end{#3}}% + \fi\fi\fi + \fi + \tabu@collectbody{#1}% +}% \tabu@collectbody +\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}% +\def\tabu@endofcollect #1{\ifnum0=`{}\fi + \expandafter\endgroup \the\toks@ #1% +}% \tabu@endofcollect +%% The trials: switching between strategies ------------------------- +\def\tabu@strategy {\relax % stops \count@ assignment ! + \ifcase\count@ % case 0 = print with vertical adjustment (outer is finished) + \expandafter \tabu@endoftrials + \or % case 1 = exit in vertical measure (outer in mode 3) + \expandafter\xdef\csname tabu@\the\tabu@nested.T\endcsname{\the\tabu@target}% + \expandafter\xdef\csname tabu@\the\tabu@nested.X\endcsname{\the\tabucolX}% + \expandafter \tabu@endoftrials + \or % case 2 = exit with a rule replacing the table (outer in mode 4) + \expandafter \tabu@quickend + \or % case 3 = outer is in mode 3 because of no X + \begingroup + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \expandafter \tabu@measuring + \else % case 4 = horizontal measure + \begingroup + \global\let\tabu@elapsedtime \tabu@message@etime + \long\def\multicolumn##1##2##3{\multispan{##1}}% + \let\tabu@startpboxORI \@startpbox + \iftabu@spread + \def\tabu@naturalXmax {\z@}% + \let\tabu@naturalXmin \tabu@naturalXmax + \tabu@evr{\global\tabu@naturalX \z@}% + \let\@startpbox \tabu@startpboxmeasure + \else\iftabu@negcoef + \let\@startpbox \tabu@startpboxmeasure + \else \let\@startpbox \tabu@startpboxquick + \fi\fi + \expandafter \tabu@measuring + \fi +}% \tabu@strategy +\def\tabu@measuring{\expandafter \tabu@trial \expandafter + \count@ \the\count@ \tabu@endtrial +}% \tabu@measuring +\def\tabu@trial{\iftabu@long \tabu@longtrial \else \tabu@shorttrial \fi} +\def\tabu@shorttrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + $\iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \csname tabu@adl@endtrial\endcsname + \endarray}$\egroup % got \tabu@box +}% \tabu@shorttrial +\def\tabu@longtrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + \iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \tabuendlongtrial}\egroup % got \tabu@box +}% \tabu@longtrial +\def\tabuendlongtrial{% no @ allowed for \scantokens + \LT@echunk \global\setbox\@ne \hbox{\unhbox\@ne}\kern\wd\@ne + \LT@get@widths +}% \tabuendlongtrial +\def\tabu@adl@endtrial{% + \crcr \noalign{\global\adl@ncol \tabu@nbcols}}% anything global is crap, junky and fails ! +\def\tabu@seteverycr {\tabu@reset + \everycr \expandafter{\the\everycr \tabu@everycr}% + \let\everycr \tabu@noeverycr % +}% \tabu@seteverycr +\def\tabu@noeverycr{{\aftergroup\tabu@restoreeverycr \afterassignment}\toks@} +\def\tabu@restoreeverycr {\let\everycr \tabu@@everycr} +\def\tabu@everycr {\iftabu@everyrow \noalign{\tabu@everyrow}\fi} +\def\tabu@endoftrials {% + \iftabuscantokens \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\expandafter \tabu@closetrialsgroup \expandafter + \tabu@rescan \expandafter{% + \expandafter\tabuthepreamble + \the\expandafter\tabu@thebody + \iftabu@long \else \endarray \fi}} + {\expandafter\tabu@closetrialsgroup \expandafter + \tabuthepreamble + \the\tabu@thebody}% + \tabu@endenvir % Finish ! +}% \tabu@endoftrials +\def\tabu@closetrialsgroup {% + \toks@\expandafter{\tabu@endenvir}% + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target + \tabu@cnt \the\tabu@cnt + \def\noexpand\tabu@endenvir{\the\toks@}% + %Quid de \@halignto = \tabu@halignto ?? + }% \tabu@bufferX + \tabu@bufferX + \ifcase\tabu@nested % print out (outer in mode 0) + \global\tabu@cnt \tabu@cnt + \tabu@evr{\tabu@verticaldynamicadjustment}% + \tabu@celllalign@def{\everypar{}}\let\tabu@cellralign \@empty + \let\@finalstrut \tabu@finalstrut + \else % vertical measure of nested tabu + \tabu@evr{\tabu@verticalinit}% + \tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \fi + \tabu@clckpt \let\@halignto \tabu@halignto + \let\@halignto \@empty + \tabu@seteverycr + \ifdim \tabustrutrule>\z@ \ifnum\tabu@nested=\z@ + \setbox\@arstrutbox \box\voidb@x % force \@arstrutbox to be rebuilt (visible struts) + \fi\fi +}% \tabu@closetrialsgroup +\def\tabu@quickend {\expandafter \endgroup \expandafter + \tabu@target \the\tabu@target \tabu@quickrule + \let\endarray \relax \tabu@endenvir +}% \tabu@quickend +\def\tabu@endtrial {\relax % stops \count@ assignment ! + \ifcase \count@ \tabu@err % case 0 = impossible here + \or \tabu@err % case 1 = impossible here + \or \tabu@err % case 2 = impossible here + \or % case 3 = outer goes into mode 0 + \def\tabu@bufferX{\endgroup}\count@ \z@ + \else % case 4 = outer goes into mode 3 + \iftabu@spread \tabu@spreadarith % inner into mode 1 (outer in mode 3) + \else \tabu@arith % or 2 (outer in mode 4) + \fi + \count@=% + \ifcase\tabu@nested \thr@@ % outer goes into mode 3 + \else\iftabu@measuring \tw@ % outer is in mode 4 + \else \@ne % outer is in mode 3 + \fi\fi + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% + \fi + \expandafter \tabu@bufferX \expandafter + \count@ \the\count@ \tabu@strategy +}% \tabu@endtrial +\def\tabu@err{\errmessage{(tabu) Internal impossible error! (\count@=\the\count@)}} +%% The algorithms: compute the widths / stop or go on --------------- +\def\tabu@arithnegcoef {% + \@tempdima \z@ \dimen@ \z@ \let\tabu@ \tabu@arith@negcoef \tabu@Xcoefs +}% \tabu@arithnegcoef +\def\tabu@arith@negcoef #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ % saturated by definition + \advance\@tempdima #2\tabucolX + \else + \ifdim -#2\tabucolX <\tabu@wd{#1}% c_i X < natural width <= \tabu@target-> saturated + \advance\dimen@ -#2\p@ + \advance\@tempdima -#2\tabucolX + \else + \advance\@tempdima \tabu@wd{#1}% natural width <= c_i X => neutralised + \ifdim \tabu@wd{#1}<\tabu@target \else % neutralised + \advance\dimen@ -#2\p@ % saturated (natural width = tabu@target) + \fi + \fi + \fi +}% \tabu@arith@negcoef +\def\tabu@givespace #1#2{% here \tabu@DELTA < \z@ + \ifdim \@tempdima=\z@ + \tabu@wddef{#1}{\the\dimexpr -\tabu@DELTA*\p@/\tabu@Xsum}% + \else + \tabu@wddef{#1}{\the\dimexpr \tabu@hsize{#1}{#2} + *(\p@ -\tabu@DELTA*\p@/\@tempdima)/\p@\relax}% + \fi +}% \tabu@givespace +\def\tabu@arith {\advance\tabu@cnt \@ne + \ifnum \tabu@cnt=\@ne \tabu@message{\tabu@titles}\fi + \tabu@arithnegcoef + \@tempdimb \dimexpr \wd\tabu@box -\@tempdima \relax % + \tabu@DELTA = \dimexpr \wd\tabu@box - \tabu@target \relax + \tabu@message{\tabu@message@arith}% + \ifdim \tabu@DELTA <\tabu@hfuzz + \ifdim \tabu@DELTA<\z@ % wd (tabu)<\tabu@target ? + \let\tabu@ \tabu@givespace \tabu@Xcoefs + \advance\@tempdima \@tempdimb \advance\@tempdima -\tabu@DELTA % for message + \else % already converged: nothing to do but nearly impossible... + \fi + \tabucolX \maxdimen + \tabu@measuringfalse + \else % need for narrower X columns + \tabucolX =\dimexpr (\@tempdima -\tabu@DELTA) *\p@/\tabu@Xsum \relax + \tabu@measuringtrue + \@whilesw \iftabu@measuring\fi {% + \advance\tabu@cnt \@ne + \tabu@arithnegcoef + \tabu@DELTA =\dimexpr \@tempdima+\@tempdimb -\tabu@target \relax % always < 0 here + \tabu@message{\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \@tempdima+\@tempdimb { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim -\tabu@DELTA<\tabu@hfuzz \tabu@spaces target ok\else + \tabu@msgalign \dimexpr -\tabu@DELTA *\p@/\dimen@ {}{}{}{}{}\@@ + \fi}% + \ifdim -\tabu@DELTA<\tabu@hfuzz + \advance\@tempdima \@tempdimb % for message + \tabu@measuringfalse + \else + \advance\tabucolX \dimexpr -\tabu@DELTA *\p@/\dimen@ \relax + \fi + }% + \fi + \tabu@message{\tabu@message@reached}% + \edef\tabu@bufferX{\endgroup \tabu@cnt \the\tabu@cnt + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% +}% \tabu@arith +\def\tabu@spreadarith {% + \dimen@ \z@ \@tempdima \tabu@naturalXmax \let\tabu@ \tabu@spread@arith \tabu@Xcoefs + \edef\tabu@naturalXmin {\the\dimexpr\tabu@naturalXmin*\dimen@/\p@}% + \@tempdimc =\dimexpr \wd\tabu@box -\tabu@naturalXmax+\tabu@naturalXmin \relax + \iftabu@measuring + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \edef\tabu@bufferX{\endgroup \tabucolX \the\tabucolX \tabu@target\the\tabu@target}% + \else + \tabu@message{\tabu@message@spreadarith}% + \ifdim \dimexpr \@tempdimc+\tabu@spreadtarget >\tabu@target + \tabu@message{(tabu) spread + \ifdim \@tempdimc>\tabu@target useless here: default target used% + \else too large: reduced to fit default target\fi.}% + \else + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \tabu@message{(tabu) spread: New target set to \the\tabu@target^^J}% + \fi + \begingroup \let\tabu@wddef \@gobbletwo + \@tempdimb \@tempdima + \tabucolX@init + \tabu@arithnegcoef + \wd\tabu@box =\dimexpr \wd\tabu@box +\@tempdima-\@tempdimb \relax + \expandafter\endgroup \expandafter\tabucolX \the\tabucolX + \tabu@arith + \fi +}% \tabu@spreadarith +\def\tabu@spread@arith #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ + \else \advance\@tempdima \tabu@wd{#1}\relax + \fi +}% \tabu@spread@arith +%% Reporting in the .log file --------------------------------------- +\def\tabu@message@defaulttarget{% + \ifnum\tabu@nested=\z@^^J(tabu) Default target: + \ifx\tabudefaulttarget\linewidth \string\linewidth + \ifdim \tabu@thetarget=\linewidth \else + -\the\dimexpr\linewidth-\tabu@thetarget\fi = + \else\ifx\tabudefaulttarget\linegoal\string\linegoal= + \fi\fi + \else (tabu) Default target (nested): \fi + \the\tabu@target \on@line + \ifnum\tabu@nested=\z@ , page \the\c@page\fi} +\def\tabu@message@target {^^J(tabu) Target specified: + \the\tabu@target \on@line, page \the\c@page} +\def\tabu@message@arith {\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim \tabu@DELTA<\tabu@hfuzz giving space\else + \tabu@msgalign \dimexpr (\@tempdima-\tabu@DELTA) *\p@/\tabu@Xsum -\tabucolX {}{}{}{}{}\@@ + \fi +}% \tabu@message@arith +\def\tabu@message@spreadarith {\tabu@spreadheader + \tabu@msgalign \tabu@spreadtarget { }{ }{ }{ }{}\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{}\@@ + \tabu@msgalign -\tabu@naturalXmax { }{}{}{}{}\@@ + \tabu@msgalign \tabu@naturalXmin { }{ }{ }{ }{}\@@ + \tabu@msgalign \ifdim \dimexpr\@tempdimc>\tabu@target \tabu@target + \else \@tempdimc+\tabu@spreadtarget \fi + {}{}{}{}{}\@@} +\def\tabu@message@negcoef #1#2{ + \tabu@spaces\tabu@spaces\space * #1. X[\rem@pt#2]: + \space width = \tabu@wd {#1} + \expandafter\string\csname tabu@\the\tabu@nested.W\number#1\endcsname + \ifdim -\tabu@pt#2\tabucolX<\tabu@target + < \number-\rem@pt#2 X + = \the\dimexpr -\tabu@pt#2\tabucolX \relax + \else + <= \the\tabu@target\space < \number-\rem@pt#2 X\fi} +\def\tabu@message@reached{\tabu@header + ******* Reached Target: + hfuzz = \tabu@hfuzz\on@line\space *******} +\def\tabu@message@etime{\edef\tabu@stoptime{\the\pdfelapsedtime}% + \tabu@message{(tabu)\tabu@spaces Time elapsed during measure: + \the\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax sec + \the\numexpr\numexpr(\tabu@stoptime-\tabu@starttime) + -\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax*65536\relax + *1000/65536\relax ms \tabu@spaces(\the\tabu@cnt\space + cycle\ifnum\tabu@cnt>\@ne s\fi)^^J^^J}} +\def\tabu@message@verticalsp {% + \ifdim \@tempdima>\tabu@ht + \ifdim \@tempdimb>\tabu@dp + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@ + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J% + \else + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@^^J% + \fi + \else\ifdim \@tempdimb>\tabu@dp + \tabu@spaces\tabu@spaces\tabu@spaces + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J\fi + \fi +}% \tabu@message@verticalsp +\edef\tabu@spaces{\@spaces} +\def\tabu@strippt{\expandafter\tabu@pt\the} +{\@makeother\P \@makeother\T\lowercase{\gdef\tabu@pt #1PT{#1}}} +\def\tabu@msgalign{\expandafter\tabu@msg@align\the\dimexpr} +\def\tabu@msgalign@PT{\expandafter\tabu@msg@align\romannumeral-`\0\tabu@strippt} +\def\do #1{% + \def\tabu@msg@align##1.##2##3##4##5##6##7##8##9\@@{% + \ifnum##1<10 #1 #1\else + \ifnum##1<100 #1 \else + \ifnum##1<\@m #1\fi\fi\fi + ##1.##2##3##4##5##6##7##8#1}% + \def\tabu@header{(tabu) \ifnum\tabu@cnt<10 #1\fi\the\tabu@cnt) }% + \def\tabu@titles{\ifnum \tabu@nested=\z@ + (tabu) Try#1 #1 tabu X #1 #1 #1tabu Width #1 #1 Target + #1 #1 #1 Coefs #1 #1 #1 Update^^J\fi}% + \def\tabu@spreadheader{% + (tabu) Try#1 #1 Spread #1 #1 tabu Width #1 #1 #1 Nat. X #1 #1 #1 #1Nat. Min. + #1 New Target^^J% + (tabu) sprd} + \def\tabu@message@save {\begingroup + \def\x ####1{\tabu@msg@align ####1{ }{ }{ }{ }{}\@@} + \def\z ####1{\expandafter\x\expandafter{\romannumeral-`\0\tabu@strippt + \dimexpr####1\p@{ }{ }}}% + \let\color \relax \def\tabu@rulesstyle ####1####2{\detokenize{####1}}% + \let\CT@arc@ \relax \let\@preamble \@gobble + \let\tabu@savedpream \@firstofone + \let\tabu@savedparams \@firstofone + \def\tabu@target ####1\relax {(tabu) target #1 #1 #1 #1 #1 = \x{####1}^^J}% + \def\tabucolX ####1\relax {(tabu) X columns width#1 = \x{####1}^^J}% + \def\tabu@nbcols ####1\relax {(tabu) Number of columns: \z{####1}^^J}% + \def\tabu@aligndefault ####1{(tabu) Default alignment: #1 #1 ####1^^J}% + \def\col@sep ####1\relax {(tabu) column sep #1 #1 #1 = \x{####1}^^J}% + \def\arrayrulewidth ####1\relax{(tabu) arrayrulewidth #1 = \x{####1}}% + \def\doublerulesep ####1\relax { doublerulesep = \x{####1}^^J}% + \def\extratabsurround####1\relax{(tabu) extratabsurround = \x{####1}^^J}% + \def\extrarowheight ####1\relax{(tabu) extrarowheight #1 = \x{####1}}% + \def\extrarowdepth ####1\relax {extrarowdepth = \x{####1}^^J}% + \def\abovetabulinesep####1\relax{(tabu) abovetabulinesep=\x{####1} }% + \def\belowtabulinesep####1\relax{ belowtabulinesep=\x{####1}^^J}% + \def\arraystretch ####1{(tabu) arraystretch #1 #1 = \z{####1}^^J}% + \def\minrowclearance####1\relax{(tabu) minrowclearance #1 = \x{####1}^^J}% + \def\tabu@arc@L ####1{(tabu) taburulecolor #1 #1 = ####1^^J}% + \def\tabu@drsc@L ####1{(tabu) tabudoublerulecolor= ####1^^J}% + \def\tabu@evr@L ####1{(tabu) everyrow #1 #1 #1 #1 = \detokenize{####1}^^J}% + \def\tabu@ls@L ####1{(tabu) line style = \detokenize{####1}^^J}% + \def\NC@find ####1\@nil{(tabu) tabu preamble#1 #1 = \detokenize{####1}^^J}% + \def\tabu@wddef####1####2{(tabu) Natural width ####1 = \x{####2}^^J}% + \let\edef \@gobbletwo \let\def \@empty \let\let \@gobbletwo + \tabu@message{% + (tabu) \string\savetabu{\tabu@temp}: \on@line^^J% + \tabu@usetabu \@nil^^J}% + \endgroup} +}\do{ } +%% Measuring the natural width (varwidth) - store the results ------- +\def\tabu@startpboxmeasure #1{\bgroup % entering \vtop + \edef\tabu@temp{\expandafter\@secondoftwo \ifx\tabu@hsize #1\else\relax\fi}% + \ifodd 1\ifx \tabu@temp\@empty 0 \else % starts with \tabu@hsize ? + \iftabu@spread \else % if spread -> measure + \ifdim \tabu@temp\p@>\z@ 0 \fi\fi\fi% if coef>0 -> do not measure + \let\@startpbox \tabu@startpboxORI % restore immediately (nesting) + \tabu@measuringtrue % for the quick option... + \tabu@Xcol =\expandafter\@firstoftwo\ifx\tabu@hsize #1\fi + \ifdim \tabu@temp\p@>\z@ \ifdim \tabu@temp\tabucolX<\tabu@target + \tabu@target=\tabu@temp\tabucolX \fi\fi + \setbox\tabu@box \hbox \bgroup + \begin{varwidth}\tabu@target + \let\FV@ListProcessLine \tabu@FV@ListProcessLine % \hbox to natural width... + \narrowragged \arraybackslash \parfillskip \@flushglue + \ifdefined\pdfadjustspacing \pdfadjustspacing\z@ \fi + \bgroup \aftergroup\tabu@endpboxmeasure + \ifdefined \cellspacetoplimit \tabu@cellspacepatch \fi + \else \expandafter\@gobble + \tabu@startpboxquick{#1}% \@gobble \bgroup + \fi +}% \tabu@startpboxmeasure +\def\tabu@cellspacepatch{\def\bcolumn##1\@nil{}\let\ecolumn\@empty + \bgroup\color@begingroup} +\def\tabu@endpboxmeasure {% + \@finalstrut \@arstrutbox + \end{varwidth}\egroup % + \ifdim \tabu@temp\p@ <\z@ % neg coef + \ifdim \tabu@wd\tabu@Xcol <\wd\tabu@box + \tabu@wddef\tabu@Xcol {\the\wd\tabu@box}% + \tabu@debug{\tabu@message@endpboxmeasure}% + \fi + \else % spread coef>0 + \global\advance \tabu@naturalX \wd\tabu@box + \@tempdima =\dimexpr \wd\tabu@box *\p@/\dimexpr \tabu@temp\p@\relax \relax + \ifdim \tabu@naturalXmax <\tabu@naturalX + \xdef\tabu@naturalXmax {\the\tabu@naturalX}\fi + \ifdim \tabu@naturalXmin <\@tempdima + \xdef\tabu@naturalXmin {\the\@tempdima}\fi + \fi + \box\tabu@box \egroup % end of \vtop (measure) restore \tabu@target +}% \tabu@endpboxmeasure +\def\tabu@wddef #1{\expandafter\xdef + \csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@wd #1{\csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@message@endpboxmeasure{\tabu@spaces\tabu@spaces<-> % <-> save natural wd + \the\tabu@Xcol. X[\tabu@temp]: + target = \the\tabucolX \space + \expandafter\expandafter\expandafter\string\tabu@wd\tabu@Xcol + =\tabu@wd\tabu@Xcol +}% \tabu@message@endpboxmeasure +\def\tabu@startpboxquick {\bgroup + \let\@startpbox \tabu@startpboxORI % restore immediately + \let\tabu \tabu@quick % \begin is expanded before... + \expandafter\@gobble \@startpbox % gobbles \bgroup +}% \tabu@startpboxquick +\def\tabu@quick {\begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\tabu@collectbody \tabu@endquick +}% \tabu@quick +\def\tabu@endquick {% + \ifodd 1\ifx\tabu@end@envir\tabu@endtabu \else + \ifx\tabu@end@envir\tabu@endtabus \else 0\fi\fi\relax + \endgroup + \else \let\endtabu \relax + \tabu@end@envir + \fi +}% \tabu@quick +\def\tabu@endtabu {\end{tabu}} +\def\tabu@endtabus {\end{tabu*}} +%% Measuring the heights and depths - store the results ------------- +\def\tabu@verticalmeasure{\everypar{}% + \ifnum \currentgrouptype>12 % 14=semi-simple, 15=math shift group + \setbox\tabu@box =\hbox\bgroup + \let\tabu@verticalspacing \tabu@verticalsp@lcr + \d@llarbegin % after \hbox ... + \else + \edef\tabu@temp{\ifnum\currentgrouptype=5\vtop + \else\ifnum\currentgrouptype=12\vcenter + \else\vbox\fi\fi}% + \setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup + \let\tabu@verticalspacing \tabu@verticalsp@pmb + \fi +}% \tabu@verticalmeasure +\def\tabu@verticalsp@lcr{% + \d@llarend \egroup % + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \noindent\vrule height\@tempdima depth\@tempdimb +}% \tabu@verticalsp@lcr +\def\tabu@verticalsp@pmb{% inserts struts as needed + \par \expandafter\egroup + \expandafter$\expandafter + \egroup \expandafter + \@tempdimc \the\prevdepth + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \let\@finalstrut \@gobble + \hrule height\@tempdima depth\@tempdimb width\hsize +%% \box\tabu@box +}% \tabu@verticalsp@pmb + +\def\tabu@verticalinit{% + \ifnum \c@taburow=\z@ \tabu@rearstrut \fi % after \tabu@reset ! + \advance\c@taburow \@ne + \tabu@htdef{\the\ht\@arstrutbox}\tabu@dpdef{\the\dp\@arstrutbox}% + \advance\c@taburow \m@ne +}% \tabu@verticalinit +\def\tabu@htdef {\expandafter\xdef \csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@ht {\csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@dpdef {\expandafter\xdef \csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@dp {\csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@verticaldynamicadjustment {% + \advance\c@taburow \@ne + \extrarowheight \dimexpr\tabu@ht - \ht\strutbox + \extrarowdepth \dimexpr\tabu@dp - \dp\strutbox + \let\arraystretch \@empty + \advance\c@taburow \m@ne +}% \tabu@verticaldynamicadjustment +\def\tabuphantomline{\crcr \noalign{% + {\globaldefs \@ne + \setbox\@arstrutbox \box\voidb@x + \let\tabu@@celllalign \tabu@celllalign + \let\tabu@@cellralign \tabu@cellralign + \let\tabu@@cellleft \tabu@cellleft + \let\tabu@@cellright \tabu@cellright + \let\tabu@@thevline \tabu@thevline + \let\tabu@celllalign \@empty + \let\tabu@cellralign \@empty + \let\tabu@cellright \@empty + \let\tabu@cellleft \@empty + \let\tabu@thevline \relax}% + \edef\tabu@temp{\tabu@multispan \tabu@nbcols{\noindent &}}% + \toks@\expandafter{\tabu@temp \noindent\tabu@everyrowfalse \cr + \noalign{\tabu@rearstrut + {\globaldefs\@ne + \let\tabu@celllalign \tabu@@celllalign + \let\tabu@cellralign \tabu@@cellralign + \let\tabu@cellleft \tabu@@cellleft + \let\tabu@cellright \tabu@@cellright + \let\tabu@thevline \tabu@@thevline}}}% + \expandafter}\the\toks@ +}% \tabuphantomline +%% \firsthline and \lasthline corrections --------------------------- +\def\tabu@firstline {\tabu@hlineAZ \tabu@firsthlinecorrection {}} +\def\tabu@firsthline{\tabu@hlineAZ \tabu@firsthlinecorrection \hline} +\def\tabu@lastline {\tabu@hlineAZ \tabu@lasthlinecorrection {}} +\def\tabu@lasthline {\tabu@hlineAZ \tabu@lasthlinecorrection \hline} +\def\tabu@hline {% replaces \hline if no colortbl (see \AtBeginDocument) + \noalign{\ifnum0=`}\fi + {\CT@arc@\hrule height\arrayrulewidth}% + \futurelet \tabu@temp \tabu@xhline +}% \tabu@hline +\def\tabu@xhline{% + \ifx \tabu@temp \hline + {\ifx \CT@drsc@\relax \vskip + \else\ifx \CT@drsc@\@empty \vskip + \else \CT@drsc@\hrule height + \fi\fi + \doublerulesep}% + \fi + \ifnum0=`{\fi}% +}% \tabu@xhline +\def\tabu@hlineAZ #1#2{\noalign{\ifnum0=`}\fi \dimen@ \z@ \count@ \z@ + \toks@{}\def\tabu@hlinecorrection{#1}\def\tabu@temp{#2}% + \tabu@hlineAZsurround +}% \tabu@hlineAZ +\newcommand*\tabu@hlineAZsurround[1][\extratabsurround]{% + \extratabsurround #1\let\tabucline \tabucline@scan + \let\hline \tabu@hlinescan \let\firsthline \hline + \let\cline \tabu@clinescan \let\lasthline \hline + \expandafter \futurelet \expandafter \tabu@temp + \expandafter \tabu@nexthlineAZ \tabu@temp +}% \tabu@hlineAZsurround +\def\tabu@hlinescan {\tabu@thick \arrayrulewidth \tabu@xhlineAZ \hline} +\def\tabu@clinescan #1{\tabu@thick \arrayrulewidth \tabu@xhlineAZ {\cline{#1}}} +\def\tabucline@scan{\@testopt \tabucline@sc@n {}} +\def\tabucline@sc@n #1[#2]{\tabu@xhlineAZ {\tabucline[{#1}]{#2}}} +\def\tabu@nexthlineAZ{% + \ifx \tabu@temp\hline \else + \ifx \tabu@temp\cline \else + \ifx \tabu@temp\tabucline \else + \tabu@hlinecorrection + \fi\fi\fi +}% \tabu@nexthlineAZ +\def\tabu@xhlineAZ #1{% + \toks@\expandafter{\the\toks@ #1}% + \@tempdimc \tabu@thick % The last line width + \ifcase\count@ \@tempdimb \tabu@thick % The first line width + \else \advance\dimen@ \dimexpr \tabu@thick+\doublerulesep \relax + \fi + \advance\count@ \@ne \futurelet \tabu@temp \tabu@nexthlineAZ +}% \tabu@xhlineAZ +\def\tabu@firsthlinecorrection{% \count@ = number of \hline -1 + \@tempdima \dimexpr \ht\@arstrutbox+\dimen@ + \edef\firsthline{% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + height \the\dimexpr\@tempdima+\extratabsurround + depth \dp\@arstrutbox + width \tabustrutrule}\hss}\cr + \noalign{\vskip -\the\dimexpr \@tempdima+\@tempdimb + +\dp\@arstrutbox \relax}% + \the\toks@ + }\ifnum0=`{\fi + \expandafter}\firsthline % we are then ! +}% \tabu@firsthlinecorrection +\def\tabu@lasthlinecorrection{% + \@tempdima \dimexpr \dp\@arstrutbox+\dimen@+\@tempdimb+\@tempdimc + \edef\lasthline{% + \the\toks@ + \noalign{\vskip -\the\dimexpr\dimen@+\@tempdimb+\dp\@arstrutbox}% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + depth \the\dimexpr \dp\@arstrutbox+\@tempdimb+\dimen@ + +\extratabsurround-\@tempdimc + height \z@ + width \tabustrutrule}\hss}\cr + }\ifnum0=`{\fi + \expandafter}\lasthline % we are then ! +}% \tabu@lasthlinecorrection +\def\tabu@LT@@hline{% + \ifx\LT@next\hline + \global\let\LT@next \@gobble + \ifx \CT@drsc@\relax + \gdef\CT@LT@sep{% + \noalign{\penalty-\@medpenalty\vskip\doublerulesep}}% + \else + \gdef\CT@LT@sep{% + \multispan\LT@cols{% + \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill}\cr}% + \fi + \else + \global\let\LT@next\empty + \gdef\CT@LT@sep{% + \noalign{\penalty-\@lowpenalty\vskip-\arrayrulewidth}}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \CT@LT@sep + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \noalign{\penalty\@M}% + \LT@next +}% \tabu@LT@@hline +%% Horizontal lines : \tabucline ------------------------------------ +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcommand*\tabucline{\noalign{\ifnum0=`}\fi \tabu@cline} +\newcommand*\tabu@cline[2][]{\tabu@startstop{#2}% + \ifnum \tabu@stop<\z@ \toks@{}% + \else \tabu@clinearg{#1}\tabu@thestyle + \edef\tabucline{\toks@{% + \ifnum \tabu@start>\z@ \omit + \tabu@multispan\tabu@start {\span\omit}&\fi + \omit \tabu@multispan\tabu@stop {\span\omit}% + \tabu@thehline\cr + }}\tabucline + \tabu@tracinglines{(tabu:tabucline) Style: #1^^J\the\toks@^^J^^J}% + \fi + \futurelet \tabu@temp \tabu@xcline +}% \tabu@cline +\def\tabu@clinearg #1{% + \ifx\\#1\\\let\tabu@thestyle \tabu@ls@ + \else \@defaultunits \expandafter\let\expandafter\@tempa + \romannumeral-`\0#1\relax \@nnil + \ifx \hbox\@tempa \tabu@clinebox{#1}% + \else\ifx \box\@tempa \tabu@clinebox{#1}% + \else\ifx \vbox\@tempa \tabu@clinebox{#1}% + \else\ifx \vtop\@tempa \tabu@clinebox{#1}% + \else\ifx \copy\@tempa \tabu@clinebox{#1}% + \else\ifx \leaders\@tempa \tabu@clineleads{#1}% + \else\ifx \cleaders\@tempa \tabu@clineleads{#1}% + \else\ifx \xleaders\@tempa \tabu@clineleads{#1}% + \else\tabu@getline {#1}% + \fi\fi\fi\fi\fi\fi\fi\fi + \fi +}% \tabu@clinearg +\def\tabu@clinebox #1{\tabu@clineleads{\xleaders#1\hss}} +\def\tabu@clineleads #1{% + \let\tabu@thestyle \relax \let\tabu@leaders \@undefined + \gdef\tabu@thehrule{#1}} +\def\tabu@thehline{\begingroup + \ifdefined\tabu@leaders + \noexpand\tabu@thehleaders + \else \noexpand\tabu@thehrule + \fi \endgroup +}% \tabu@thehline +\def\tabu@xcline{% + \ifx \tabu@temp\tabucline + \toks@\expandafter{\the\toks@ \noalign + {\ifx\CT@drsc@\relax \vskip + \else \CT@drsc@\hrule height + \fi + \doublerulesep}}% + \fi + \tabu@docline +}% \tabu@xcline +\def\tabu@docline {\ifnum0=`{\fi \expandafter}\the\toks@} +\def\tabu@docline@evr {\xdef\tabu@doclineafter{\the\toks@}% + \ifnum0=`{\fi}\aftergroup\tabu@doclineafter} +\def\tabu@multispan #1#2{% + \ifnum\numexpr#1>\@ne #2\expandafter\tabu@multispan + \else \expandafter\@gobbletwo + \fi {#1-1}{#2}% +}% \tabu@multispan +\def\tabu@startstop #1{\tabu@start@stop #1\relax 1-\tabu@nbcols \@nnil} +\def\tabu@start@stop #1-#2\@nnil{% + \@defaultunits \tabu@start\number 0#1\relax \@nnil + \@defaultunits \tabu@stop \number 0#2\relax \@nnil + \tabu@stop \ifnum \tabu@start>\tabu@nbcols \m@ne + \else\ifnum \tabu@stop=\z@ \tabu@nbcols + \else\ifnum \tabu@stop>\tabu@nbcols \tabu@nbcols + \else \tabu@stop + \fi\fi\fi + \advance\tabu@start \m@ne + \ifnum \tabu@start>\z@ \advance\tabu@stop -\tabu@start \fi +}% \tabu@start@stop +%% Numbers: siunitx S columns (and \tabudecimal) ------------------- +\def\tabu@tabudecimal #1{% + \def\tabu@decimal{#1}\@temptokena{}% + \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces + \tabu@scandecimal +}% \tabu@tabudecimal +\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@} +\def\tabu@skipdecimal#1{#1\tabu@scandecimal} +\def\tabu@getdecimal@ignorespaces{% + \ifcase 0\ifx\tabu@temp\ignorespaces\else + \ifx\tabu@temp\@sptoken1\else + 2\fi\fi\relax + \let\tabu@getdecimal@ \tabu@getdecimal + \expandafter\tabu@skipdecimal + \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal + \else \expandafter\tabu@skipdecimal + \fi +}% \tabu@getdecimal@ignorespaces +\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}% + \tabu@scandecimal} +\def\do#1{% + \def\tabu@get@decimalspace#1{% + \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}% +}\do{ } +\let\tabu@@tabudecimal \tabu@tabudecimal +\def\tabu@getdecimal{% + \ifcase 0\ifx 0\tabu@temp\else + \ifx 1\tabu@temp\else + \ifx 2\tabu@temp\else + \ifx 3\tabu@temp\else + \ifx 4\tabu@temp\else + \ifx 5\tabu@temp\else + \ifx 6\tabu@temp\else + \ifx 7\tabu@temp\else + \ifx 8\tabu@temp\else + \ifx 9\tabu@temp\else + \ifx .\tabu@temp\else + \ifx ,\tabu@temp\else + \ifx -\tabu@temp\else + \ifx +\tabu@temp\else + \ifx e\tabu@temp\else + \ifx E\tabu@temp\else + \ifx\tabu@cellleft\tabu@temp1\else + \ifx\ignorespaces\tabu@temp1\else + \ifx\@sptoken\tabu@temp2\else + 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \expandafter\tabu@get@decimal + \or \expandafter\tabu@skipdecimal + \or \expandafter\tabu@get@decimalspace + \else\expandafter\tabu@printdecimal + \fi +}% \tabu@getdecimal +\def\tabu@printdecimal{% + \edef\tabu@temp{\the\@temptokena}% + \ifx\tabu@temp\@empty\else + \ifx\tabu@temp\space\else + \expandafter\tabu@decimal\expandafter{\the\@temptokena}% + \fi\fi +}% \tabu@printdecimal +%% Verbatim inside X columns ---------------------------------------- +\def\tabu@verbatim{% + \let\verb \tabu@verb + \let\FV@DefineCheckEnd \tabu@FV@DefineCheckEnd +}% \tabu@verbatim +\let\tabu@ltx@verb \verb +\def\tabu@verb{\@ifstar {\tabu@ltx@verb*} \tabu@ltx@verb} +\def\tabu@fancyvrb {% + \def\tabu@FV@DefineCheckEnd ##1{% + \def\tabu@FV@DefineCheckEnd{% + ##1% + \let\FV@CheckEnd \tabu@FV@CheckEnd + \let\FV@@CheckEnd \tabu@FV@@CheckEnd + \let\FV@@@CheckEnd \tabu@FV@@@CheckEnd + \edef\FV@EndScanning{% + \def\noexpand\next{\noexpand\end{\FV@EnvironName}}% + \global\let\noexpand\FV@EnvironName\relax + \noexpand\next}% + \xdef\FV@EnvironName{\detokenize\expandafter{\FV@EnvironName}}}% + }\expandafter\tabu@FV@DefineCheckEnd\expandafter{\FV@DefineCheckEnd} +}% \tabu@fancyvrb +\def\tabu@FV@CheckEnd #1{\expandafter\FV@@CheckEnd \detokenize{#1\end{}}\@nil} +\edef\tabu@FV@@@CheckEnd {\detokenize{\end{}}} +\begingroup +\catcode`\[1 \catcode`\]2 +\@makeother\{ \@makeother\} + \edef\x[\endgroup + \def\noexpand\tabu@FV@@CheckEnd ##1\detokenize[\end{]##2\detokenize[}]##3% + ]\x \@nil{\def\@tempa{#2}\def\@tempb{#3}} +\def\tabu@FV@ListProcessLine #1{% + \hbox {%to \hsize{% + \kern\leftmargin + \hbox {%to \linewidth{% + \FV@LeftListNumber + \FV@LeftListFrame + \FancyVerbFormatLine{#1}\hss +%% DG/SR modification begin - Jan. 28, 1998 (for numbers=right add-on) +%% \FV@RightListFrame}% + \FV@RightListFrame + \FV@RightListNumber}% +%% DG/SR modification end + \hss}} +%% \savetabu -------------------------------------------------------- +\newcommand*\savetabu[1]{\noalign{% + \tabu@sanitizearg{#1}\tabu@temp + \ifx \tabu@temp\@empty \tabu@savewarn{}{The tabu will not be saved}\else + \@ifundefined{tabu@saved@\tabu@temp}{}{\tabu@savewarn{#1}{Overwriting}}% + \ifdefined\tabu@restored \expandafter\let + \csname tabu@saved@\tabu@temp \endcsname \tabu@restored + \else {\tabu@save}% + \fi + \fi}% +}% \savetabu +\def\tabu@save {% + \toks0\expandafter{\tabu@saved@}% + \iftabu@negcoef + \let\tabu@wddef \relax \let\tabu@ \tabu@savewd \edef\tabu@savewd{\tabu@Xcoefs}% + \toks0\expandafter{\the\toks\expandafter0\tabu@savewd}\fi + \toks1\expandafter{\tabu@savedpream}% + \toks2\expandafter{\tabu@savedpreamble}% + \let\@preamble \relax + \let\tabu@savedpream \relax \let\tabu@savedparams \relax + \edef\tabu@preamble{% + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \edef\tabu@usetabu{% + \def\@preamble {\noexpand\the\toks2}% + \tabu@target \the\tabu@target \relax + \tabucolX \the\tabucolX \relax + \tabu@nbcols \the\tabu@nbcols \relax + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \let\tabu@aligndefault \relax \let\@sharp \relax + \edef\@tempa{\noexpand\tabu@s@ved + {\tabu@usetabu} + {\tabu@preamble} + {\the\toks1}}\@tempa + \tabu@message@save +}% \tabu@save +\long\def\tabu@s@ved #1#2#3{% + \def\tabu@usetabu{#1}% + \expandafter\gdef\csname tabu@saved@\tabu@temp\endcsname ##1{% + \ifodd ##1% \usetabu + \tabu@measuringfalse \tabu@spreadfalse % Just in case... + \gdef\tabu@usetabu {% + \ifdim \tabu@target>\z@ \tabu@warn@usetabu \fi + \global\let\tabu@usetabu \@undefined + \def\@halignto {to\tabu@target}% + #1% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \else % \preamble + \gdef\tabu@preamble {% + \global\let\tabu@preamble \@undefined + #2% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \fi + #3}% +}% \tabu@s@ved +\def\tabu@aligndefault@text {\tabu@aligndefault}% +\def\tabu@warn@usetabu {\PackageWarning{tabu} + {Specifying a target with \string\usetabu\space is useless + \MessageBreak The target cannot be changed!}} +\def\tabu@savewd #1#2{\ifdim #2\p@<\z@ \tabu@wddef{#1}{\tabu@wd{#1}}\fi} +\def\tabu@savewarn#1#2{\PackageInfo{tabu} + {User-name `#1' already used for \string\savetabu + \MessageBreak #2}}% +\def\tabu@saveerr#1{\PackageError{tabu} + {User-name `#1' is unknown for \string\usetabu + \MessageBreak I cannot restore an unknown preamble!}\@ehd} +%% \rowfont --------------------------------------------------------- +\newskip \tabu@cellskip +\def\tabu@rowfont{\ifdim \baselineskip=\z@\noalign\fi + {\ifnum0=`}\fi \tabu@row@font} +\newcommand*\tabu@row@font[2][]{% + \ifnum7=\currentgrouptype + \global\let\tabu@@cellleft \tabu@cellleft + \global\let\tabu@@cellright \tabu@cellright + \global\let\tabu@@celllalign \tabu@celllalign + \global\let\tabu@@cellralign \tabu@cellralign + \global\let\tabu@@rowfontreset\tabu@rowfontreset + \fi + \global\let\tabu@rowfontreset \tabu@rowfont@reset + \expandafter\gdef\expandafter\tabu@cellleft\expandafter{\tabu@cellleft #2}% + \ifcsname tabu@cell@#1\endcsname % row alignment + \csname tabu@cell@#1\endcsname \fi + \ifnum0=`{\fi}% end of group / noalign group +}% \rowfont +\def\tabu@ifcolorleavevmode #1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}% +\def\tabu@rowfont@reset{% + \global\let\tabu@rowfontreset \tabu@@rowfontreset + \global\let\tabu@cellleft \tabu@@cellleft + \global\let\tabu@cellright \tabu@@cellright + \global\let\tabu@cellfont \@empty + \global\let\tabu@celllalign \tabu@@celllalign + \global\let\tabu@cellralign \tabu@@cellralign +}% \tabu@@rowfontreset +\let\tabu@rowfontreset \@empty % overwritten \AtBeginDocument if colortbl +%% \tabu@prepnext@tok ----------------------------------------------- +\newif \iftabu@cellright +\def\tabu@prepnext@tok{% + \ifnum \count@<\z@ % + \@tempcnta \@M % + \tabu@nbcols\z@ + \let\tabu@fornoopORI \@fornoop + \tabu@cellrightfalse + \else + \ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left + \advance \tabu@nbcols \@ne + \iftabu@cellright % before-previous token is right and is finished + \tabu@cellrightfalse % + \tabu@righttok + \fi + \tabu@lefttok + \or % (case 1) previous token is right + \tabu@cellrighttrue \let\@fornoop \tabu@lastnoop + \else % special column: do not change the token + \iftabu@cellright % before-previous token is right + \tabu@cellrightfalse + \tabu@righttok + \fi + \fi % \ifcase + \fi + \tabu@prepnext@tokORI +}% \tabu@prepnext@tok +\long\def\tabu@lastnoop#1\@@#2#3{\tabu@lastn@@p #2\@nextchar \in@\in@@} +\def\tabu@lastn@@p #1\@nextchar #2#3\in@@{% + \ifx \in@#2\else + \let\@fornoop \tabu@fornoopORI + \xdef\tabu@mkpreambuffer{\tabu@nbcols\the\tabu@nbcols \tabu@mkpreambuffer}% + \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}% + \expandafter\prepnext@tok + \fi +}% \tabu@lastnoop +\def\tabu@righttok{% + \advance \count@ \m@ne + \toks\count@\expandafter {\the\toks\count@ \tabu@cellright \tabu@cellralign}% + \advance \count@ \@ne +}% \tabu@righttok +\def\tabu@lefttok{\toks\count@\expandafter{\expandafter\tabu@celllalign + \the\toks\count@ \tabu@cellleft}% after because of $ +}% \tabu@lefttok +%% Neutralisation of glues ------------------------------------------ +\let\tabu@cellleft \@empty +\let\tabu@cellright \@empty +\tabu@celllalign@def{\tabu@cellleft}% +\let\tabu@cellralign \@empty +\def\tabu@cell@align #1#2#3{% + \let\tabu@maybesiunitx \toks@ \tabu@celllalign + \global \expandafter \tabu@celllalign@def \expandafter {\the\toks@ #1}% + \toks@\expandafter{\tabu@cellralign #2}% + \xdef\tabu@cellralign{\the\toks@}% + \toks@\expandafter{\tabu@cellleft #3}% + \xdef\tabu@cellleft{\the\toks@}% +}% \tabu@cell@align +\def\tabu@cell@l{% force alignment to left + \tabu@cell@align + {\tabu@removehfil \raggedright \tabu@cellleft}% left + {\tabu@flush1\tabu@ignorehfil}% right + \raggedright +}% \tabu@cell@l +\def\tabu@cell@c{% force alignment to center + \tabu@cell@align + {\tabu@removehfil \centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \centering +}% \tabu@cell@c +\def\tabu@cell@r{% force alignment to right + \tabu@cell@align + {\tabu@removehfil \raggedleft \tabu@flush1\tabu@cellleft} + \tabu@ignorehfil + \raggedleft +}% \tabu@cell@r +\def\tabu@cell@j{% force justification (for p, m, b columns) + \tabu@cell@align + {\tabu@justify\tabu@cellleft} + {} + \tabu@justify +}% \tabu@cell@j +\def\tabu@justify{% + \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip + \parfillskip\@flushglue +}% \tabu@justify +%% ragged2e settings +\def\tabu@cell@L{% force alignment to left (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedRight \tabu@cellleft} + {\tabu@flush 1\tabu@ignorehfil} + \RaggedRight +}% \tabu@cell@L +\def\tabu@cell@C{% force alignment to center (ragged2e) + \tabu@cell@align + {\tabu@removehfil \Centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \Centering +}% \tabu@cell@C +\def\tabu@cell@R{% force alignment to right (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedLeft \tabu@flush 1\tabu@cellleft} + \tabu@ignorehfil + \RaggedLeft +}% \tabu@cell@R +\def\tabu@cell@J{% force justification (ragged2e) + \tabu@cell@align + {\justifying \tabu@cellleft} + {} + \justifying +}% \tabu@cell@J +\def\tabu@flush#1{% + \iftabu@colortbl % colortbl uses \hfill rather than \hfil + \hskip \ifnum13<\currentgrouptype \stretch{#1}% + \else \ifdim#1pt<\p@ \tabu@cellskip + \else \stretch{#1} + \fi\fi \relax + \else % array.sty + \ifnum 13<\currentgrouptype + \hfil \hskip1sp \relax \fi + \fi +}% \tabu@flush +\let\tabu@hfil \hfil +\let\tabu@hfill \hfill +\let\tabu@hskip \hskip +\def\tabu@removehfil{% + \iftabu@colortbl + \unkern \tabu@cellskip =\lastskip + \ifnum\gluestretchorder\tabu@cellskip =\tw@ \hskip-\tabu@cellskip + \else \tabu@cellskip \z@skip + \fi + \else + \ifdim\lastskip=1sp\unskip\fi + \ifnum\gluestretchorder\lastskip =\@ne + \hfilneg % \hfilneg for array.sty but not for colortbl... + \fi + \fi +}% \tabu@removehfil +\def\tabu@ignorehfil{\aftergroup \tabu@nohfil} +\def\tabu@nohfil{% \hfil -> do nothing + restore original \hfil + \def\hfil{\let\hfil \tabu@hfil}% local to (alignment template) group +}% \tabu@nohfil +\def\tabu@colortblalignments {% if colortbl + \def\tabu@nohfil{% + \def\hfil {\let\hfil \tabu@hfil}% local to (alignment template) group + \def\hfill {\let\hfill \tabu@hfill}% (colortbl uses \hfill) pfff... + \def\hskip ####1\relax{\let\hskip \tabu@hskip}}% local +}% \tabu@colortblalignments +%% Taking care of footnotes and hyperfootnotes ---------------------- +\long\def\tabu@footnotetext #1{% + \edef\@tempa{\the\tabu@footnotes + \noexpand\footnotetext [\the\csname c@\@mpfn\endcsname]}% + \global\tabu@footnotes\expandafter{\@tempa {#1}}}% +\long\def\tabu@xfootnotetext [#1]#2{% + \global\tabu@footnotes\expandafter{\the\tabu@footnotes + \footnotetext [{#1}]{#2}}} +\let\tabu@xfootnote \@xfootnote +\long\def\tabu@Hy@ftntext{\tabu@Hy@ftntxt {\the \c@footnote }} +\long\def\tabu@Hy@xfootnote [#1]{% + \begingroup + \value\@mpfn #1\relax + \protected@xdef \@thefnmark {\thempfn}% + \endgroup + \@footnotemark \tabu@Hy@ftntxt {#1}% +}% \tabu@Hy@xfootnote +\long\def\tabu@Hy@ftntxt #1#2{% + \edef\@tempa{% + \the\tabu@footnotes + \begingroup + \value\@mpfn #1\relax + \noexpand\protected@xdef\noexpand\@thefnmark {\noexpand\thempfn}% + \expandafter \noexpand \expandafter + \tabu@Hy@footnotetext \expandafter{\Hy@footnote@currentHref}% + }% + \global\tabu@footnotes\expandafter{\@tempa {#2}% + \endgroup}% +}% \tabu@Hy@ftntxt +\long\def\tabu@Hy@footnotetext #1#2{% + \H@@footnotetext{% + \ifHy@nesting + \hyper@@anchor {#1}{#2}% + \else + \Hy@raisedlink{% + \hyper@@anchor {#1}{\relax}% + }% + \def\@currentHref {#1}% + \let\@currentlabelname \@empty + #2% + \fi + }% +}% \tabu@Hy@footnotetext +%% No need for \arraybackslash ! ------------------------------------ +\def\tabu@latextwoe {% +\def\tabu@temp##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@centering \centering \arraybackslash +\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash +\tabu@temp \tabu@raggedright \raggedright \arraybackslash +}% \tabu@latextwoe +\def\tabu@raggedtwoe {% +\def\tabu@temp ##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@Centering \Centering \arraybackslash +\tabu@temp \tabu@RaggedLeft \RaggedLeft \arraybackslash +\tabu@temp \tabu@RaggedRight \RaggedRight \arraybackslash +\tabu@temp \tabu@justifying \justifying \arraybackslash +}% \tabu@raggedtwoe +\def\tabu@normalcrbackslash{\let\\\@normalcr} +\def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{% + \expandafter\tabu@normalcrbackslash \@trivlist}} +%% Utilities: \fbox \fcolorbox and \tabudecimal ------------------- +\def\tabu@fbox {\leavevmode\afterassignment\tabu@beginfbox \setbox\@tempboxa\hbox} +\def\tabu@beginfbox {\bgroup \kern\fboxsep + \bgroup\aftergroup\tabu@endfbox} +\def\tabu@endfbox {\kern\fboxsep\egroup\egroup + \@frameb@x\relax} +\def\tabu@color@b@x #1#2{\leavevmode \bgroup + \def\tabu@docolor@b@x{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}% + \afterassignment\tabu@begincolor@b@x \setbox\z@ \hbox +}% \tabu@color@b@x +\def\tabu@begincolor@b@x {\kern\fboxsep \bgroup + \aftergroup\tabu@endcolor@b@x \set@color} +\def\tabu@endcolor@b@x {\kern\fboxsep \egroup + \dimen@\ht\z@ \advance\dimen@ \fboxsep \ht\z@ \dimen@ + \dimen@\dp\z@ \advance\dimen@ \fboxsep \dp\z@ \dimen@ + \tabu@docolor@b@x \egroup +}% \tabu@endcolor@b@x +%% Corrections (arydshln, delarray, colortbl) ----------------------- +\def\tabu@fix@arrayright {%% \@arrayright is missing from \endarray + \iftabu@colortbl + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \CT@end \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \def\tabu@endarray{% + \crcr \egroup \egroup % + \@arrayright % + \gdef\@preamble{}\CT@end}% + \fi + \else + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \PackageWarning{tabu} + {\string\@arrayright\space is missing from the + \MessageBreak definition of \string\endarray. + \MessageBreak Compatibility with delarray.sty is broken.}% + \fi\fi +}% \tabu@fix@arrayright +\def\tabu@adl@xarraydashrule #1#2#3{% + \ifnum\@lastchclass=\adl@class@start\else + \ifnum\@lastchclass=\@ne\else + \ifnum\@lastchclass=5 \else % @-arg (class 5) and !-arg (class 1) + \adl@leftrulefalse \fi\fi % must be treated the same + \fi + \ifadl@zwvrule\else \ifadl@inactive\else + \@addtopreamble{\vrule\@width\arrayrulewidth + \@height\z@ \@depth\z@}\fi \fi + \ifadl@leftrule + \@addtopreamble{\adl@vlineL{\CT@arc@}{\adl@dashgapcolor}% + {\number#1}#3}% + \else \@addtopreamble{\adl@vlineR{\CT@arc@}{\adl@dashgapcolor}% + {\number#2}#3} + \fi +}% \tabu@adl@xarraydashrule +\def\tabu@adl@act@endpbox {% + \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox + \egroup \egroup + \adl@colhtdp \box\adl@box \hfil +}% \tabu@adl@act@endpbox +\def\tabu@adl@fix {% + \let\adl@xarraydashrule \tabu@adl@xarraydashrule % arydshln + \let\adl@act@endpbox \tabu@adl@act@endpbox % arydshln + \let\adl@act@@endpbox \tabu@adl@act@endpbox % arydshln + \let\@preamerror \@preamerr % arydshln +}% \tabu@adl@fix +%% Correction for longtable' \@startbox definition ------------------ +%% => \everypar is ``missing'' : TeX should be in vertical mode +\def\tabu@LT@startpbox #1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \everypar{% + \vrule \@height \ht\@arstrutbox \@width \z@ + \everypar{}}% +}% \tabu@LT@startpbox +%% \tracingtabu and the package options ------------------ +\DeclareOption{delarray}{\AtEndOfPackage{\RequirePackage{delarray}}} +\DeclareOption{linegoal}{% + \AtEndOfPackage{% + \RequirePackage{linegoal}[2010/12/07]% + \let\tabudefaulttarget \linegoal% \linegoal is \linewidth if not pdfTeX +}} +\DeclareOption{scantokens}{\tabuscantokenstrue} +\DeclareOption{debugshow}{\AtEndOfPackage{\tracingtabu=\tw@}} +\def\tracingtabu {\begingroup\@ifnextchar=% + {\afterassignment\tabu@tracing\count@} + {\afterassignment\tabu@tracing\count@1\relax}} +\def\tabu@tracing{\expandafter\endgroup + \expandafter\tabu@tr@cing \the\count@ \relax +}% \tabu@tracing +\def\tabu@tr@cing #1\relax {% + \ifnum#1>\thr@@ \let\tabu@tracinglines\message + \else \let\tabu@tracinglines\@gobble + \fi + \ifnum#1>\tw@ \let\tabu@DBG \tabu@@DBG + \def\tabu@mkarstrut {\tabu@DBG@arstrut}% + \tabustrutrule 1.5\p@ + \else \let\tabu@DBG \@gobble + \def\tabu@mkarstrut {\tabu@arstrut}% + \tabustrutrule \z@ + \fi + \ifnum#1>\@ne \let\tabu@debug \message + \else \let\tabu@debug \@gobble + \fi + \ifnum#1>\z@ + \let\tabu@message \message + \let\tabu@tracing@save \tabu@message@save + \let\tabu@starttimer \tabu@pdftimer + \else + \let\tabu@message \@gobble + \let\tabu@tracing@save \@gobble + \let\tabu@starttimer \relax + \fi +}% \tabu@tr@cing +%% Setup \AtBeginDocument +\AtBeginDocument{\tabu@AtBeginDocument} +\def\tabu@AtBeginDocument{\let\tabu@AtBeginDocument \@undefined + \ifdefined\arrayrulecolor \tabu@colortbltrue % + \tabu@colortblalignments % different glues are used + \else \tabu@colortblfalse \fi + \ifdefined\CT@arc@ \else \let\CT@arc@ \relax \fi + \ifdefined\CT@drsc@\else \let\CT@drsc@ \relax \fi + \let\tabu@arc@L \CT@arc@ \let\tabu@drsc@L \CT@drsc@ + \ifodd 1\ifcsname siunitx_table_collect_begin:Nn\endcsname % + \expandafter\ifx + \csname siunitx_table_collect_begin:Nn\endcsname\relax 0\fi\fi\relax + \tabu@siunitxtrue + \else \let\tabu@maybesiunitx \@firstofone % + \let\tabu@siunitx \tabu@nosiunitx + \tabu@siunitxfalse + \fi + \ifdefined\adl@array % + \else \let\tabu@adl@fix \relax + \let\tabu@adl@endtrial \@empty \fi + \ifdefined\longtable % + \else \let\longtabu \tabu@nolongtabu \fi + \ifdefined\cellspacetoplimit \tabu@warn@cellspace\fi + \csname\ifcsname ifHy@hyperfootnotes\endcsname % + ifHy@hyperfootnotes\else iffalse\fi\endcsname + \let\tabu@footnotetext \tabu@Hy@ftntext + \let\tabu@xfootnote \tabu@Hy@xfootnote \fi + \ifdefined\FV@DefineCheckEnd% + \tabu@fancyvrb \fi + \ifdefined\color % + \let\tabu@color \color + \def\tabu@leavevmodecolor ##1{% + \def\tabu@leavevmodecolor {\leavevmode ##1}% + }\expandafter\tabu@leavevmodecolor\expandafter{\color}% + \else + \let\tabu@color \tabu@nocolor + \let\tabu@leavevmodecolor \@firstofone \fi + \tabu@latextwoe + \ifdefined\@raggedtwoe@everyselectfont % + \tabu@raggedtwoe + \else + \let\tabu@cell@L \tabu@cell@l + \let\tabu@cell@R \tabu@cell@r + \let\tabu@cell@C \tabu@cell@c + \let\tabu@cell@J \tabu@cell@j \fi + \expandafter\in@ \expandafter\@arrayright \expandafter{\endarray}% + \ifin@ \let\tabu@endarray \endarray + \else \tabu@fix@arrayright \fi% + \everyrow{}% +}% \tabu@AtBeginDocument +\def\tabu@warn@cellspace{% + \PackageWarning{tabu}{% + Package cellspace has some limitations + \MessageBreak And redefines some macros of array.sty. + \MessageBreak Please use \string\tabulinesep\space to control + \MessageBreak vertical spacing of lines inside tabu environment}% +}% \tabu@warn@cellspace +%% tabu Package initialisation +\tabuscantokensfalse +\let\tabu@arc@G \relax +\let\tabu@drsc@G \relax +\let\tabu@evr@G \@empty +\let\tabu@rc@G \@empty +\def\tabu@ls@G {\tabu@linestyle@}% +\let\tabu@@rowfontreset \@empty % +\let\tabu@@celllalign \@empty +\let\tabu@@cellralign \@empty +\let\tabu@@cellleft \@empty +\let\tabu@@cellright \@empty +\def\tabu@naturalXmin {\z@} +\def\tabu@naturalXmax {\z@} +\let\tabu@rowfontreset \@empty +\def\tabulineon {4pt}\let\tabulineoff \tabulineon +\tabu@everyrowtrue +\ifdefined\pdfelapsedtime % + \def\tabu@pdftimer {\xdef\tabu@starttime{\the\pdfelapsedtime}}% +\else \let\tabu@pdftimer \relax \let\tabu@message@etime \relax +\fi +\tracingtabu=\z@ +\newtabulinestyle {=\maxdimen}% creates the 'factory' settings \tabu@linestyle@ +\tabulinestyle{} +\taburowcolors{} +\let\tabudefaulttarget \linewidth +\ProcessOptions* % \ProcessOptions* is quicker ! +\endinput +%% +%% End of file `tabu.sty'. diff --git a/input/bitmap/aerodynamic_obstacle.png b/input/bitmap/aerodynamic_obstacle.png new file mode 100644 index 00000000..5de5d25d Binary files /dev/null and b/input/bitmap/aerodynamic_obstacle.png differ diff --git a/input/bitmap/damBreak.png b/input/bitmap/damBreak.png new file mode 100644 index 00000000..78835570 Binary files /dev/null and b/input/bitmap/damBreak.png differ diff --git a/input/bitmap/doubleDam/doubleDam.png b/input/bitmap/doubleDam/doubleDam.png new file mode 100644 index 00000000..ad8076f5 Binary files /dev/null and b/input/bitmap/doubleDam/doubleDam.png differ diff --git a/input/bitmap/doubleDam/doubleDam.txt b/input/bitmap/doubleDam/doubleDam.txt new file mode 100644 index 00000000..0a297f6e --- /dev/null +++ b/input/bitmap/doubleDam/doubleDam.txt @@ -0,0 +1,73 @@ +# Settings file for numsim program +# Run ./numsim lid_driven_cavity.txt + +# Problem description +physicalSizeX = 2.0 # physical size of the domain +physicalSizeY = 2.0 +endTime = 10.0 # duration of the simulation +re = 1000 # Reynolds number +gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity +gY = -1.0 + + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 0 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0.0 +PressureRight = 0.0 +PressureBottom = 0.0 +PressureLeft = 0.0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 0.75 +obstaclePositionY = 0.75 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = true +pathToBitmap = ../input/bitmap/doubleDam/small.png + +# Discretization parameters +nCellsX = 20 # number of cells in x and y direction +nCellsY = 20 + +useDonorCell = true # if donor cell discretization should be used, possible values: true false +alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences +tau = 0.5 # safety factor for time step width +maximumDt = 0.0005 # maximum values for time step width + +# Solver parameters +pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG +omega = 1.6 # overrelaxation factor, only for SOR solver +epsilon = 1e-5 # tolerance for 2-norm of residual +maximumNumberOfIterations = 1e5 # maximum number of iterations in the solver + +# Particle Tracker +useFluidTracer = true +particlePerCell = 100 +fluidTracerMethod = fixed + diff --git a/input/bitmap/doubleDam/doubleDamLeft.png b/input/bitmap/doubleDam/doubleDamLeft.png new file mode 100644 index 00000000..964979f9 Binary files /dev/null and b/input/bitmap/doubleDam/doubleDamLeft.png differ diff --git a/input/bitmap/doubleDam/doubleDamLeft.txt b/input/bitmap/doubleDam/doubleDamLeft.txt new file mode 100644 index 00000000..4be3431b --- /dev/null +++ b/input/bitmap/doubleDam/doubleDamLeft.txt @@ -0,0 +1,73 @@ +# Settings file for numsim program +# Run ./numsim lid_driven_cavity.txt + +# Problem description +physicalSizeX = 2.0 # physical size of the domain +physicalSizeY = 2.0 +endTime = 10.0 # duration of the simulation +re = 1000 # Reynolds number +gX = -1.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity +gY = 0.0 + + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 0 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0.0 +PressureRight = 0.0 +PressureBottom = 0.0 +PressureLeft = 0.0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 0.75 +obstaclePositionY = 0.75 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = true +pathToBitmap = ../input/bitmap/doubleDam/smallLeft.png + +# Discretization parameters +nCellsX = 20 # number of cells in x and y direction +nCellsY = 20 + +useDonorCell = true # if donor cell discretization should be used, possible values: true false +alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences +tau = 0.5 # safety factor for time step width +maximumDt = 0.0005 # maximum values for time step width + +# Solver parameters +pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG +omega = 1.6 # overrelaxation factor, only for SOR solver +epsilon = 1e-5 # tolerance for 2-norm of residual +maximumNumberOfIterations = 1e5 # maximum number of iterations in the solver + +# Particle Tracker +useFluidTracer = true +particlePerCell = 100 +fluidTracerMethod = fixed + diff --git a/input/bitmap/doubleDam/doubleDamRight.png b/input/bitmap/doubleDam/doubleDamRight.png new file mode 100644 index 00000000..3e6df44c Binary files /dev/null and b/input/bitmap/doubleDam/doubleDamRight.png differ diff --git a/input/bitmap/doubleDam/doubleDamRight.txt b/input/bitmap/doubleDam/doubleDamRight.txt new file mode 100644 index 00000000..859f68e8 --- /dev/null +++ b/input/bitmap/doubleDam/doubleDamRight.txt @@ -0,0 +1,73 @@ +# Settings file for numsim program +# Run ./numsim lid_driven_cavity.txt + +# Problem description +physicalSizeX = 2.0 # physical size of the domain +physicalSizeY = 2.0 +endTime = 10.0 # duration of the simulation +re = 1000 # Reynolds number +gX = 0.5 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity +gY = 0.0 + + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 0 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0.0 +PressureRight = 0.0 +PressureBottom = 0.0 +PressureLeft = 0.0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 0.75 +obstaclePositionY = 0.75 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = true +pathToBitmap = ../input/bitmap/doubleDam/smallRight.png + +# Discretization parameters +nCellsX = 20 # number of cells in x and y direction +nCellsY = 20 + +useDonorCell = true # if donor cell discretization should be used, possible values: true false +alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences +tau = 0.5 # safety factor for time step width +maximumDt = 0.0005 # maximum values for time step width + +# Solver parameters +pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG +omega = 1.6 # overrelaxation factor, only for SOR solver +epsilon = 1e-5 # tolerance for 2-norm of residual +maximumNumberOfIterations = 1e5 # maximum number of iterations in the solver + +# Particle Tracker +useFluidTracer = true +particlePerCell = 100 +fluidTracerMethod = fixed + diff --git a/input/bitmap/doubleDam/doubleDamTop.png b/input/bitmap/doubleDam/doubleDamTop.png new file mode 100644 index 00000000..9351bd23 Binary files /dev/null and b/input/bitmap/doubleDam/doubleDamTop.png differ diff --git a/input/bitmap/doubleDam/doubleDamTop.txt b/input/bitmap/doubleDam/doubleDamTop.txt new file mode 100644 index 00000000..5d1c950b --- /dev/null +++ b/input/bitmap/doubleDam/doubleDamTop.txt @@ -0,0 +1,73 @@ +# Settings file for numsim program +# Run ./numsim lid_driven_cavity.txt + +# Problem description +physicalSizeX = 2.0 # physical size of the domain +physicalSizeY = 2.0 +endTime = 10.0 # duration of the simulation +re = 1000 # Reynolds number +gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity +gY = 1.0 + + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 0 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0.0 +PressureRight = 0.0 +PressureBottom = 0.0 +PressureLeft = 0.0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 0.75 +obstaclePositionY = 0.75 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = true +pathToBitmap = ../input/bitmap/doubleDam/smallTop.png + +# Discretization parameters +nCellsX = 20 # number of cells in x and y direction +nCellsY = 20 + +useDonorCell = true # if donor cell discretization should be used, possible values: true false +alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences +tau = 0.5 # safety factor for time step width +maximumDt = 0.0005 # maximum values for time step width + +# Solver parameters +pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG +omega = 1.6 # overrelaxation factor, only for SOR solver +epsilon = 1e-5 # tolerance for 2-norm of residual +maximumNumberOfIterations = 1e5 # maximum number of iterations in the solver + +# Particle Tracker +useFluidTracer = true +particlePerCell = 100 +fluidTracerMethod = fixed + diff --git a/input/bitmap/doubleDam/small.png b/input/bitmap/doubleDam/small.png new file mode 100644 index 00000000..31d3a6a0 Binary files /dev/null and b/input/bitmap/doubleDam/small.png differ diff --git a/input/bitmap/doubleDam/smallLeft.png b/input/bitmap/doubleDam/smallLeft.png new file mode 100644 index 00000000..5724f4f4 Binary files /dev/null and b/input/bitmap/doubleDam/smallLeft.png differ diff --git a/input/bitmap/doubleDam/smallRight.png b/input/bitmap/doubleDam/smallRight.png new file mode 100644 index 00000000..093267c8 Binary files /dev/null and b/input/bitmap/doubleDam/smallRight.png differ diff --git a/input/bitmap/doubleDam/smallTop.png b/input/bitmap/doubleDam/smallTop.png new file mode 100644 index 00000000..9eb189bb Binary files /dev/null and b/input/bitmap/doubleDam/smallTop.png differ diff --git a/input/bitmap/drop/drop3.png b/input/bitmap/drop/drop3.png new file mode 100644 index 00000000..0b6a1d08 Binary files /dev/null and b/input/bitmap/drop/drop3.png differ diff --git a/input/bitmap/drop/dropTheComet.png b/input/bitmap/drop/dropTheComet.png new file mode 100644 index 00000000..40336c36 Binary files /dev/null and b/input/bitmap/drop/dropTheComet.png differ diff --git a/input/bitmap/drop/dropWater.png b/input/bitmap/drop/dropWater.png new file mode 100644 index 00000000..b2ba642b Binary files /dev/null and b/input/bitmap/drop/dropWater.png differ diff --git a/input/bitmap/drop/dropWaterHighResolution.png b/input/bitmap/drop/dropWaterHighResolution.png new file mode 100644 index 00000000..5f95fcfc Binary files /dev/null and b/input/bitmap/drop/dropWaterHighResolution.png differ diff --git a/input/bitmap/drop/dropWaterWide.png b/input/bitmap/drop/dropWaterWide.png new file mode 100644 index 00000000..a5405978 Binary files /dev/null and b/input/bitmap/drop/dropWaterWide.png differ diff --git a/input/bitmap/drop/dropWide.png b/input/bitmap/drop/dropWide.png new file mode 100644 index 00000000..39721de8 Binary files /dev/null and b/input/bitmap/drop/dropWide.png differ diff --git a/input/bitmap/drop/dropWide_HighResolution.png b/input/bitmap/drop/dropWide_HighResolution.png new file mode 100644 index 00000000..766b1e39 Binary files /dev/null and b/input/bitmap/drop/dropWide_HighResolution.png differ diff --git a/input/bitmap/quadruple_cavity.png b/input/bitmap/quadruple_cavity.png new file mode 100644 index 00000000..84b1b3eb Binary files /dev/null and b/input/bitmap/quadruple_cavity.png differ diff --git a/input/different_re/2000.txt b/input/different_re/2000.txt deleted file mode 100644 index 04b48d5d..00000000 --- a/input/different_re/2000.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Settings file for numsim program -# Run ./numsim lid_driven_cavity.txt - -# Problem description -physicalSizeX = 2.0 # physical size of the domain -physicalSizeY = 2.0 -endTime = 10.0 # duration of the simulation -re = 100 # Reynolds number -gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity -gY = 0.0 - -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 - -# Discretization parameters -nCellsX = 20 # number of cells in x and y direction -nCellsY = 20 -useDonorCell = true # if donor cell discretization should be used, possible values: true false -alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences -tau = 0.5 # safety factor for time step width -maximumDt = 0.1 # maximum values for time step width - -# Solver parameters -pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG -omega = 1.6 # overrelaxation factor, only for SOR solver -epsilon = 1e-5 # tolerance for 2-norm of residual -maximumNumberOfIterations = 1e4 # maximum number of iterations in the solver diff --git a/input/different_re/500.txt b/input/different_re/500.txt deleted file mode 100644 index 04b48d5d..00000000 --- a/input/different_re/500.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Settings file for numsim program -# Run ./numsim lid_driven_cavity.txt - -# Problem description -physicalSizeX = 2.0 # physical size of the domain -physicalSizeY = 2.0 -endTime = 10.0 # duration of the simulation -re = 100 # Reynolds number -gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity -gY = 0.0 - -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 - -# Discretization parameters -nCellsX = 20 # number of cells in x and y direction -nCellsY = 20 -useDonorCell = true # if donor cell discretization should be used, possible values: true false -alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences -tau = 0.5 # safety factor for time step width -maximumDt = 0.1 # maximum values for time step width - -# Solver parameters -pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG -omega = 1.6 # overrelaxation factor, only for SOR solver -epsilon = 1e-5 # tolerance for 2-norm of residual -maximumNumberOfIterations = 1e4 # maximum number of iterations in the solver diff --git a/input/different_resolutions/settings_02.txt b/input/different_resolutions/settings_02.txt deleted file mode 100644 index 85e672bf..00000000 --- a/input/different_resolutions/settings_02.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Settings file for numsim program -# Run ./numsim lid_driven_cavity.txt - -# Problem description -physicalSizeX = 2.0 # physical size of the domain -physicalSizeY = 2.0 -endTime = 1.0 # duration of the simulation -re = 1000 # Reynolds number -gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity -gY = 0.0 - -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 - -# Discretization parameters -nCellsX = 10 # number of cells in x and y direction -nCellsY = 10 -useDonorCell = true # if donor cell discretization should be used, possible values: true false -alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences -tau = 0.5 # safety factor for time step width -maximumDt = 0.1 # maximum values for time step width - -# Solver parameters -pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG -omega = 1.6 # overrelaxation factor, only for SOR solver -epsilon = 1e-5 # tolerance for 2-norm of residual -maximumNumberOfIterations = 1e4 # maximum number of iterations in the solver diff --git a/input/different_resolutions/settings_03.txt b/input/different_resolutions/settings_03.txt deleted file mode 100644 index bbf9cf44..00000000 --- a/input/different_resolutions/settings_03.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Settings file for numsim program -# Run ./numsim lid_driven_cavity.txt - -# Problem description -physicalSizeX = 2.0 # physical size of the domain -physicalSizeY = 2.0 -endTime = 1.0 # duration of the simulation -re = 1000 # Reynolds number -gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity -gY = 0.0 - -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 - -# Discretization parameters -nCellsX = 20 # number of cells in x and y direction -nCellsY = 20 -useDonorCell = true # if donor cell discretization should be used, possible values: true false -alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences -tau = 0.5 # safety factor for time step width -maximumDt = 0.1 # maximum values for time step width - -# Solver parameters -pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG -omega = 1.6 # overrelaxation factor, only for SOR solver -epsilon = 1e-5 # tolerance for 2-norm of residual -maximumNumberOfIterations = 1e4 # maximum number of iterations in the solver diff --git a/input/different_resolutions/settings_05.txt b/input/different_resolutions/settings_05.txt deleted file mode 100644 index 2eb5ef4b..00000000 --- a/input/different_resolutions/settings_05.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Settings file for numsim program -# Run ./numsim lid_driven_cavity.txt - -# Problem description -physicalSizeX = 2.0 # physical size of the domain -physicalSizeY = 2.0 -endTime = 1.0 # duration of the simulation -re = 1000 # Reynolds number -gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity -gY = 0.0 - -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 - -# Discretization parameters -nCellsX = 80 # number of cells in x and y direction -nCellsY = 80 -useDonorCell = true # if donor cell discretization should be used, possible values: true false -alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences -tau = 0.5 # safety factor for time step width -maximumDt = 0.1 # maximum values for time step width - -# Solver parameters -pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG -omega = 1.6 # overrelaxation factor, only for SOR solver -epsilon = 1e-5 # tolerance for 2-norm of residual -maximumNumberOfIterations = 1e4 # maximum number of iterations in the solver diff --git a/input/different_resolutions/settings_06.txt b/input/different_resolutions/settings_06.txt deleted file mode 100644 index d6c6acc4..00000000 --- a/input/different_resolutions/settings_06.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Settings file for numsim program -# Run ./numsim lid_driven_cavity.txt - -# Problem description -physicalSizeX = 2.0 # physical size of the domain -physicalSizeY = 2.0 -endTime = 1.0 # duration of the simulation -re = 1000 # Reynolds number -gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity -gY = 0.0 - -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 - -# Discretization parameters -nCellsX = 160 # number of cells in x and y direction -nCellsY = 160 -useDonorCell = true # if donor cell discretization should be used, possible values: true false -alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences -tau = 0.5 # safety factor for time step width -maximumDt = 0.1 # maximum values for time step width - -# Solver parameters -pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG -omega = 1.6 # overrelaxation factor, only for SOR solver -epsilon = 1e-5 # tolerance for 2-norm of residual -maximumNumberOfIterations = 1e4 # maximum number of iterations in the solver diff --git a/input/donor_cell.md b/input/donor_cell.md deleted file mode 100644 index d85a5e92..00000000 --- a/input/donor_cell.md +++ /dev/null @@ -1,14 +0,0 @@ -# Donor Cell Scheme - -## Used Formulas - \f[ -$$ \begin{align*} - [(uv)_x]_{i,j} = &(1 - \alpha) \\ - & u(i - 1, j + \frac{1}{2})^+ v(i - 1, j) \\ - & u(i - 1, j + \frac{1}{2})^- v(i, j) \\ - & u(i,j+\frac{1}{2})^+ v(i, j) \\ - & u(i,j+\frac{1}{2})^+ v(i + 1, j) \\ - &+ \alpha \frac{u_{i, j + \frac{1}{2}} v_{i + \frac{1}{2}, j} - u_{i - 1, j + \frac{1}{2}} v_{i - \frac{1}{2}, j}}{dx} -\end{align*}$$ - \f] - diff --git a/input/different_re/100.txt b/input/settings_aerodynamic_obstacle.txt similarity index 50% rename from input/different_re/100.txt rename to input/settings_aerodynamic_obstacle.txt index 04b48d5d..0a17d347 100644 --- a/input/different_re/100.txt +++ b/input/settings_aerodynamic_obstacle.txt @@ -5,23 +5,55 @@ physicalSizeX = 2.0 # physical size of the domain physicalSizeY = 2.0 endTime = 10.0 # duration of the simulation -re = 100 # Reynolds number +re = 1000 # Reynolds number gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity gY = 0.0 -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = Pressure +BCBottom = NoSlip +BCLeft = Pressure + + +# NoSlip boundary conditions + +NoSlipVelTopX = 0 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0 +PressureRight = 0.0 +PressureBottom = 0 +PressureLeft = 10.0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 0.5 +obstaclePositionY = 0.5 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = true +pathToBitmap = ../input/bitmap/aerodynamic_obstacle.png # Discretization parameters -nCellsX = 20 # number of cells in x and y direction -nCellsY = 20 +nCellsX = 3 # number of cells in x and y direction +nCellsY = 3 useDonorCell = true # if donor cell discretization should be used, possible values: true false alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences tau = 0.5 # safety factor for time step width @@ -31,4 +63,4 @@ maximumDt = 0.1 # maximum values for time step width pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG omega = 1.6 # overrelaxation factor, only for SOR solver epsilon = 1e-5 # tolerance for 2-norm of residual -maximumNumberOfIterations = 1e4 # maximum number of iterations in the solver +maximumNumberOfIterations = 1e5 # maximum number of iterations in the solver diff --git a/input/different_re/10000.txt b/input/settings_cavity_with_a_step.txt similarity index 50% rename from input/different_re/10000.txt rename to input/settings_cavity_with_a_step.txt index 04b48d5d..c130ba48 100644 --- a/input/different_re/10000.txt +++ b/input/settings_cavity_with_a_step.txt @@ -2,25 +2,57 @@ # Run ./numsim lid_driven_cavity.txt # Problem description -physicalSizeX = 2.0 # physical size of the domain +physicalSizeX = 4.0 # physical size of the domain physicalSizeY = 2.0 endTime = 10.0 # duration of the simulation -re = 100 # Reynolds number +re = 1000 # Reynolds number gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity gY = 0.0 -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = Pressure +BCBottom = NoSlip +BCLeft = Pressure + + +# NoSlip boundary conditions + +NoSlipVelTopX = 1 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0 +PressureRight = 100.0 +PressureBottom = 0 +PressureLeft = 200.0 + +# Create Rectangular object in domain + +createRectangularObject = true + +obstaclePositionX = 0.0 +obstaclePositionY = 0.0 +obstacleDimensionX = 1.5 +obstacleDimensionY = 1.0 + +# Create domain from PNGBitmap + +# createDomainfromBitmap = true +# pathToBitmap = /home/lukas/Documents/SimTech/Semester2/NumSim/Submission4/Bitmaps/double_cavity.png # Discretization parameters -nCellsX = 20 # number of cells in x and y direction +nCellsX = 40 # number of cells in x and y direction nCellsY = 20 useDonorCell = true # if donor cell discretization should be used, possible values: true false alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences diff --git a/input/settings_damBreak.txt b/input/settings_damBreak.txt new file mode 100644 index 00000000..64a44c99 --- /dev/null +++ b/input/settings_damBreak.txt @@ -0,0 +1,67 @@ +# Settings file for numsim program +# Run ./numsim lid_driven_cavity.txt + +# Problem description +physicalSizeX = 4.0 # physical size of the domain +physicalSizeY = 4.0 +endTime = 10.0 # duration of the simulation +re = 100 # Reynolds number +gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity +gY = -9.81 + + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 0 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0 +PressureRight = 0 +PressureBottom = 0 +PressureLeft = 0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 2 +obstaclePositionY = 0 +obstacleDimensionX = 0.16 +obstacleDimensionY = 0.32 + +# Create domain from PNGBitmap 12 x 23 + +createDomainfromBitmap = true +pathToBitmap = ../input/bitmap/damBreak.png + +# Discretization parameters +nCellsX = 100 # number of cells in x and y direction +nCellsY = 100 + +useDonorCell = true # if donor cell discretization should be used, possible values: true false +alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences +tau = 0.5 # safety factor for time step width +maximumDt = 0.005 # maximum values for time step width + +# Solver parameters +pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG +omega = 1.6 # overrelaxation factor, only for SOR solver +epsilon = 1e-5 # tolerance for 2-norm of residual +maximumNumberOfIterations = 1e5 # maximum number of iterations in the solver diff --git a/input/settings_debug.txt b/input/settings_debug.txt index c1c76989..a7fa5ab3 100644 --- a/input/settings_debug.txt +++ b/input/settings_debug.txt @@ -9,19 +9,51 @@ re = 1000 # Reynolds number gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity gY = 0.0 -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 1 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = -1 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0 +PressureRight = 100.0 +PressureBottom = 0 +PressureLeft = 200.0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 1.5 +obstaclePositionY = 1.5 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = true +pathToBitmap = /home/lukas/Documents/SimTech/Semester2/NumSim/Submission4/Bitmaps/quadruple_cavity.png # Discretization parameters -nCellsX = 20 # number of cells in x and y direction -nCellsY = 20 +nCellsX = 40 # number of cells in x and y direction +nCellsY = 40 useDonorCell = true # if donor cell discretization should be used, possible values: true false alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences tau = 0.5 # safety factor for time step width @@ -32,3 +64,9 @@ pressureSolver = SOR # which pressure solver to use, possible values: GaussSeid omega = 1.6 # overrelaxation factor, only for SOR solver epsilon = 1e-5 # tolerance for 2-norm of residual maximumNumberOfIterations = 1e4 # maximum number of iterations in the solver + +# Particle Tracker +useFluidTracer = false +particlePerCell = 100 +fluidTracerMethod = fixed + diff --git a/input/settings_drop.txt b/input/settings_drop.txt new file mode 100644 index 00000000..3e116480 --- /dev/null +++ b/input/settings_drop.txt @@ -0,0 +1,74 @@ +# Settings file for numsim program +# Run ./numsim lid_driven_cavity.txt + +# Problem description +physicalSizeX = 10.0 # physical size of the domain +physicalSizeY = 2.0 +endTime = 10.0 # duration of the simulation +re = 1000 # Reynolds number +gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity +gY = -10.0 + + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 0 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0.0 +PressureRight = 0.0 +PressureBottom = 0.0 +PressureLeft = 0.0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 0.75 +obstaclePositionY = 0.75 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = true +# pathToBitmap = ../input/bitmap/drop3.png +pathToBitmap = ../input/bitmap/drop/dropTheComet.png + +# Discretization parameters +nCellsX = 20 # number of cells in x and y direction +nCellsY = 20 + +useDonorCell = true # if donor cell discretization should be used, possible values: true false +alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences +tau = 0.5 # safety factor for time step width +maximumDt = 0.0005 # maximum values for time step width + +# Solver parameters +pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG +omega = 1.6 # overrelaxation factor, only for SOR solver +epsilon = 1e-5 # tolerance for 2-norm of residual +maximumNumberOfIterations = 1e5 # maximum number of iterations in the solver + +# Particle Tracker +useFluidTracer = true +particlePerCell = 200 +fluidTracerMethod = fixed + diff --git a/input/different_resolutions/settings_01.txt b/input/settings_lid_driven_cavity_with_a_step.txt similarity index 52% rename from input/different_resolutions/settings_01.txt rename to input/settings_lid_driven_cavity_with_a_step.txt index d11294e6..ec9bacc4 100644 --- a/input/different_resolutions/settings_01.txt +++ b/input/settings_lid_driven_cavity_with_a_step.txt @@ -4,24 +4,56 @@ # Problem description physicalSizeX = 2.0 # physical size of the domain physicalSizeY = 2.0 -endTime = 1.0 # duration of the simulation +endTime = 20.0 # duration of the simulation re = 1000 # Reynolds number gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity gY = 0.0 -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 1 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0 +PressureRight = 100.0 +PressureBottom = 0 +PressureLeft = 200.0 + +# Create Rectangular object in domain + +createRectangularObject = true + +obstaclePositionX = 1.5 +obstaclePositionY = 1.5 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = false +pathToBitmap = /home/lukas/Documents/SimTech/Semester2/NumSim/Submission4/Bitmaps/wing_large.png # Discretization parameters -nCellsX = 5 # number of cells in x and y direction -nCellsY = 5 +nCellsX = 40 # number of cells in x and y direction +nCellsY = 40 useDonorCell = true # if donor cell discretization should be used, possible values: true false alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences tau = 0.5 # safety factor for time step width diff --git a/input/different_resolutions/settings_04.txt b/input/settings_quadruple_cavity.txt similarity index 57% rename from input/different_resolutions/settings_04.txt rename to input/settings_quadruple_cavity.txt index 79c70362..7791d91c 100644 --- a/input/different_resolutions/settings_04.txt +++ b/input/settings_quadruple_cavity.txt @@ -4,20 +4,52 @@ # Problem description physicalSizeX = 2.0 # physical size of the domain physicalSizeY = 2.0 -endTime = 1.0 # duration of the simulation +endTime = 10.0 # duration of the simulation re = 1000 # Reynolds number gX = 0.0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity gY = 0.0 -# Dirichlet boundary conditions -dirichletBottomX = 0 -dirichletBottomY = 0 -dirichletTopX = 1 -dirichletTopY = 0 -dirichletLeftX = 0 -dirichletLeftY = 0 -dirichletRightX = 0 -dirichletRightY = 0 + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 1 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = -1 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0 +PressureRight = 100.0 +PressureBottom = 0 +PressureLeft = 200.0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 1.5 +obstaclePositionY = 1.5 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = true +pathToBitmap = ../input/bitmap/quadruple_cavity.png # Discretization parameters nCellsX = 40 # number of cells in x and y direction diff --git a/input/settings_v3.txt b/input/settings_v3.txt deleted file mode 100644 index 93547571..00000000 --- a/input/settings_v3.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Settings file for numsim program -# Run ./numsim driven_cavity.txt - -# Problem description -physicalSizeX = 4.0 # physical size of the domain -physicalSizeY = 2.0 -endTime = 20.0 # duration of the simulation -re = 1222 # Reynolds number -gX = 0 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity -gY = 0 - -# Dirichlet boundary conditions -dirichletBottomX = -0.1 -dirichletBottomY = 0.2 -dirichletTopX = 0.5 -dirichletTopY = 0.2 -dirichletLeftX = -0.1 -dirichletLeftY = 0 -dirichletRightX = -0.1 -dirichletRightY = 0 - -# Discretization parameters -nCellsX = 40 # number of cells in x and y direction -nCellsY = 30 -useDonorCell = true # if donor cell discretization should be used, possible values: true false -alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences -tau = 0.5 # safety factor for time step width -maximumDt = 0.2 # maximum values for time step width - -# Solver parameters -pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG -omega = 1.6 # overrelaxation factor, only for SOR solver -epsilon = 1e-5 # tolerance for 2-norm of residual -maximumNumberOfIterations = 1e4 # maximum number of iterations in the solver diff --git a/input/settings_water_tap.txt b/input/settings_water_tap.txt new file mode 100644 index 00000000..ace7662e --- /dev/null +++ b/input/settings_water_tap.txt @@ -0,0 +1,79 @@ +# Settings file for numsim program +# Run ./numsim lid_driven_cavity.txt + +# Problem description +physicalSizeX = 2.0 # physical size of the domain +physicalSizeY = 2.0 +endTime = 10.0 # duration of the simulation +re = 1000 # Reynolds number +gX = 0.01 # external forces, set to (gX,gY) = (0,-9.81) to account for gravity +gY = -0.5 + + +# Boundary Conditions Type + +BCTop = NoSlip +BCRight = NoSlip +BCBottom = NoSlip +BCLeft = NoSlip + + +# NoSlip boundary conditions + +NoSlipVelTopX = 0 +NoSlipVelTopY = 0 +NoSlipVelRightX = 0 +NoSlipVelRightY = 0 +NoSlipVelBottomX = 0 +NoSlipVelBottomY = 0 +NoSlipVelLeftX = 0 +NoSlipVelLeftY = 0 + + +# Pressure BoundaryConditions + +PressureTop = 0.0 +PressureRight = 0.0 +PressureBottom = 0.0 +PressureLeft = 0.0 + +# Create Rectangular object in domain + +createRectangularObject = false + +obstaclePositionX = 0.75 +obstaclePositionY = 0.75 +obstacleDimensionX = 0.5 +obstacleDimensionY = 0.5 + +# Create domain from PNGBitmap + +createDomainfromBitmap = true +pathToBitmap = ../input/bitmap/wineTab.png + +# Discretization parameters +nCellsX = 20 # number of cells in x and y direction +nCellsY = 20 + +useDonorCell = true # if donor cell discretization should be used, possible values: true false +alpha = 0.5 # factor for donor-cell scheme, 0 is equivalent to central differences +tau = 0.5 # safety factor for time step width +maximumDt = 0.05 # maximum values for time step width + +# Solver parameters +pressureSolver = SOR # which pressure solver to use, possible values: GaussSeidel SOR CG +omega = 1.6 # overrelaxation factor, only for SOR solver +epsilon = 1e-5 # tolerance for 2-norm of residual +maximumNumberOfIterations = 1e5 # maximum number of iterations in the solver + +# Fluid Tracker +useFluidTracer = true +particlePerCell = 16 +fluidTracerMethod = fixed +useParticleSource = true +particleSourceX = 0.6 +particleSourceY = 1.2 + + + + diff --git a/media/CavityStep.png b/media/CavityStep.png new file mode 100644 index 00000000..98d6b9a1 Binary files /dev/null and b/media/CavityStep.png differ diff --git a/media/CavityStep_Streamtraces.png b/media/CavityStep_Streamtraces.png new file mode 100644 index 00000000..27f831fa Binary files /dev/null and b/media/CavityStep_Streamtraces.png differ diff --git a/media/Example_QuadLidDrivenCavity.png b/media/Example_QuadLidDrivenCavity.png new file mode 100644 index 00000000..d54e0fd8 Binary files /dev/null and b/media/Example_QuadLidDrivenCavity.png differ diff --git a/media/aero_vector.png b/media/aero_vector.png new file mode 100644 index 00000000..f0871c93 Binary files /dev/null and b/media/aero_vector.png differ diff --git a/media/damBreak1.png b/media/damBreak1.png new file mode 100644 index 00000000..a2e7729f Binary files /dev/null and b/media/damBreak1.png differ diff --git a/media/damBreak2.png b/media/damBreak2.png new file mode 100644 index 00000000..e67e84e3 Binary files /dev/null and b/media/damBreak2.png differ diff --git a/media/damBreak3.png b/media/damBreak3.png new file mode 100644 index 00000000..9d090e9d Binary files /dev/null and b/media/damBreak3.png differ diff --git a/media/drop.png b/media/drop.png new file mode 100644 index 00000000..35e3f066 Binary files /dev/null and b/media/drop.png differ diff --git a/media/mask.png b/media/mask.png new file mode 100644 index 00000000..be261016 Binary files /dev/null and b/media/mask.png differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dee3a415..666d583e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,6 +21,10 @@ add_executable(${PROJECT_NAME} storage/array2D.cpp storage/field_variable.cpp + + boundary/mask.cpp + boundary/boundary.cpp + surface/fluid_tracer.cpp solver/pressure_solver.cpp solver/gauss_seidel.cpp @@ -32,12 +36,14 @@ add_executable(${PROJECT_NAME} # Add the project directory to include directories, # to be able to include all project header files from anywhere -target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR}) +target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR} ${PNG_INCLUDE_DIRS}) # Search for the external package "VTK" find_package(VTK) +find_package(PNG REQUIRED) + # Output various cmake variables for demonstration purpose message("If VTK was found on the system: VTK_FOUND: ${VTK_FOUND}") message("The directory of VTK: VTK_DIR: ${VTK_DIR}") @@ -46,7 +52,7 @@ message("The include directory of VTK: VTK_INCLUDE_DIRS: ${VTK_INCLUDE_DIRS}") # If an installation of vtk was found on the system if (VTK_FOUND) include_directories(${VTK_INCLUDE_DIRS}) # add the include directory where the header files are for the compiler - target_link_libraries(${PROJECT_NAME} ${VTK_LIBRARIES}) # add the libraries for the linker + target_link_libraries(${PROJECT_NAME} ${VTK_LIBRARIES} ${PNG_LIBRARIES}) # add the libraries for the linker endif(VTK_FOUND) # install numsim executable in build directory diff --git a/src/boundary/boundary.cpp b/src/boundary/boundary.cpp new file mode 100644 index 00000000..974e1546 --- /dev/null +++ b/src/boundary/boundary.cpp @@ -0,0 +1,673 @@ +#include "boundary.h" + +Boundary::Boundary(std::shared_ptr mask, + std::shared_ptr discretization, + Settings settings) : mask_(mask), discretization_(discretization), settings_(settings) +{ + createBoundaryCellsLists(); +} + +void Boundary::createBoundaryCellsLists() +{ + for (int i = 0; i < mask_->size()[0]; i++) + { + for (int j = 0; j < mask_->size()[1]; j++) + { + int idx = i + j * mask_->size()[0]; + + if (mask_->isDomainBoundary(i, j)) + domainBoundaryCells_.push_back(idx); + if (mask_->isObstacleBoundary(i, j)) + obstacleBoundaryCells_.push_back(idx); + if (mask_->isFluidBoundary(i, j)) + fluidBoundaryCells_.push_back(idx); + } + } +} + +void Boundary::updateBoundary(){ + fluidBoundaryCells_ = {}; + for (int i = 0; i < mask_->size()[0]; i++) { + for (int j = 0; j < mask_->size()[1]; j++) { + int idx = i + j * mask_->size()[0]; + if (mask_->isFluidBoundary(i, j)) + fluidBoundaryCells_.push_back(idx); + } + } +} + +void Boundary::setPressureBoundaryValues() +{ + setPressureDomainBC(); + setPressureObstacleBC(); +} + + +void Boundary::setPressureDomainBC() +{ + for (int idx : domainBoundaryCells_) + { + int i = idx % mask_->size()[0]; + int j = idx / mask_->size()[0]; + + switch ((*mask_)(i, j)) + { + case Mask::DOMAIN_LEFT_NOSLIP: + discretization_->p(i, j) = discretization_->p(i + 1, j); + break; + case Mask::DOMAIN_TOP_NOSLIP: + discretization_->p(i, j) = discretization_->p(i, j - 1); + break; + case Mask::DOMAIN_RIGHT_NOSLIP: + discretization_->p(i, j) = discretization_->p(i - 1, j); + break; + case Mask::DOMAIN_BOTTOM_NOSLIP: + discretization_->p(i, j) = discretization_->p(i, j + 1); + break; + case Mask::DOMAIN_LEFT_PRESSURE: + discretization_->p(i, j) = settings_.PressureLeft; + break; + case Mask::DOMAIN_TOP_PRESSURE: + discretization_->p(i, j) = settings_.PressureTop; + break; + case Mask::DOMAIN_RIGHT_PRESSURE: + discretization_->p(i, j) = settings_.PressureRight; + break; + case Mask::DOMAIN_BOTTOM_PRESSURE: + discretization_->p(i, j) = settings_.PressureBottom; + break; + } + } +} + +void Boundary::setPressureObstacleBC() +{ + for (int idx : obstacleBoundaryCells_) + { + int i = idx % mask_->size()[0]; + int j = idx / mask_->size()[0]; + switch ((*mask_)(i, j)) + { + case Mask::OBSTACLE_BORDER_LEFT: + discretization_->p(i, j) = discretization_->p(i - 1, j); + break; + case Mask::OBSTACLE_BORDER_TOP: + discretization_->p(i, j) = discretization_->p(i, j + 1); + break; + case Mask::OBSTACLE_CORNER_TOP_LEFT: + discretization_->p(i, j) = 0.5 * (discretization_->p(i - 1, j) + discretization_->p(i, j + 1)); + break; + case Mask::OBSTACLE_BORDER_RIGHT: + discretization_->p(i, j) = discretization_->p(i + 1, j); + break; + case Mask::OBSTACLE_CORNER_TOP_RIGHT: + discretization_->p(i, j) = 0.5 * (discretization_->p(i + 1, j) + discretization_->p(i, j + 1)); + break; + case Mask::OBSTACLE_BORDER_BOTTOM: + discretization_->p(i, j) = discretization_->p(i, j - 1); + break; + case Mask::OBSTACLE_CORNER_BOTTOM_RIGHT: + discretization_->p(i, j) = 0.5 * (discretization_->p(i + 1, j) + discretization_->p(i, j - 1)); + break; + case Mask::OBSTACLE_CORNER_BOTTOM_LEFT: + discretization_->p(i, j) = 0.5 * (discretization_->p(i - 1, j) + discretization_->p(i, j - 1)); + break; + } + } +} + +void Boundary::setPressureSurfaceBC() +{ + double dx = discretization_->dx(); + double dy = discretization_->dy(); + + for (int idx : fluidBoundaryCells_) + { + int i = idx % mask_->size()[0]; + int j = idx / mask_->size()[0]; + + + // u and v must be updated before p + + // NORMAL STRESS + switch((*mask_)(i, j)){ + case Mask::FLUID_BORDER_LEFT: + discretization_->p(i, j) = 2/settings_.re*(discretization_->u(i, j) - discretization_->u(i - 1, j))/dx; + break; + case Mask::FLUID_BORDER_TOP: + discretization_->p(i, j) = 2/settings_.re*(discretization_->v(i, j) - discretization_->v(i, j - 1))/dy; + break; + case Mask::FLUID_BORDER_RIGHT: + discretization_->p(i, j) = 2/settings_.re*(discretization_->u(i, j) - discretization_->u(i - 1, j))/dx; + break; + case Mask::FLUID_BORDER_BOTTOM: + discretization_->p(i, j) = 2/settings_.re*(discretization_->v(i, j) - discretization_->v(i, j - 1))/dy; + break; + case Mask::FLUID_CORNER_TOP_LEFT: + discretization_->p(i, j) = -1/(2 * settings_.re) * ( + 1/(2*dy) * (discretization_->u(i, j) + discretization_->u(i - 1, j) + -discretization_->u(i, j - 1) - discretization_->u(i - 1, j - 1)) + + 1/(2*dx) * (discretization_->v(i + 1, j) + discretization_->v(i + 1, j - 1) + -discretization_->v(i, j) - discretization_->v(i, j - 1)) + + ); + break; + case Mask::FLUID_CORNER_TOP_RIGHT: + discretization_->p(i, j) = 1/(2 * settings_.re) * ( + 1/(2*dy) * (discretization_->u(i, j) + discretization_->u(i - 1, j) + -discretization_->u(i, j - 1) - discretization_->u(i - 1, j - 1)) + + 1/(2*dx) * (discretization_->v(i, j) + discretization_->v(i, j - 1) + -discretization_->v(i - 1, j) - discretization_->v(i - 1, j - 1)) + ); + break; + case Mask::FLUID_CORNER_BOTTOM_RIGHT: + discretization_->p(i, j) =-1/(2 * settings_.re) * ( + 1/(2*dy) * (discretization_->u(i, j + 1) + discretization_->u(i - 1, j + 1) + -discretization_->u(i, j) - discretization_->u(i - 1, j)) + + 1/(2*dx) * (discretization_->v(i, j) + discretization_->v(i, j - 1) + -discretization_->v(i - 1, j) - discretization_->v(i - 1, j - 1)) + ); + break; + case Mask::FLUID_CORNER_BOTTOM_LEFT: + discretization_->p(i, j) = 1/(2 * settings_.re) * ( + 1/(2*dy) * (discretization_->u(i, j + 1) + discretization_->u(i - 1, j + 1) + -discretization_->u(i, j) - discretization_->u(i - 1, j)) + + 1/(2*dx) * (discretization_->v(i + 1, j) + discretization_->v(i + 1, j - 1) + -discretization_->v(i, j) - discretization_->v(i, j - 1)) + ); + break; + case Mask::FLUID_COLUMN_VERTICAL: + discretization_->p(i, j) = 2/settings_.re * (discretization_->u(i, j) - discretization_->u(i - 1, j))/dx; + break; + case Mask::FLUID_COLUMN_HORIZONTAL: + discretization_->p(i, j) = 2/settings_.re * (discretization_->v(i, j) - discretization_->v(i, j - 1))/dy; + break; + case Mask::FLUID_SINGLE_LEFT: + discretization_->p(i, j) = 0; + break; + case Mask::FLUID_SINGLE_TOP: + discretization_->p(i, j) = 0; + break; + case Mask::FLUID_SINGLE_RIGHT: + discretization_->p(i, j) = 0; + break; + case Mask::FLUID_SINGLE_BOTTOM: + discretization_->p(i, j) = 0; + break; + case Mask::FLUID_DROPLET: + discretization_->p(i, j) = 0; + break; + default: + std::cout << "ERROR" << std::endl; + break; + } + } +} + +void Boundary::setVelocityBoundaryValues() +{ + setAirCellsZero(); + setVelocitySurfaceBC(); + setVelocityDomainBC(); + setVelocityObstacleBC(); +} + +void Boundary::setVelocityBoundaryValues(double dt){ + updateVelocitySurfaceBC(dt); + setVelocityBoundaryValues(); +} + +void Boundary::setVelocityDomainBC() +{ + for (int idx : domainBoundaryCells_) + { + int i = idx % mask_->size()[0]; + int j = idx / mask_->size()[0]; + switch ((*mask_)(i, j)) + { + case Mask::DOMAIN_LEFT_NOSLIP: + discretization_->u(i, j) = settings_.NoSlipVelLeft[0]; + discretization_->f(i, j) = discretization_->u(i, j); + discretization_->v(i, j) = 2 * settings_.NoSlipVelLeft[1] - discretization_->v(i + 1, j); + break; + case Mask::DOMAIN_TOP_NOSLIP: + discretization_->u(i, j) = 2 * settings_.NoSlipVelTop[0] - discretization_->u(i, j - 1); + discretization_->v(i, j - 1) = settings_.NoSlipVelTop[1]; + discretization_->g(i, j - 1) = discretization_->v(i, j - 1); + break; + case Mask::DOMAIN_RIGHT_NOSLIP: + discretization_->u(i - 1, j) = settings_.NoSlipVelRight[0]; + discretization_->f(i - 1, j) = discretization_->u(i - 1, j); + discretization_->v(i, j) = 2 * settings_.NoSlipVelRight[1] - discretization_->v(i - 1, j); + break; + case Mask::DOMAIN_BOTTOM_NOSLIP: + discretization_->u(i, j) = 2 * settings_.NoSlipVelBottom[0] - discretization_->u(i, j + 1); + discretization_->v(i, j) = settings_.NoSlipVelBottom[1]; + discretization_->g(i, j) = discretization_->v(i, j); + break; + case Mask::DOMAIN_LEFT_PRESSURE: + discretization_->u(i, j) = discretization_->u(i+1, j); + discretization_->f(i, j) = discretization_->u(i, j); + discretization_->v(i, j) = discretization_->v(i+1, j); + discretization_->g(i, j) = discretization_->v(i, j); + break; + case Mask::DOMAIN_TOP_PRESSURE: + discretization_->u(i, j) = discretization_->u(i, j-1); + discretization_->f(i, j) = discretization_->u(i, j); + discretization_->v(i, j) = discretization_->v(i, j-1); + discretization_->g(i, j) = discretization_->v(i, j); + break; + case Mask::DOMAIN_RIGHT_PRESSURE: + discretization_->u(i, j) = discretization_->u(i-1, j); + discretization_->f(i, j) = discretization_->u(i, j); + discretization_->v(i, j) = discretization_->v(i-1, j); + discretization_->g(i, j) = discretization_->v(i, j); + break; + case Mask::DOMAIN_BOTTOM_PRESSURE: + discretization_->u(i, j) = discretization_->u(i, j+1); + discretization_->f(i, j) = discretization_->u(i, j); + discretization_->v(i, j) = discretization_->v(i, j+1); + discretization_->g(i, j) = discretization_->v(i, j); + break; + } + } +} + +void Boundary::setVelocityObstacleBC() +{ + for (int idx : obstacleBoundaryCells_) + { + int i = idx % mask_->size()[0]; + int j = idx / mask_->size()[0]; + switch ((*mask_)(i, j)) + { + case Mask::OBSTACLE_BORDER_LEFT: + discretization_->v(i, j) = -discretization_->v(i - 1, j); + discretization_->u(i - 1, j) = 0.0; + discretization_->f(i - 1, j) = discretization_->u(i - 1, j); + break; + case Mask::OBSTACLE_BORDER_TOP: + discretization_->u(i, j) = -discretization_->u(i, j + 1); + discretization_->v(i, j) = 0.0; + discretization_->g(i, j) = discretization_->v(i, j); + break; + case Mask::OBSTACLE_CORNER_TOP_LEFT: + discretization_->u(i - 1, j) = 0.0; + discretization_->f(i - 1, j) = discretization_->u(i - 1, j); + discretization_->v(i, j) = 0.0; + discretization_->g(i, j) = discretization_->v(i, j); + discretization_->u(i, j) = -discretization_->u(i, j + 1); + discretization_->v(i, j - 1) = -discretization_->v(i - 1, j - 1); + break; + case Mask::OBSTACLE_BORDER_RIGHT: + discretization_->v(i, j) = -discretization_->v(i + 1, j); + discretization_->u(i, j) = 0.0; + discretization_->f(i, j) = discretization_->u(i, j); + break; + case Mask::OBSTACLE_CORNER_TOP_RIGHT: + discretization_->u(i, j) = 0.0; + discretization_->f(i, j) = discretization_->u(i, j); + discretization_->v(i, j) = 0.0; + discretization_->g(i, j) = discretization_->v(i, j); + discretization_->u(i - 1, j) = -discretization_->u(i - 1, j + 1); + discretization_->v(i, j - 1) = -discretization_->v(i + 1, j - 1); + break; + case Mask::OBSTACLE_BORDER_BOTTOM: + discretization_->u(i, j) = -discretization_->u(i, j - 1); + discretization_->v(i, j - 1) = 0.0; + discretization_->g(i, j - 1) = 0.0; + break; + case Mask::OBSTACLE_CORNER_BOTTOM_RIGHT: + discretization_->u(i, j) = 0.0; + discretization_->f(i, j) = discretization_->u(i, j); + discretization_->v(i, j - 1) = 0.0; + discretization_->g(i, j - 1) = discretization_->v(i, j - 1); + discretization_->u(i - 1, j) = -discretization_->u(i - 1, j - 1); + discretization_->v(i, j) = -discretization_->v(i + 1, j); + break; + case Mask::OBSTACLE_CORNER_BOTTOM_LEFT: + discretization_->u(i - 1, j) = 0.0; + discretization_->f(i - 1, j) = discretization_->u(i, j); + discretization_->v(i, j - 1) = 0.0; + discretization_->g(i, j - 1) = discretization_->v(i, j - 1); + discretization_->u(i, j) = -discretization_->u(i, j - 1); + discretization_->v(i, j) = -discretization_->v(i - 1, j); + break; + } + } +} + + +void Boundary::setAirCellsZero() { + for (int i = 1; i < mask_->size()[0] - 1; i++) { + for (int j = 1; j < mask_->size()[1] - 1; j++) { + if (mask_->isAir(i, j)) { + discretization_->p(i, j) = 0; + discretization_->u(i, j) = 0; + discretization_->v(i, j) = 0; + } + } + } +} + +void Boundary::updateVelocitySurfaceBC(double dt){ + + for (int idx : fluidBoundaryCells_){ + + int i = idx % mask_->size()[0]; + int j = idx / mask_->size()[0]; + + switch ((*mask_)(i, j)){ + case Mask::FLUID_COLUMN_HORIZONTAL: + // v + discretization_->v(i, j) = discretization_->v(i, j) + dt * settings_.g[1]; + discretization_->v(i, j - 1) = discretization_->v(i, j - 1) + dt * settings_.g[1]; + break; + case Mask::FLUID_COLUMN_VERTICAL: + // u + discretization_->u(i, j) = discretization_->u(i, j) + dt * settings_.g[0]; + discretization_->u(i - 1, j) = discretization_->u(i - 1, j) + dt * settings_.g[0]; + break; + case Mask::FLUID_SINGLE_LEFT: + // v + discretization_->v(i, j) = discretization_->v(i, j) + dt * settings_.g[1]; + discretization_->v(i, j - 1) = discretization_->v(i, j - 1) + dt * settings_.g[1]; + break; + case Mask::FLUID_SINGLE_TOP: + // u + discretization_->u(i, j) = discretization_->u(i, j) + dt * settings_.g[0]; + discretization_->u(i - 1, j) = discretization_->u(i - 1, j) + dt * settings_.g[0]; + break; + case Mask::FLUID_SINGLE_RIGHT: + // v + discretization_->v(i, j) = discretization_->v(i, j) + dt * settings_.g[1]; + discretization_->v(i, j - 1) = discretization_->v(i, j - 1) + dt * settings_.g[1]; + break; + case Mask::FLUID_SINGLE_BOTTOM: + // u + discretization_->u(i, j) = discretization_->u(i, j) + dt * settings_.g[0]; + discretization_->u(i - 1, j) = discretization_->u(i - 1, j) + dt * settings_.g[0]; + break; + case Mask::FLUID_DROPLET: + // u + discretization_->u(i, j) = discretization_->u(i, j) + dt * settings_.g[0]; + discretization_->u(i - 1, j) = discretization_->u(i - 1, j) + dt * settings_.g[0]; + // v + discretization_->v(i, j) = discretization_->v(i, j) + dt * settings_.g[1]; + discretization_->v(i, j - 1) = discretization_->v(i, j - 1) + dt * settings_.g[1]; + break; + default: + break; + } + } +} + +void Boundary::setVelocitySurfaceBC(){ + + double dxByDy = discretization_->dx() / discretization_->dy(); + double dyByDx = discretization_->dy() / discretization_->dx(); + // Should the dt update step happen here? Then per loop only one execution is allowed + + for (int idx : fluidBoundaryCells_) + { + int i = idx % mask_->size()[0]; + int j = idx / mask_->size()[0]; + + switch ((*mask_)(i, j)) { + case Mask::FLUID_BORDER_LEFT: + // u - CONTINUITY + discretization_->u(i - 1, j) = discretization_->u(i, j) + + dxByDy * (discretization_->v(i, j) - discretization_->v(i, j - 1)); + + // v - TANGENTIAL + if (!mask_->isFluid(i - 1, j - 1)){ + discretization_->v(i - 1, j - 1) = discretization_->v(i, j - 1) + + dxByDy * (discretization_->u(i - 1, j) - discretization_->u(i - 1, j - 1)); + } + break; + + case Mask::FLUID_BORDER_TOP: + // v - CONTINUITY + discretization_->v(i, j) = discretization_->v(i, j - 1) + - dyByDx * (discretization_->u(i, j) - discretization_->u(i - 1, j)); + + // u - TANGENTIAL + if (!mask_->isFluid(i - 1, j + 1)){ + discretization_->u(i - 1, j + 1) = discretization_->u(i - 1, j) + - dyByDx * (discretization_->v(i, j) - discretization_->v(i - 1, j)); + } + break; + case Mask::FLUID_BORDER_RIGHT: + // u - CONTINUITY + discretization_->u(i, j) = discretization_->u(i - 1, j) + - dxByDy * (discretization_->v(i, j) - discretization_->v(i, j - 1)); + + // v - TANGENTIAL + if (!mask_->isFluid(i + 1, j - 1)){ + discretization_->v(i + 1, j - 1) = discretization_->v(i, j - 1) + + dxByDy * (discretization_->u(i, j) - discretization_->u(i, j - 1)); + } + break; + case Mask::FLUID_BORDER_BOTTOM: + // v - CONTINUITY + discretization_->v(i, j - 1) = discretization_->v(i, j) + + dyByDx * (discretization_->u(i, j) - discretization_->u(i - 1, j)); + + + // u - TANGENTIAL + if (!mask_->isFluid(i - 1, j - 1)){ + discretization_->u(i - 1, j - 1) = discretization_->u(i - 1, j) + + dyByDx * (discretization_->v(i, j - 1) - discretization_->v(i - 1, j - 1)); + // f + discretization_->f(i - 1, j - 1) = discretization_->u(i - 1, j - 1); + } + break; + case Mask::FLUID_CORNER_TOP_LEFT: + // u & v - CONTINUITY and TANGENTIAL -> 0 derivative + discretization_->u(i - 1, j) = discretization_->u(i, j); + discretization_->v(i, j) = discretization_->v(i, j - 1); + + if (!mask_->isFluid(i - 1, j + 1)) { + discretization_->u(i - 1, j + 1) = discretization_->u(i - 1, j); // chain, u(i, j) is equvivalent + discretization_->v(i - 1, j) = discretization_->v(i, j); + } + + // v - TANGENTIAL + if (!mask_->isFluid(i - 1, j - 1)) { + discretization_->v(i - 1, j - 1) = discretization_->v(i, j - 1) + + dxByDy * (discretization_->u(i - 1, j) - discretization_->u(i - 1, j - 1)); + + } + break; + case Mask::FLUID_CORNER_TOP_RIGHT: + // u & v - CONTINUITY and TANGENTIAL -> 0 derivative + discretization_->u(i, j) = discretization_->u(i - 1, j); + discretization_->v(i, j) = discretization_->v(i, j - 1); + if (!mask_->isFluid(i + 1, j + 1)){ + discretization_->u(i, j + 1) = discretization_->u(i, j); + discretization_->v(i + 1, j) = discretization_->v(i, j); + } + + // u & v - TANGENTIAL + if (!mask_->isFluid(i - 1, j + 1)) { + discretization_->u(i - 1, j + 1) = discretization_->u(i - 1, j) + - dyByDx * (discretization_->v(i, j) - discretization_->v(i - 1, j)); + } + if (!mask_->isFluid(i + 1, j - 1)){ + discretization_->v(i + 1, j - 1) = discretization_->v(i, j - 1) + - dxByDy * (discretization_->u(i, j) - discretization_->u(i, j - 1)); + } + break; + case Mask::FLUID_CORNER_BOTTOM_RIGHT: + // u & v - CONTINUITY and TANGENTIAL -> 0 derivative + discretization_->u(i, j) = discretization_->u(i - 1, j); + discretization_->v(i, j - 1) = discretization_->v(i, j); + if (!mask_->isFluid(i + 1, j - 1)){ + discretization_->v(i + 1, j - 1) = discretization_->v(i, j - 1); + discretization_->u(i, j - 1) = discretization_->u(i, j); + } + + // u - TANGENTIAL + if (!mask_->isFluid(i - 1, j - 1)) { + discretization_->u(i - 1, j - 1) = discretization_->u(i - 1, j) + + dyByDx * (discretization_->v(i, j - 1) - discretization_->v(i - 1, j - 1)); + } + break; + case Mask::FLUID_CORNER_BOTTOM_LEFT: + // u & v - CONTINUITY and TANGENTIAL -> 0 derivative + discretization_->u(i - 1, j) = discretization_->u(i, j); + discretization_->v(i, j - 1) = discretization_->v(i, j); + if (!mask_->isFluid(i - 1, j - 1)) + { + discretization_->u(i - 1, j - 1) = discretization_->u(i - 1, j); + discretization_->v(i - 1, j - 1) = discretization_->v(i, j - 1); + } + break; + case Mask::FLUID_COLUMN_HORIZONTAL: + // v - ONLY SUBJECT TO GRAVITY -> no update necessary + + // u - TANGENTIAL + if (!mask_->isFluid(i - 1, j + 1)){ + discretization_->u(i - 1, j + 1) = discretization_->u(i - 1, j) + - dyByDx * (discretization_->v(i, j) - discretization_->v(i - 1, j)); + } + if (!mask_->isFluid(i - 1, j - 1)){ + discretization_->u(i - 1, j - 1) = discretization_->u(i - 1, j) + + dyByDx * (discretization_->v(i, j - 1) - discretization_->v(i - 1, j - 1)); + } + break; + case Mask::FLUID_COLUMN_VERTICAL: + // u - ONLY SUBJECT TO GRAVITY -> no update necessary + + // v - TANGENTIAL + if (!mask_->isFluid(i - 1, j - 1)){ + discretization_->v(i - 1, j - 1) = discretization_->v(i, j - 1) + + dxByDy * (discretization_->u(i - 1, j) - discretization_->u(i - 1, j - 1)); + } + if (!mask_->isFluid(i + 1, j - 1)){ + discretization_->v(i + 1, j - 1) = discretization_->v(i, j - 1) + - dxByDy * (discretization_->u(i, j) - discretization_->u(i, j - 1)); + } + break; + case Mask::FLUID_SINGLE_LEFT: + // v - ONLY SUBJECT TO GRAVITY -> no update necessary + + // u - CONTINUITY + discretization_->u(i, j) = discretization_->u(i - 1, j) + - dxByDy * (discretization_->v(i, j) - discretization_->v(i, j - 1)); + // CHAIN + if (!mask_->isFluid(i + 1, j + 1)){ + discretization_->u(i, j + 1) = discretization_->u(i, j); + discretization_->v(i + 1, j) = discretization_->v(i, j); + } + if (!mask_->isFluid(i + 1, j - 1)){ + discretization_->u(i, j - 1) = discretization_->u(i, j); + discretization_->v(i + 1, j - 1) = discretization_->v(i, j - 1); + } + + // u - TANGENTIAL + if (!mask_->isFluid(i - 1, j - 1)){ + discretization_->u(i - 1, j - 1) = discretization_->u(i - 1, j) + + dyByDx * (discretization_->v(i, j - 1) - discretization_->v(i - 1, j - 1)); + } + if (!mask_->isFluid(i - 1, j + 1)){ + discretization_->u(i - 1, j + 1) = discretization_->u(i - 1, j) + - dyByDx * (discretization_->v(i, j) - discretization_->v(i - 1, j)); + } + break; + case Mask::FLUID_SINGLE_TOP: + // v - CONTINUITY + discretization_->v(i, j - 1) = discretization_->v(i, j) + + dyByDx * (discretization_->u(i, j) - discretization_->u(i - 1, j)); + + // CHAIN + if (!mask_->isFluid(i - 1, j - 1)){ + discretization_->u(i - 1, j - 1) = discretization_->u(i - 1, j); + discretization_->v(i - 1, j - 1) = discretization_->v(i, j - 1); + } + if (!mask_->isFluid(i + 1, j - 1)){ + discretization_->u(i, j - 1) = discretization_->u(i, j); + discretization_->v(i + 1, j - 1) = discretization_->v(i, j - 1); + } + + // Tangential stress is calculated by TOP cell + break; + case Mask::FLUID_SINGLE_RIGHT: + // v - ONLY SUBJECT TO GRAVITY -> no update necessary + + // u - CONTINUITY + discretization_->u(i - 1, j) = discretization_->u(i, j) + + dxByDy * (discretization_->v(i, j) - discretization_->v(i, j - 1)); + + // Chain + if (!mask_->isFluid(i - 1, j - 1)){ + discretization_->u(i - 1, j - 1) = discretization_->u(i - 1, j); + discretization_->v(i - 1, j - 1) = discretization_->v(i, j - 1); + } + if (!mask_->isFluid(i - 1, j + 1)){ + discretization_->u(i - 1, j + 1) = discretization_->u(i - 1, j); + discretization_->v(i - 1, j) = discretization_->v(i, j); + } + + // Tangential stress is calculated by RIGHT cell + break; + case Mask::FLUID_SINGLE_BOTTOM: + // u - ONLY SUBJECT TO GRAVITY -> no update necessary + + // v - CONTINUITY + discretization_->v(i, j) = discretization_->v(i, j - 1) + - dyByDx * (discretization_->u(i, j) - discretization_->u(i - 1, j)); + + // CHAIN + if (!mask_->isFluid(i - 1, j + 1)){ + discretization_->u(i - 1, j + 1) = discretization_->u(i - 1, j); + discretization_->v(i - 1, j) = discretization_->v(i, j); + } + if (!mask_->isFluid(i + 1, j + 1)){ + discretization_->u(i, j + 1) = discretization_->u(i, j); + discretization_->v(i + 1, j) = discretization_->v(i, j); + } + + // v - TANGENTIAL + if (!mask_->isFluid(i - 1, j - 1)){ + discretization_->v(i - 1, j - 1) = discretization_->v(i, j - 1) + + dxByDy * (discretization_->u(i - 1, j) - discretization_->u(i - 1, j - 1)); + } + if (!mask_->isFluid(i + 1, j - 1)){ + discretization_->v(i + 1, j - 1) = discretization_->v(i, j - 1) + - dxByDy * (discretization_->u(i, j) - discretization_->u(i, j - 1)); + } + break; + case Mask::FLUID_DROPLET: + // CHAIN + if (!mask_->isFluid(i - 1, j - 1)){ + discretization_->u(i - 1, j - 1) = discretization_->u(i - 1, j); + discretization_->v(i - 1, j - 1) = discretization_->v(i, j - 1); + } + if (!mask_->isFluid(i - 1, j + 1)){ + discretization_->u(i - 1, j + 1) = discretization_->u(i - 1, j); + discretization_->v(i - 1, j) = discretization_->v(i, j); + } + if (!mask_->isFluid(i + 1, j + 1)){ + discretization_->u(i, j + 1) = discretization_->u(i, j); + discretization_->v(i + 1, j) = discretization_->v(i, j); + } + if (!mask_->isFluid(i + 1, j - 1)){ + discretization_->u(i, j - 1) = discretization_->u(i, j); + discretization_->v(i + 1, j - 1) = discretization_->v(i, j - 1); + } + break; + default: + std::cout << "ERROR" << (*mask_)(i, j) << "i" << i << " j " << j << std::endl; + } + } +} + + +bool Boundary::doCalculateF(int i, int j) const { + return (mask_->isFluid(i, j) && mask_->isFluid(i + 1, j)); +} + +bool Boundary::doCalculateG(int i, int j) const { + return (mask_->isFluid(i, j) && mask_->isFluid(i, j + 1)); +} diff --git a/src/boundary/boundary.h b/src/boundary/boundary.h new file mode 100644 index 00000000..6793ab4e --- /dev/null +++ b/src/boundary/boundary.h @@ -0,0 +1,116 @@ +#pragma once + +#include "mask.h" +#include "../discretization/discretization.h" +#include "../settings_parser/settings.h" +#include +#include + +/** + * @class Boundary + * @brief Class responsible to caluclate boundary conditions + * + */ +class Boundary +{ +public: + /** + * @brief Constructor. + * + * @param discretization instance of Discretization holding the needed field variables for rhs and p + * @param mask instance of mask holding the boundary condition enums for each cell tolerance for the solver + * @param settings holding the necessary domainn boundary condition + */ + Boundary(std::shared_ptr mask, std::shared_ptr discretization, Settings settings); + + /** + * @brief calculates and sets the pressure boundary values for obstacles and domain boundary + */ + void setPressureBoundaryValues(); + + /** + * @brief calculates and sets the pressure boundary values for surface boundary + * + * Only needs to be set once -> no need to update each solver iteration + */ + void setPressureSurfaceBC(); + + /** + * @brief calculates and sets the velocity boundary values for surface, obstacle and domain boundary + */ + void setVelocityBoundaryValues(); + + /** + * @brief overloaded function that sets velocity boundary + * + * necessary when fluid tracker is used + * + * @param dt current time step + */ + void setVelocityBoundaryValues(double dt); + + /** + * @brief returns true if cell left and rigt of F value are fluid (not a boundary value) + */ + bool doCalculateF(int i, int j) const; + + /** + * @brief returns true if cell top and bottom of G value are fluid (not a boundary value) + */ + bool doCalculateG(int i, int j) const; + + /** + * @brief updates fluid boundary cell list + */ + void updateBoundary(); + + std::shared_ptr mask_; //!< shared pointer to mask entity + +private: + /** + * @brief creates 3 lists for all fluid, obstacle and domain boundary cells + */ + void createBoundaryCellsLists(); + + /** + * @brief Set pressure values at domain boundary + */ + void setPressureDomainBC(); + + /** + * @brief Set pressure values at obstacle boundary + */ + void setPressureObstacleBC(); + + /** + * @brief Set velocity values at domain boundary + */ + void setVelocityDomainBC(); + + /** + * @brief Set velocity values at obstacle boundary + */ + void setVelocityObstacleBC(); + + /** + * @brief Set velocity values at surface boundary + */ + void setVelocitySurfaceBC(); + + /** + * @brief Update velocity boundary conditions at surface + */ + void updateVelocitySurfaceBC(double dt); + + /** + * @brief set values in dirscretization for all air cells to zero + */ + void setAirCellsZero(); + + std::shared_ptr discretization_; //!< shared pointer to discretization entity + Settings settings_; //!< settings loaded from settings file + + std::vector domainBoundaryCells_; //!< indice list of all domain boundary cells + std::vector obstacleBoundaryCells_; //!< indice list of all obstacle boundary cells + std::vector fluidBoundaryCells_; //!< indice list of all fluid boundary cells +}; \ No newline at end of file diff --git a/src/boundary/mask.cpp b/src/boundary/mask.cpp new file mode 100644 index 00000000..6bb4285d --- /dev/null +++ b/src/boundary/mask.cpp @@ -0,0 +1,315 @@ +#include "mask.h" + +Mask::Mask( Settings settings) : settings_(settings) +{ + if (settings_.createDomainfromBitmap) + createMaskFromPNGBitMap(); + else + { + assert(settings_.nCells[0] > 0 && settings_.nCells[1] > 0); + + size_ = {settings_.nCells[0] + 2, settings_.nCells[1] + 2}; + data_.resize(size_[0] * size_[1], FLUID); + } + + if (settings_.createRectangularObject) + makeRectangularObstacle(); + + setFluidBC(); + setDomainBC(); + setObstacleBC(); +} + +int &Mask::operator()(int i, int j) { + assert(i >= 0 && i < size_[0] && j >= 0 && j < size_[1]); + return data_[i + j * size_[0]]; +} + +int Mask::operator()(int i, int j) const { + assert(i >= 0 && i < size_[0] && j >= 0 && j < size_[1]); + return data_[i + j * size_[0]]; +} + +std::array Mask::size() const { + return size_; +} + +void Mask::resetMask() { + for (int i = 0; i < size_[0]; i++) { + for (int j = 0; j < size_[1]; j++) { + if (!isObstacle(i, j)) { + data_[i + j * size_[0]] = AIR; + } + } + } +} + +// Primitive type +bool Mask::isFluid(int i, int j) const { + return (data_[i + j * size_[0]] < FLUID_TYPE); + } + +bool Mask::isObstacle(int i, int j) const { + return (data_[i + j * size_[0]] >= OBSTACLE); + } + +bool Mask::isAir(int i, int j) const { + return (data_[i + j * size_[0]] == AIR); + } + +// Boundary type +bool Mask::isDomainBoundary(int i, int j) const{ + return (*this)(i,j)>Mask::DOMAIN_BOUNDARY; +} + +bool Mask::isObstacleBoundary(int i, int j) const{ + return ((*this)(i,j)>Mask::OBSTACLE_INSIDE && + (*this)(i,j)(std::floor(scaleX * nCellsX)) + 1; + int i_end = static_cast(std::ceil((settings_.obstaclePosition[0] + settings_.obstacleDimension[0]) / settings_.physicalSize[0] * nCellsX)) + 1; + int j_beg = static_cast(std::floor(scaleY * nCellsY)) + 1; + int j_end = static_cast(std::ceil((settings_.obstaclePosition[1] + settings_.obstacleDimension[1]) / settings_.physicalSize[1] * nCellsY)) + 1; + + std::cout << i_beg << " from obstacle Position" << settings_.obstaclePosition[0] << " and size " << size_[0] - 2 << std::endl; + std::cout << i_end << " from obstacle Size " << settings_.obstacleDimension[0] << " and size " << size_[0] - 2 << std::endl; + + for (int i = i_beg; i < i_end; i++) + { + for (int j = j_beg; j < j_end; j++) + { + data_[i + j * size_[0]] = OBSTACLE; + } + } +}; + +void Mask::createMaskFromPNGBitMap() +{ + std::cout << "Creating Domain from PNGBitMap\n"; + const char *file_path = settings_.pathToBitmap.c_str(); + FILE *fp = fopen(file_path, "rb"); + if (!fp) + abort(); + + png_structp png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (!png) + abort(); + + png_infop info = png_create_info_struct(png); + if (!info) + abort(); + + if (setjmp(png_jmpbuf(png))) + abort(); + + png_init_io(png, fp); + + png_read_info(png, info); + + int width = png_get_image_width(png, info); + int height = png_get_image_height(png, info); + png_byte color_type = png_get_color_type(png, info); + png_byte bit_depth = png_get_bit_depth(png, info); + + std::cout << "Bitmap width: " << width << ", Bitmap height: " << height << std::endl; + + size_ = {width + 2, height + 2}; + data_.resize(size_[0] * size_[1], FLUID); + + if (bit_depth == 16) + png_set_strip_16(png); + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png); + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) + png_set_expand_gray_1_2_4_to_8(png); + if (png_get_valid(png, info, PNG_INFO_tRNS)) + png_set_tRNS_to_alpha(png); + + if (color_type == PNG_COLOR_TYPE_RGB || color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_PALETTE) + png_set_filler(png, 0xFF, PNG_FILLER_AFTER); + + if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png); + + png_read_update_info(png, info); + + png_bytep *row_pointers = new png_bytep[height]; + for (int y = 0; y < height; y++) + row_pointers[y] = new png_byte[png_get_rowbytes(png, info)]; + + png_read_image(png, row_pointers); + + fclose(fp); + + // Iterate over each pixel + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + png_byte *pixel = &row_pointers[y][x * 4]; // Assuming RGBA format + + int red = pixel[0]; + int green = pixel[1]; + int blue = pixel[2]; + + // Black pixel + if (red == 0 && green == 0 && blue == 0) + (*this)(x+1,height-y) = OBSTACLE; + //White pixel + else if (red == 255 && green == 255 && blue == 255) + (*this)(x+1,height-y) = AIR; + // Blue pixel + else + (*this)(x+1,height-y) = FLUID; + } + } + + // Clean up + for (int y = 0; y < height; y++) + delete[] row_pointers[y]; + delete[] row_pointers; +} + + +void Mask::setFluidBC() +{ + for (int i = 0; i < size_[0]; i++) { + for (int j = 0; j < size_[1]; j++) { + int idx = i + j * size_[0]; + + if (Mask::isFluid(i, j)) + { + data_[idx] = 1 * !Mask::isAir(i - 1, j) + + 2 * !Mask::isAir(i, j + 1) + + 4 * !Mask::isAir(i + 1, j) + + 8 * !Mask::isAir(i, j - 1); + } + } + } +} + +void Mask::setDomainBC() +{ + // Set domain boundaries + + for (int i = 0; i < size_[0]; i++) + { + // Bottom Domain Boundary + if (data_[i + size_[0]] > OBSTACLE) + data_[i] = OBSTACLE_INSIDE; + else if (settings_.BCBottom == "NoSlip") + data_[i] = DOMAIN_BOTTOM_NOSLIP; + else if (settings_.BCBottom == "Pressure") + data_[i] = DOMAIN_BOTTOM_PRESSURE; + + // Top Domain Boundary + if (data_[i + (size_[1] - 2) * size_[0]] > OBSTACLE) + data_[i + (size_[1] - 1) * size_[0]] = OBSTACLE_INSIDE; + else if (settings_.BCTop == "NoSlip") + data_[i + (size_[1] - 1) * size_[0]] = DOMAIN_TOP_NOSLIP; + else if (settings_.BCTop == "Pressure") + data_[i + (size_[1] - 1) * size_[0]] = DOMAIN_TOP_PRESSURE; + } + + for (int j = 0; j < size_[1]; j++) + { + // Left Domain Boundary + if (data_[j * size_[0] + 1] > OBSTACLE) + data_[j * size_[0]] = OBSTACLE_INSIDE; + else if (settings_.BCLeft == "NoSlip") + data_[j * size_[0]] = DOMAIN_LEFT_NOSLIP; + else if (settings_.BCLeft == "Pressure") + data_[j * size_[0]] = DOMAIN_LEFT_PRESSURE; + + // Right Domain Boundary + if (data_[(size_[0] - 2) + j * size_[0]] > OBSTACLE) + data_[(size_[0] - 1) + j * size_[0]] = OBSTACLE_INSIDE; + else if (settings_.BCRight == "NoSlip") + data_[(size_[0] - 1) + j * size_[0]] = DOMAIN_RIGHT_NOSLIP; + else if (settings_.BCRight == "Pressure") + data_[(size_[0] - 1) + j * size_[0]] = DOMAIN_RIGHT_PRESSURE; + } + + // corners of domain + data_[0] = OBSTACLE_INSIDE; + data_[size_[0] - 1] = OBSTACLE_INSIDE; + data_[0 + size_[0] * (size_[1] - 1)] = OBSTACLE_INSIDE; + data_[size_[0] - 1 + size_[0] * (size_[1] - 1)] = OBSTACLE_INSIDE; +} + +void Mask::setObstacleBC() +{ + for (int i = 0; i < size_[0]; i++) + { + for (int j = 0; j < size_[1]; j++) + { + if ((*this)(i, j) == OBSTACLE) + { + int BC = 1 * Mask::isFluid(i - 1, j) + + 2 * Mask::isFluid(i, j + 1) + + 4 * Mask::isFluid(i + 1, j) + + 8 * Mask::isFluid(i, j - 1) + + 100; + + bool BCinForbiddenCombinations = std::find(std::begin(forbiddenObstacleFluidCombinations), std::end(forbiddenObstacleFluidCombinations), BC) != std::end(forbiddenObstacleFluidCombinations); + + // Check that obstacle is not only one cell wide + if (Mask::isAir(i - 1, j) && Mask::isAir(i + 1, j)) + throw std::runtime_error("Obstacel is only one cell wide at i: " + std::to_string(i) + " ,j: " + std::to_string(j)); + else if (Mask::isAir(i, j + 1) && Mask::isAir(i, j - 1)) + throw std::runtime_error("Obstacel is only one cell wide at i: " + std::to_string(i) + " ,j: " + std::to_string(j)); + else if (BCinForbiddenCombinations) + throw std::runtime_error("Obstacel is only one cell wide at i: " + std::to_string(i) + " ,j: " + std::to_string(j)); + else + (*this)(i, j) = BC; + } + } + } +} + + +void Mask::printMask() const{ + for (int j = size_[1] - 1; j >= 0; j--){ + for (int i = 0; i < size_[0]; i++){ + if (data_[i + j * size_[0]] == AIR){ + std::cout << " "; + } else { + std::cout << std::setw(3) << std::setfill('0') << data_[i + j * size_[0]] << " "; + } + } + std::cout << std::endl; + } +} + + diff --git a/src/boundary/mask.h b/src/boundary/mask.h new file mode 100644 index 00000000..dc6d2ec4 --- /dev/null +++ b/src/boundary/mask.h @@ -0,0 +1,221 @@ +#pragma once + +#include +#include +#include +#include + +#include +#include +#include +#include +#include "../settings_parser/settings.h" + +class Mask +{ +public: + /** + * @brief constructor. + * + * @param setting settings containing necessary user input + */ + Mask(Settings settings); + + enum CellType //!< enums used to encode cell type and boundary condition + { + FLUID_DROPLET = 0, + + FLUID_SINGLE_LEFT = 1, + FLUID_SINGLE_TOP = 2, + FLUID_SINGLE_RIGHT = 4, + FLUID_SINGLE_BOTTOM = 8, + + FLUID_CORNER_BOTTOM_LEFT = 6, + FLUID_CORNER_TOP_LEFT = 12, + FLUID_CORNER_TOP_RIGHT = 9, + FLUID_CORNER_BOTTOM_RIGHT = 3, + + FLUID_COLUMN_HORIZONTAL = 5, + FLUID_COLUMN_VERTICAL = 10, + + FLUID_BORDER_LEFT = 14, + FLUID_BORDER_TOP = 13, + FLUID_BORDER_RIGHT = 11, + FLUID_BORDER_BOTTOM = 7, + + FLUID = 15, + FLUID_TYPE = 50, + AIR = 64, + + OBSTACLE = 99, + OBSTACLE_INSIDE = 100, + + OBSTACLE_BORDER_LEFT = 101, + OBSTACLE_BORDER_TOP = 102, + OBSTACLE_CORNER_TOP_LEFT = 103, + OBSTACLE_BORDER_RIGHT = 104, + OBSTACLE_CORNER_TOP_RIGHT = 106, + OBSTACLE_BORDER_BOTTOM = 108, + OBSTACLE_CORNER_BOTTOM_LEFT = 109, + OBSTACLE_CORNER_BOTTOM_RIGHT = 112, + + DOMAIN_BOUNDARY = 200, + + DOMAIN_LEFT_NOSLIP = 201, + DOMAIN_TOP_NOSLIP = 202, + DOMAIN_RIGHT_NOSLIP = 203, + DOMAIN_BOTTOM_NOSLIP = 204, + + DOMAIN_LEFT_PRESSURE = 205, + DOMAIN_TOP_PRESSURE = 206, + DOMAIN_RIGHT_PRESSURE = 207, + DOMAIN_BOTTOM_PRESSURE = 208, + }; + + /** + * @brief set array value. + * Overloads the () operator + * + * @param i index in x direction + * @param j index in y direction + */ + int &operator()(int i, int j); + + /** + * @brief get array value. + * Overloads the () operator + * + * @param i index in x direction + * @param j index in y direction + */ + int operator()(int i, int j) const; + + /** + * @brief get size of array in x and y direction + */ + std::array size() const; + + /** + * @brief sets all not obstacle cells to air + * + */ + void resetMask(); + + + /** + * @brief Cell at (i,j) is fluid or not + * + * @param i index in x direction + * @param j index in y direction + * + * If i and j are out of bond returns false + */ + bool isFluid(int i, int j) const; + + /** + * @brief True if Cell at (i,j) is either obstacle or boundary + * + * @param i index in x direction + * @param j index in y direction + */ + bool isObstacle(int i, int j) const; + + /** + * @brief Cell at (i,j) is a air cell or not + * + * @param i index in x direction + * @param j index in y direction + * + * If i and j are out of bond returns false + */ + bool isAir(int i, int j) const; + + /** + * @brief Cell at (i,j) is a inner fluid cell or not + * + * @param i index in x direction + * @param j index in y direction + * + * Checks if fluid is sourrounded by only fluid cells + * If i and j are out of bond returns false + */ + bool isInnerFluid(int i, int j) const; + + /** + * @brief Cecks if cell at index is domain boundary + * + * @param i index in x direction + * @param j index in y direction + * + */ + bool isDomainBoundary(int i, int j) const; + + /** + * @brief Cecks if cell at index is obstacle boundary + * + * @param i index in x direction + * @param j index in y direction + * + */ + bool isObstacleBoundary(int i, int j) const; + + /** + * @brief Cecks if cell at index is fluid boundary + * + * @param i index in x direction + * @param j index in y direction + * + */ + bool isFluidBoundary(int i, int j) const; + + /** + * @brief number of fluid cells + * + * not efficient but is only used once in the creation of the fluid tracer + * + */ + int getNumberOfFluidCells() const; + + /** + * @brief creates rectangulat objecct inside domain + * + * location and size are specified in settings file by user + */ + void makeRectangularObstacle(); + + /** + * @brief creates mask by reading in bitmap + * + * path to bitmap saved as png is specified in settings file by user + */ + void createMaskFromPNGBitMap(); + + /** + * @brief sets enums for all cells that belong to domain boundary + * + * type of domain boundary condition is specified in settings file by user + */ + void setDomainBC(); + + /** + * @brief sets enums for all cells that belong to an obstacle + */ + void setObstacleBC(); + + /** + * @brief sets enums for all fluid cells that belong are located at a surface + */ + void setFluidBC(); + + /** + * @brief print mask enums to terminal + */ + void printMask() const; + +protected: + std::array size_; //!< size of array in x and y direction + std::vector data_; //!< storage array values, in row-major order + std::vector boundary_list; //!< stores the indices of the boundary cells + Settings settings_; //!< settings entity + int forbiddenObstacleFluidCombinations[7] = {105, 107, 110, 111, 113, 114, 115}; //!< enums that singnal forbidden obstacle - fluid cell combinations +}; \ No newline at end of file diff --git a/src/computation.cpp b/src/computation.cpp index 58712784..fcf45f32 100644 --- a/src/computation.cpp +++ b/src/computation.cpp @@ -1,5 +1,8 @@ #include "computation.h" +#include "surface/fluid_tracer.h" +#include + void Computation::initialize(int argc, char *argv[]) { @@ -11,8 +14,20 @@ void Computation::initialize(int argc, char *argv[]) settings_.printSettings(); #endif - std::array meshWidth_ = {settings_.physicalSize[0] / settings_.nCells[0], - settings_.physicalSize[1] / settings_.nCells[1]}; + // create boundary and tracer + mask_ = std::make_shared(settings_); + + if (settings_.createDomainfromBitmap){ + settings_.nCells = {mask_->size()[0]-2, mask_->size()[1]-2}; + settings_.physicalSize = {settings_.physicalSize[0], settings_.physicalSize[0] * settings_.nCells[1] / settings_.nCells[0]}; + } + + meshWidth_ = {settings_.physicalSize[0] / settings_.nCells[0], settings_.physicalSize[1] / settings_.nCells[1]}; + + // TODO: remove prints + std::cout << "Pyhsical size: " << settings_.physicalSize[0] << " " << settings_.physicalSize[1] << std::endl; + std::cout << "Meshwidth: " << meshWidth_[0] << " " << meshWidth_[1] << std::endl; + usleep(1000000); if (settings_.useDonorCell) { @@ -22,39 +37,85 @@ void Computation::initialize(int argc, char *argv[]) { discretization_ = std::make_shared(settings_.nCells, meshWidth_); } + // Boundary + boundary_ = std::make_shared(mask_, discretization_, settings_); + if (settings_.pressureSolver == "SOR") { pressureSolver_ = std::make_unique(discretization_, settings_.epsilon, settings_.maximumNumberOfIterations, + boundary_, settings_.omega); } else { pressureSolver_ = std::make_unique(discretization_, settings_.epsilon, - settings_.maximumNumberOfIterations); + settings_.maximumNumberOfIterations, + boundary_); + } + + // Fluid Tracker + if (settings_.useFluidTracer) + { + fluidTracer_ = std::make_shared(settings_.particlePerCell, discretization_, mask_); } - outputWriterParaview_ = std::make_unique(discretization_); + + // Output + outputWriterParaview_ = std::make_unique(discretization_, mask_, fluidTracer_); outputWriterText_ = std::make_unique(discretization_); } void Computation::runSimulation() { + // initialize double currentTime = 0.; + double nextPrintTime = 0.; + int stepsBetweenPrints = 0; + + boundary_->setVelocityBoundaryValues(); + boundary_->setPressureSurfaceBC(); do { - applyBoundaryValues(); + // mask_->printMask(); + // usleep(100000000); + // std::cout << "\033[2J\033[1;1H"; + computeTimeStepWidth(currentTime); computePreliminaryVelocities(); computeRightHandSide(); computePressure(); computeVelocities(); - currentTime += dt_; - outputWriterParaview_->writeFile(currentTime); + + if (settings_.useFluidTracer) + { + boundary_->setVelocityBoundaryValues(dt_); + // Fulfill CFL condition for particles + computeTimeStepWidth(currentTime); + fluidTracer_->moveParticles(dt_); + boundary_->updateBoundary(); + } + + boundary_->setVelocityBoundaryValues(); + boundary_->setPressureSurfaceBC(); + + if (currentTime > nextPrintTime) { + + if (settings_.useParticleSource) { + fluidTracer_->createParticles(settings_.particleSource[0], settings_.particleSource[1]); + } + + outputWriterParaview_->writeFile(currentTime); + nextPrintTime += settings_.printInterval; + std::cout << currentTime << " -> Write VTK, took: " << stepsBetweenPrints << " steps" << std::endl; + stepsBetweenPrints = 0; + } + + stepsBetweenPrints++; #ifndef NDEBUG outputWriterText_->writeFile(currentTime); @@ -67,48 +128,11 @@ void Computation::runSimulation() void Computation::applyBoundaryValues() { - // set Dirichlet BC - - // BV for u - int i_beg = discretization_->uIBegin(); - int i_end = discretization_->uIEnd(); - int j_beg = discretization_->uJBegin(); - int j_end = discretization_->uJEnd(); - - // Vertical - for (int j = j_beg; j < j_end; j++) - { - discretization_->u(i_beg, j) = settings_.dirichletBcLeft[0]; - discretization_->u(i_end - 1, j) = settings_.dirichletBcRight[0]; - } - // Horizontal (leave out corners) - for (int i = i_beg + 1; i < i_end - 1; i++) - { - discretization_->u(i, j_beg) = 2 * settings_.dirichletBcBottom[0] - discretization_->u(i, j_beg + 1); - discretization_->u(i, j_end - 1) = 2 * settings_.dirichletBcTop[0] - discretization_->u(i, j_end - 2); - } - - // BV for v - i_beg = discretization_->vIBegin(); - i_end = discretization_->vIEnd(); - j_beg = discretization_->vJBegin(); - j_end = discretization_->vJEnd(); - - // Vertical - for (int j = j_beg; j < j_end; j++) - { - discretization_->v(i_beg, j) = 2 * settings_.dirichletBcLeft[1] - discretization_->v(i_beg + 1, j); - discretization_->v(i_end - 1, j) = 2 * settings_.dirichletBcRight[1] - discretization_->v(i_end - 2, j); - } - // Horizontal (leave out corners) - for (int i = i_beg + 1; i < i_end - 1; i++) - { - discretization_->v(i, j_beg) = settings_.dirichletBcBottom[1]; - discretization_->v(i, j_end - 1) = settings_.dirichletBcTop[1]; - } + boundary_->setVelocityBoundaryValues(); } + void Computation::computeTimeStepWidth(double currentTime) { // Diffusion operator (always > 0) @@ -132,78 +156,31 @@ void Computation::computeTimeStepWidth(double currentTime) void Computation::computePreliminaryVelocities() { - // **************************************** - // Compute F - // **************************************** - int f_i_beg = discretization_->fIBegin(); - int f_i_end = discretization_->fIEnd(); - int f_j_beg = discretization_->fJBegin(); - int f_j_end = discretization_->fJEnd(); - - // Boundary of F - - // Vertical - for (int j = f_j_beg - 1; j < f_j_end + 1; j++) + // F + for (int i = discretization_->fIBegin(); i < discretization_->fIEnd(); i++) { - discretization_->f(f_i_beg, j) = discretization_->u(f_i_beg, j); - discretization_->f(f_i_end - 1, j) = discretization_->u(f_i_end - 1, j); - } - - // Horizontal - for (int i = f_i_beg; i < f_i_end + 1; i++) - { - discretization_->f(i, f_j_beg - 1) = discretization_->u(i, f_j_beg - 1); - // std::cout << discretization_->u(i, f_j_beg) << std::endl; - discretization_->f(i, f_j_end) = discretization_->u(i, f_j_end); - } - - // Interior - for (int i = f_i_beg + 1; i < f_i_end - 1; i++) - { - for (int j = f_j_beg; j < f_j_end; j++) + for (int j = discretization_->fJBegin(); j < discretization_->fJEnd(); j++) { - - double diffusion = 1 / settings_.re * (discretization_->computeD2uDx2(i, j) + discretization_->computeD2uDy2(i, j)); - double convection = -discretization_->computeDu2Dx(i, j) - discretization_->computeDuvDy(i, j); - discretization_->f(i, j) = discretization_->u(i, j) + dt_ * (diffusion + convection + settings_.g[0]); + if (boundary_->doCalculateF(i, j)) + { + double diffusion = 1 / settings_.re * (discretization_->computeD2uDx2(i, j) + discretization_->computeD2uDy2(i, j)); + double convection = -discretization_->computeDu2Dx(i, j) - discretization_->computeDuvDy(i, j); + discretization_->f(i, j) = discretization_->u(i, j) + dt_ * (diffusion + convection + settings_.g[0]); + } } } - // **************************************** - // Compute G - // **************************************** - - int g_i_beg = discretization_->gIBegin(); - int g_i_end = discretization_->gIEnd(); - int g_j_beg = discretization_->gJBegin(); - int g_j_end = discretization_->gJEnd(); - - // Boundary of G - - // Horizontal - for (int i = g_i_beg - 1; i < g_i_end + 1; i++) + // G + for (int i = discretization_->gIBegin(); i < discretization_->gIEnd(); i++) { - discretization_->g(i, g_j_beg) = discretization_->v(i, g_j_beg); - discretization_->g(i, g_j_end - 1) = discretization_->v(i, g_j_end - 1); - } - - // Vertical - for (int j = g_j_beg; j < g_j_end + 1; j++) - { - discretization_->g(g_i_beg - 1, j) = discretization_->v(g_i_beg - 1, j); - discretization_->g(g_i_end, j) = discretization_->v(g_i_end, j); - } - - // Interior - for (int i = g_i_beg; i < g_i_end; i++) - { - for (int j = g_j_beg + 1; j < g_j_end - 1; j++) + for (int j = discretization_->gJBegin(); j < discretization_->gJEnd(); j++) { - - double diffusion = 1 / settings_.re * (discretization_->computeD2vDx2(i, j) + discretization_->computeD2vDy2(i, j)); - double convection = -discretization_->computeDv2Dy(i, j) - discretization_->computeDuvDx(i, j); - - discretization_->g(i, j) = discretization_->v(i, j) + dt_ * (diffusion + convection + settings_.g[1]); + if (boundary_->doCalculateG(i, j)) + { + double diffusion = 1 / settings_.re * (discretization_->computeD2vDx2(i, j) + discretization_->computeD2vDy2(i, j)); + double convection = -discretization_->computeDv2Dy(i, j) - discretization_->computeDuvDx(i, j); + discretization_->g(i, j) = discretization_->v(i, j) + dt_ * (diffusion + convection + settings_.g[1]); + } } } } @@ -211,19 +188,17 @@ void Computation::computePreliminaryVelocities() void Computation::computeRightHandSide() { - int i_beg = discretization_->rhsIBegin(); - int i_end = discretization_->rhsIEnd(); - int j_beg = discretization_->rhsJBegin(); - int j_end = discretization_->rhsJEnd(); - - // Interior - for (int i = i_beg; i < i_end; i++) + for (int i = discretization_->rhsIBegin(); i < discretization_->rhsIEnd(); i++) { - for (int j = j_beg; j < j_end; j++) + for (int j = discretization_->rhsJBegin(); j < discretization_->rhsJEnd(); j++) { - double dF = (1 / discretization_->dx()) * (discretization_->f(i, j) - discretization_->f(i - 1, j)); - double dG = (1 / discretization_->dy()) * (discretization_->g(i, j) - discretization_->g(i, j - 1)); - discretization_->rhs(i, j) = (1 / dt_) * (dF + dG); + if (mask_->isInnerFluid(i, j)) + { + double dF = (1 / discretization_->dx()) * (discretization_->f(i, j) - discretization_->f(i - 1, j)); + double dG = (1 / discretization_->dy()) * (discretization_->g(i, j) - discretization_->g(i, j - 1)); + discretization_->rhs(i, j) = (1 / dt_) * (dF + dG); + + } } } } @@ -235,12 +210,12 @@ void Computation::computePressure() void Computation::computeVelocities() { - for (int i = discretization_->uIBegin() + 1; i < discretization_->uIEnd() - 1; i++) { for (int j = discretization_->uJBegin() + 1; j < discretization_->uJEnd() - 1; j++) { - discretization_->u(i, j) = discretization_->f(i, j) - dt_ * discretization_->computeDpDx(i, j); + if (boundary_->doCalculateF(i, j)) + discretization_->u(i, j) = discretization_->f(i, j) - dt_ * discretization_->computeDpDx(i, j); } } @@ -248,7 +223,9 @@ void Computation::computeVelocities() { for (int j = discretization_->vJBegin() + 1; j < discretization_->vJEnd() - 1; j++) { - discretization_->v(i, j) = discretization_->g(i, j) - dt_ * discretization_->computeDpDy(i, j); + if (boundary_->doCalculateG(i, j)){ + discretization_->v(i, j) = discretization_->g(i, j) - dt_ * discretization_->computeDpDy(i, j); + } } } } diff --git a/src/computation.h b/src/computation.h index 3308bf99..95c2cf00 100644 --- a/src/computation.h +++ b/src/computation.h @@ -12,6 +12,11 @@ #include "output_writer/output_writer_text.h" #include "settings_parser/settings.h" +#include "boundary/boundary.h" +#include "boundary/mask.h" +#include "surface/fluid_tracer.h" +#include + #include #include #include @@ -73,8 +78,13 @@ class Computation */ void computeVelocities(); - Settings settings_; - std::shared_ptr discretization_; //!< discretization instance + Settings settings_; //!< setttings instance + std::shared_ptr discretization_; //!< discretization instance + + std::shared_ptr mask_; //!< mask instance + std::shared_ptr boundary_; //!< boundary instance + std::shared_ptr fluidTracer_; //!< fluid tracer instance + std::unique_ptr pressureSolver_; //!< pressureSolver instance std::unique_ptr outputWriterParaview_; //!< outputWriterParaview instance std::unique_ptr outputWriterText_; //!< outputWriterText instance diff --git a/src/discretization/discretization.h b/src/discretization/discretization.h index cff36c8e..7e38ec2b 100644 --- a/src/discretization/discretization.h +++ b/src/discretization/discretization.h @@ -66,4 +66,7 @@ class Discretization : public StaggeredGrid * @brief Calculate first derivative of p with respect to y */ virtual double computeDpDy(int i, int j) const; -}; \ No newline at end of file + + +}; + diff --git a/src/main.cpp b/src/main.cpp index 42125a04..9ad97714 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,7 +11,6 @@ int main(int argc, char *argv[]) std::cout << "usage: " << argv[0] << " " << std::endl; return EXIT_FAILURE; } - Computation computation; auto start = std::chrono::system_clock::now(); diff --git a/src/output_writer/output_writer.h b/src/output_writer/output_writer.h index 49afbbfb..9fc9e86e 100644 --- a/src/output_writer/output_writer.h +++ b/src/output_writer/output_writer.h @@ -4,6 +4,7 @@ #include #include +#include /** * @class OutputWriter diff --git a/src/output_writer/output_writer_paraview.cpp b/src/output_writer/output_writer_paraview.cpp index f98a0041..1140bd95 100644 --- a/src/output_writer/output_writer_paraview.cpp +++ b/src/output_writer/output_writer_paraview.cpp @@ -1,6 +1,8 @@ #include "output_writer_paraview.h" -OutputWriterParaview::OutputWriterParaview(std::shared_ptr discretization) : OutputWriter(discretization) +OutputWriterParaview::OutputWriterParaview(std::shared_ptr discretization, + std::shared_ptr mask, + std::shared_ptr fluidTracer): OutputWriter(discretization), mask_(mask), fluidTracer_(fluidTracer) { // Create a vtkWriter_ vtkWriter_ = vtkSmartPointer::New(); @@ -23,48 +25,140 @@ void OutputWriterParaview::writeFile(double currentTime) dataSet->SetOrigin(0, 0, 0); // set spacing of mesh - const double dx = discretization_->meshWidth()[0]; - const double dy = discretization_->meshWidth()[1]; + const double dx = discretization_->meshWidth()[0] * (1 / 2.0); + const double dy = discretization_->meshWidth()[1] * (1 / 2.0); const double dz = 1; dataSet->SetSpacing(dx, dy, dz); // set number of points in each dimension, 1 cell in z direction std::array nCells = discretization_->nCells(); + int n_cells_x = nCells[0] * 2 + 1; + int n_cells_y = nCells[1] * 2 + 1; // we want to have points at each corner of each cell - dataSet->SetDimensions(nCells[0] + 1, nCells[1] + 1, 1); + dataSet->SetDimensions(n_cells_x, n_cells_y, 1); // add pressure field variable // --------------------------- vtkSmartPointer arrayPressure = vtkDoubleArray::New(); + vtkSmartPointer arrayMask = vtkDoubleArray::New(); + vtkSmartPointer arrayParticles = vtkDoubleArray::New(); // the pressure is a scalar which means the number of components is 1 arrayPressure->SetNumberOfComponents(1); + arrayMask->SetNumberOfComponents(1); + arrayParticles->SetNumberOfComponents(1); // Set the number of pressure values and allocate memory for it. We already know the number, it has to be the same as there are nodes in the mesh. arrayPressure->SetNumberOfTuples(dataSet->GetNumberOfPoints()); + arrayMask->SetNumberOfTuples(dataSet->GetNumberOfPoints()); + arrayParticles->SetNumberOfTuples(dataSet->GetNumberOfPoints()); arrayPressure->SetName("pressure"); + arrayMask->SetName("mask"); + arrayParticles->SetName("particles"); // loop over the nodes of the mesh and assign the interpolated p values in the vtk data structure // we only consider the cells that are the actual computational domain, not the helper values in the "halo" // index for the vtk data structure, will be incremented in the inner loop - int index = 0; - for (int j = 0; j < nCells[1] + 1; j++) + int idxParticles = 0; + for (int j = 0; j < n_cells_y; j++) { - for (int i = 0; i < nCells[0] + 1; i++, index++) + for (int i = 0; i < n_cells_x; i++, idxParticles++) { const double x = i * dx; const double y = j * dy; - arrayPressure->SetValue(index, discretization_->p().interpolateAt(x, y)); + arrayPressure->SetValue(idxParticles, discretization_->p().interpolateAt(x, y)); + } + } + + // set the array to particles per cell + int index_ = 0; + for (int j = 2; j < n_cells_y + 2; j++) { + for (int i = 2; i < n_cells_x + 2; i++, index_++) { + if (fluidTracer_.get() == nullptr) + arrayParticles->SetValue(index_, 0.0); + else + arrayParticles->SetValue(index_, fluidTracer_->getNumberOfParticles(i/2, j/2)); + } + } + + int FLUID = 1; + int OBSTACLE = 2; + int AIR = 3; + + int index = 0; + for (int j = 0; j < n_cells_y; j++) + { + for (int i = 0; i < n_cells_x; i++, index++) + { + // vertex + if ((i%2) == 0 && (j%2) == 0) + { + int i_bottom_left = i / 2; + int j_bootom_left = j / 2; + if (mask_->isObstacle(i_bottom_left, j_bootom_left) || mask_->isObstacle(i_bottom_left + 1, j_bootom_left) || mask_->isObstacle(i_bottom_left, j_bootom_left + 1) || mask_->isObstacle(i_bottom_left + 1, j_bootom_left + 1)){ + arrayMask->SetValue(index, OBSTACLE); + } + else if (mask_->isAir(i_bottom_left, j_bootom_left) && mask_->isAir(i_bottom_left + 1, j_bootom_left) && mask_->isAir(i_bottom_left, j_bootom_left + 1) && mask_->isAir(i_bottom_left + 1, j_bootom_left + 1)){ + arrayMask->SetValue(index, AIR); + } + else{ + arrayMask->SetValue(index, FLUID); + } + } + // middle + else if ( (i%2) != 0 && (j%2) != 0) + { + int i_new = ((i - 1) / 2)+1; + int j_new = ((j - 1) / 2)+1; + if (mask_->isObstacle(i_new, j_new)){ + arrayMask->SetValue(index, OBSTACLE); + } + else if (mask_->isAir(i_new, j_new)) { + arrayMask->SetValue(index, AIR); + } else { + arrayMask->SetValue(index, FLUID); + } + } + // horizontal + else if ((i%2) != 0 && (j%2) == 0) + { + int i_bottom = ((i - 1) / 2)+1; + int j_bottom = j / 2; + if (mask_->isObstacle(i_bottom, j_bottom) || mask_->isObstacle(i_bottom, j_bottom + 1)){ + arrayMask->SetValue(index, OBSTACLE); + } + else if (mask_->isAir(i_bottom, j_bottom) && mask_->isAir(i_bottom, j_bottom + 1)){ + arrayMask->SetValue(index, AIR); + } else { + arrayMask->SetValue(index, FLUID); + } + } + // vertical + else if ((i%2) == 0 && (j%2) != 0) + { + int i_left = i / 2; + int j_left = ((j - 1) / 2)+1; + if (mask_->isObstacle(i_left, j_left) || mask_->isObstacle(i_left + 1, j_left)){ + arrayMask->SetValue(index, OBSTACLE); + } + else if (mask_->isAir(i_left, j_left) && mask_->isAir(i_left + 1, j_left)){ + arrayMask->SetValue(index, AIR); + } else { + arrayMask->SetValue(index, FLUID); + } + } } } // now, we should have added as many values as there are points in the vtk data structure - assert(index == dataSet->GetNumberOfPoints()); + // assert(index == dataSet->GetNumberOfPoints()); // add the field variable to the data set dataSet->GetPointData()->AddArray(arrayPressure); + dataSet->GetPointData()->AddArray(arrayMask); + dataSet->GetPointData()->AddArray(arrayParticles); // add velocity field variable // --------------------------- @@ -82,11 +176,11 @@ void OutputWriterParaview::writeFile(double currentTime) // loop over the mesh where p is defined and assign the values in the vtk data structure // index for the vtk data structure index = 0; - for (int j = 0; j < nCells[1] + 1; j++) + for (int j = 0; j < n_cells_y; j++) { const double y = j * dy; - for (int i = 0; i < nCells[0] + 1; i++, index++) + for (int i = 0; i < n_cells_x; i++, index++) { const double x = i * dx; @@ -99,7 +193,7 @@ void OutputWriterParaview::writeFile(double currentTime) } } // now, we should have added as many values as there are points in the vtk data structure - assert(index == dataSet->GetNumberOfPoints()); + // assert(index == dataSet->GetNumberOfPoints()); // add the field variable to the data set dataSet->GetPointData()->AddArray(arrayVelocity); diff --git a/src/output_writer/output_writer_paraview.h b/src/output_writer/output_writer_paraview.h index 9a343584..c86ce170 100644 --- a/src/output_writer/output_writer_paraview.h +++ b/src/output_writer/output_writer_paraview.h @@ -7,9 +7,12 @@ #include #include #include +#include #include #include +#include "../boundary/mask.h" +#include "../surface/fluid_tracer.h" /** * @class OutputWriterParaview @@ -27,7 +30,9 @@ class OutputWriterParaview : public OutputWriter * * @param discretization shared pointer to the discretization object that will contain all the data to be written to the file */ - OutputWriterParaview(std::shared_ptr discretization); + OutputWriterParaview(std::shared_ptr discretization, + std::shared_ptr mask, + std::shared_ptr fluidTracer); /** * @brief Write current velocities to file, filename is output_.vti @@ -38,4 +43,6 @@ class OutputWriterParaview : public OutputWriter private: vtkSmartPointer vtkWriter_; //!< vtk writer to write ImageData + std::shared_ptr mask_; //!< mask used to display different cell types in ParaView + std::shared_ptr fluidTracer_; //!< fluid tracer used to display fluid particles in ParaView }; diff --git a/src/settings_parser/settings.cpp b/src/settings_parser/settings.cpp index 8bf75d5b..ebd4aecb 100644 --- a/src/settings_parser/settings.cpp +++ b/src/settings_parser/settings.cpp @@ -42,10 +42,10 @@ void Settings::printSettings() std::cout << "Settings: " << std::endl << " physicalSize: " << physicalSize[0] << " x " << physicalSize[1] << ", nCells: " << nCells[0] << " x " << nCells[1] << std::endl << " endTime: " << endTime << " s, re: " << re << ", g: (" << g[0] << "," << g[1] << "), tau: " << tau << ", maximum dt: " << maximumDt << std::endl - << " dirichletBC: bottom: (" << dirichletBcBottom[0] << "," << dirichletBcBottom[1] << ")" - << ", top: (" << dirichletBcTop[0] << "," << dirichletBcTop[1] << ")" - << ", left: (" << dirichletBcLeft[0] << "," << dirichletBcLeft[1] << ")" - << ", right: (" << dirichletBcRight[0] << "," << dirichletBcRight[1] << ")" << std::endl + << " dirichletBC: bottom: (" << NoSlipVelBottom[0] << "," << NoSlipVelBottom[1] << ")" + << ", top: (" << NoSlipVelTop[0] << "," << NoSlipVelTop[1] << ")" + << ", left: (" << NoSlipVelLeft[0] << "," << NoSlipVelLeft[1] << ")" + << ", right: (" << NoSlipVelRight[0] << "," << NoSlipVelRight[1] << ")" << std::endl << " useDonorCell: " << std::boolalpha << useDonorCell << ", alpha: " << alpha << std::endl << " pressureSolver: " << pressureSolver << ", omega: " << omega << ", epsilon: " << epsilon << ", maximumNumberOfIterations: " << maximumNumberOfIterations << std::endl; } @@ -111,24 +111,94 @@ void Settings::setParameter(std::string parameterName, std::string value) else if (parameterName == "gY") Settings::g[1] = atof(value.c_str()); - // Dirichlet boundary conditions - else if (parameterName == "dirichletBottomX") - Settings::dirichletBcBottom[0] = atof(value.c_str()); - else if (parameterName == "dirichletBottomY") - Settings::dirichletBcBottom[1] = atof(value.c_str()); - else if (parameterName == "dirichletTopX") - Settings::dirichletBcTop[0] = atof(value.c_str()); - else if (parameterName == "dirichletTopY") - Settings::dirichletBcTop[1] = atof(value.c_str()); - else if (parameterName == "dirichletLeftX") - Settings::dirichletBcLeft[0] = atof(value.c_str()); - else if (parameterName == "dirichletLeftY") - Settings::dirichletBcLeft[1] = atof(value.c_str()); - else if (parameterName == "dirichletRightX") - Settings::dirichletBcRight[0] = atof(value.c_str()); - else if (parameterName == "dirichletRightY") - Settings::dirichletBcRight[1] = atof(value.c_str()); + // // Boundary conditions type + else if (parameterName == "BCTop"){ + if (value == "NoSlip" || value == "Pressure") + Settings::BCTop = value; + else + throw std::invalid_argument("Supported values for BCTop are NoSlip and Pressure."); + } + else if (parameterName == "BCRight"){ + if (value == "NoSlip" || value == "Pressure") + Settings::BCRight = value; + else + throw std::invalid_argument("Supported values for BCRight are NoSlip and Pressure."); + } + else if (parameterName == "BCBottom"){ + if (value == "NoSlip" || value == "Pressure") + Settings::BCBottom = value; + else + throw std::invalid_argument("Supported values for BCBottom are NoSlip and Pressure."); + } + else if (parameterName == "BCLeft"){ + if (value == "NoSlip" || value == "Pressure") + Settings::BCLeft = value; + else + throw std::invalid_argument("Supported values for BCLeft are NoSlip and Pressure."); + } + + // NoSlip boundary conditions + else if (parameterName == "NoSlipVelTopX" || parameterName == "dirichletTopX") + Settings::NoSlipVelTop[0] = atof(value.c_str()); + else if (parameterName == "NoSlipVelTopY" || parameterName == "dirichtelTopY") + Settings::NoSlipVelTop[1] = atof(value.c_str()); + else if (parameterName == "NoSlipVelRightX" || parameterName == "dirichtelRightX") + Settings::NoSlipVelRight[0] = atof(value.c_str()); + else if (parameterName == "NoSlipVelRightY" || parameterName == "dirichtelRightY") + Settings::NoSlipVelRight[1] = atof(value.c_str()); + else if (parameterName == "NoSlipVelBottomX" || parameterName == "dirichtelBottomX") + Settings::NoSlipVelBottom[0] = atof(value.c_str()); + else if (parameterName == "NoSlipVelBottomY" || parameterName == "dirichtelBottomY") + Settings::NoSlipVelBottom[1] = atof(value.c_str()); + else if (parameterName == "NoSlipVelLeftX" || parameterName == "dirichtelLeftX") + Settings::NoSlipVelLeft[0] = atof(value.c_str()); + else if (parameterName == "NoSlipVelLeftY" || parameterName == "dirichtelLeftY") + Settings::NoSlipVelLeft[1] = atof(value.c_str()); + + // Pressure BoundaryConditions. + else if (parameterName == "PressureTop") + Settings::PressureTop = atof(value.c_str()); + else if (parameterName == "PressureRight") + Settings::PressureRight = atof(value.c_str()); + else if (parameterName == "PressureBottom") + Settings::PressureBottom = atof(value.c_str()); + else if (parameterName == "PressureLeft") + Settings::PressureLeft = atof(value.c_str()); + + + // Rectangular object in domain + else if (parameterName == "createRectangularObject") + { + if (value == "true" || value == "True") + Settings::createRectangularObject = true; + else if (value == "false" || value == "False") + Settings::createRectangularObject = false; + else + throw std::invalid_argument("createRectangularObject must be a boolean (true or false)."); + } + else if (parameterName == "obstaclePositionX"){ + Settings::obstaclePosition[0] = atof(value.c_str()); + } + else if (parameterName == "obstaclePositionY") + Settings::obstaclePosition[1] = atof(value.c_str()); + else if (parameterName == "obstacleDimensionX") + Settings::obstacleDimension[0] = atof(value.c_str()); + else if (parameterName == "obstacleDimensionY") + Settings::obstacleDimension[1] = atof(value.c_str()); + // Domain from Bitmap + else if (parameterName == "createDomainfromBitmap") + { + if (value == "true" || value == "True") + Settings::createDomainfromBitmap = true; + else if (value == "false" || value == "False") + Settings::createDomainfromBitmap = false; + else + throw std::invalid_argument("createDomainfromBitmap must be a boolean (true or false)."); + } + else if (parameterName == "pathToBitmap") + Settings::pathToBitmap = value; + // Discretization parameters else if (parameterName == "nCellsX") Settings::nCells[0] = atoi(value.c_str()); @@ -164,4 +234,39 @@ void Settings::setParameter(std::string parameterName, std::string value) Settings::epsilon = atof(value.c_str()); else if (parameterName == "maximumNumberOfIterations") Settings::maximumNumberOfIterations = atof(value.c_str()); + + + else if(parameterName == "useFluidTracer") + { + if (value == "true" || value == "True") + Settings::useFluidTracer = true; + else if (value == "false" || value == "False") + Settings::useFluidTracer = false; + else + throw std::invalid_argument("createDomainfromBitmap must be a boolean (true or false)."); + } + else if(parameterName == "particlePerCell") + particlePerCell = atof(value.c_str()); + else if(parameterName == "fluidTracerMethod") + if (value == "fixed" || value == "calculated") + Settings::fluidTracerMethod = value; + else + throw std::invalid_argument("Supported values for fluidTracerMethod are single and threshold"); + else if(parameterName == "fluidTracerThreshold") + fluidTracerThreshold = atof(value.c_str()); + else if(parameterName == "useParticleSource") + { + if (value == "true" || value == "True") + Settings::useParticleSource = true; + else if (value == "false" || value == "False") + Settings::useParticleSource = false; + else + throw std::invalid_argument("useParticleSource must be a boolean (true or false)."); + } + else if(parameterName == "particleSourceX") + particleSource[0] = atof(value.c_str()); + else if(parameterName == "particleSourceY") + particleSource[1] = atof(value.c_str()); + else if(parameterName == "printInterval") + printInterval = atof(value.c_str()); } diff --git a/src/settings_parser/settings.h b/src/settings_parser/settings.h index fc2429ca..bf1504f7 100644 --- a/src/settings_parser/settings.h +++ b/src/settings_parser/settings.h @@ -24,16 +24,58 @@ struct Settings bool useDonorCell = false; //!< if the donor cell scheme schould be used double alpha = 0.5; //!< factor for donor-cell scheme - std::array dirichletBcBottom; //!< prescribed values of u,v at bottom of domain - std::array dirichletBcTop; //!< prescribed values of u,v at top of domain - std::array dirichletBcLeft; //!< prescribed values of u,v at left of domain - std::array dirichletBcRight; //!< prescribed values of u,v at right of domain + // Boundary Conditions Type + std::string BCTop = "NoSlip"; + std::string BCRight = "NoSlip"; + std::string BCBottom = "NoSlip"; + std::string BCLeft = "NoSlip"; + + // NoSlip boundary conditions + std::array NoSlipVelTop; //!< prescribed values of u,v at top of domain + std::array NoSlipVelRight; //!< prescribed values of u,v at right of domain + std::array NoSlipVelBottom; //!< prescribed values of u,v at bottom of domain + std::array NoSlipVelLeft; //!< prescribed values of u,v at left of domain + + // Pressure boundary conditions + double PressureTop; //!< prescribed pressure BC top of domain + double PressureRight; //!< prescribed pressure BC right of domain + double PressureBottom; //!< prescribed pressure BC bottom of domain + double PressureLeft; //!< prescribed pressure BC left of domain + + // Create rectangular obstacle in domain + bool createRectangularObject = false; //!< wheter a rectangular object in domain should be created + + // Create domain from PNGBitmap + bool createDomainfromBitmap = false; //!< wheter domain should be created from bitmap + std::string pathToBitmap; //!< path to bitmap + + std::array obstaclePosition; //!< x and y position of rectangular object + std::array obstacleDimension; //!< x and y dimension of rectangular object std::string pressureSolver = "SOR"; //!< which pressure solver to use, "GaussSeidel" or "SOR" double omega = 1.0; //!< overrelaxation factor double epsilon = 1e-5; //!< tolerance for the residual in the pressure solver int maximumNumberOfIterations = 1e5; //!< maximum number of iterations in the solver + + // Fluid Tracer + bool useFluidTracer = false; //!< Enables Open Surface Evolution + int particlePerCell = 100; //!< Initializes with given virtual particles per cell + /** + * `fixed` -> `n` virtual particles is enough for fluid cell, standard is 1 + * `calculated` -> aims at a constant amount of fluid cells and calculates the threshold accordingly + */ + std::string fluidTracerMethod = "fixed"; + int fluidTracerThreshold = 1; //!< Threshold for fluidTracerMethod `fixed` + bool useParticleSource = false; //!< Enables virtual particles source + std::array particleSource = {0.0, 0.0}; //!< Source of virtual particles + + double printInterval = 0.05; //!< generates output VTK every `printInterval` seconds + + + + // Writer Options + /** * @brief Parse a text file with settings. * diff --git a/src/solver/gauss_seidel.cpp b/src/solver/gauss_seidel.cpp index d3afb83d..dc0be3ce 100644 --- a/src/solver/gauss_seidel.cpp +++ b/src/solver/gauss_seidel.cpp @@ -2,7 +2,8 @@ GaussSeidel::GaussSeidel(const std::shared_ptr &data, double epsilon, - int maximumNumberOfIterations) : PressureSolver(data, epsilon, maximumNumberOfIterations) + int maximumNumberOfIterations, + std::shared_ptr boundary) : PressureSolver(data, epsilon, maximumNumberOfIterations, boundary) { } @@ -20,11 +21,11 @@ void GaussSeidel::solve() { for (int j = j_beg; j < j_end; j++) { - - double p_x = 1 / dx2 * (discretization_->p(i + 1, j) + discretization_->p(i - 1, j)); - double p_y = 1 / dy2 * (discretization_->p(i, j + 1) + discretization_->p(i, j - 1)); - - discretization_->p(i, j) = d_fac * (p_x + p_y - discretization_->rhs(i, j)); + if(boundary_->mask_->isFluid(i,j)){ + double p_x = 1 / dx2 * (discretization_->p(i + 1, j) + discretization_->p(i - 1, j)); + double p_y = 1 / dy2 * (discretization_->p(i, j + 1) + discretization_->p(i, j - 1)); + discretization_->p(i, j) = d_fac * (p_x + p_y - discretization_->rhs(i, j)); + } } } setBoundaryValues(); diff --git a/src/solver/gauss_seidel.h b/src/solver/gauss_seidel.h index 22f5572b..900416e0 100644 --- a/src/solver/gauss_seidel.h +++ b/src/solver/gauss_seidel.h @@ -21,7 +21,8 @@ class GaussSeidel : public PressureSolver */ GaussSeidel(const std::shared_ptr &data, double epsilon, - int maximumNumberOfIterations); + int maximumNumberOfIterations, + std::shared_ptr boundary); /** * @brief override function that starts solver. * diff --git a/src/solver/pressure_solver.cpp b/src/solver/pressure_solver.cpp index 26426f10..502db9a5 100644 --- a/src/solver/pressure_solver.cpp +++ b/src/solver/pressure_solver.cpp @@ -1,12 +1,15 @@ #include "pressure_solver.h" -#include -#include + + PressureSolver::PressureSolver(std::shared_ptr discretization, double epsilon, - int maximumNumberOfIterations) : discretization_(discretization), - epsilon_(epsilon), - maximumNumberOfIterations_(maximumNumberOfIterations) + int maximumNumberOfIterations, + std::shared_ptr boundary) : + discretization_(discretization), + epsilon_(epsilon), + maximumNumberOfIterations_(maximumNumberOfIterations), + boundary_(boundary) { assert(epsilon > 0); assert(maximumNumberOfIterations > 0); @@ -24,20 +27,7 @@ PressureSolver::PressureSolver(std::shared_ptr discretization, void PressureSolver::setBoundaryValues() { - - // Horizontal (without corners) - for (int i = i_beg; i < i_end; i++) - { - discretization_->p(i, j_beg - 1) = discretization_->p(i, j_beg); - discretization_->p(i, j_end) = discretization_->p(i, j_end - 1); - } - - // Vertical (without corners) - for (int j = j_beg - 1; j < j_end + 1; j++) - { - discretization_->p(i_beg - 1, j) = discretization_->p(i_beg, j); - discretization_->p(i_end, j) = discretization_->p(i_end - 1, j); - } + boundary_->setPressureBoundaryValues(); } double PressureSolver::calculateResiduum() @@ -56,10 +46,12 @@ double PressureSolver::calculateResiduum() { for (int j = j_beg; j < j_end; j++) { - pxx = (discretization_->p(i - 1, j) - 2 * discretization_->p(i, j) + discretization_->p(i + 1, j)) / dx2; - pyy = (discretization_->p(i, j - 1) - 2 * discretization_->p(i, j) + discretization_->p(i, j + 1)) / dy2; - res_current_point = pxx + pyy - discretization_->rhs(i, j); - sum_of_squares += pow(res_current_point, 2); + if(boundary_->mask_->isInnerFluid(i,j)){ + pxx = (discretization_->p(i - 1, j) - 2 * discretization_->p(i, j) + discretization_->p(i + 1, j)) / dx2; + pyy = (discretization_->p(i, j - 1) - 2 * discretization_->p(i, j) + discretization_->p(i, j + 1)) / dy2; + res_current_point = pxx + pyy - discretization_->rhs(i, j); + sum_of_squares += pow(res_current_point, 2); + } } } return sqrt(sum_of_squares / N); diff --git a/src/solver/pressure_solver.h b/src/solver/pressure_solver.h index 9f7ea8db..adc831b4 100644 --- a/src/solver/pressure_solver.h +++ b/src/solver/pressure_solver.h @@ -1,7 +1,13 @@ #pragma once + +#include +#include +#include + #include "../storage/field_variable.h" #include "../discretization/discretization.h" -#include +#include "../boundary/boundary.h" + /** * @class PressureSolver @@ -20,11 +26,13 @@ class PressureSolver * @param discretization instance of Discretization holding the needed field variables for rhs and p * @param epsilon tolerance for the solver * @param maximumNumberOfIterations maximum of iteration + * @param boundary object managing boundary for obstacle and surface tension */ PressureSolver(std::shared_ptr discretization, double epsilon, - int maximumNumberOfIterations); - + int maximumNumberOfIterations, + std::shared_ptr boundary); + /** * @brief virtual function that starts solver. * @@ -53,6 +61,7 @@ class PressureSolver int j_end; //!< end of loop for rhs in y direction std::shared_ptr discretization_; //!< object holding the needed field variables for rhs and p + std::shared_ptr boundary_; //!< object managing boundary for obstacle and surface tension double epsilon_; //!< tolerance for the solver diff --git a/src/solver/sor.cpp b/src/solver/sor.cpp index b0e7c29c..ed440c9d 100644 --- a/src/solver/sor.cpp +++ b/src/solver/sor.cpp @@ -4,7 +4,8 @@ SOR::SOR(const std::shared_ptr &data, double epsilon, int maximumNumberOfIterations, - double omega) : PressureSolver(data, epsilon, maximumNumberOfIterations), omega_(omega) + std::shared_ptr boundary, + double omega) : PressureSolver(data, epsilon, maximumNumberOfIterations, boundary), omega_(omega) { } @@ -22,15 +23,15 @@ void SOR::solve() { for (int j = j_beg; j < j_end; j++) { - - p_x = 1 / dx2 * (discretization_->p(i + 1, j) + discretization_->p(i - 1, j)); - p_y = 1 / dy2 * (discretization_->p(i, j + 1) + discretization_->p(i, j - 1)); - - discretization_->p(i, j) = (1 - omega_) * discretization_->p(i, j) + omega_ * (d_fac * (p_x + p_y - discretization_->rhs(i, j))); + if (boundary_->mask_->isInnerFluid(i, j)) + { + p_x = 1 / dx2 * (discretization_->p(i + 1, j) + discretization_->p(i - 1, j)); + p_y = 1 / dy2 * (discretization_->p(i, j + 1) + discretization_->p(i, j - 1)); + discretization_->p(i, j) = (1 - omega_) * discretization_->p(i, j) + omega_ * (d_fac * (p_x + p_y - discretization_->rhs(i, j))); + } } } setBoundaryValues(); - // Compute the residual with new values res = calculateResiduum(); n++; } while (n < maximumNumberOfIterations_ && res > epsilon_); diff --git a/src/solver/sor.h b/src/solver/sor.h index 614d9327..9d40204a 100644 --- a/src/solver/sor.h +++ b/src/solver/sor.h @@ -22,6 +22,7 @@ class SOR : public PressureSolver SOR(const std::shared_ptr &data, double epsilon, int maximumNumberOfIterations, + std::shared_ptr boundary, double omega); /** diff --git a/src/storage/array2D.cpp b/src/storage/array2D.cpp index 073f9e85..c628b27f 100644 --- a/src/storage/array2D.cpp +++ b/src/storage/array2D.cpp @@ -1,5 +1,7 @@ #include "array2D.h" +#include + Array2D::Array2D(std::array size) : size_(size) { assert(size[0] > 0 && size[1] > 0); @@ -23,6 +25,10 @@ double Array2D::operator()(int i, int j) const const int index = j * size_[0] + i; // Assert that indices are inside size of array + if (i < 0 || i >= size_[0]) + { + std::cout << "i: " << i << " size: " << size_[0] << std::endl; + } assert(0 <= i && i < size_[0]); assert(0 <= j && j < size_[1]); assert(j * size_[0] + i < (int)data_.size()); diff --git a/src/storage/array2D.h b/src/storage/array2D.h index aa4929d5..a7a9c31d 100644 --- a/src/storage/array2D.h +++ b/src/storage/array2D.h @@ -4,6 +4,7 @@ #include #include + /** * @class Array2D * @brief This class represents a 2D array of double values. diff --git a/src/surface/fluid_tracer.cpp b/src/surface/fluid_tracer.cpp new file mode 100644 index 00000000..7b7a55d0 --- /dev/null +++ b/src/surface/fluid_tracer.cpp @@ -0,0 +1,574 @@ +#include "fluid_tracer.h" + + +FluidTracer::FluidTracer(int numParticlesPerCell, + std::shared_ptr discretization, + std::shared_ptr mask) { + + discretization_ = discretization; + mask_ = mask; + + seedRelationDyDx_ = discretization_->dy()/ discretization_->dx(); + n_x = static_cast(std::ceil(std::sqrt(numParticlesPerCell/seedRelationDyDx_))); + n_y = static_cast(std::ceil(n_x * seedRelationDyDx_)); + numParticlesPerCell_ = n_x * n_y; + numParticles_ = numParticlesPerCell_ * mask_->getNumberOfFluidCells(); + + // Resize for speed up + x_.resize(numParticles_); + y_.resize(numParticles_); + + initializeHomogenousParticleDistribution(); +} + +void FluidTracer::initializeHomogenousParticleDistribution(){ + + + currentParticlesPerCell_.resize(mask_->size()[0] * mask_->size()[1]); + numFluidCells_ = 0; + + int placedParticles = 0; + for (int i = 1; i < mask_->size()[0] - 1; i++) { + for (int j = 1; j < mask_->size()[1] - 1; j++) { + if (mask_->isFluid(i, j)) { + initializeFluidCell(i, j, placedParticles); + placedParticles += numParticlesPerCell_; + currentParticlesPerCell_[i + j * mask_->size()[0]] = numParticlesPerCell_; + numFluidCells_++; + } + } + } + numParticles_ = placedParticles; + // assert(placedParticles == numParticles_); +} + + +void FluidTracer::initializeFluidCell(int i, int j, int idx) { + double cell_x = discretization_->dx() * (i - 1); + double cell_y = discretization_->dy() * (j - 1); + // fills in from bottom left to top right + for (int l = 0; l < n_y; l++) { + for (int k = 0; k < n_x; k++) { + x_[idx] = cell_x + ((0.5 + k) * discretization_->dx()) / n_x; + y_[idx] = cell_y + ((0.5 + l) * discretization_->dy()) / n_y; + + idx++; + } + } +} + + +void FluidTracer::createParticles(double positionSourceX, double positionSourceY){ + int idx_x = val2CellX(positionSourceX); + int idx_y = val2CellY(positionSourceY); + double newNumParticles_ = numParticles_ + numParticlesPerCell_; + x_.resize(newNumParticles_); + y_.resize(newNumParticles_); + + initializeFluidCell(idx_x, idx_y, numParticles_); + numParticles_ = newNumParticles_; +} + + +int FluidTracer::getNumberOfParticles() const { + return numParticles_; +} + +int FluidTracer::getNumberOfParticles(int i, int j) const { + return currentParticlesPerCell_[i + j * mask_->size()[0]]; +} + +std::array FluidTracer::cellOfParticle(int i){ + return {val2CellX(x_[i]), val2CellY(y_[i])}; +} + +int FluidTracer::val2CellX(double xVal){ + return static_cast(std::floor(xVal/discretization_->dx())) + 1; +} + +int FluidTracer::val2CellY(double yVal){ + return static_cast(std::floor(yVal/discretization_->dy())) + 1; +} + +std::array FluidTracer::getParticlePosition(int i) const { + return {x_[i], y_[i]}; +} + +int FluidTracer::getThresholdParticlesFluidCell() { + std::vector copy = currentParticlesPerCell_; + std::sort(copy.begin(), copy.end(), std::greater()); + + if (numFluidCells_ > copy.size()){ + std::cout << "PARTICLE COUNT CURROPTED" << std::endl; + return 1; + } + int threshold = copy[numFluidCells_ - 1]; + if (threshold < 1){ + std::cout << " WARNING, THRESHOLD 0" << std::endl; + return 1; + } + return threshold; +} + + + +void FluidTracer::moveParticles(double dt) { + // initializeHomogenousParticleDistribution(); + // Reset + mask_->resetMask(); + std::vector oldParticlesPerCell; + oldParticlesPerCell = currentParticlesPerCell_; + std::fill(currentParticlesPerCell_.begin(), currentParticlesPerCell_.end(), 0); + + for (int i = 0; i < numParticles_; i++) { + std::array vel = {discretization_->u().interpolateAt(x_[i], y_[i]), + discretization_->v().interpolateAt(x_[i], y_[i])}; + + std::array idx = cellOfParticle(i); + std::array newIdx = updateParticle(i, idx, dt, vel); + // x_[i] += vel[0] * dt; + // y_[i] += vel[1] * dt; + // std::array newIdx = cellOfParticle(i); + + + if (mask_->isObstacle(newIdx[0], newIdx[1])){ + // SAFETY FEATURE -> if bug + x_.erase(x_.begin() + i); + y_.erase(y_.begin() + i); + } else { + currentParticlesPerCell_[newIdx[0] + newIdx[1] * mask_->size()[0]] += 1; + (*mask_)(newIdx[0], newIdx[1]) = Mask::FLUID; + } + } + int threshold = 0; + //getThresholdParticlesFluidCell(); + + for (int i = 0; i < mask_->size()[0]; i++){ + for (int j = 0; j < mask_->size()[1]; j++){ + if (currentParticlesPerCell_[i + j * mask_->size()[0]] > threshold){ + (*mask_)(i, j) = Mask::FLUID; + } + } + } + + // Update BC in mask + mask_->setFluidBC(); + + checkForNewCreatedFluidCells(oldParticlesPerCell); +} + + +void FluidTracer::checkForNewCreatedFluidCells(std::vector oldParticlesPerCell){ + // Debug against Rocket Phenomen, that a drop with small velocity in tangential direction builds up momentum + for (int i = 0; i < mask_->size()[0]; i++){ + for (int j = 0; j < mask_->size()[1]; j++){ + + if (currentParticlesPerCell_[i + j * mask_->size()[0]] > 0 && oldParticlesPerCell[i + j * mask_->size()[0]] == 0){ + switch ((*mask_)(i, j)){ + case Mask::FLUID_SINGLE_RIGHT: + discretization_->u(i, j) = discretization_->u(i + 1, j); + break; + case Mask::FLUID_SINGLE_BOTTOM: + discretization_->v(i, j - 1) = discretization_->v(i, j - 2); + break; + case Mask::FLUID_SINGLE_LEFT: + discretization_->u(i - 1, j) = discretization_->u(i - 2, j); + break; + case Mask::FLUID_SINGLE_TOP: + discretization_->v(i, j) = discretization_->v(i, j + 1); + break; + } + } + } + } +} + +std::array FluidTracer::updateParticle(int i, std::array idx, double dt, std::array vel) { + + double newPos_x = x_[i] + dt * vel[0]; + double newPos_y = y_[i] + dt * vel[1]; + + // x - Border + double leftBorder = discretization_->dx()*(idx[0] - 1); // -1 because idx starts at 0 with outer cell -dx + double rightBorder = discretization_->dx()*idx[0]; + bool inCellX = leftBorder < newPos_x && newPos_x < rightBorder; + + // y - Border + double lowerBorder = discretization_->dy()*(idx[1] - 1); + double topBorder = discretization_->dy()*idx[1]; + bool inCellY = lowerBorder < newPos_y && newPos_y < topBorder; + + if (inCellX && inCellY) { + x_[i] = newPos_x; + y_[i] = newPos_y; + return idx; + + } else { + // distance and time to border + double dist_x, dt_x, dist_y, dt_y; + double dtBeforeCollision; + + std::array newIdx = idx; + std::array newVel = vel; + + // if any collision + double eps = 1e-14; + + if (dt < eps){ + // Source of error + return newIdx; + } + + // Checks DIRECTION then COLLISION + // U: + if (vel[0] >= 0) { + dist_x = rightBorder - x_[i]; + dt_x = dist_x/vel[0]; + + if (vel[1] >= 0) { + // direction TOP_RIGHT + dist_y = topBorder - y_[i]; + dt_y = dist_y/vel[1]; + + if (dt_y < dt_x) { + // collision TOP + if (mask_->isObstacle(idx[0], idx[1] + 1)){ + newVel[1] = -vel[1]; + } else { + newIdx[1] += 1; + } + dtBeforeCollision = dt_y; + } else { + // collision RIGHT + if (mask_->isObstacle(idx[0] + 1, idx[1])){ + newVel[0] = -vel[0]; + } else { + newIdx[0] += 1; + } + dtBeforeCollision = dt_x; + } + } else if (vel[1] < 0){ + // direction BOTTOM_RIGHT + dist_y = lowerBorder - y_[i]; + dt_y = dist_y/vel[1]; // -- = + + + if (dt_y < dt_x) { + // collision BOTTOM + if (mask_->isObstacle(idx[0], idx[1] - 1)){ + newVel[1] = -vel[1]; + } else { + newIdx[1] -= 1; + } + dtBeforeCollision = dt_y; + } else { + // collision RIGHT + if (mask_->isObstacle(idx[0] + 1, idx[1])){ + newVel[0] = -vel[0]; + } else { + newIdx[0] += 1; + } + dtBeforeCollision = dt_x; + } + } + // U + } else if (vel[0] < 0){ + dist_x = leftBorder - x_[i]; + dt_x = dist_x/vel[0]; // -- = + + + if (vel[1] >= 0) { + // direction TOP_LEFT + dist_y = topBorder - y_[i]; + dt_y = dist_y/vel[1]; + + if (dt_y < dt_x) { + // collision TOP + if (mask_->isObstacle(idx[0], idx[1] + 1)){ + newVel[1] = -vel[1]; + } else { + newIdx[1] += 1; + } + dtBeforeCollision = dt_y; + } else { + // collision LEFT + if (mask_->isObstacle(idx[0] - 1, idx[1])){ + newVel[0] = -vel[0]; + } else { + newIdx[0] -= 1; + } + dtBeforeCollision = dt_x; + } + } else if (vel[1] < 0){ + // direction BOTTOM_LEFT + dist_y = lowerBorder - y_[i]; + dt_y = dist_y/vel[1]; // -- = + + + if (dt_y < dt_x) { + // collision BOTTOM + if (mask_->isObstacle(idx[0], idx[1] - 1)){ + newVel[1] = -vel[1]; + } else { + newIdx[1] -= 1; + } + dtBeforeCollision = dt_y; + } else { + // collision LEFT + if (mask_->isObstacle(idx[0] - 1, idx[1])){ + newVel[0] = -vel[0]; + } else { + newIdx[0] -= 1; + } + dtBeforeCollision = dt_x; + } + } + } + // Bugfix for Floating Point Error + if (dt_x < eps || dt_y < eps){ + dtBeforeCollision = eps; + } + + // Happens if it was outside of cell but flies into the cell + if (dt < dtBeforeCollision) { + x_[i] += dt * vel[0]; + y_[i] += dt * vel[1]; + return idx; + } + + x_[i] += dtBeforeCollision * vel[0]; + y_[i] += dtBeforeCollision * vel[1]; + double newDt = dt - dtBeforeCollision; + + if (newDt < eps){ + return newIdx; + } + return updateParticle(i, newIdx, newDt, newVel); + } +} + + +////////////////////////////////////////////////////// + +// T E S T I N G + +////////////////////////////////////////////////////// + +// ONLY FOR TESTING PURPOSES + + +void FluidTracer::printParticles() { + for (int j = mask_->size()[1] - 1; j >= 0; j--){ + for (int i = 0; i < mask_->size()[0]; i++){ + std::cout << std::setw(5) << std::setfill(' ') << currentParticlesPerCell_[i + j * mask_->size()[0]] << " "; + } + std::cout << std::endl; + } +} + + +FluidTracer::FluidTracer(std::vector x, std::vector y, + std::shared_ptr discretization, + std::shared_ptr mask) { + x_ = x; + y_ = y; + discretization_ = discretization; + mask_ = mask; + numParticles_ = x_.size(); + + numParticlesPerCell_ = 1; + n_x = 1; + n_y = 1; + // hack to init currentParticlesPerCell_ + currentParticlesPerCell_.resize(mask_->size()[0] * mask_->size()[1]); + moveParticles(0.0); +} + + +std::array FluidTracer::moveParticles(double dt, std::array vel) { + // Cells without particle are air or obstacle + mask_->resetMask(); + + for (int i = 0; i < numParticles_; i++) { + std::array idx1 = cellOfParticle(i); + std::cout << " x: " << std::fixed << std::setprecision(3) << x_[0] + << " y: " << std::fixed << std::setprecision(3) << y_[0] << std::endl; + std::cout << "v_x: " << vel[0] << " v_y: " << vel[1] << std::endl; + vel = updateParticle(i, idx1, dt, vel, 0); + + // Update mask + std::array idx = cellOfParticle(i); + if (!mask_->isObstacle(idx[0], idx[1])){ + (*mask_)(idx[0], idx[1]) = Mask::FLUID; + } + } + + mask_->setFluidBC(); + return vel; +} + + + + +std::array FluidTracer::updateParticle(int i, std::array idx, double dt, std::array vel, int depth) { + // std::cout << "depth: " << depth << "time " << dt << std::endl; + if (depth > 2){ + std::cout << "----------------------------------" << std::endl; + return vel; + } + double newPos_x = x_[i] + dt * vel[0]; + double newPos_y = y_[i] + dt * vel[1]; + + // x - Border + double leftBorder = discretization_->dx()*(idx[0] - 1); // -1 because idx starts at 0 with outer cell -dx + double rightBorder = discretization_->dx()*idx[0]; + bool inCellX = leftBorder < newPos_x && newPos_x < rightBorder; + + // y - Border + double lowerBorder = discretization_->dy()*(idx[1] - 1); + double topBorder = discretization_->dy()*idx[1]; + bool inCellY = lowerBorder < newPos_y && newPos_y < topBorder; + + if (inCellX && inCellY) { + x_[i] = newPos_x; + y_[i] = newPos_y; + return vel; + + } else { + // distance and time to border + double dist_x, dt_x, dist_y, dt_y; + double dtBeforeCollision; + + std::array newIdx = idx; + std::array newVel = vel; + + // if any collision + double eps = 1e-10; + + if (dt < eps){ + return vel; + } + + // Note: ZERO_VELOCITY is no problem, because then dt is pos_inf, which is always larger + + // Checks DIRECTION then COLLISION + // U: + if (vel[0] >= 0) { + dist_x = rightBorder - x_[i]; + dt_x = dist_x/vel[0]; + + if (vel[1] >= 0) { + // direction TOP_RIGHT + dist_y = topBorder - y_[i]; + dt_y = dist_y/vel[1]; + + if (dt_y < dt_x) { + // collision TOP + if (mask_->isObstacle(idx[0], idx[1] + 1)){ + newVel[1] = -vel[1]; + } else { + newIdx[1] += 1; + } + dtBeforeCollision = dt_y; + } else { + // collision RIGHT + if (mask_->isObstacle(idx[0] + 1, idx[1])){ + newVel[0] = -vel[0]; + } else { + newIdx[0] += 1; + } + dtBeforeCollision = dt_x; + } + } else if (vel[1] < 0){ + // direction BOTTOM_RIGHT + dist_y = lowerBorder - y_[i]; + dt_y = dist_y/vel[1]; // -- = + + + if (dt_y < dt_x) { + // collision BOTTOM + if (mask_->isObstacle(idx[0], idx[1] - 1)){ + newVel[1] = -vel[1]; + } else { + newIdx[1] -= 1; + } + dtBeforeCollision = dt_y; + } else { + // collision RIGHT + if (mask_->isObstacle(idx[0] + 1, idx[1])){ + newVel[0] = -vel[0]; + } else { + newIdx[0] += 1; + } + dtBeforeCollision = dt_x; + } + } + // U + } else if (vel[0] < 0){ + dist_x = leftBorder - x_[i]; + dt_x = dist_x/vel[0]; // -- = + + + if (vel[1] >= 0) { + // direction TOP_LEFT + dist_y = topBorder - y_[i]; + dt_y = dist_y/vel[1]; + + if (dt_y < dt_x) { + // collision TOP + if (mask_->isObstacle(idx[0], idx[1] + 1)){ + newVel[1] = -vel[1]; + } else { + newIdx[1] += 1; + } + dtBeforeCollision = dt_y; + } else { + // collision LEFT + if (mask_->isObstacle(idx[0] - 1, idx[1])){ + newVel[0] = -vel[0]; + } else { + newIdx[0] -= 1; + } + dtBeforeCollision = dt_x; + } + } else if (vel[1] < 0){ + // direction BOTTOM_LEFT + dist_y = lowerBorder - y_[i]; + dt_y = dist_y/vel[1]; // -- = + + + if (dt_y < dt_x) { + // collision BOTTOM + if (mask_->isObstacle(idx[0], idx[1] - 1)){ + newVel[1] = -vel[1]; + } else { + newIdx[1] -= 1; + } + dtBeforeCollision = dt_y; + } else { + // collision LEFT + if (mask_->isObstacle(idx[0] - 1, idx[1])){ + newVel[0] = -vel[0]; + } else { + newIdx[0] -= 1; + } + dtBeforeCollision = dt_x; + } + } + } + // Bugfix for Floating Point Error + if (dt_x < eps || dt_y < eps){ + dtBeforeCollision = eps; + } + + // Happens if it was outside of cell but flies into the cell + if (dt < dtBeforeCollision) { + x_[i] += dt * vel[0]; + y_[i] += dt * vel[1]; + return vel; + } + + x_[i] += dtBeforeCollision * vel[0]; + y_[i] += dtBeforeCollision * vel[1]; + double newDt = dt - dtBeforeCollision; + + if (newDt < eps){ + return newVel; + } + return updateParticle(i, newIdx, newDt, newVel, depth + 1); + } +} \ No newline at end of file diff --git a/src/surface/fluid_tracer.h b/src/surface/fluid_tracer.h new file mode 100644 index 00000000..0f1bb0bc --- /dev/null +++ b/src/surface/fluid_tracer.h @@ -0,0 +1,140 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +#include "../discretization/discretization.h" +#include "../boundary/boundary.h" + + +class FluidTracer { + public: + FluidTracer(int numParticlesperCell, + std::shared_ptr discretization, + std::shared_ptr mask); + + // Mainly for testing purposes + FluidTracer(std::vector x, std::vector y, + std::shared_ptr discretization, + std::shared_ptr mask); + + /** + * @brief Update the position of the particles according to the velocity field and sets mask accordingly + * + * get the velocity field $u$ and $v$ + * Checks for collision with border or obstacle and reflects the particle at this position + * Update the mask where there are new Air or Fluid cells + * + * @param dt + */ + void moveParticles(double dt); + + /** + * @brief can be used to create a source cell for particles + * + * fills the cell homogenously with particles by cell + * + */ + void createParticles(double positionSourceX, double positionSourceY); + + /** + * @brief Total number of Particles + * + * @return int + */ + int getNumberOfParticles() const; + + /** + * @brief Particles of specified cell + * + * uses mask Grid + */ + int getNumberOfParticles(int i, int j) const; + + + /** + * @brief Get the Particle Position, index starts at 0 + * + * @return std::array + */ + std::array getParticlePosition(int i) const; + + /** + * @brief returns the 2D idx of particle `i` + * + * @param i + * @return std::array + */ + std::array cellOfParticle(int i); + + /** + * @brief translates from x-coordinate to cell index in x-direction + */ + int val2CellX(double xVal); + /** + * @brief translate from y-coordinate to cell index in y-direction + */ + int val2CellY(double yVal); + + + + /** + * Methods for debugging and test purposes + */ + std::array updateParticle(int i, std::array idx, double dt, std::array vel, int depth); + std::array moveParticles(double dt, std::array vel); + void printParticles(); + + + private: + void initializeHomogenousParticleDistribution(); + /** + * @brief initializes a single cell according to nx, ny and numParticlesPerCell_ + */ + void initializeFluidCell(int i, int j, int idx); + + + /** + * @brief updates the position of particle `i` according to the velocity field and possible collisions (recursive function) + * + * @param i particle to move + * @param idx 2D idx of the cell in which particle `i` currently is + * @param dt time step (particle will travel with *remainder* of dt if it collides with border or obstacle in opposite direction) + * @param vel velocity derived from flow field + * @return std::array new 2D idx of the cell in which particle `i` is after update + */ + std::array updateParticle(int i, std::array idx, double dt, std::array vel); + + /** + * @brief Updates velocities if a new cell is created to avoid **rocket** effect for droplets + * + * @param oldParticlesPerCell + */ + void checkForNewCreatedFluidCells(std::vector oldParticlesPerCell); + + // Under construction: for making fluid update step more stable, by majority vote of particles in cell + int getThresholdParticlesFluidCell(); + + + int numParticles_; // + + // aspect ratio e.g. 1.0 for square cells and 0.5 for (dx = 2*dy) cells + double seedRelationDyDx_; + // how many particles are placed in each direction per cell + int n_x, n_y; + // inital count of fluid cells + int numFluidCells_; + + std::shared_ptr discretization_; + std::shared_ptr mask_; + std::vector x_; + std::vector y_; + std::vector currentParticlesPerCell_; // +#include "../src/boundary/boundary.h" +#include "../src/discretization/central_differences.h" + +TEST(Boundary, BoundaryCellsWithoutObstacle) { + Settings settings; + settings.nCells = {10, 10}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {settings.physicalSize[0] / settings.nCells[0], settings.physicalSize[1] / settings.nCells[1]}; + + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + + Boundary boundary(mask, discretization, settings); +}; + + +TEST(Boundary, BoundaryCellsWithObstacle) { + Settings settings; + settings.nCells = {10, 10}; + settings.obstaclePosition = {0.45, 0.45}; + settings.obstacleDimension = {0.1, 0.1}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {settings.physicalSize[0] / settings.nCells[0], settings.physicalSize[1] / settings.nCells[1]}; + + std::shared_ptr mask = std::make_shared(settings); + mask->makeRectangularObstacle(); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + + Boundary boundary(mask, discretization, settings); + +}; + +TEST(Boundary, SurfacePressure) { + // Reset this grid with all 16 possibilities + + // A A A + // F F F + // F F A + + // (sourrounded by domain) + + Settings settings; + settings.nCells = {3, 3}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {settings.physicalSize[0] / settings.nCells[0], settings.physicalSize[1] / settings.nCells[1]}; + + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + Boundary boundary(mask, discretization, settings); + for (int i = 0; i < 16; i++) { + mask->resetMask(); + if (i%2 > 0){ + (*mask)(1, 0) = Mask::FLUID; + } + if (i%4 > 2){ + (*mask)(1, 1) = Mask::FLUID; + } + if (i%8 > 4){ + (*mask)(1, 2) = Mask::FLUID; + } + if (i%16 > 8){ + (*mask)(0, 1) = Mask::FLUID; + } + + // boundary.setSurfacePressure(); + // std::cout << "Case " << i << "\n"; + // mask_->printMask(); + + + } + +} \ No newline at end of file diff --git a/tests/test_computation.cpp b/tests/test_computation.cpp new file mode 100644 index 00000000..663326d7 --- /dev/null +++ b/tests/test_computation.cpp @@ -0,0 +1,25 @@ +// #include +// #include "../src/computation.h" + + +// TEST(Computation, Initialize){ +// Computation comp; +// char* argv[] = {const_cast("test"), +// const_cast("/home/jonat/Documents/01_Studium/NumSim/input/settings_debug_joni.txt")}; +// comp.initialize(2, argv); + +// comp.runSimulation(); +// } + + +// // std::cout << fluidTracer_->getNumberOfParticles() << std::endl; +// // int particleInDomain = 0; +// // int fluidCells = 0; +// // for (int i = 0; i < fluidTracer_->getNumberOfParticles(); i++) +// // { +// // particleInDomain += fluidTracer_->getParticlePosition(i)[0] > 1.9 +// // && fluidTracer_->getParticlePosition(i)[0] < settings_.physicalSize[0] +// // && fluidTracer_->getParticlePosition(i)[1] > 0.0 +// // && fluidTracer_->getParticlePosition(i)[1] < settings_.physicalSize[1]; +// // } +// // std::cout << particleInDomain << std::endl; \ No newline at end of file diff --git a/tests/test_fluid_tracer.cpp b/tests/test_fluid_tracer.cpp new file mode 100644 index 00000000..5f7170f8 --- /dev/null +++ b/tests/test_fluid_tracer.cpp @@ -0,0 +1,400 @@ +#include +#include "../src/surface/fluid_tracer.h" +#include "../src/discretization/central_differences.h" + +// Experimental stuff +#include + +TEST(FluidTracer, NumberParticlesSingleCell){ + /* + Test for a single cell (with 8 boundary cells) how many particles are placed + */ + Settings settings; + settings.nCells = {1, 1}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {1.0, 1.0}; + + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + + + int numParticlesPerCell = 1; + FluidTracer fluid_tracer(numParticlesPerCell, discretization, mask); + EXPECT_GE(fluid_tracer.getNumberOfParticles(), numParticlesPerCell); + + int numParticlesPerCell2 = 9; + FluidTracer fluid_tracer2(numParticlesPerCell2, discretization, mask); + EXPECT_GE(fluid_tracer2.getNumberOfParticles(), numParticlesPerCell2); + + int numParticlesPerCell3 = 17; + FluidTracer fluid_tracer3(numParticlesPerCell3, discretization, mask); + EXPECT_GE(fluid_tracer3.getNumberOfParticles(), numParticlesPerCell3); + + int numParticlesPerCell4 = 100; + FluidTracer fluid_tracer4(numParticlesPerCell4, discretization, mask); + EXPECT_GE(fluid_tracer4.getNumberOfParticles(), numParticlesPerCell4); + EXPECT_GE(fluid_tracer4.getNumberOfParticles(), fluid_tracer3.getNumberOfParticles()); + EXPECT_LE(fluid_tracer4.getNumberOfParticles(), 2 * numParticlesPerCell4); +}; + +TEST(FluidTracer, DistributionSingleCell){ + /* + Test for a single cell (with 8 boundary cells) how many particles are placed + */ + Settings settings; + settings.nCells = {1, 1}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {1.0, 1.0}; + + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + + + int numParticlesPerCell = 1; + FluidTracer fluid_tracer(numParticlesPerCell, discretization, mask); + EXPECT_NEAR(fluid_tracer.getParticlePosition(0)[0], 0.5, 0.001); + EXPECT_NEAR(fluid_tracer.getParticlePosition(0)[1], 0.5, 0.001); + + int numParticlesPerCell2 = 9; + FluidTracer fluid_tracer2(numParticlesPerCell2, discretization, mask); + EXPECT_NEAR(fluid_tracer2.getParticlePosition(0)[0], 0.166667, 0.001); + EXPECT_NEAR(fluid_tracer2.getParticlePosition(0)[1], 0.166667, 0.001); + EXPECT_NEAR(fluid_tracer2.getParticlePosition(1)[0], 0.5, 0.001); + EXPECT_NEAR(fluid_tracer2.getParticlePosition(1)[1], 0.166667, 0.001); + EXPECT_NEAR(fluid_tracer2.getParticlePosition(4)[0], 0.5, 0.001); + EXPECT_NEAR(fluid_tracer2.getParticlePosition(4)[1], 0.5, 0.001); + EXPECT_NEAR(fluid_tracer2.getParticlePosition(8)[0], 0.833333, 0.001); + EXPECT_NEAR(fluid_tracer2.getParticlePosition(8)[1], 0.833333, 0.001); + + int numParticlesPerCell3 = 17; + FluidTracer fluid_tracer3(numParticlesPerCell3, discretization, mask); + EXPECT_NEAR(fluid_tracer3.getParticlePosition(0)[0], 0.125, 0.1); + EXPECT_NEAR(fluid_tracer3.getParticlePosition(0)[1], 0.1, 0.1); + EXPECT_NEAR(fluid_tracer3.getParticlePosition(1)[0], 0.375, 0.1); + EXPECT_NEAR(fluid_tracer3.getParticlePosition(1)[1], 0.1, 0.1); + +} + + +TEST(FluidTracer, val2CellXAndY){ + Settings settings; + settings.nCells = {1, 1}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {1.0, 1.0}; + + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + + FluidTracer fluid_tracer(1, discretization, mask); + + EXPECT_EQ(fluid_tracer.val2CellX(0.5), 1); + EXPECT_EQ(fluid_tracer.val2CellX(0.0), 1); + EXPECT_EQ(fluid_tracer.val2CellX(-0.5), 0); + EXPECT_EQ(fluid_tracer.val2CellX(1.5), 2); + + EXPECT_EQ(fluid_tracer.val2CellY(0.5), 1); + EXPECT_EQ(fluid_tracer.val2CellY(0.0), 1); + EXPECT_EQ(fluid_tracer.val2CellY(-0.5), 0); + EXPECT_EQ(fluid_tracer.val2CellY(1.5), 2); +} + +TEST(FluidTracer, moveParticles_1Cell_1Particle_WithoutCollision){ + // u(0,2) ----- u(1,2) + // : : + // v(0,1) |____v(1,1)_____| v(2,1) + // | | + // u(0,1) ----- u(1,1) + // | | + // v(0,0) |____v(1,0)_____| v(2,0) + // : : + // u(0,0) ----- u(1,0) + // + + Settings settings; + settings.nCells = {1, 1}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {1.0, 1.0}; + + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + int numParticlesPerCell = 1; + FluidTracer fluid_tracer(numParticlesPerCell, discretization, mask); + + std::array velocitiesU = {-1, -0.1, -0.01, 0, 0.01, 0.1, 1}; + std::array velocitiesV = {-1, -0.1, -0.01, 0, 0.01, 0.1, 1}; + + // Checks 49 Cases + for (int idx_u = 0; idx_u < velocitiesU.size(); idx_u++){ + for (int idx_v = 0; idx_v < velocitiesV.size(); idx_v++){ + + // Set all velocities to the same value + discretization->u(0,0) = velocitiesU[idx_u]; + discretization->u(1,0) = velocitiesU[idx_u]; + discretization->u(0,1) = velocitiesU[idx_u]; + discretization->u(1,1) = velocitiesU[idx_u]; + discretization->u(0,2) = velocitiesU[idx_u]; + discretization->u(1,2) = velocitiesU[idx_u]; + + discretization->v(0,0) = velocitiesV[idx_v]; + discretization->v(1,0) = velocitiesV[idx_v]; + discretization->v(2,0) = velocitiesV[idx_v]; + discretization->v(0,1) = velocitiesV[idx_v]; + discretization->v(1,1) = velocitiesV[idx_v]; + discretization->v(2,1) = velocitiesV[idx_v]; + + // Initialize Fluid tracer with single particle + FluidTracer fluid_tracer(1, discretization, mask); + + double old_pos_x = fluid_tracer.getParticlePosition(0)[0]; + double old_pos_y = fluid_tracer.getParticlePosition(0)[1]; + EXPECT_EQ(fluid_tracer.getNumberOfParticles(), 1); + EXPECT_EQ(old_pos_x, 0.5); + EXPECT_EQ(old_pos_y, 0.5); + + // Update particle according to velocity + + double dt = 0.1; // + fluid_tracer.moveParticles(dt); + EXPECT_EQ(fluid_tracer.getParticlePosition(0)[0], old_pos_x + dt * velocitiesU[idx_u]); + EXPECT_EQ(fluid_tracer.getParticlePosition(0)[1], old_pos_y + dt * velocitiesV[idx_v]); + } + } +} + + +TEST(FluidTracer, moveParticles_1Cell_1Particle_WithCollision){ + // u(0,2) ----- u(1,2) + // : : + // v(0,1) |____v(1,1)_____| v(2,1) + // | | + // u(0,1) ----- u(1,1) + // | | + // v(0,0) |____v(1,0)_____| v(2,0) + // : : + // u(0,0) ----- u(1,0) + // + + // TODO: check obstacle edges + + Settings settings; + settings.nCells = {1, 1}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {1.0, 1.0}; + + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + + std::array velocitiesU = {-6, -1, 1, 6}; + std::array velocitiesV = {-6, -1, 1, 6}; + // std::array velocitiesU = {8}; + // std::array velocitiesV = {1}; + +// Checks 16 Cases --> 0°, 27°, 45°, 63°, 90°, ... + for (int idx_u = 0; idx_u < velocitiesU.size(); idx_u++){ + for (int idx_v = 0; idx_v < velocitiesV.size(); idx_v++){ + + // Set all velocities to the same value + discretization->u(0,0) = velocitiesU[idx_u]; + discretization->u(1,0) = velocitiesU[idx_u]; + discretization->u(0,1) = velocitiesU[idx_u]; + discretization->u(1,1) = velocitiesU[idx_u]; + discretization->u(0,2) = velocitiesU[idx_u]; + discretization->u(1,2) = velocitiesU[idx_u]; + + discretization->v(0,0) = velocitiesV[idx_v]; + discretization->v(1,0) = velocitiesV[idx_v]; + discretization->v(2,0) = velocitiesV[idx_v]; + discretization->v(0,1) = velocitiesV[idx_v]; + discretization->v(1,1) = velocitiesV[idx_v]; + discretization->v(2,1) = velocitiesV[idx_v]; + + + // Initialize Fluid tracer with single particle + FluidTracer fluidTracer(1, discretization, mask); + + double old_pos_x = fluidTracer.getParticlePosition(0)[0]; + double old_pos_y = fluidTracer.getParticlePosition(0)[1]; + EXPECT_EQ(fluidTracer.getNumberOfParticles(), 1); + EXPECT_EQ(old_pos_x, 0.5); + EXPECT_EQ(old_pos_y, 0.5); + + // Update particle + double dt = 0.1; + fluidTracer.moveParticles(dt); + + // Particle is still in the box + EXPECT_GE(fluidTracer.getParticlePosition(0)[0], 0.0); + EXPECT_LE(fluidTracer.getParticlePosition(0)[0], 1.0); + EXPECT_GE(fluidTracer.getParticlePosition(0)[1], 0.0); + EXPECT_LE(fluidTracer.getParticlePosition(0)[1], 1.0); + + + // CHECK A SPECIAL CASE + // if (idx_u == 3 && idx_v == 2){ + // // Particles position is + // double new_pos_x = 0.75; + // double new_pos_y = 0.875; + // EXPECT_EQ(fluid_tracer.getParticlePosition(0)[0], new_pos_x); + // EXPECT_EQ(fluid_tracer.getParticlePosition(0)[1], new_pos_y); + // } + } + } +} + + +TEST(FluidTracer, moveParticlesInLargeGrid){ + // Flow Field like this: + // + // Right Down + // Up Left + // + // Or larger + // + // R R R D D D + // R R R D D D + // R R R D D D + // U U U L L L + // U U U L L L + // U U U L L L + + Settings settings; + settings.nCells = {9, 9}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {settings.physicalSize[0] / settings.nCells[0], settings.physicalSize[1] / settings.nCells[1]}; + + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + + std::vector x = {0.1, 0.1, 0.9, 0.9, 0.25, 0.75, 0.25, 0.75}; + std::vector y = {0.1, 0.9, 0.1, 0.9, 0.25, 0.25, 0.75, 0.75}; + FluidTracer fluidTracer(x, y, discretization, mask); + + + // Create an interesting flow-field: Wirbel + for (int i = 0; i < settings.nCells[0]; i++){ + for (int j = 0; j < settings.nCells[1]; j++){ + if (i > settings.nCells[0]/2){ + if (j > settings.nCells[1]/2){ + discretization->v(i,j) = -1; + } else { + discretization->u(i,j) = -1; + } + } else { + if (j > settings.nCells[1]/2){ + discretization->u(i,j) = 1; + } else { + discretization->v(i,j) = 1; + } + } + } + } + // Move particles for 100 steps + double dt = 0.1; + for (int k = 0; k < 100; k++){ + fluidTracer.moveParticles(dt); + + + // particles are still in the box + for (int i = 0; i < fluidTracer.getNumberOfParticles(); i++){ + EXPECT_GE(fluidTracer.getParticlePosition(i)[0], 0.0); + EXPECT_LE(fluidTracer.getParticlePosition(i)[0], 1.0); + EXPECT_GE(fluidTracer.getParticlePosition(i)[1], 0.0); + EXPECT_LE(fluidTracer.getParticlePosition(i)[1], 1.0); + } + } + +} + +TEST(FluidTracer, moveDistributedParticlesInLargeGrid){ + // Flow Field like this: + // + // Right Down + // Up Left + // + // Or larger + // + // R R R D D D + // R R R D D D + // R R R D D D + // U U U L L L + // U U U L L L + // U U U L L L + + Settings settings; + settings.nCells = {9, 9}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {settings.physicalSize[0] / settings.nCells[0], settings.physicalSize[1] / settings.nCells[1]}; + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + + FluidTracer fluidTracer(1, discretization, mask); + double vel = meshWidth[0]; + for (int i = 0; i < settings.nCells[0]; i++){ + for (int j = 0; j < settings.nCells[1] + 1; j++){ + // Flow to the right + discretization->u(i,j) = vel; + } + } + + double dt = 0.5; + for (int k = 0; k < 1; k++){ + fluidTracer.moveParticles(dt); + mask->printMask(); + + + // particles are still in the box + for (int i = 0; i < fluidTracer.getNumberOfParticles(); i++){ + EXPECT_GE(fluidTracer.getParticlePosition(i)[0], 0.0); + EXPECT_LE(fluidTracer.getParticlePosition(i)[0], 1.0); + EXPECT_GE(fluidTracer.getParticlePosition(i)[1], 0.0); + EXPECT_LE(fluidTracer.getParticlePosition(i)[1], 1.0); + } + + } + +} + +// Benötigt Test Methode mit return velocity +TEST(FluidTracer, DVDLogoBounceOff){ + + Settings settings; + settings.nCells = {10, 10}; + settings.obstaclePosition = {0.45, 0.45}; + settings.obstacleDimension = {0.1, 0.1}; + settings.physicalSize = {1.0, 1.0}; + std::array meshWidth = {settings.physicalSize[0] / settings.nCells[0], settings.physicalSize[1] / settings.nCells[1]}; + + std::shared_ptr mask = std::make_shared(settings); + std::shared_ptr discretization = std::make_shared(settings.nCells, meshWidth); + + mask->makeRectangularObstacle(); + mask->setObstacleBC(); + + // Initial values + std::array vel = {0.35*meshWidth[0], -0.5 * meshWidth[1]}; + double dt = 1; + std::vector x = {0.5}; + std::vector y = {0.2}; + + FluidTracer fluidTracer(x, y, discretization, mask); + + + for (int k = 0; k < 100; k++){ + + + mask->printMask(); + std::cout << k << " "; + vel = fluidTracer.moveParticles(dt, vel); + std::cout << "\033[2J\033[1;1H"; + usleep(10000); + + } +} + + + +// ----------------------------------------------------------------- +// --- T E S T U P D A T E M A S K B O U N D A R I E S --- +// ----------------------------------------------------------------- + + diff --git a/tests/test_mask.cpp b/tests/test_mask.cpp new file mode 100644 index 00000000..735f9a6a --- /dev/null +++ b/tests/test_mask.cpp @@ -0,0 +1,114 @@ +#include +#include "../src/boundary/mask.h" + +TEST(Mask, ConstructorInitAllInnerCellsAsFluid){ + Settings settings; + settings.nCells = {3,3}; + Mask mask(settings); + for (int i = 1; i < 4; i++){ + for (int j = 1; j < 4; j++){ + EXPECT_EQ(mask(i,j), Mask::FLUID); + } + } +}; + +TEST(Mask, SetOriginToAir){ + Settings settings; + settings.nCells = {3,3}; + Mask mask(settings); + mask(0,0) = Mask::AIR; + EXPECT_EQ(mask(0,0), Mask::AIR); +}; + +TEST(Mask, isFluid){ + Settings settings; + settings.nCells = {3,3}; + Mask mask(settings); + mask(0,0) = Mask::AIR; + EXPECT_FALSE(mask.isFluid(0,0)); + EXPECT_TRUE(mask.isFluid(1,1)); +}; + +TEST(Mask, isObstacle){ + Settings settings; + settings.nCells = {5, 5}; + Mask mask(settings); + mask(1,1) = Mask::AIR; + mask(3,3) = Mask::OBSTACLE; + EXPECT_TRUE(mask.isObstacle(0,0)); + EXPECT_FALSE(mask.isObstacle(1,1)); + EXPECT_FALSE(mask.isObstacle(2,2)); + EXPECT_TRUE(mask.isObstacle(3,3)); +}; + +TEST(Mask, updateMaskBoundaries){ + // Create simple map + + // O O O O O O O + // O A A A F F O + // O A A A F F O + // O A A A F F O + // O F F F F F O + // O F F F F F O + // O O O O O O O + + // O - Obstacle + // F - Fluid + // A - Air + Settings settings; + settings.nCells = {5, 5}; + Mask mask(settings); + mask(1,5) = Mask::AIR; + mask(2,5) = Mask::AIR; + mask(3,5) = Mask::AIR; + mask(1,4) = Mask::AIR; + mask(2,4) = Mask::AIR; + mask(3,4) = Mask::AIR; + mask(1,3) = Mask::AIR; + mask(2,3) = Mask::AIR; + mask(3,3) = Mask::AIR; + + + mask.setFluidBC(); + EXPECT_EQ(mask(3,2), Mask::FLUID_BORDER_TOP); + EXPECT_EQ(mask(4,2), Mask::FLUID); + EXPECT_EQ(mask(4,3), Mask::FLUID_BORDER_LEFT); + + mask.printMask(); +}; + +TEST(Mask, makeSmallRectangularObstacleCenter){ + // Create simple map + + // 130 131 131 131 131 131 131 131 131 131 131 132 + // 130 015 015 015 015 015 015 015 015 015 015 132 + // 130 015 015 015 015 015 015 015 015 015 015 132 + // 130 015 015 015 015 015 015 015 015 015 015 132 + // 130 015 015 015 015 015 015 015 015 015 015 132 + // 130 015 015 015 015 121 122 015 015 015 015 132 + // 130 015 015 015 015 120 123 015 015 015 015 132 + // 130 015 015 015 015 015 015 015 015 015 015 132 + // 130 015 015 015 015 015 015 015 015 015 015 132 + // 130 015 015 015 015 015 015 015 015 015 015 132 + // 130 015 015 015 015 015 015 015 015 015 015 132 + // 130 133 133 133 133 133 133 133 133 133 133 132 + + // O - Obstacle + // F - Fluid + // A - Air + Settings settings; + settings.nCells = {10, 10}; + settings.physicalSize = {1.0, 1.0}; + settings.obstaclePosition = {0.45, 0.45}; + settings.obstacleDimension = {0.1, 0.1}; + + Mask mask(settings); + mask.makeRectangularObstacle(); + mask.setObstacleBC(); + mask.printMask(); + + EXPECT_EQ(mask(5,5), Mask::OBSTACLE_CORNER_BOTTOM_LEFT); + EXPECT_EQ(mask(5,6), Mask::OBSTACLE_CORNER_TOP_LEFT); + EXPECT_EQ(mask(6,5), Mask::OBSTACLE_CORNER_BOTTOM_RIGHT); + EXPECT_EQ(mask(6,6), Mask::OBSTACLE_CORNER_TOP_RIGHT); +};