← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/logg] Rev 6372: Change search path of parameter file to ~/.fenics/dolfin_parameters.xml

 


On 24 Oct 2011, at 08:25, noreply@xxxxxxxxxxxxx wrote:

> ------------------------------------------------------------
> revno: 6372
> committer: Anders Logg <logg@xxxxxxxxx>
> branch nick: work
> timestamp: Mon 2011-10-24 09:23:52 +0200
> message:
>  Change search path of parameter file to ~/.fenics/dolfin_parameters.xml


Is this platform independent?

I would suggest using

  ~/.local/fenics

Garth

> modified:
>  ChangeLog
>  dolfin/parameter/GlobalParameters.cpp
> 
> 
> --
> lp:~dolfin-core/dolfin/logg
> https://code.launchpad.net/~dolfin-core/dolfin/logg
> 
> Your team DOLFIN Core Team is subscribed to branch lp:~dolfin-core/dolfin/logg.
> To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/logg/+edit-subscription
> === modified file 'ChangeLog' --- ChangeLog	2011-10-23 22:47:58 +0000 +++ ChangeLog	2011-10-24 07:23:52 +0000 @@ -1,3 +1,4 @@ + - Change search path of parameter file to ~/.fenics/dolfin_parameters.xml - Add functions Parameters::has_parameter, Parameters::has_parameter_set - Propagate global parameters to Krylov and LU solvers - Fix OpenMp assemble of scalars === modified file 'dolfin/parameter/GlobalParameters.cpp' --- dolfin/parameter/GlobalParameters.cpp	2011-10-24 07:17:50 +0000 +++ dolfin/parameter/GlobalParameters.cpp	2011-10-24 07:23:52 +0000 @@ -36,22 +36,19 @@ // Set default parameter values *static_cast(this) = default_parameters(); - // FIXME: Consider adding the default parameter sets for all - // FIXME: classes as nested parameter sets here. - // Search paths to parameter files in order of increasing priority std::vector parameter_files; - #ifdef _WIN32 +#ifdef _WIN32 std::string home_directory(std::getenv("USERPROFILE")); - parameter_files.push_back(home_directory + "\\.dolfin\\parameters.xml.gz"); - parameter_files.push_back(home_directory + "\\.dolfin\\parameters.xml"); - #else + parameter_files.push_back(home_directory + "\\.fenics\\dolfin_parameters.xml.gz"); + parameter_files.push_back(home_directory + "\\.fenics\\dolfin_parameters.xml"); +#else std::string home_directory(std::getenv("HOME")); - parameter_files.push_back(home_directory + "/.dolfin/parameters.xml.gz"); - parameter_files.push_back(home_directory + "/.dolfin/parameters.xml"); - #endif - parameter_files.push_back("parameters.xml.gz"); - parameter_files.push_back("parameters.xml"); + parameter_files.push_back(home_directory + "/.fenics/dolfin_parameters.xml.gz"); + parameter_files.push_back(home_directory + "/.fenics/dolfin_parameters.xml"); +#endif + parameter_files.push_back("dolfin_parameters.xml.gz"); + parameter_files.push_back("dolfin_parameters.xml"); // Try reading parameters from files for (uint i = 0; i < parameter_files.size(); ++i)


Follow ups