... | @@ -39,13 +39,13 @@ One way of implementing such condition is to define a new function: |
... | @@ -39,13 +39,13 @@ One way of implementing such condition is to define a new function: |
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
You can have a look to the already implemented conditions in [src/boundariesConditions.cpp](https://gitlab.oca.eu/DISC/fargOCA/blob/master/src/boundariesConditions.cpp): `ComputeReflectingZ`, `OpenBoundaryR` etc.
|
|
You can have a look to the already implemented conditions in [src/D3/boundariesConditions.cpp](https://gitlab.oca.eu/DISC/fargOCA/blob/master/src/D3/boundariesConditions.cpp): `ComputeReflectingZ`, `OpenBoundaryR` etc.
|
|
|
|
|
|
### Declaring a stateless boundaries condition
|
|
### Declaring a stateless boundaries condition
|
|
|
|
|
|
Let say you want to make your new condition available under the name "someGreatBC":
|
|
Let say you want to make your new condition available under the name "someGreatBC":
|
|
|
|
|
|
In a carefully chosen source file ([src/boundariesConditions.cpp](https://gitlab.oca.eu/DISC/fargOCA/blob/master/src/boundariesConditions.cpp) for example):
|
|
In a carefully chosen source file ([src/D3/boundariesConditions.cpp](https://gitlab.oca.eu/DISC/fargOCA/blob/master/src/D3/boundariesConditions.cpp) for example):
|
|
|
|
|
|
```
|
|
```
|
|
...
|
|
...
|
... | @@ -60,3 +60,12 @@ In a carefully chosen source file ([src/boundariesConditions.cpp](https://gitlab |
... | @@ -60,3 +60,12 @@ In a carefully chosen source file ([src/boundariesConditions.cpp](https://gitlab |
|
|
|
|
|
```
|
|
```
|
|
You're done.
|
|
You're done.
|
|
|
|
|
|
|
|
## Tips
|
|
|
|
|
|
|
|
### Factorize
|
|
|
|
|
|
|
|
It's possible to apply any number of boundaries conditions, so instead of replicating common code, make it an independent conditions and call them as needed. (need details ?)
|
|
|
|
|
|
|
|
###
|
|
|
|
|