LifeV
|
dataLevelSet - Container for the data for the level set solver More...
#include <LevelSetData.hpp>
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_Type > | timePtr_Type |
typedef TimeAdvanceData | timeAdvance_Type |
typedef std::shared_ptr< timeAdvance_Type > | timeAdvancePtr_Type |
Constructor & Destructor | |
DataLevelSet () | |
Empty Constructor. More... | |
virtual | ~DataLevelSet () |
Destructor. More... | |
Methods | |
void | setup (const GetPot &dataFile, const std::string §ion="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... | |
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
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.
Definition at line 124 of file LevelSetData.hpp.
Definition at line 131 of file LevelSetData.hpp.
typedef std::shared_ptr<time_Type> timePtr_Type |
Definition at line 132 of file LevelSetData.hpp.
typedef TimeAdvanceData timeAdvance_Type |
Definition at line 134 of file LevelSetData.hpp.
typedef std::shared_ptr<timeAdvance_Type> timeAdvancePtr_Type |
Definition at line 135 of file LevelSetData.hpp.
enum stabilization_type |
Enumerator | |
---|---|
NONE | No stabilization will be added. |
IP | The IP stabiilzation will be used. |
Definition at line 138 of file LevelSetData.hpp.
enum 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.
DataLevelSet | ( | ) |
Empty Constructor.
Definition at line 48 of file LevelSetData.cpp.
|
inlinevirtual |
Destructor.
Definition at line 162 of file LevelSetData.hpp.
|
private |
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.
void showMe | ( | std::ostream & | out = std::cout | ) | const |
ShowMe method.
Definition at line 83 of file LevelSetData.cpp.
|
inline |
Set data time container.
Definition at line 189 of file LevelSetData.hpp.
|
inline |
Set data time advance container.
timeAdvanceData | shared_ptr to TimeAdvanceData container |
Definition at line 198 of file LevelSetData.hpp.
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.
|
inline |
Set the stabilization type.
Definition at line 213 of file LevelSetData.hpp.
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.
|
inline |
Set the IP treatment.
Definition at line 228 of file LevelSetData.hpp.
|
inline |
Set the IP coefficient.
Definition at line 234 of file LevelSetData.hpp.
|
inline |
Get data time container.
Definition at line 249 of file LevelSetData.hpp.
|
inline |
Get data time advance container.
Definition at line 258 of file LevelSetData.hpp.
|
inline |
Getter for the stabilization type.
Definition at line 264 of file LevelSetData.hpp.
|
inline |
Getter for the IP treatment.
Definition at line 270 of file LevelSetData.hpp.
|
inline |
Getter for the IP coefficient.
Definition at line 276 of file LevelSetData.hpp.
|
private |
Definition at line 289 of file LevelSetData.hpp.
|
private |
Definition at line 290 of file LevelSetData.hpp.
|
private |
Definition at line 293 of file LevelSetData.hpp.
|
private |
Definition at line 296 of file LevelSetData.hpp.
|
private |
Definition at line 299 of file LevelSetData.hpp.