Commit 057ca02e authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#723 InputParameter: make the Solver a parameter that may appear several...

#723 InputParameter: make the Solver a parameter that may appear several times. Currently only hyperelastic model is up-to-date with this change.
parent d3e43f2c
......@@ -250,7 +250,7 @@ FiniteElementSpace2 = {
} -- FiniteElementSpace2
Petsc = {
Petsc1 = {
-- Absolute tolerance
-- Expected format: {VALUE1, VALUE2, ...}
......
......@@ -267,6 +267,9 @@
BE4478871AA740F800665010 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE4478861AA740F800665010 /* main.cpp */; };
BE4478891AA7415000665010 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE4478881AA7415000665010 /* main.cpp */; };
BE44C05B1AA463DF0030FA26 /* Pragma.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE44C0581AA463DF0030FA26 /* Pragma.hpp */; };
BE44C7C91BE3AA460059A886 /* Petsc.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE44C7C71BE3AA460059A886 /* Petsc.hpp */; };
BE44C7CD1BE3AA8D0059A886 /* Petsc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE44C7CB1BE3AA8D0059A886 /* Petsc.cpp */; };
BE44C7CE1BE3AA8D0059A886 /* Petsc.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE44C7CC1BE3AA8D0059A886 /* Petsc.hpp */; };
BE44ECC31AC9463D00561634 /* GodOfDofManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE44ECC01AC9463D00561634 /* GodOfDofManager.cpp */; };
BE44ECC41AC9463D00561634 /* GodOfDofManager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE44ECC11AC9463D00561634 /* GodOfDofManager.hpp */; };
BE44ECC51AC9463D00561634 /* GodOfDofManager.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE44ECC21AC9463D00561634 /* GodOfDofManager.hxx */; };
......@@ -274,7 +277,6 @@
BE4529221A4185E6006A1577 /* libUtilities.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEA8A379177AD4FE009436C9 /* libUtilities.a */; };
BE4529241A419010006A1577 /* libCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE05B52916D238FE000E248D /* libCore.a */; };
BE4529251A419010006A1577 /* libGeometry.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE05B4DD16D23573000E248D /* libGeometry.a */; };
BE45B90F1A9611D400812586 /* Petsc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE42C2701A94ADCA00D03605 /* Petsc.cpp */; };
BE45B9101A9611D400812586 /* Result.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE42C2711A94ADCA00D03605 /* Result.cpp */; };
BE45C26A1A8BAFBF00DF4442 /* FEltSpaceInternalStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE45C2671A8BAFBF00DF4442 /* FEltSpaceInternalStorage.cpp */; };
BE45C26B1A8BAFBF00DF4442 /* FEltSpaceInternalStorage.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE45C2681A8BAFBF00DF4442 /* FEltSpaceInternalStorage.hpp */; };
......@@ -577,7 +579,6 @@
BE90DED11A24903700CCAFDE /* Mpi.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BEA2158A17FDACB70014AC13 /* Mpi.hxx */; };
BE90DED21A24903700CCAFDE /* InputParameterList.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE5E465F16CE6B3E00E473AF /* InputParameterList.hpp */; };
BE90DED31A24903700CCAFDE /* InputParameterList.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BEABCD3817AA494E00EDE896 /* InputParameterList.hxx */; };
BE90DEDC1A24903700CCAFDE /* Petsc.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE9F688017B7C03500CAAA8F /* Petsc.hpp */; };
BE90DEE11A24903700CCAFDE /* Result.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE7A19EC183E4789002767FD /* Result.hpp */; };
BE90DFA31A24915500CCAFDE /* GeometricMeshRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5BC2B916C00A0600232749 /* GeometricMeshRegion.cpp */; };
BE90DFA41A24915500CCAFDE /* GeometricMeshRegion__Medit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5BC2BA16C00A0600232749 /* GeometricMeshRegion__Medit.cpp */; };
......@@ -3664,7 +3665,6 @@
BE4225F219E41C6F008F6FA5 /* EnumInterface.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = EnumInterface.hxx; sourceTree = "<group>"; };
BE42A4381A5D650E00B3FF6B /* InitTimeKeepLog.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InitTimeKeepLog.hpp; sourceTree = "<group>"; };
BE42A4391A5D650E00B3FF6B /* InitTimeKeepLog.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InitTimeKeepLog.hxx; sourceTree = "<group>"; };
BE42C2701A94ADCA00D03605 /* Petsc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Petsc.cpp; sourceTree = "<group>"; };
BE42C2711A94ADCA00D03605 /* Result.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Result.cpp; sourceTree = "<group>"; };
BE43AA8019E7D29B00FCCB24 /* ComputeOrientation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ComputeOrientation.hpp; sourceTree = "<group>"; };
BE43AA8119E7D29B00FCCB24 /* ComputeOrientation.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ComputeOrientation.hxx; sourceTree = "<group>"; };
......@@ -3679,6 +3679,10 @@
BE4478861AA740F800665010 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
BE4478881AA7415000665010 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
BE44C0581AA463DF0030FA26 /* Pragma.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Pragma.hpp; sourceTree = "<group>"; };
BE44C7C61BE3AA460059A886 /* Petsc.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Petsc.hxx; path = Solver/Petsc.hxx; sourceTree = "<group>"; };
BE44C7C71BE3AA460059A886 /* Petsc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Petsc.hpp; path = Solver/Petsc.hpp; sourceTree = "<group>"; };
BE44C7CB1BE3AA8D0059A886 /* Petsc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Petsc.cpp; path = Solver/Private/Petsc.cpp; sourceTree = "<group>"; };
BE44C7CC1BE3AA8D0059A886 /* Petsc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Petsc.hpp; path = Solver/Private/Petsc.hpp; sourceTree = "<group>"; };
BE44ECC01AC9463D00561634 /* GodOfDofManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GodOfDofManager.cpp; sourceTree = "<group>"; };
BE44ECC11AC9463D00561634 /* GodOfDofManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GodOfDofManager.hpp; sourceTree = "<group>"; };
BE44ECC21AC9463D00561634 /* GodOfDofManager.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GodOfDofManager.hxx; sourceTree = "<group>"; };
......@@ -4066,7 +4070,6 @@
BE9EA0211B8F159D00B60AC2 /* libHyperelasticity.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHyperelasticity.a; sourceTree = BUILT_PRODUCTS_DIR; };
BE9EBD0B1AADDBAD001B8FC8 /* demo_input_hyperelasticity_3d.lua */ = {isa = PBXFileReference; lastKnownFileType = text; name = demo_input_hyperelasticity_3d.lua; path = Data/Lua/demo_input_hyperelasticity_3d.lua; sourceTree = SOURCE_ROOT; };
BE9EBD0D1AADE038001B8FC8 /* demo_input_heat_1d.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = demo_input_heat_1d.lua; path = Data/Lua/demo_input_heat_1d.lua; sourceTree = SOURCE_ROOT; };
BE9F688017B7C03500CAAA8F /* Petsc.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Petsc.hpp; sourceTree = "<group>"; };
BE9FE80918CE0A6900177F79 /* Lm5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Lm5.cpp; sourceTree = "<group>"; };
BE9FE80A18CE0A6900177F79 /* Lm5.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Lm5.hpp; sourceTree = "<group>"; };
BE9FE81218CE0A6900177F79 /* Mpi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mpi.cpp; sourceTree = "<group>"; };
......@@ -5662,6 +5665,25 @@
path = Pragma;
sourceTree = "<group>";
};
BE44C7C51BE3A9FB0059A886 /* Solver */ = {
isa = PBXGroup;
children = (
BE44C7C71BE3AA460059A886 /* Petsc.hpp */,
BE44C7C61BE3AA460059A886 /* Petsc.hxx */,
BE44C7CA1BE3AA590059A886 /* Private */,
);
name = Solver;
sourceTree = "<group>";
};
BE44C7CA1BE3AA590059A886 /* Private */ = {
isa = PBXGroup;
children = (
BE44C7CB1BE3AA8D0059A886 /* Petsc.cpp */,
BE44C7CC1BE3AA8D0059A886 /* Petsc.hpp */,
);
name = Private;
sourceTree = "<group>";
};
BE4529231A4189F3006A1577 /* PostProcessing */ = {
isa = PBXGroup;
children = (
......@@ -6643,6 +6665,7 @@
BE968B6917AB94A100995748 /* InputParameter */ = {
isa = PBXGroup;
children = (
BE44C7C51BE3A9FB0059A886 /* Solver */,
BEB7B0F21BB3F46D005E5D18 /* DirichletBoundaryCondition */,
BE64E3FF1B25B76700DD48A0 /* TimeManager */,
BE2E0CC01ABAFB8700B543E8 /* Geometry */,
......@@ -6653,8 +6676,6 @@
BE192D771BD66F1A0012AF14 /* InitialCondition.hxx */,
131D43A81B441F610015EBF9 /* InitialConditionGate.cpp */,
131D43A91B441F610015EBF9 /* InitialConditionGate.hpp */,
BE42C2701A94ADCA00D03605 /* Petsc.cpp */,
BE9F688017B7C03500CAAA8F /* Petsc.hpp */,
BE42C2711A94ADCA00D03605 /* Result.cpp */,
BE7A19EC183E4789002767FD /* Result.hpp */,
BE96FE941B8202E9009BC073 /* Crtp */,
......@@ -8291,6 +8312,7 @@
BE2E0CCC1ABAFBA800B543E8 /* Mesh.hxx in Headers */,
BE96FE9A1B820327009BC073 /* Section.hxx in Headers */,
BE64622D1AEE199900D5162A /* NumberingSubsetManager.hpp in Headers */,
BE44C7C91BE3AA460059A886 /* Petsc.hpp in Headers */,
BEDAC3D51AD8102400AA2156 /* NumberingSubset.hxx in Headers */,
BE64622E1AEE199900D5162A /* NumberingSubsetManager.hxx in Headers */,
BE63C1781B21E51000978D05 /* TimeManagerInstance.hxx in Headers */,
......@@ -8306,9 +8328,9 @@
BE90DED01A24903700CCAFDE /* Mpi.hpp in Headers */,
BE87A4EF1A6FEFF100E92902 /* InitHappyHeart.hxx in Headers */,
BE6FB5E01B4EC0CF00F0F6A3 /* ParameterUsualDescription.hxx in Headers */,
BE44C7CE1BE3AA8D0059A886 /* Petsc.hpp in Headers */,
BE192D781BD66F1A0012AF14 /* InitialCondition.hxx in Headers */,
BE64623B1AEE1AEF00D5162A /* GlobalVector.hxx in Headers */,
BE90DEDC1A24903700CCAFDE /* Petsc.hpp in Headers */,
BE646CD91B1C4AEF001267F4 /* TransientSource.hpp in Headers */,
BE96FE991B820327009BC073 /* Section.hpp in Headers */,
BE63C16B1B21DFDD00978D05 /* ConstantTimeStep.hxx in Headers */,
......@@ -10036,6 +10058,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BE44C7CD1BE3AA8D0059A886 /* Petsc.cpp in Sources */,
BE55781C1BE250670097FB58 /* Solver.cpp in Sources */,
131D43AB1B441FE30015EBF9 /* InitialConditionGate.cpp in Sources */,
BE96FEA61B821D51009BC073 /* Fluid.cpp in Sources */,
......@@ -10062,7 +10085,6 @@
1322D2841B42F038009BEFD0 /* FitzHughNagumo.cpp in Sources */,
BE8C17791B1C86E300514368 /* TransfertCoefficient.cpp in Sources */,
BE64622C1AEE199900D5162A /* NumberingSubsetManager.cpp in Sources */,
BE45B90F1A9611D400812586 /* Petsc.cpp in Sources */,
1322D2A01B43C779009BEFD0 /* MitchellSchaeffer.cpp in Sources */,
BE96FE9E1B820BF4009BC073 /* Solid.cpp in Sources */,
BE625B561BCBB72500FB316D /* Fiber.cpp in Sources */,
......
//
// Petsc.hpp
// HappyHeart
//
// Created by Sébastien Gilles on 11/08/13.
// Copyright (c) 2013 Inria. All rights reserved.
//
# include "Core/InputParameter/Petsc.hpp"
namespace HappyHeart
{
namespace InputParameter
{
const std::string& Petsc::GetName()
{
static std::string ret("Petsc");
return ret;
}
const std::string& Petsc::Solver::NameInFile()
{
static std::string ret("solver");
return ret;
}
const std::string& Petsc::Solver::Description()
{
static std::string ret("Solver to use."); //chebychev cg gmres preonly bicg python };\n\t-- To use Mumps choose preonly.");
return ret;
}
const std::string& Petsc::Solver::Constraint()
{
static std::string ret("ops_in(v, { 'Mumps', 'Umfpack' })"); // 'chebychev', 'umfpack', 'cg', 'gmres', 'preonly', 'bicg', 'python'})");
return ret;
}
const std::string& Petsc::Solver::DefaultValue()
{
static std::string ret("{\"preonly\"}");
return ret;
}
const std::string& Petsc::GmresRestart::NameInFile()
{
static std::string ret("gmresRestart");
return ret;
}
const std::string& Petsc::GmresRestart::Description()
{
static std::string ret("gmresStart");
return ret;
}
const std::string& Petsc::GmresRestart::Constraint()
{
static std::string ret("v >= 0");
return ret;
}
const std::string& Petsc::GmresRestart::DefaultValue()
{
static std::string ret("{200}");
return ret;
}
const std::string& Petsc::Preconditioner::NameInFile()
{
static std::string ret("preconditioner");
return ret;
}
const std::string& Petsc::Preconditioner::Description()
{
static std::string ret("Preconditioner to use. Must be lu for any direct solver.");
return ret;
}
const std::string& Petsc::Preconditioner::Constraint()
{
static std::string ret("ops_in(v, {'lu'})"); // none', 'jacobi', 'sor', 'lu', 'bjacobi', 'ilu', 'asm', 'cholesky'})");
return ret;
}
const std::string& Petsc::Preconditioner::DefaultValue()
{
static std::string ret("{\"lu\"}");
return ret;
}
const std::string& Petsc::RelativeTolerance::NameInFile()
{
static std::string ret("relativeTolerance");
return ret;
}
const std::string& Petsc::RelativeTolerance::Description()
{
static std::string ret("Relative tolerance");
return ret;
}
const std::string& Petsc::RelativeTolerance::Constraint()
{
static std::string ret("v > 0.");
return ret;
}
const std::string& Petsc::RelativeTolerance::DefaultValue()
{
static std::string ret("{1e-9}");
return ret;
}
const std::string& Petsc::AbsoluteTolerance::NameInFile()
{
static std::string ret("absoluteTolerance");
return ret;
}
const std::string& Petsc::AbsoluteTolerance::Description()
{
static std::string ret("Absolute tolerance");
return ret;
}
const std::string& Petsc::AbsoluteTolerance::Constraint()
{
static std::string ret("v > 0.");
return ret;
}
const std::string& Petsc::AbsoluteTolerance::DefaultValue()
{
static std::string ret("{1e-50}");
return ret;
}
const std::string& Petsc::MaxIteration::NameInFile()
{
static std::string ret("maxIteration");
return ret;
}
const std::string& Petsc::MaxIteration::Description()
{
static std::string ret("Maximum iteration");
return ret;
}
const std::string& Petsc::MaxIteration::Constraint()
{
static std::string ret("v > 0");
return ret;
}
const std::string& Petsc::MaxIteration::DefaultValue()
{
static std::string ret("{1000}");
return ret;
}
} // namespace InputParameter
} // namespace HappyHeart
//
// Petsc.hpp
// HappyHeart
//
// Created by Sébastien Gilles on 11/08/13.
// Copyright (c) 2013 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_PETSC_HPP_
# define HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_PETSC_HPP_
# include <vector>
# include <string>
# include "Core/InputParameter/Crtp/Section.hpp"
namespace HappyHeart
{
namespace InputParameter
{
struct Petsc : public Crtp::Section<Petsc, NoEnclosingSection>
{
/*!
* \brief Return the name of the section in the input parameter.
*
*/
static const std::string& GetName();
//! Convenient alias.
using self = Petsc;
using return_type = self;
//! Friendship to section parent.
using parent = Crtp::Section<self, NoEnclosingSection>;
friend parent;
//! Holds information related to the input parameter Petsc::Solver.
struct Solver : public Crtp::InputParameter<Solver, self, std::string>
{
//! Name of the input parameter in Lua input file.
static const std::string& NameInFile();
//! Description of the input parameter.
static const std::string& Description();
/*!
* \return Constraint to fulfill.
*
* Might be left empty; if not the format to respect is the Ops one. Hereafter some text from Ops example file:
*
* An age should be greater than 0 and less than, say, 150. It is possible
* to check it with a logical expression (written in Lua). The expression
* should be written with 'v' being the variable to be checked.
* \a constraint = "v >= 0 and v < 150"
*
* It is possible to check whether a variable is in a set of acceptable
* value. This is performed with 'ops_in' (a Lua function defined by Ops).
* \a constraint = "ops_in(v, {'Messiah', 'Water Music'})"
*
* If a vector is retrieved, the constraint must be satisfied on every
* element of the vector.
*/
static const std::string& Constraint();
/*!
* \return Default value.
*
* This is intended to be used only when the class is used to create a default file; never when no
* value has been given in the input parameter file (doing so is too much error prone...)
*
* This is given as a string; if no default value return an empty string. The value must be Ops-formatted.
*/
static const std::string& DefaultValue();
};
//! Holds information related to the input parameter Petsc::gmresRestart.
struct GmresRestart : public Crtp::InputParameter<GmresRestart, self, unsigned int>
{
//! Name of the input parameter in Lua input file.
static const std::string& NameInFile();
//! Description of the input parameter.
static const std::string& Description();
/*!
* \return Constraint to fulfill.
*
* Might be left empty; if not the format to respect is the Ops one. Hereafter some text from Ops example file:
*
* An age should be greater than 0 and less than, say, 150. It is possible
* to check it with a logical expression (written in Lua). The expression
* should be written with 'v' being the variable to be checked.
* \a constraint = "v >= 0 and v < 150"
*
* It is possible to check whether a variable is in a set of acceptable
* value. This is performed with 'ops_in' (a Lua function defined by Ops).
* \a constraint = "ops_in(v, {'Messiah', 'Water Music'})"
*
* If a vector is retrieved, the constraint must be satisfied on every
* element of the vector.
*/
static const std::string& Constraint();
/*!
* \return Default value.
*
* This is intended to be used only when the class is used to create a default file; never when no value has been given
* in the input parameter file (doing so is too much error prone...)
*
* This is given as a string; if no default value return an empty string. The value must be Ops-formatted.
*/
static const std::string& DefaultValue();
};
//! Holds information related to the input parameter Petsc::preconditioner.
struct Preconditioner : public Crtp::InputParameter<Preconditioner, self, std::string>
{
//! Name of the input parameter in Lua input file.
static const std::string& NameInFile();
//! Description of the input parameter.
static const std::string& Description();
/*!
* \return Constraint to fulfill.
*
* Might be left empty; if not the format to respect is the Ops one. Hereafter some text from Ops example file:
*
* An age should be greater than 0 and less than, say, 150. It is possible
* to check it with a logical expression (written in Lua). The expression
* should be written with 'v' being the variable to be checked.
* \a constraint = "v >= 0 and v < 150"
*
* It is possible to check whether a variable is in a set of acceptable
* value. This is performed with 'ops_in' (a Lua function defined by Ops).
* \a constraint = "ops_in(v, {'Messiah', 'Water Music'})"
*
* If a vector is retrieved, the constraint must be satisfied on every
* element of the vector.
*/
static const std::string& Constraint();
/*!
* \return Default value.
*
* This is intended to be used only when the class is used to create a default file; never when no value has been given
* in the input parameter file (doing so is too much error prone...)
*
* This is given as a string; if no default value return an empty string. The value must be Ops-formatted.
*/
static const std::string& DefaultValue();
};
//! Holds information related to the input parameter Petsc::relativeTolerance.
struct RelativeTolerance : public Crtp::InputParameter<RelativeTolerance, self, double>
{
//! Name of the input parameter in Lua input file.
static const std::string& NameInFile();
//! Description of the input parameter.
static const std::string& Description();
/*!
* \return Constraint to fulfill.
*
* Might be left empty; if not the format to respect is the Ops one. Hereafter some text from Ops example file:
*
* An age should be greater than 0 and less than, say, 150. It is possible
* to check it with a logical expression (written in Lua). The expression
* should be written with 'v' being the variable to be checked.
* \a constraint = "v >= 0 and v < 150"
*
* It is possible to check whether a variable is in a set of acceptable
* value. This is performed with 'ops_in' (a Lua function defined by Ops).
* \a constraint = "ops_in(v, {'Messiah', 'Water Music'})"
*
* If a vector is retrieved, the constraint must be satisfied on every
* element of the vector.
*/
static const std::string& Constraint();
/*!
* \return Default value.
*
* This is intended to be used only when the class is used to create a default file; never when no value has been given
* in the input parameter file (doing so is too much error prone...)
*
* This is given as a string; if no default value return an empty string. The value must be Ops-formatted.
*/
static const std::string& DefaultValue();
};
//! Holds information related to the input parameter Petsc::absoluteTolerance.
struct AbsoluteTolerance : public Crtp::InputParameter<AbsoluteTolerance, self, double>
{
//! Name of the input parameter in Lua input file.
static const std::string& NameInFile();
//! Description of the input parameter.
static const std::string& Description();
/*!
* \return Constraint to fulfill.
*
* Might be left empty; if not the format to respect is the Ops one. Hereafter some text from Ops example file:
*
* An age should be greater than 0 and less than, say, 150. It is possible
* to check it with a logical expression (written in Lua). The expression
* should be written with 'v' being the variable to be checked.
* \a constraint = "v >= 0 and v < 150"
*
* It is possible to check whether a variable is in a set of acceptable
* value. This is performed with 'ops_in' (a Lua function defined by Ops).
* \a constraint = "ops_in(v, {'Messiah', 'Water Music'})"
*
* If a vector is retrieved, the constraint must be satisfied on every
* element of the vector.
*/
static const std::string& Constraint();
/*!
* \return Default value.
*
* This is intended to be used only when the class is used to create a default file; never when no value has been given
* in the input parameter file (doing so is too much error prone...)
*
* This is given as a string; if no default value return an empty string. The value must be Ops-formatted.
*/
static const std::string& DefaultValue();
};
//! Holds information related to the input parameter Petsc::maxIteration.
struct MaxIteration : public Crtp::InputParameter<MaxIteration, self, unsigned int>
{
//! Name of the input parameter in Lua input file.
static const std::string& NameInFile();
//! Description of the input parameter.
static const std::string& Description();
/*!
* \return Constraint to fulfill.
*
* Might be left empty; if not the format to respect is the Ops one. Hereafter some text from Ops example file:
*
* An age should be greater than 0 and less than, say, 150. It is possible
* to check it with a logical expression (written in Lua). The expression
* should be written with 'v' being the variable to be checked.
* \a constraint = "v >= 0 and v < 150"
*
* It is possible to check whether a variable is in a set of acceptable
* value. This is performed with 'ops_in' (a Lua function defined by Ops).
* \a constraint = "ops_in(v, {'Messiah', 'Water Music'})"