Skip to content
Snippets Groups Projects
Commit e9d6b1a9 authored by Leon Keim's avatar Leon Keim
Browse files

Merge branch 'cleanup/problem-slides' into 'master'

[slides][problem] Add generic interfaces for initial and boundary conditions 

See merge request !287
parents 6bc14a5b eeb1ea78
No related branches found
No related tags found
1 merge request!287Cleanup/problem slides
Pipeline #47847 passed
......@@ -227,6 +227,24 @@ PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const
##
More general Dirichlet boundary functions:
```cpp
PrimaryVariables dirichlet(const Element &element,
const SubControlVolumeFace &scvf) const
{
...
}
```
```cpp
PrimaryVariables dirichlet(const Element &element,
const SubControlVolume &scv) const
{
...
}
```
##
Neumann boundary condition values / boundary fluxes (only called on Neumann boundaries)
```cpp
......@@ -247,6 +265,21 @@ NumEqVector neumannAtPos(const GlobalPosition& globalPos) const
##
More general Neumann boundary function:
```cpp
template<class ElementVolumeVariables, class ElementFluxVariablesCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVariablesCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
...
}
```
##
Initial conditions:
```cpp
......@@ -274,6 +307,21 @@ NumEqVector sourceAtPos(const GlobalPosition &globalPos) const
{ return NumEqVector(0.0); }
```
##
More general source/sink function:
```cpp
template<class ElementVolumeVariables>
NumEqVector source(const Element &element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolume &scv) const
{
...
}
```
# Spatial Parameters definition
## Spatial parameters
......@@ -373,7 +421,7 @@ See [Part I: Runtime parameters](./params.html) for details.
## Main program
* Each problem has one main file (`test_name.cc` or `main.cc`)
* Here: `2pmain.cc` and `2p2cmain.cc`
* Here: `2pmain.cc` and `2pnimain.cc`
* Contains the `main` function (mandatory in C/C++ programs)
## Main function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment