Commit 8de34514 authored by Gautier Bureau's avatar Gautier Bureau Committed by GILLES Sebastien
Browse files

#831 - #838 Initial Condition now generalized to a vectorial case. Also...

#831 - #838 Initial Condition now generalized to a vectorial case. Also introduce a new input parameter that enables to write some outputs every few iterations.
parent 9a133976
......@@ -223,7 +223,11 @@ Result = {
-- Directory in which all the results will be written.
-- Expected format: "VALUE"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Bidomain/CRN"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Bidomain/CRN",
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
display_value = 100
} -- Result
......@@ -587,7 +591,32 @@ ReactionMitchellSchaeffer = {
InitialCondition1 = {
-- Initial Condition, analytical function in space to initialize the problem at t=t0.
-- How is given the initial condition value (as a constant or as a Lua function.)
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, {'ignore', 'constant', 'lua_function'})
nature = { "constant", "constant", "constant" },
-- Value of the initial condition in the case nature is 'constant.
-- Expected format: {VALUE1, VALUE2, ...}
scalar_value = { -81.2 , 0., 0.},
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_x = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
......@@ -597,15 +626,40 @@ InitialCondition1 = {
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
value = function (x, y, z)
return -81.2;
lua_function_y = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_z = function(x, y, z)
return 0.;
end
} -- InitialCondition1
InitialCondition2 = {
-- Initial Condition, analytical function in space to initialize the problem at t=t0.
-- How is given the initial condition value (as a constant or as a Lua function.)
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, {'ignore', 'constant', 'lua_function'})
nature = { "constant", "constant", "constant" },
-- Value of the initial condition in the case nature is 'constant.
-- Expected format: {VALUE1, VALUE2, ...}
scalar_value = { 0. , 0., 0.},
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
......@@ -615,15 +669,85 @@ InitialCondition2 = {
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
value = function (x, y, z)
return 0.;
lua_function_x = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_y = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_z = function(x, y, z)
return 0.;
end
} -- InitialCondition2
InitialCondition3 = {
-- Initial Condition, analytical function in space to initialize the problem at t=t0.
-- How is given the initial condition value (as a constant or as a Lua function.)
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, {'ignore', 'constant', 'lua_function'})
nature = { "constant", "constant", "constant" },
-- Value of the initial condition in the case nature is 'constant.
-- Expected format: {VALUE1, VALUE2, ...}
scalar_value = { 1. , 0., 0.},
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_x = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_y = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
......@@ -633,8 +757,8 @@ InitialCondition3 = {
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
value = function (x, y, z)
return 1.;
lua_function_z = function(x, y, z)
return 0.;
end
} -- InitialCondition3
......
......@@ -16,7 +16,7 @@ transient = {
-- Time step between two iterations, in seconds.
-- Expected format: VALUE
-- Constraint: v > 0.
timeStep = 0.0001,
timeStep = 0.01,
-- Maximum time, if set to zero run a static case.
-- Expected format: VALUE
......@@ -224,7 +224,11 @@ Result = {
-- Directory in which all the results will be written.
-- Expected format: "VALUE"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Bidomain/MS_SMALL_DT"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Bidomain/MS",
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
display_value = 100
} -- Result
......@@ -586,7 +590,47 @@ ReactionMitchellSchaeffer = {
InitialCondition1 = {
-- Initial Condition, analytical function in space to initialize the problem at t=t0.
-- How is given the initial condition value (as a constant or as a Lua function.)
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, {'ignore', 'constant', 'lua_function'})
nature = { "constant", "constant", "constant" },
-- Value of the initial condition in the case nature is 'constant.
-- Expected format: {VALUE1, VALUE2, ...}
scalar_value = { -80. , 0., 0.},
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_x = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_y = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
......@@ -596,15 +640,55 @@ InitialCondition1 = {
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
value = function (x, y, z)
return -80.;
lua_function_z = function(x, y, z)
return 0.;
end
} -- InitialCondition1
InitialCondition2 = {
-- Initial Condition, analytical function in space to initialize the problem at t=t0.
-- How is given the initial condition value (as a constant or as a Lua function.)
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, {'ignore', 'constant', 'lua_function'})
nature = { "constant", "constant", "constant" },
-- Value of the initial condition in the case nature is 'constant.
-- Expected format: {VALUE1, VALUE2, ...}
scalar_value = { 0. , 0., 0.},
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_x = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_y = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
......@@ -614,7 +698,7 @@ InitialCondition2 = {
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
value = function (x, y, z)
lua_function_z = function(x, y, z)
return 0.;
end
......@@ -622,7 +706,47 @@ InitialCondition2 = {
InitialCondition3 = {
-- Initial Condition, analytical function in space to initialize the problem at t=t0.
-- How is given the initial condition value (as a constant or as a Lua function.)
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, {'ignore', 'constant', 'lua_function'})
nature = { "constant", "constant", "constant" },
-- Value of the initial condition in the case nature is 'constant.
-- Expected format: {VALUE1, VALUE2, ...}
scalar_value = { 1. , 0., 0.},
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_x = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_y = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
......@@ -632,8 +756,8 @@ InitialCondition3 = {
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
value = function (x, y, z)
return 1.;
lua_function_z = function(x, y, z)
return 0.;
end
} -- InitialCondition3
......
......@@ -529,6 +529,10 @@ Result = {
-- Directory in which all the results will be written.
-- Expected format: "VALUE"
-- output_directory = "/home/sebastien/Data/HappyHeart/Results/Hyperelasticity", -- LINUX
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Elasticity"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Elasticity",
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
display_value = 1
}
......@@ -457,6 +457,10 @@ Result = {
-- Directory in which all the results will be written.
-- Expected format: "VALUE"
-- output_directory = "/home/sebastien/Data/HappyHeart/Results/Hyperelasticity", -- LINUX
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Elasticity"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Elasticity",
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
display_value = 1
}
......@@ -395,7 +395,11 @@ Petsc1 = {
Result = {
-- Directory in which all the results will be written.
-- Expected format: "VALUE"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Heat/2D"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Heat/2D",
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
display_value = 1
}
......@@ -600,20 +604,62 @@ TransientSource3 = {
lua_function_z = function (x, y, z)
return 0.;
end
}
-- InitialCondition
InitialCondition1 = {
-- Initial Condition
-- How is given the initial condition value (as a constant or as a Lua function.)
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, {'ignore', 'constant', 'lua_function'})
nature = { "lua_function", "constant", "constant" },
-- Value of the initial condition in the case nature is 'constant.
-- Expected format: {VALUE1, VALUE2, ...}
scalar_value = { 0. , 0., 0.},
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- function(arg1, arg2, arg3)
-- return arg1 + arg2 - arg3
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.' preffix.
--
value = function (x, y, z)
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_x = function(x, y, z)
return 0.*x + 100.*y + 0.*z + 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_y = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_z = function(x, y, z)
return 0.;
end
}
} -- InitialCondition1
......@@ -393,7 +393,11 @@ Petsc1 = {
Result = {
-- Directory in which all the results will be written.
-- Expected format: "VALUE"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Heat/1D"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Heat/1D",
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
display_value = 1
}
-- DiffusionDensity
......@@ -598,17 +602,60 @@ TransientSource3 = {
end
}
-- InitialCondition
InitialCondition1 = {
-- Initial Condition
-- How is given the initial condition value (as a constant or as a Lua function.)
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, {'ignore', 'constant', 'lua_function'})
nature = { "lua_function", "constant", "constant" },
-- Value of the initial condition in the case nature is 'constant.
-- Expected format: {VALUE1, VALUE2, ...}
scalar_value = { 0. , 0., 0.},
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- function(arg1, arg2, arg3)
-- return arg1 + arg2 - arg3
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.' preffix.
--
value = function (x, y, z)
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_x = function(x, y, z)
return 10*math.exp(-(x-0.5-10/2)^2);
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_y = function(x, y, z)
return 0.;
end,
-- Value of the initial condition in the case nature is 'lua_function'.
-- Function expects as arguments global coordinates (coordinates in the mesh).
-- Expected format: Function in Lua language, for instance:
-- -- function(arg1, arg2, arg3)
-- return arg1 + arg2 -
-- arg3
-- end
-- sin, cos and tan require a 'math.'
-- preffix.
-- If you do not wish to provide one, put anything you want (e.g. 'none'): the
-- content is not interpreted by Ops until an actual use of the underlying function.
lua_function_z = function(x, y, z)
return 0.;
end
}
} -- InitialCondition1
......@@ -655,5 +655,9 @@ Result = {
-- Directory in which all the results will be written.
-- Expected format: "VALUE"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Hyperelasticity/2D",
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
display_value = 1
} -- Result
......@@ -547,5 +547,9 @@ Result = {
-- Expected format: "VALUE"
--output_directory = "/home/sebastien/Data/HappyHeart/Results/Hyperelasticity", -- LINUX
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/Hyperelasticity/3D"
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
display_value = 1
}
......@@ -291,7 +291,11 @@ Petsc1 = {
Result = {
-- Directory in which all the results will be written.
-- Expected format: "VALUE"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/ReactionDiffusion/FHN"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/ReactionDiffusion/FHN/1D",
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
display_value = 1
}
-- Diffusion
......@@ -512,23 +516,67 @@ TransientSource2 = {