IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue 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
Pranav Sampathkumar
corsika
Commits
5f818d43
Commit
5f818d43
authored
3 years ago
by
ralfulrich
Committed by
Ralf Ulrich
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
missing files
parent
64059505
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corsika/detail/framework/process/CascadeEquationsProcess.hpp
+60
-0
60 additions, 0 deletions
corsika/detail/framework/process/CascadeEquationsProcess.hpp
corsika/framework/process/CascadeEquationsProcess.hpp
+55
-0
55 additions, 0 deletions
corsika/framework/process/CascadeEquationsProcess.hpp
with
115 additions
and
0 deletions
corsika/detail/framework/process/CascadeEquationsProcess.hpp
0 → 100644
+
60
−
0
View file @
5f818d43
/*
* (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include
<corsika/framework/process/ProcessTraits.hpp>
#include
<corsika/framework/utility/HasMethodSignature.hpp>
/**
* @file CascadeEquationsProcess.hpp
*/
namespace
corsika
{
/**
* traits test for CascadeEquationsProcess::doCascadeEquations method.
*/
template
<
class
TProcess
,
typename
TReturn
,
typename
...
TArg
>
struct
has_method_doCascadeEquations
:
public
detail
::
has_method_signature
<
TReturn
,
TArg
...
>
{
//! method signature
using
detail
::
has_method_signature
<
TReturn
,
TArg
...
>::
testSignature
;
//! the default value
template
<
class
T
>
static
std
::
false_type
test
(...);
//! templated parameter option
template
<
class
T
>
static
decltype
(
testSignature
(
&
T
::
template
doCascadeEquations
<
TArg
...>))
test
(
std
::
nullptr_t
);
//! non templated parameter option
template
<
class
T
>
static
decltype
(
testSignature
(
&
T
::
doCascadeEquations
))
test
(
std
::
nullptr_t
);
public:
/**
* @name traits results
* @{
*/
using
type
=
decltype
(
test
<
std
::
decay_t
<
TProcess
>>
(
nullptr
));
static
const
bool
value
=
type
::
value
;
//! @}
};
/**
* value traits type.
*/
template
<
class
TProcess
,
typename
TReturn
,
typename
...
TArg
>
bool
constexpr
has_method_doCascadeEquations_v
=
has_method_doCascadeEquations
<
TProcess
,
TReturn
,
TArg
...
>::
value
;
}
// namespace corsika
This diff is collapsed.
Click to expand it.
corsika/framework/process/CascadeEquationsProcess.hpp
0 → 100644
+
55
−
0
View file @
5f818d43
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include
<corsika/framework/process/BaseProcess.hpp>
#include
<corsika/framework/core/PhysicalUnits.hpp>
#include
<corsika/detail/framework/process/CascadeEquationsProcess.hpp>
// for extra traits, method/interface checking
namespace
corsika
{
/**
* @ingroup Processes
* @{
*
* Processes executing cascade-equations calculations.
*
* Create a new CascadeEquationsProcess, e.g. for XYModel, via:
* @code{.cpp}
* class XYModel : public CascadeEquationsProcess<XYModel> {};
* @endcode
*
* and provide the necessary interface method:
* @code{.cpp}
* template <typename TStack>
* void doCascadeEquations(TStack& stack);
* @endcode
*
* Cascade equation processes may generate new particles on the stack. They also
* typically generate output.
*/
template
<
typename
TDerived
>
class
CascadeEquationsProcess
:
public
BaseProcess
<
TDerived
>
{
public:
};
/**
* ProcessTraits specialization to flag CascadeEquationsProcess objects.
*/
template
<
typename
TProcess
>
struct
is_cascade_equations_process
<
TProcess
,
std
::
enable_if_t
<
std
::
is_base_of_v
<
CascadeEquationsProcess
<
typename
std
::
decay_t
<
TProcess
>>
,
typename
std
::
decay_t
<
TProcess
>>>>
:
std
::
true_type
{};
//! @}
}
// namespace corsika
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