Feellgood
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
Settings Class Reference

#include <feellgoodSettings.h>

Public Member Functions

 Settings ()
 
void infos (void)
 
std::string evolMetadata (std::string realWorldTime) const
 
std::string solMetadata (double t, std::string columnsTitle) const
 
void read (YAML::Node)
 
bool read (std::string filename)
 
int getPrecision (void) const
 
std::string getFileDisplayName (void) const
 
void setFileDisplayName (std::string _s)
 
void setPbName (std::string str)
 
std::string getPbName (void) const
 
void setSimName (std::string str)
 
std::string getSimName (void) const
 
void setScale (const double s)
 
double getScale (void) const
 
void set_MAXITER (int i)
 
int findTetraRegionIdx (const std::string name) const
 
int findFacetteRegionIdx (const std::string name) const
 
Eigen::Vector3d getMagnetization (const Eigen::Ref< Eigen::Vector3d > p) const
 
Eigen::Vector3d getField (const double t_val) const
 
field_exprType getFieldType (void) const
 
Eigen::Vector3d getFieldSpace (const Eigen::Ref< Eigen::Vector3d > p) const
 
double getFieldTime (const double t_val) const
 

Static Public Member Functions

static void dumpDefaults ()
 

Public Attributes

bool withTsv
 
int verbose
 
double time_step
 
int save_period
 
bool recenter
 
Nodes::index recentering_direction
 
double threshold
 
int solverNbTh
 
int scalfmmNbTh
 
STT p_stt
 
bool stt_flag
 
std::string sMx
 
std::string sMy
 
std::string sMz
 
std::string sM
 
std::string sBx
 
std::string sBy
 
std::string sBz
 
std::string sB
 
std::string sB_space
 
std::string sB_time
 
std::string restoreFileName
 
double DUMAX
 
double TOL
 
int MAXITER
 
double ILU_tol
 
int ILU_fill_factor
 
std::vector< Tetra::prmparamTetra
 
std::vector< Facette::prmparamFacette
 
std::string r_path_output_dir
 
std::vector< std::string > evol_columns
 
double tf
 
double dt_min
 
double dt_max
 

Private Attributes

int precision
 
std::string fileDisplayName
 
double _scale
 
std::string simName
 
std::string pbName
 
ExpressionParser mag_parser
 
field_exprType field_type
 
ExpressionParser field_parser
 
ExpressionParser field_time_parser
 
ExpressionParser field_space_parser
 

Detailed Description

container class to store many setting parameters, such as file names, parameters for the solver, output file format. It also handles text user interation through terminal, and some parsing functions.

Constructor & Destructor Documentation

◆ Settings()

Settings::Settings ( )

default constructor

Member Function Documentation

◆ dumpDefaults()

void Settings::dumpDefaults ( )
static

print out the YAML document defining the default settings

◆ evolMetadata()

std::string Settings::evolMetadata ( std::string  realWorldTime) const

build a metadata string for .evol file

◆ findFacetteRegionIdx()

int Settings::findFacetteRegionIdx ( const std::string  name) const
inline
Returns
index of the region in surface region container
Parameters
[in]name

◆ findTetraRegionIdx()

int Settings::findTetraRegionIdx ( const std::string  name) const
inline
Returns
index of the region in volume region container
Parameters
[in]name

◆ getField()

Eigen::Vector3d Settings::getField ( const double  t_val) const
inline

evaluation of the field components through math expression, each component of the field is a function of (t).

◆ getFieldSpace()

Eigen::Vector3d Settings::getFieldSpace ( const Eigen::Ref< Eigen::Vector3d >  p) const
inline

evaluation of the space dependant vector distribution of the applied field when defined from math expressions

◆ getFieldTime()

double Settings::getFieldTime ( const double  t_val) const
inline

evaluation of the time dependant amplitude of the applied field when defined from math expressions, mu0 is there

◆ getFieldType()

field_exprType Settings::getFieldType ( void  ) const
inline

returns field type, either expression defined (t) -> (Bx(t),By(t),Bz(t)) or a couple of math expressions (t) -> A(t) and (x,y,z) -> (fx(x,y,z),fy(x,y,z),fz(x,y,z)) with B(x,y,z,t) = A(t) * (fx(x,y,z),fy(x,y,z),fz(x,y,z))

◆ getFileDisplayName()

std::string Settings::getFileDisplayName ( void  ) const
inline

getter for fileDisplayName

◆ getMagnetization()

Eigen::Vector3d Settings::getMagnetization ( const Eigen::Ref< Eigen::Vector3d >  p) const
inline

evaluation of the magnetization components through math expression, each component of the magnetization is a function of (x,y,z). It is not safe to call this method simultaneously from multiple threads.

Returns
unit vector

◆ getPbName()

std::string Settings::getPbName ( void  ) const
inline

getter for problem file name

◆ getPrecision()

int Settings::getPrecision ( void  ) const
inline

returns numeric precision for .sol output text files

◆ getScale()

double Settings::getScale ( void  ) const
inline

getter for geometrical scaling factor for physical coordinates of the mesh

◆ getSimName()

std::string Settings::getSimName ( void  ) const
inline

getter for output file name

◆ infos()

void Settings::infos ( void  )

some prints sent to terminal

◆ read() [1/2]

bool Settings::read ( std::string  filename)

read settings from a YAML file. Returns true if a non-empty configuration is found.

◆ read() [2/2]

void Settings::read ( YAML::Node  yaml)

read settings from a parsed YAML document

◆ set_MAXITER()

void Settings::set_MAXITER ( int  i)
inline

maximum number of iterations setter for bicgstab

◆ setFileDisplayName()

void Settings::setFileDisplayName ( std::string  _s)
inline

setter for fileDisplayName

◆ setPbName()

void Settings::setPbName ( std::string  str)
inline

setter for .msh file name

◆ setScale()

void Settings::setScale ( const double  s)
inline

setter for geometrical scaling factor for physical coordinates of the mesh

◆ setSimName()

void Settings::setSimName ( std::string  str)
inline

setter for .sol output file name

◆ solMetadata()

std::string Settings::solMetadata ( double  t,
std::string  columnsTitle 
) const

build a metadata string for .sol text files

Member Data Documentation

◆ _scale

double Settings::_scale
private

scaling factor from gmsh files to feellgood

◆ dt_max

double Settings::dt_max

maximal time step

◆ dt_min

double Settings::dt_min

minimal time step

◆ DUMAX

double Settings::DUMAX

maximum value for du step

◆ evol_columns

std::vector<std::string> Settings::evol_columns

contain the value names of the columns the user want in .evol file

◆ field_parser

ExpressionParser Settings::field_parser
private

parser for the time dependant applied field expressions R->R³

◆ field_space_parser

ExpressionParser Settings::field_space_parser
private

parser for the field space dependant vector expressions

◆ field_time_parser

ExpressionParser Settings::field_time_parser
private

parser for the field time dependant scalar expression

◆ field_type

field_exprType Settings::field_type
private

applied field might be either expression defined (t) -> (Bx(t),By(t),Bz(t)) or a couple of math expressions (t) -> A(t) and (x,y,z) -> (fx(x,y,z),fy(x,y,z),fz(x,y,z)) with B(x,y,z,t) = A(t) * (fx(x,y,z),fy(x,y,z),fz(x,y,z))

◆ fileDisplayName

std::string Settings::fileDisplayName
private

parameters file name : either a yaml file or standard input

◆ ILU_fill_factor

int Settings::ILU_fill_factor

◆ ILU_tol

double Settings::ILU_tol

◆ mag_parser

ExpressionParser Settings::mag_parser
private

parser for the magnetization expressions R³->R³

◆ MAXITER

int Settings::MAXITER

maximum number of iteration for biconjugate gradient algorithm

◆ p_stt

STT Settings::p_stt

spin transfert torque parameters

◆ paramFacette

std::vector<Facette::prm> Settings::paramFacette

this vector contains the material parameters for all regions for all the facettes

◆ paramTetra

std::vector<Tetra::prm> Settings::paramTetra

this vector contains the material parameters for all regions for all the tetrahedrons

◆ pbName

std::string Settings::pbName
private

mesh file, gmsh file format

◆ precision

int Settings::precision
private

numeric precision for .sol output text files

◆ r_path_output_dir

std::string Settings::r_path_output_dir

relative path for output files (to be implemented)

◆ recenter

bool Settings::recenter

to recenter magnetization distribution or not

◆ recentering_direction

Nodes::index Settings::recentering_direction

recentering direction, should be IDX_X|IDX_Y|IDX_Z

◆ restoreFileName

std::string Settings::restoreFileName

input file name for continuing a calculation (sol.in)

◆ save_period

int Settings::save_period

magnetic configuration saved every save_period time steps

◆ sB

std::string Settings::sB

string for a JavaScript function defining B, alternative to (sBx, sBy, sBz)

◆ sB_space

std::string Settings::sB_space

string for a JavaScript function defining B space: (x,y,z)->[,,]

◆ sB_time

std::string Settings::sB_time

string for a JavaScript function defining B time, (t) -> real

◆ sBx

std::string Settings::sBx

string for analytical definition of Bx

◆ sBy

std::string Settings::sBy

string for analytical definition of By

◆ sBz

std::string Settings::sBz

string for analytical definition of Bz

◆ scalfmmNbTh

int Settings::scalfmmNbTh

nb of threads for the computation of the demag field with scalfmm

◆ simName

std::string Settings::simName
private

simulation name

◆ sM

std::string Settings::sM

string for a JavaScript function defining M, alternative to (sMx, sMy, sMz)

◆ sMx

std::string Settings::sMx

string for analytical definition of Mx

◆ sMy

std::string Settings::sMy

string for analytical definition of My

◆ sMz

std::string Settings::sMz

string for analytical definition of Mz

◆ solverNbTh

int Settings::solverNbTh

nb of threads for the finite element solver

◆ stt_flag

bool Settings::stt_flag

if spin transfer torque p_stt is fully initialized and boundary conditions ok, stt_flag is set to true

◆ tf

double Settings::tf

final integration time

◆ threshold

double Settings::threshold

threshold value to recenter or not versus avg(M_recentering_direction)

◆ time_step

double Settings::time_step

energy saved every time_step

◆ TOL

double Settings::TOL

solver tolerance (eigen bicgstab)

◆ verbose

int Settings::verbose

verbosity level, defaults to zero

◆ withTsv

bool Settings::withTsv

boolean flag to mention if you want output in txt tsv file format


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