WRApplication
External kratos "application" for multiscale time integration.
Collaboration diagram for Pipes:

Typedefs

using ConstModelPredicate = ModelPredicatePipe< Pipes::SingleSegmentPipeline< Pipes::ConstPredicate< const Model & > > >
 Always returns the boolean value it was constructed with, regardless of the input Model. More...
 
using TimeIntervalPredicate = ModelPredicatePipe< Pipes::Pipeline< Pipes::ModelPartFromModel, Pipes::ProcessInfoFromModelPart, Pipes::TimeFromProcessInfo, Pipes::IntervalPredicate< double > > >
 Check whether TIME is greater than the provided value. More...
 
using StepIntervalPredicate = ModelPredicatePipe< Pipes::Pipeline< Pipes::ModelPartFromModel, Pipes::ProcessInfoFromModelPart, Pipes::StepFromProcessInfo, Pipes::IntervalPredicate< int > > >
 Check whether STEP in a ModelPart is within an interval. More...
 
using PeriodicTimeIntervalPredicate = ModelPredicatePipe< Pipes::Pipeline< Pipes::ModelPartFromModel, Pipes::ProcessInfoFromModelPart, Pipes::TimeFromProcessInfo, Pipes::Add< double >, Pipes::Modulo< double >, Pipes::IntervalPredicate< double > > >
 Check whether TIME in a ModelPart is within a cyclic interval. More...
 
using PeriodicStepIntervalPredicate = ModelPredicatePipe< Pipes::Pipeline< Pipes::ModelPartFromModel, Pipes::ProcessInfoFromModelPart, Pipes::StepFromProcessInfo, Pipes::Modulo< int >, Pipes::IntervalPredicate< int > > >
 Check whether STEP in a ModelPart is within a cyclic interval. More...
 
template<class TPipe >
using IsPipe = std::integral_constant< bool, std::is_same_v< decltype(std::declval< const TPipe >().operator()(std::declval< typename TPipe::InputType >())), typename TPipe::OutputType > &&!std::is_same_v< typename TPipe::InputType, void > &&!std::is_same_v< typename TPipe::OutputType, void > >
 Bool constant checking whether TPipe satisfies the requirements of a pipe. More...
 
template<class ... TPipes>
using Pipeline = decltype((...|std::declval< TPipes >()))
 Convenience type alias for complex pipes. More...
 

Functions

template<class TInput , class TPipe , std::enable_if_t< IsPipe< TPipe >::value &&std::is_convertible_v< TInput, typename TPipe::InputType >, bool > = true>
TPipe::OutputType operator>> (TInput &&rInput, const TPipe &rPipe)
 Operator for calling operator() of the pipe. More...
 
template<class TInputPipe , class TOutputPipe , std::enable_if_t< IsPipe< TInputPipe >::value &&IsPipe< TOutputPipe >::value, bool > = true>
CompoundPipe< TInputPipe, TOutputPipe > operator| (TInputPipe &&rInputPipe, TOutputPipe &&rOutputPipe)
 Construct a pipe that takes the output of an input pipe and feeds it into an output pipe. More...
 
template<class TInputPipe , class TOutputPipe , std::enable_if_t< IsPipe< TInputPipe >::value &&IsPipe< TOutputPipe >::value, bool > = true>
CompoundPipe< TInputPipe, TOutputPipe > operator| (const TInputPipe &rInputPipe, const TOutputPipe &rOutputPipe)
 Construct a pipe that takes the output of an input pipe and feeds it into an output pipe. More...
 

Detailed Description

Typedef Documentation

◆ ConstModelPredicate

Always returns the boolean value it was constructed with, regardless of the input Model.

Model => true/false

. Required parameters:

[
{"value" : <bool>}
]

◆ IsPipe

using IsPipe = std::integral_constant<bool, std::is_same_v<decltype(std::declval<const TPipe>().operator()(std::declval<typename TPipe::InputType>())), typename TPipe::OutputType> && !std::is_same_v<typename TPipe::InputType,void> && !std::is_same_v<typename TPipe::OutputType,void> >

Bool constant checking whether TPipe satisfies the requirements of a pipe.

Pipe requirements:

  • has non-void member aliases InputType and OutputType
  • has member function with the following signature OutputType operator()(InputType) const
  • is default, move, and copy constructible
    Todo:
    @matekelemen

◆ PeriodicStepIntervalPredicate

Check whether STEP in a ModelPart is within a cyclic interval.

Model => ModelPart => ProcessInfo => STEP => Modulo => DiscreteIntervalUtility::IsInInterval
bool IsInInterval(TValue Value) const noexcept
Check whether the input value is within the defined closed interval [Begin, End].

. Required parameters (other settings ignored):

[
{"model_part_name" : ""}, // <== model part from model
{}, // <== process info from model part
{}, // <== step from process info
{"mod" : 0}, // <== modulo
{"interval" : ["Begin", "End"]} // <== interval utility
]

Example with

{"mod" : 12, "interval" : [3, 6]}
TIME: 12 24 36 48 60
... ----|-----------|-----------|-----------|-----------|---- ...
++++ ++++ ++++ ++++ ++
Note
See DiscreteIntervalUtility for details.

◆ PeriodicTimeIntervalPredicate

Check whether TIME in a ModelPart is within a cyclic interval.

Model => ModelPart => ProcessInfo => TIME => Add => Modulo => IntervalUtility::IsInInterval

. Required parameters (other settings ignored):

[
{"model_part_name" : ""}, // <== model part from model
{}, // <== process info from model part
{}, // <== time from process info
{"value" : 0}, // <== apply an offset
{"mod" : 0}, // <== modulo
{"interval" : ["Begin", "End"]} // <== interval utility
]

Example with

{"mod" : 12.0, "interval" : [3.0, 6.0]}
TIME: 12 24 36 48 60
... ----|-----------|-----------|-----------|-----------|---- ...
++++ ++++ ++++ ++++ ++
Note
See IntervalUtility for details.
The offset can be used to handle tricky cases with module and floating point representations.

◆ Pipeline

using Pipeline = decltype((... | std::declval<TPipes>()))

Convenience type alias for complex pipes.

◆ StepIntervalPredicate

Check whether STEP in a ModelPart is within an interval.

Model => ModelPart => ProcessInfo => STEP => DiscreteIntervalUtility::IsIninterval

. Required parameters (other settings ignored):

[
{"model_part_name" : ""}, // <== model part from model
{}, // <== process info from model part
{}, // <== step from process info
{"interval" : ["Begin", "End"]} // <== discrete interval utility
]
Note
See DiscreteIntervalUtility for details.

◆ TimeIntervalPredicate

Check whether TIME is greater than the provided value.

Model => ModelPart => ProcessInfo => TIME => std::less

. Default parameters:

[
{"model_part_name" : ""}, // <== model part from model
{}, // <== process info from model part
{}, // <== time from process info
{"rhs" : 0} // <== double comparison
]
@code
/
using TimeGreaterPredicate = ModelPredicatePipe<Pipes::Pipeline<
Pipes::ModelPartFromModel,
Pipes::ProcessInfoFromModelPart,
Pipes::TimeFromProcessInfo,
Pipes::Comparison<double,std::greater<double>>
>>;
decltype((...|std::declval< TPipes >())) Pipeline
Convenience type alias for complex pipes.
Definition: pipe.hpp:225
Note
See IntervalUtility for details.

Function Documentation

◆ operator>>()

TPipe::OutputType Kratos::Pipes::operator>> ( TInput &&  rInput,
const TPipe &  rPipe 
)

Operator for calling operator() of the pipe.

◆ operator|() [1/2]

CompoundPipe<TInputPipe,TOutputPipe> Kratos::Pipes::operator| ( const TInputPipe &  rInputPipe,
const TOutputPipe &  rOutputPipe 
)

Construct a pipe that takes the output of an input pipe and feeds it into an output pipe.

◆ operator|() [2/2]

CompoundPipe<TInputPipe,TOutputPipe> Kratos::Pipes::operator| ( TInputPipe &&  rInputPipe,
TOutputPipe &&  rOutputPipe 
)

Construct a pipe that takes the output of an input pipe and feeds it into an output pipe.