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

data TimeSet More...

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

Classes

struct  ltstep
 Order sample pointers by sequence index. More...
 
class  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. More...
 

Subclasses

typedef MeshType mesh_type
 
typedef std::shared_ptr< mesh_type > mesh_ptrtype
 
using size_type = typename mesh_type::size_type
 
typedef Pdh_type< MeshType, 0 > scalar_p0_space_type
 
typedef Pch_type< MeshType, N > scalar_p1_space_type
 
typedef std::shared_ptr< scalar_p0_space_type > scalar_p0_space_ptrtype
 
typedef std::shared_ptr< scalar_p1_space_type > scalar_p1_space_ptrtype
 
typedef scalar_p0_space_type::element_type element_scalar_type
 
typedef scalar_p1_space_type::element_type nodal_scalar_type
 

Typedefs

typedef Step step_type
 
typedef std::shared_ptr< Step > step_ptrtype
 
typedef std::set< step_ptrtype, ltstep > step_set_type
 
typedef step_set_type::iterator step_iterator
 
typedef step_set_type::const_iterator step_const_iterator
 
typedef step_set_type::reverse_iterator step_reverse_iterator
 
typedef step_set_type::const_reverse_iterator step_const_reverse_iterator
 

Methods

std::string M_name
 name of the time set
 
uint32_type M_index
 index of the time set
 
step_set_type M_step_set
 steps
 
Real M_time_increment
 time increment
 
uint16_type M_keep_steps
 
class boost::serialization::access
 
std::optional< mesh_ptrtype > M_mesh
 
std::shared_ptr< typename Step::field_set_type::SpaceCache > M_fieldSpaceCache
 Conversion workspace shared by this sequence's independently owned field sets. More...
 
step_ptrtype step (Real time, int freq=1)
 
step_iterator beginStep ()
 
step_const_iterator beginStep () const
 
step_reverse_iterator rbeginStep ()
 
step_const_reverse_iterator rbeginStep () const
 
step_iterator endStep ()
 
step_const_iterator endStep () const
 
step_reverse_iterator rendStep ()
 
step_const_reverse_iterator rendStep () const
 
std::pair< step_iterator, bool > insertStep (step_ptrtype sample)
 
void clear ()
 Release all samples, retaining sequence metadata and conversion spaces.
 
void load (std::string const &filename, Real time)
 Restore temporal metadata and discard samples later than time. Field payloads are not deserialized; static-field restart remains unsupported.
 
void save (std::string const &filename, WorldComm const &worldComm)
 Save temporal metadata on the communicator's master rank.
 
void setMesh (mesh_ptrtype m)
 Associate geometry with this temporal sequence.
 
bool hasMesh () const
 
mesh_ptrtype mesh () const
 

Constructors, destructor

 TimeSet (std::string filename="undefined", bool init=false)
 constructor for a time set More...
 
 TimeSet (TimeSet const &)
 Copy time-set metadata without copying samples.
 
 ~TimeSet ()
 Release the time-set index.
 

Operator overloads

TimeSet & operator= (TimeSet const &)
 Assign time-set metadata.
 

Accessors

std::string const & name () const
 
void setName (std::string const &name) const
 Update the display name of the time set.
 
uint32_type index () const
 
size_type numberOfSteps () const
 
size_type numberOfActiveSteps () const
 
step_ptrtype firstActiveStep () const
 return the first active step
 
Real timeIncrement () const
 
step_set_type stepsToWriteOnDisk () const
 

Mutators

void setTimeIncrement (Real increment)
 set the time increment
 
void setNumberOfStepsInMemory (uint16_type i)
 Set the legacy in-memory step-retention count.
 

Detailed Description

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

data TimeSet

Template Parameters
MeshTypeMesh type
NMesh geometrical order
Author
Christophe Prud'homme

Constructor & Destructor Documentation

◆ TimeSet()

template<typename MeshType , int N>
Feel::detail::TimeSet< MeshType, N >::TimeSet ( std::string  filename = "undefined",
bool  init = false 
)

constructor for a time set

Parameters
filenamename of the file that stores the timeset information
initif true, remove the file that stores the timset info if it exists

Member Function Documentation

◆ beginStep() [1/2]

template<typename MeshType , int N = 1>
step_iterator Feel::detail::TimeSet< MeshType, N >::beginStep ( )
Returns
Iterator to the first sample.

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

◆ beginStep() [2/2]

template<typename MeshType , int N = 1>
step_const_iterator Feel::detail::TimeSet< MeshType, N >::beginStep ( ) const
Returns
Const iterator to the first sample.

◆ endStep() [1/2]

template<typename MeshType , int N = 1>
step_iterator Feel::detail::TimeSet< MeshType, N >::endStep ( )
Returns
End iterator for samples.

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

◆ endStep() [2/2]

template<typename MeshType , int N = 1>
step_const_iterator Feel::detail::TimeSet< MeshType, N >::endStep ( ) const
Returns
Const end iterator for samples.

References Feel::detail::TimeSet< MeshType, N >::M_time_increment.

◆ hasMesh()

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

◆ index()

template<typename MeshType , int N = 1>
uint32_type Feel::detail::TimeSet< MeshType, N >::index ( ) const
Returns
the index of the time set

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

◆ insertStep()

template<typename MeshType , int N = 1>
std::pair< step_iterator, bool > Feel::detail::TimeSet< MeshType, N >::insertStep ( step_ptrtype  sample)
Returns
Insertion position and whether the sample index was new.

◆ mesh()

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

◆ name()

template<typename MeshType , int N = 1>
std::string const & Feel::detail::TimeSet< MeshType, N >::name ( ) const
Returns
the name of the time set

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

◆ numberOfActiveSteps()

template<typename MeshType , int N = 1>
size_type Feel::detail::TimeSet< MeshType, N >::numberOfActiveSteps ( ) const
Returns
the number of active steps

◆ numberOfSteps()

template<typename MeshType , int N = 1>
size_type Feel::detail::TimeSet< MeshType, N >::numberOfSteps ( ) const
Returns
the number of steps already stored

◆ rbeginStep() [1/2]

template<typename MeshType , int N = 1>
step_reverse_iterator Feel::detail::TimeSet< MeshType, N >::rbeginStep ( )
Returns
Reverse iterator to the last sample.

◆ rbeginStep() [2/2]

template<typename MeshType , int N = 1>
step_const_reverse_iterator Feel::detail::TimeSet< MeshType, N >::rbeginStep ( ) const
Returns
Const reverse iterator to the last sample.

◆ rendStep() [1/2]

template<typename MeshType , int N = 1>
step_reverse_iterator Feel::detail::TimeSet< MeshType, N >::rendStep ( )
Returns
Reverse end iterator for samples.

◆ rendStep() [2/2]

template<typename MeshType , int N = 1>
step_const_reverse_iterator Feel::detail::TimeSet< MeshType, N >::rendStep ( ) const
Returns
Const reverse end iterator for samples.

◆ step()

template<typename MeshType , int N>
TimeSet< MeshType, N >::step_ptrtype Feel::detail::TimeSet< MeshType, N >::step ( Real  time,
int  freq = 1 
)
Parameters
timetime at which we want to get the step
freqactive step by frequence
Returns
a step defined at time time if not found then generate a new one

◆ stepsToWriteOnDisk()

template<typename MeshType , int N = 1>
step_set_type Feel::detail::TimeSet< MeshType, N >::stepsToWriteOnDisk ( ) const
Returns
Resident, non-ignored samples whose current data is not published.

References Feel::detail::TimeSet< MeshType, N >::beginStep(), and Feel::detail::TimeSet< MeshType, N >::endStep().

◆ timeIncrement()

template<typename MeshType , int N = 1>
Real Feel::detail::TimeSet< MeshType, N >::timeIncrement ( ) const
Returns
the time increment between two steps

References Feel::detail::TimeSet< MeshType, N >::M_step_set.

Member Data Documentation

◆ M_fieldSpaceCache

template<typename MeshType , int N = 1>
std::shared_ptr<typename Step::field_set_type::SpaceCache> Feel::detail::TimeSet< MeshType, N >::M_fieldSpaceCache
Initial value:
=
std::make_shared<typename Step::field_set_type::SpaceCache>()

Conversion workspace shared by this sequence's independently owned field sets.