Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirtualFluids
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iRMB
VirtualFluids
Commits
b3803d9f
Commit
b3803d9f
authored
2 years ago
by
Anna Wellmann
Browse files
Options
Downloads
Patches
Plain Diff
More doxygen documentation in BCKernelManager
parent
0788f93a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!131
Add meaningful exceptions to BCKernelManager()
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gpu/VirtualFluids_GPU/KernelManager/BCKernelManager.h
+20
-14
20 additions, 14 deletions
src/gpu/VirtualFluids_GPU/KernelManager/BCKernelManager.h
with
20 additions
and
14 deletions
src/gpu/VirtualFluids_GPU/KernelManager/BCKernelManager.h
+
20
−
14
View file @
b3803d9f
...
...
@@ -47,16 +47,17 @@ class Parameter;
struct
LBMSimulationParameter
;
using
boundaryCondition
=
std
::
function
<
void
(
LBMSimulationParameter
*
,
QforBoundaryConditions
*
)
>
;
using
boundaryConditionParameter
=
std
::
function
<
void
(
Parameter
*
,
QforBoundaryConditions
*
,
const
int
level
)
>
;
using
boundaryCondition
With
Parameter
=
std
::
function
<
void
(
Parameter
*
,
QforBoundaryConditions
*
,
const
int
level
)
>
;
//! \class BCKernelManager
//! \brief manage the cuda kernel calls to boundary conditions
//! \details This class stores the boundary conditions and manages the calls to the boundary condition kernels.
class
VIRTUALFLUIDS_GPU_EXPORT
BCKernelManager
{
public:
//! Class constructor
//! \param parameter shared pointer to instance of class Parameter
//! \throws std::runtime_error when the user
misconfigured the
boundary condition
(s)
//! \throws std::runtime_error when the user
forgets to specify a
boundary condition
BCKernelManager
(
SPtr
<
Parameter
>
parameter
,
BoundaryConditionFactory
*
bcFactory
);
//! \brief calls the device function of the velocity boundary condition (post-collision)
...
...
@@ -90,20 +91,25 @@ public:
void
runStressWallModelKernelPost
(
const
int
level
)
const
;
private:
template
<
typename
bcFunction
>
void
checkBoundaryCondition
(
const
bcFunction
&
bc
,
const
QforBoundaryConditions
&
bcStruct
,
const
std
::
string
&
bcName
){
if
(
!
bc
&&
bcStruct
.
numberOfBCnodes
>
0
)
throw
std
::
runtime_error
(
"The boundary condition "
+
bcName
+
" was not set!"
);
}
//! \brief check if a boundary condition was set
//! \throws std::runtime_error if boundary nodes were assigned, but no boundary condition was set in the boundary condition factory
//! \param boundaryCondition: a kernel function for the boundary condition
//! \param bcStruct: a struct containing the grid nodes which are part of the boundary condition
//! \param bcName: the name of the checked boundary condition
template
<
typename
bcFunction
>
void
checkBoundaryCondition
(
const
bcFunction
&
boundaryCondition
,
const
QforBoundaryConditions
&
bcStruct
,
const
std
::
string
&
bcName
)
{
if
(
!
boundaryCondition
&&
bcStruct
.
numberOfBCnodes
>
0
)
throw
std
::
runtime_error
(
"The boundary condition "
+
bcName
+
" was not set!"
);
}
SPtr
<
Parameter
>
para
;
boundaryCondition
velocityBoundaryConditionPost
=
nullptr
;
boundaryCondition
noSlipBoundaryConditionPost
=
nullptr
;
boundaryCondition
slipBoundaryConditionPost
=
nullptr
;
boundaryCondition
pressureBoundaryConditionPre
=
nullptr
;
boundaryCondition
geometryBoundaryConditionPost
=
nullptr
;
boundaryConditionParameter
stressBoundaryConditionPost
=
nullptr
;
boundaryCondition
velocityBoundaryConditionPost
=
nullptr
;
boundaryCondition
noSlipBoundaryConditionPost
=
nullptr
;
boundaryCondition
slipBoundaryConditionPost
=
nullptr
;
boundaryCondition
pressureBoundaryConditionPre
=
nullptr
;
boundaryCondition
geometryBoundaryConditionPost
=
nullptr
;
boundaryCondition
With
Parameter
stressBoundaryConditionPost
=
nullptr
;
};
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment