LifeV
DataLevelSet Class Reference

dataLevelSet - Container for the data for the level set solver More...

#include <LevelSetData.hpp>

+ Collaboration diagram for DataLevelSet:

Private Member Functions

 DataLevelSet (const DataLevelSet &)
 

Private Attributes

timePtr_Type M_time
 
timeAdvancePtr_Type M_timeAdvance
 
stabilization_type M_stabilization
 
IPTreatment_type M_IPTreatment
 
Real M_IPCoef
 

Public Types

enum  stabilization_type { NONE, IP }
 
enum  IPTreatment_type { IMPLICIT, SEMI_IMPLICIT, EXPLICIT }
 
typedef TimeData time_Type
 
typedef std::shared_ptr< time_TypetimePtr_Type
 
typedef TimeAdvanceData timeAdvance_Type
 
typedef std::shared_ptr< timeAdvance_TypetimeAdvancePtr_Type
 

Constructor & Destructor

 DataLevelSet ()
 Empty Constructor. More...
 
virtual ~DataLevelSet ()
 Destructor. More...
 

Methods

void setup (const GetPot &dataFile, const std::string &section="level-set")
 Fill the DataLevelSet with the informations of the GetPot object. More...
 
void showMe (std::ostream &out=std::cout) const
 ShowMe method. More...
 

Set Methods

void setTimeData (const timePtr_Type timeData)
 Set data time container. More...
 
void setTimeAdvanceData (const timeAdvancePtr_Type timeAdvanceData)
 Set data time advance container. More...
 
void setStabilization (const std::string &stab)
 Set the stabilization type. More...
 
void setStabilization (const stabilization_type &stab)
 Set the stabilization type. More...
 
void setIPTreatment (const std::string &treat)
 Set the treatment for the IP stabilization. More...
 
void setIPTreatment (const IPTreatment_type &treat)
 Set the IP treatment. More...
 
void setIPCoef (const Real &coef)
 Set the IP coefficient. More...
 

Get Methods

timePtr_Type dataTime () const
 Get data time container. More...
 
timeAdvancePtr_Type dataTimeAdvance () const
 Get data time advance container. More...
 
stabilization_type stabilization () const
 Getter for the stabilization type. More...
 
IPTreatment_type IPTreatment () const
 Getter for the IP treatment. More...
 
Real IPCoef () const
 Getter for the IP coefficient. More...
 

Detailed Description

dataLevelSet - Container for the data for the level set solver

There are two ways of filling this data container: either by reading a file and using the setup method, or by setting the data one by one using the setters defined in the class. Mixture of the two solutions are also possible.

Reading from a data file

If one read the data from a file, the following informations can be provided:

[section]

    [./time_discretization]

        #everything for the TimeData class

    [../]

    stabilization = ip  #options: none, ip

    [./ip]

        coefficient = 0.5
        treatment = implicit  #options: implicit, semi-implicit, explicit

    [../]

[../]

The code that one need then (usually in the main file) is simply

GetPot dataFile( ... );
DataLevelSet data_level_set;
data_level_set.setup(dataFile,"section");

Using the setters

This way allows you to define all the members of the class. Simply use the setters defined.

For the stabilization and its treatment, prefer using the setters with the enumerated types, this makes code more robust with respect to typos.

Mixing the two solutions

Mixing the two solutions might be a good idea is some cases, for example to write the time discretization only once in a data file for a problem that consists in coupling smaller problems. Here, the idea would be to initialize this data container with the dataFile (this will put default parameters for the time discretization), create a TimeData (outside DataLevelSet) and set this new TimeData in DataLevelSet. As DataLevelSet will retain a pointer to the TimeData, any change to it will be repercuted in the DataLevelSet. Then, only one TimeData needs to be managed.

Beware that, when mixing the two solutions, any call to the setup will overwrite ALL the previous informations stored in the DataLevelSet.

Author
Samuel Quinodoz

Definition at line 124 of file LevelSetData.hpp.

Member Typedef Documentation

◆ time_Type

Definition at line 131 of file LevelSetData.hpp.

◆ timePtr_Type

typedef std::shared_ptr<time_Type> timePtr_Type

Definition at line 132 of file LevelSetData.hpp.

◆ timeAdvance_Type

Definition at line 134 of file LevelSetData.hpp.

◆ timeAdvancePtr_Type

typedef std::shared_ptr<timeAdvance_Type> timeAdvancePtr_Type

Definition at line 135 of file LevelSetData.hpp.

Member Enumeration Documentation

◆ stabilization_type

Enumerator
NONE 

No stabilization will be added.

IP 

The IP stabiilzation will be used.

Definition at line 138 of file LevelSetData.hpp.

◆ IPTreatment_type

Enumerator
IMPLICIT 

Fully implicit stabilization (standard procedure)

SEMI_IMPLICIT 

Semi-implicit, best choice for faster computations.

EXPLICIT 

Completly explicit, not very usefull but available.

Definition at line 145 of file LevelSetData.hpp.

Constructor & Destructor Documentation

◆ DataLevelSet() [1/2]

Empty Constructor.

Definition at line 48 of file LevelSetData.cpp.

◆ ~DataLevelSet()

virtual ~DataLevelSet ( )
inlinevirtual

Destructor.

Definition at line 162 of file LevelSetData.hpp.

◆ DataLevelSet() [2/2]

DataLevelSet ( const DataLevelSet )
private

Member Function Documentation

◆ setup()

void setup ( const GetPot dataFile,
const std::string &  section = "level-set" 
)

Fill the DataLevelSet with the informations of the GetPot object.

Using this method overrides all the previously stored informations!

Definition at line 61 of file LevelSetData.cpp.

◆ showMe()

void showMe ( std::ostream &  out = std::cout) const

ShowMe method.

Definition at line 83 of file LevelSetData.cpp.

◆ setTimeData()

void setTimeData ( const timePtr_Type  timeData)
inline

Set data time container.

Parameters
TimeDatashared_ptr to TimeData container

Definition at line 189 of file LevelSetData.hpp.

◆ setTimeAdvanceData()

void setTimeAdvanceData ( const timeAdvancePtr_Type  timeAdvanceData)
inline

Set data time advance container.

Parameters
timeAdvanceDatashared_ptr to TimeAdvanceData container

Definition at line 198 of file LevelSetData.hpp.

◆ setStabilization() [1/2]

void setStabilization ( const std::string &  stab)

Set the stabilization type.

This set the stabilization to the one given in the string format. Accepted possibilities are "none" and "ip". : prefer using the other version of setStabilization that is not sensible to typos.

Definition at line 121 of file LevelSetData.cpp.

+ Here is the caller graph for this function:

◆ setStabilization() [2/2]

void setStabilization ( const stabilization_type stab)
inline

Set the stabilization type.

Definition at line 213 of file LevelSetData.hpp.

◆ setIPTreatment() [1/2]

void setIPTreatment ( const std::string &  treat)

Set the treatment for the IP stabilization.

This set the treatment of the ip stabilization to the one given in the string format. Accepted possibilities are "implicit", "semi-implicit" and "explicit". : prefer using the other version of setIPTreatment that is not sensible to typos.

Definition at line 136 of file LevelSetData.cpp.

+ Here is the caller graph for this function:

◆ setIPTreatment() [2/2]

void setIPTreatment ( const IPTreatment_type treat)
inline

Set the IP treatment.

Definition at line 228 of file LevelSetData.hpp.

◆ setIPCoef()

void setIPCoef ( const Real coef)
inline

Set the IP coefficient.

Definition at line 234 of file LevelSetData.hpp.

◆ dataTime()

timePtr_Type dataTime ( ) const
inline

Get data time container.

Returns
shared_ptr to TimeData container

Definition at line 249 of file LevelSetData.hpp.

◆ dataTimeAdvance()

timeAdvancePtr_Type dataTimeAdvance ( ) const
inline

Get data time advance container.

Returns
shared_ptr to TimeAdvanceData container

Definition at line 258 of file LevelSetData.hpp.

◆ stabilization()

stabilization_type stabilization ( ) const
inline

Getter for the stabilization type.

Definition at line 264 of file LevelSetData.hpp.

◆ IPTreatment()

IPTreatment_type IPTreatment ( ) const
inline

Getter for the IP treatment.

Definition at line 270 of file LevelSetData.hpp.

◆ IPCoef()

Real IPCoef ( ) const
inline

Getter for the IP coefficient.

Definition at line 276 of file LevelSetData.hpp.

Field Documentation

◆ M_time

timePtr_Type M_time
private

Definition at line 289 of file LevelSetData.hpp.

◆ M_timeAdvance

timeAdvancePtr_Type M_timeAdvance
private

Definition at line 290 of file LevelSetData.hpp.

◆ M_stabilization

stabilization_type M_stabilization
private

Definition at line 293 of file LevelSetData.hpp.

◆ M_IPTreatment

IPTreatment_type M_IPTreatment
private

Definition at line 296 of file LevelSetData.hpp.

◆ M_IPCoef

Real M_IPCoef
private

Definition at line 299 of file LevelSetData.hpp.


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