PLaSK library
Loading...
Searching...
No Matches
plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > > Struct Template Referenceabstract

#include <plask/filters/filter.hpp>

Inheritance diagram for plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >:
[legend]
Collaboration diagram for plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >:
[legend]

Classes

struct  FilterLazyDataImpl
 

Public Types

typedef PropertyAt< PropertyT, OutputSpaceType >::ValueType ValueType
 
typedef DataSource< PropertyT, OutputSpaceType > DataSourceT
 
typedef std::unique_ptr< DataSourceTDataSourceTPtr
 
typedef std::function< plask::optional< ValueType >(std::size_t)> DataSourceF
 
typedef PropertyT::EnumType EnumType
 

Public Member Functions

 FilterBaseImpl (shared_ptr< OutputSpaceType > geometry)
 Construct solver with given output geometry.
 
std::string getClassName () const override
 Get name of solver.
 
shared_ptr< OutputSpaceType > getGeometry () const
 Get this filter output geometry.
 
LazyData< ValueTypeget (EnumType num, const shared_ptr< const MeshD< OutputSpaceType::DIM > > &dst_mesh, ExtraArgs... extra_args, InterpolationMethod method) const
 Get value provided by output of this solver.
 
void setOuter (DataSourceTPtr &&outerSource)
 Set outer source to outerSource.
 
void setDefault (const ValueType &value)
 Set outer provider to provide constant value.
 
void appendInner (DataSourceTPtr &&innerSource)
 Append inner data source.
 
virtual ReceiverFor< PropertyT, Geometry3D > & input (GeometryObjectD< 3 > &obj, const PathHints *path=nullptr)=0
 Set outer or append inner input.
 
ReceiverFor< PropertyT, Geometry3D > & input (shared_ptr< GeometryObjectD< 3 > > obj, const PathHints *path=nullptr)
 
ReceiverFor< PropertyT, Geometry3D > & input (Geometry3D &inGeom, const PathHints *path=nullptr)
 
ReceiverFor< PropertyT, Geometry3D > & input (shared_ptr< Geometry3D > inGeom, const PathHints *path=nullptr)
 
virtual ReceiverFor< PropertyT, Geometry2DCartesian > & input (Geometry2DCartesian &obj, const PathHints *path=nullptr)=0
 
ReceiverFor< PropertyT, Geometry2DCartesian > & input (shared_ptr< Geometry2DCartesian > obj, const PathHints *path=nullptr)
 
virtual ReceiverFor< PropertyT, Geometry2DCylindrical > & input (Geometry2DCylindrical &obj, const PathHints *path=nullptr)=0
 
ReceiverFor< PropertyT, Geometry2DCylindrical > & input (shared_ptr< Geometry2DCylindrical > obj, const PathHints *path=nullptr)
 
- Public Member Functions inherited from plask::FilterCommonBase
template<typename... Args>
 FilterCommonBase (Args &&... args)
 
- Public Member Functions inherited from plask::Solver
bool initCalculation ()
 This should be called on beginning of each calculation method to ensure that solver will be initialized.
 
 Solver (const std::string &name="")
 Construct uninitialized solver.
 
virtual ~Solver ()
 Virtual destructor (for subclassing). Do nothing.
 
virtual void loadConfiguration (XMLReader &source, Manager &manager)
 Load configuration from given source.
 
void parseStandardConfiguration (XMLReader &source, Manager &manager, const std::string &expected_msg="solver configuration element")
 Load standard configuration (geometry, mesh) tags from source.
 
bool isInitialized ()
 Check if solver is already initialized.
 
void invalidate ()
 This method should be and is called if something important was changed: calculation space, mesh, etc.
 
std::string getId () const
 Get solver id.
 
std::string getName () const
 
virtual std::string getClassDescription () const
 Get a description of this solver.
 
template<typename ArgT = double, typename ValT = double>
DataLog< ArgT, ValTdataLog (const std::string &chart_name, const std::string &axis_arg_name, const std::string &axis_val_name)
 
template<typename ArgT = double, typename ValT = double>
DataLog< ArgT, ValTdataLog (const std::string &axis_arg_name, const std::string &axis_val_name)
 
template<typename ... Args>
void writelog (LogLevel level, std::string msg, Args &&... params) const
 Log a message for this solver.
 

Public Attributes

ProviderFor< PropertyT, OutputSpaceType >::Delegate out
 Provider of filtered data.
 

Protected Member Functions

template<typename SourceType >
auto setOuterRecv (std::unique_ptr< SourceType > &&outerSource) -> decltype(outerSource->in)&
 
template<typename SourceType >
auto appendInnerRecv (std::unique_ptr< SourceType > &&innerSource) -> decltype(innerSource->in)&
 
- Protected Member Functions inherited from plask::Solver
virtual void onInitialize ()
 Initialize the solver.
 
virtual void onInvalidate ()
 This method is called by invalidate() to reset stored values.
 

Protected Attributes

std::vector< DataSourceTPtrinnerSources
 
DataSourceTPtr outerSource
 
shared_ptr< OutputSpaceType > geometry
 Output space in which the results are provided.
 
- Protected Attributes inherited from plask::Solver
bool initialized
 true only if solver is initialized
 

Detailed Description

template<typename PropertyT, typename OutputSpaceType, typename... ExtraArgs>
struct plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >

Definition at line 247 of file filter.hpp.

Member Typedef Documentation

◆ DataSourceF

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
typedef std::function<plask::optional<ValueType>(std::size_t)> plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::DataSourceF

Definition at line 257 of file filter.hpp.

◆ DataSourceT

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
typedef DataSource<PropertyT, OutputSpaceType> plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::DataSourceT

Definition at line 255 of file filter.hpp.

◆ DataSourceTPtr

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
typedef std::unique_ptr<DataSourceT> plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::DataSourceTPtr

Definition at line 256 of file filter.hpp.

◆ EnumType

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
typedef PropertyT::EnumType plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::EnumType

Definition at line 258 of file filter.hpp.

◆ ValueType

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
typedef PropertyAt<PropertyT,OutputSpaceType>::ValueType plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::ValueType

Definition at line 254 of file filter.hpp.

Constructor & Destructor Documentation

◆ FilterBaseImpl()

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::FilterBaseImpl ( shared_ptr< OutputSpaceType >  geometry)
inline

Construct solver with given output geometry.

Parameters
geometryoutput geometry

Definition at line 334 of file filter.hpp.

Member Function Documentation

◆ appendInner()

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
void plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::appendInner ( DataSourceTPtr &&  innerSource)
inline

Append inner data source.

Parameters
innerSourceinner source to add

Definition at line 411 of file filter.hpp.

◆ appendInnerRecv()

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
template<typename SourceType >
auto plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::appendInnerRecv ( std::unique_ptr< SourceType > &&  innerSource) -> decltype(innerSource->in)&
inlineprotected

Definition at line 318 of file filter.hpp.

◆ get()

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
LazyData< ValueType > plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::get ( EnumType  num,
const shared_ptr< const MeshD< OutputSpaceType::DIM > > &  dst_mesh,
ExtraArgs...  extra_args,
InterpolationMethod  method 
) const
inline

Get value provided by output of this solver.

Parameters
dst_mesh
extra_args
method
Returns

Definition at line 365 of file filter.hpp.

◆ getClassName()

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
std::string plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::getClassName ( ) const
inlineoverridevirtual

Get name of solver.

Returns
name of this solver

Implements plask::Solver.

Definition at line 350 of file filter.hpp.

◆ getGeometry()

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
shared_ptr< OutputSpaceType > plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::getGeometry ( ) const
inline

Get this filter output geometry.

Returns
filter geometry

Definition at line 356 of file filter.hpp.

◆ input() [1/8]

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
virtual ReceiverFor< PropertyT, Geometry2DCartesian > & plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::input ( Geometry2DCartesian obj,
const PathHints path = nullptr 
)
pure virtual

◆ input() [2/8]

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
virtual ReceiverFor< PropertyT, Geometry2DCylindrical > & plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::input ( Geometry2DCylindrical obj,
const PathHints path = nullptr 
)
pure virtual

◆ input() [3/8]

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
ReceiverFor< PropertyT, Geometry3D > & plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::input ( Geometry3D inGeom,
const PathHints path = nullptr 
)
inline

Definition at line 429 of file filter.hpp.

◆ input() [4/8]

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
virtual ReceiverFor< PropertyT, Geometry3D > & plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::input ( GeometryObjectD< 3 > &  obj,
const PathHints path = nullptr 
)
pure virtual

Set outer or append inner input.

Parameters
obj
path
Returns

◆ input() [5/8]

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
ReceiverFor< PropertyT, Geometry2DCartesian > & plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::input ( shared_ptr< Geometry2DCartesian obj,
const PathHints path = nullptr 
)
inline

Definition at line 439 of file filter.hpp.

◆ input() [6/8]

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
ReceiverFor< PropertyT, Geometry2DCylindrical > & plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::input ( shared_ptr< Geometry2DCylindrical obj,
const PathHints path = nullptr 
)
inline

Definition at line 445 of file filter.hpp.

◆ input() [7/8]

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
ReceiverFor< PropertyT, Geometry3D > & plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::input ( shared_ptr< Geometry3D inGeom,
const PathHints path = nullptr 
)
inline

Definition at line 433 of file filter.hpp.

◆ input() [8/8]

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
ReceiverFor< PropertyT, Geometry3D > & plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::input ( shared_ptr< GeometryObjectD< 3 > >  obj,
const PathHints path = nullptr 
)
inline

Definition at line 425 of file filter.hpp.

◆ setDefault()

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
void plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::setDefault ( const ValueType value)
inline

Set outer provider to provide constant value.

Parameters
valuevalue which is used in all points where inner sources don't provide values.

Definition at line 400 of file filter.hpp.

◆ setOuter()

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
void plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::setOuter ( DataSourceTPtr &&  outerSource)
inline

Set outer source to outerSource.

Parameters
outerSourcesource to use in all points where inner sources don't provide values.

Definition at line 389 of file filter.hpp.

◆ setOuterRecv()

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
template<typename SourceType >
auto plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::setOuterRecv ( std::unique_ptr< SourceType > &&  outerSource) -> decltype(outerSource->in)&
inlineprotected

Definition at line 308 of file filter.hpp.

Member Data Documentation

◆ geometry

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
shared_ptr<OutputSpaceType> plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::geometry
protected

Output space in which the results are provided.

Definition at line 305 of file filter.hpp.

◆ innerSources

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
std::vector<DataSourceTPtr> plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::innerSources
protected

Definition at line 300 of file filter.hpp.

◆ out

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
ProviderFor<PropertyT,OutputSpaceType>::Delegate plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::out

Provider of filtered data.

Definition at line 328 of file filter.hpp.

◆ outerSource

template<typename PropertyT , typename OutputSpaceType , typename... ExtraArgs>
DataSourceTPtr plask::FilterBaseImpl< PropertyT, MULTI_FIELD_PROPERTY, OutputSpaceType, VariadicTemplateTypesHolder< ExtraArgs... > >::outerSource
protected

Definition at line 302 of file filter.hpp.


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