https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
StochasticTools::CalculatorBuilder< InType, OutType > Struct Template Reference

#include <Calculators.h>

Static Public Member Functions

static std::unique_ptr< Calculator< InType, OutType > > build (const MooseEnumItem &item, const libMesh::ParallelObject &other)
 

Detailed Description

template<typename InType, typename OutType>
struct StochasticTools::CalculatorBuilder< InType, OutType >

Definition at line 280 of file Calculators.h.

Member Function Documentation

◆ build()

template<typename InType , typename OutType >
std::unique_ptr< Calculator< InType, OutType > > StochasticTools::CalculatorBuilder< InType, OutType >::build ( const MooseEnumItem item,
const libMesh::ParallelObject other 
)
static

Definition at line 293 of file Calculators.C.

295{
296 if (item == "min")
297 return std::make_unique<Min<InType, OutType>>(other, item);
298
299 else if (item == "max")
300 return std::make_unique<Max<InType, OutType>>(other, item);
301
302 else if (item == "sum")
303 return std::make_unique<Sum<InType, OutType>>(other, item);
304
305 else if (item == "mean" || item == "average") // average is deprecated
306 return std::make_unique<Mean<InType, OutType>>(other, item);
307
308 else if (item == "stddev")
309 return std::make_unique<StdDev<InType, OutType>>(other, item);
310
311 else if (item == "stderr")
312 return std::make_unique<StdErr<InType, OutType>>(other, item);
313
314 else if (item == "norm2")
315 return std::make_unique<L2Norm<InType, OutType>>(other, item);
316
317 else if (item == "ratio")
318 return std::make_unique<Ratio<InType, OutType>>(other, item);
319
320 else if (item == "median")
321 return std::make_unique<Median<InType, OutType>>(other, item);
322
323 else if (item == "meanabs")
324 return std::make_unique<MeanAbsoluteValue<InType, OutType>>(other, item);
325
326 ::mooseError("Failed to create Statistics::Calculator object for ", item);
327 return nullptr;
328}

Referenced by StochasticTools::makeCalculator().


The documentation for this struct was generated from the following files: