Commit 940ad893 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1237 Introduce MOREFEM_ROOT environment variable and use it in demo Lua files...

#1237 Introduce MOREFEM_ROOT environment variable and use it in demo Lua files to indicate where to look for the mesh.
parent 1d6634d6
......@@ -79,6 +79,27 @@ namespace MoReFEM
assert(!error_code && "Should be called only if the environment variable doesn't exist yet.");
std::cout << "[WARNING] Environment variable '" << result_dir << "' was not defined; default value '"
<< default_value << "' has therefore be provided. This environment variable may appear in mesh "
"directory defined in input parameter file; if not it is in fact unused." << std::endl;
}
const char* const morefem_dir = "MOREFEM_ROOT";
if (!Utilities::EnvironmentNS::DoExist(morefem_dir))
{
int no_overwrite_allowed = 0;
const char* const default_value("${HOME}/Codes/MoReFEM/CoreLibrary");
int error_code = setenv(morefem_dir,
default_value,
no_overwrite_allowed);
static_cast<void>(error_code);
assert(!error_code && "Should be called only if the environment variable doesn't exist yet.");
std::cout << "[WARNING] Environment variable '" << morefem_dir << "' was not defined; default value '"
<< default_value << "' has therefore be provided. This environment variable may appear in output "
"directory defined in input parameter file; if not it is in fact unused." << std::endl;
......
......@@ -98,7 +98,6 @@ namespace MoReFEM
if (DoPrintBanner())
{
std::cout << "REALLY?" << std::endl;
Wrappers::Petsc::PrintMessageOnFirstProcessor("\n================================================================\n",
mpi, __FILE__, __LINE__);
......
......@@ -71,7 +71,7 @@ Unknown1 = {
Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/elasticity_Nx50_Ny20_force_label.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/elasticity_Nx50_Ny20_force_label.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -69,7 +69,7 @@ Unknown1 = {
Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/Bar.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/Bar.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -67,7 +67,7 @@ Unknown1 = {
Mesh1 = {
-- Input Mesh file name
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/heat_bar.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/heat_bar.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -66,7 +66,7 @@ Unknown1 = {
Mesh1 = {
-- Input Mesh file name
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/heat_bar_1D.geo",
mesh = "${MOREFEM_ROOT}/Data/Mesh/heat_bar_1D.geo",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -63,7 +63,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/Bar.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/Bar.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -34,7 +34,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/cube_hexa_N10_corrected.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/cube_hexa_N10_corrected.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -64,7 +64,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/rivlin_cube_one_hexa.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/rivlin_cube_one_hexa.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -64,7 +64,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/rivlin_cube_tetra_6_tetra.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/rivlin_cube_tetra_6_tetra.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -97,7 +97,7 @@ Unknown2 = {
Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/cylindrical_3d.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/cylindrical_3d.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -97,7 +97,7 @@ Unknown2 = {
Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/CoreLibrary/Data/Mesh/cylindrical_3d.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/cylindrical_3d.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -61,7 +61,7 @@ Unknown1 = {
Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = '${HOME}/Codes/MoReFEM/Data/Mesh/one_triangle.mesh',
mesh = '${MOREFEM_ROOT}/Data/Mesh/one_triangle.mesh',
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -34,8 +34,8 @@ transient = {
Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
--mesh = '${HOME}/Codes/MoReFEM/Data/Mesh/one_triangle.mesh',
mesh = '${HOME}/Codes/MoReFEM/Data/Mesh/elasticity_Nx50_Ny20_force_label.mesh',
--mesh = '${MOREFEM_ROOT}/Data/Mesh/one_triangle.mesh',
mesh = '${MOREFEM_ROOT}/Data/Mesh/elasticity_Nx50_Ny20_force_label.mesh',
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -79,7 +79,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/Data/Mesh/ventriVol300.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/ventriVol300.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......@@ -103,7 +103,7 @@ Mesh2 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/Data/Mesh/heat_bar_1D.geo",
mesh = "${MOREFEM_ROOT}/Data/Mesh/heat_bar_1D.geo",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -34,7 +34,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = '${HOME}/Codes/MoReFEM/Data/Mesh/ventriVol300.mesh',
mesh = '${MOREFEM_ROOT}/Data/Mesh/ventriVol300.mesh',
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -34,7 +34,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = '${HOME}/Codes/MoReFEM/Sources/Test/Geometry/LightweightDomainList/test_lightweight_domain_list.mesh',
mesh = '${MOREFEM_ROOT}/Sources/Test/Geometry/LightweightDomainList/test_lightweight_domain_list.mesh',
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -63,7 +63,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/Data/Mesh/TwoCubes.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/TwoCubes.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -97,7 +97,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/Data/Mesh/one_tetra.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/one_tetra.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
......@@ -64,7 +64,7 @@ Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/MoReFEM/Data/Mesh/square_one_quad.mesh",
mesh = "${MOREFEM_ROOT}/Data/Mesh/square_one_quad.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment