Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::detail::TimeSet< MeshType, N >::Step Class Reference

A temporal sample composed of a time-neutral field set. Time/index metadata belongs here; field conversion and payload storage belong to ExportFieldSet. The latter can also be owned directly by an exporter without constructing a Step or referencing a TimeSet. Step owns scheduling and publication policy. Field revisions invalidate the published state even when registration uses fieldSet() directly. Mutation is not thread-safe; owners must honor collective registration. More...

+ Inheritance diagram for Feel::detail::TimeSet< MeshType, N >::Step:
+ Collaboration diagram for Feel::detail::TimeSet< MeshType, N >::Step:

Public Types

using complex_const_iterator = typename field_set_type::complex_const_iterator
 
using complex_iterator = typename field_set_type::complex_iterator
 
using element_const_iterator = typename field_set_type::element_const_iterator
 
using element_field_type = typename field_set_type::element_field_type
 
using element_iterator = typename field_set_type::element_iterator
 
using element_scalar_ptrtype = typename field_set_type::element_scalar_ptrtype
 
using element_scalar_type = typename field_set_type::element_scalar_type
 
using field_set_ptrtype = std::shared_ptr< field_set_type >
 
using field_set_type = ExportFieldSet< MeshType, N >
 
using map_complex_type = typename field_set_type::map_complex_type
 
using map_element_type = typename field_set_type::map_element_type
 
using map_nodal_type = typename field_set_type::map_nodal_type
 
using map_scalar_type = typename field_set_type::map_scalar_type
 
using mesh_ptrtype = std::shared_ptr< mesh_type >
 
using mesh_type = MeshType
 
using nodal_const_iterator = typename field_set_type::nodal_const_iterator
 
using nodal_field_type = typename field_set_type::nodal_field_type
 
using nodal_iterator = typename field_set_type::nodal_iterator
 
using nodal_scalar_ptrtype = typename field_set_type::nodal_scalar_ptrtype
 
using nodal_scalar_type = typename field_set_type::nodal_scalar_type
 
using scalar_const_iterator = typename field_set_type::scalar_const_iterator
 
using scalar_iterator = typename field_set_type::scalar_iterator
 
using scalar_p0_space_ptrtype = typename field_set_type::scalar_p0_space_ptrtype
 
using scalar_p0_space_type = typename field_set_type::scalar_p0_space_type
 
using scalar_p1_space_ptrtype = typename field_set_type::scalar_p1_space_ptrtype
 
using scalar_p1_space_type = typename field_set_type::scalar_p1_space_type
 
using size_type = typename mesh_type::size_type
 
using step_type = Step
 
using variant_representation_arg_type = typename field_set_type::variant_representation_arg_type
 

Public Member Functions

size_type activeIndex () const
 
template<typename... Args>
void add (Args &&...args)
 Add a scalar, FE field or expression to this temporal sample. All existing representation/range overloads are forwarded unchanged.
 
template<typename F >
void add (std::initializer_list< std::string > names, F const &field)
 Preserve initializer-list names for mixed FE fields.
 
void addComplex (std::string const &name, complex_type const &value, bool cst=false)
 Register a complex quantity using the existing backend convention.
 
void addRegions (std::string const &prefix, std::string const &filename)
 Add partition IDs with a distinct output filename prefix.
 
void addRegions (std::string const &prefix="")
 Add partition IDs to this temporal sample.
 
FEELPP_DEPRECATED void addScalar (std::string const &name, scalar_type value, bool cst=false)
 Compatibility wrapper for per-case scalar registration.
 
element_const_iterator beginElement () const
 
nodal_const_iterator beginNodal () const
 
scalar_const_iterator beginScalar () const
 
void cleanup ()
 Release values while retaining the schema.
 
element_field_type const & element (std::string const &name) const
 
element_const_iterator endElement () const
 
nodal_const_iterator endNodal () const
 
scalar_const_iterator endScalar () const
 
std::string const & fieldName (std::string const &key, bool nodal) const
 
field_set_ptrtype const & fieldSet () const
 
bool hasData () const
 
bool hasMesh () const
 
size_type index () const
 
bool isIgnored () const
 
bool isInMemory () const
 
bool isNew () const
 
bool isOnDisk () const
 
void load ()
 Restore the legacy in-memory flag; this does not read field values.
 
mesh_ptrtype mesh () const
 
auto nodal () const
 
nodal_field_type const & nodal (std::string const &name) const
 
bool operator< (Step const &other) const
 
bool operator== (Step const &other) const
 
scalar_type scalar (std::string const &name) const
 
void setMesh (mesh_ptrtype const &mesh)
 Associate geometry with this sample's field storage.
 
void setState (size_type state)
 Add legacy state flags, recording the published revision when requested.
 
void showMe (std::string const &text) const
 Emit temporal and field-state diagnostics at verbose level.
 
size_type state () const
 
Real time () const
 
 ~Step ()=default
 Release this sample's field-set ownership.
 

Friends

class TimeSet
 

Detailed Description

template<typename MeshType, int N = 1>
class Feel::detail::TimeSet< MeshType, N >::Step

A temporal sample composed of a time-neutral field set. Time/index metadata belongs here; field conversion and payload storage belong to ExportFieldSet. The latter can also be owned directly by an exporter without constructing a Step or referencing a TimeSet. Step owns scheduling and publication policy. Field revisions invalidate the published state even when registration uses fieldSet() directly. Mutation is not thread-safe; owners must honor collective registration.

Member Function Documentation

◆ activeIndex()

template<typename MeshType , int N = 1>
size_type Feel::detail::TimeSet< MeshType, N >::Step::activeIndex ( ) const
Returns
Index among non-ignored output samples.

◆ beginElement()

template<typename MeshType , int N = 1>
element_const_iterator Feel::detail::TimeSet< MeshType, N >::Step::beginElement ( ) const
Returns
First element field.

References Feel::detail::TimeSet< MeshType, N >::Step::isIgnored().

◆ beginNodal()

template<typename MeshType , int N = 1>
nodal_const_iterator Feel::detail::TimeSet< MeshType, N >::Step::beginNodal ( ) const
Returns
First nodal field.

◆ beginScalar()

template<typename MeshType , int N = 1>
scalar_const_iterator Feel::detail::TimeSet< MeshType, N >::Step::beginScalar ( ) const
Returns
First per-case scalar.

◆ element()

template<typename MeshType , int N = 1>
element_field_type const & Feel::detail::TimeSet< MeshType, N >::Step::element ( std::string const &  name) const
Returns
Named element field.

◆ endElement()

template<typename MeshType , int N = 1>
element_const_iterator Feel::detail::TimeSet< MeshType, N >::Step::endElement ( ) const
Returns
End of element fields.

◆ endNodal()

template<typename MeshType , int N = 1>
nodal_const_iterator Feel::detail::TimeSet< MeshType, N >::Step::endNodal ( ) const
Returns
End of nodal fields.

◆ endScalar()

template<typename MeshType , int N = 1>
scalar_const_iterator Feel::detail::TimeSet< MeshType, N >::Step::endScalar ( ) const
Returns
End of per-case scalars.

◆ fieldName()

template<typename MeshType , int N = 1>
std::string const & Feel::detail::TimeSet< MeshType, N >::Step::fieldName ( std::string const &  key,
bool  nodal 
) const
Returns
Persistent display name after buffer cleanup.

◆ fieldSet()

template<typename MeshType , int N = 1>
field_set_ptrtype const & Feel::detail::TimeSet< MeshType, N >::Step::fieldSet ( ) const
Returns
Field data composed into this temporal sample.

◆ hasData()

template<typename MeshType , int N = 1>
bool Feel::detail::TimeSet< MeshType, N >::Step::hasData ( ) const
Returns
Whether this sample contains geometry or values.

◆ hasMesh()

template<typename MeshType , int N = 1>
bool Feel::detail::TimeSet< MeshType, N >::Step::hasMesh ( ) const
Returns
Whether geometry has been associated.

◆ index()

template<typename MeshType , int N = 1>
size_type Feel::detail::TimeSet< MeshType, N >::Step::index ( ) const
Returns
Temporal sequence index.

Referenced by Feel::detail::TimeSet< MeshType, N >::ltstep::operator()().

◆ isIgnored()

template<typename MeshType , int N = 1>
bool Feel::detail::TimeSet< MeshType, N >::Step::isIgnored ( ) const
Returns
Whether output frequency suppresses this sample.

Referenced by Feel::detail::TimeSet< MeshType, N >::Step::beginElement().

◆ isInMemory()

template<typename MeshType , int N = 1>
bool Feel::detail::TimeSet< MeshType, N >::Step::isInMemory ( ) const
Returns
Whether component buffers are resident.

◆ isNew()

template<typename MeshType , int N = 1>
bool Feel::detail::TimeSet< MeshType, N >::Step::isNew ( ) const
Returns
Whether the legacy new-sample flag is set.

◆ isOnDisk()

template<typename MeshType , int N = 1>
bool Feel::detail::TimeSet< MeshType, N >::Step::isOnDisk ( ) const
Returns
Whether this sample has an on-disk representation.

◆ mesh()

template<typename MeshType , int N = 1>
mesh_ptrtype Feel::detail::TimeSet< MeshType, N >::Step::mesh ( ) const
Returns
Mesh associated with this sample.

Referenced by Feel::detail::TimeSet< MeshType, N >::Step::addComplex().

◆ nodal() [1/2]

template<typename MeshType , int N = 1>
auto Feel::detail::TimeSet< MeshType, N >::Step::nodal ( ) const
Returns
Range of nodal fields.

◆ nodal() [2/2]

template<typename MeshType , int N = 1>
nodal_field_type const & Feel::detail::TimeSet< MeshType, N >::Step::nodal ( std::string const &  name) const
Returns
Named nodal field.

◆ operator<()

template<typename MeshType , int N = 1>
bool Feel::detail::TimeSet< MeshType, N >::Step::operator< ( Step const &  other) const
Returns
Ordering by sample index.

◆ operator==()

template<typename MeshType , int N = 1>
bool Feel::detail::TimeSet< MeshType, N >::Step::operator== ( Step const &  other) const
Returns
Equality by sample index.

◆ scalar()

template<typename MeshType , int N = 1>
scalar_type Feel::detail::TimeSet< MeshType, N >::Step::scalar ( std::string const &  name) const
Returns
Named per-case scalar.

◆ state()

template<typename MeshType , int N = 1>
size_type Feel::detail::TimeSet< MeshType, N >::Step::state ( ) const
Returns
Legacy state bits assembled from temporal policy and field residency.

◆ time()

template<typename MeshType , int N = 1>
Real Feel::detail::TimeSet< MeshType, N >::Step::time ( ) const
Returns
Physical time of this sample.