Teuchos::ParameterList params; params.set("name", "John Doe"); params.set("age", 30); params.set("salary", 50000.0);
Teuchos::ParameterList nestedParams; nestedParams.set("x", 1.0); nestedParams.set("y", 2.0); params.set("point", nestedParams);
Teuchos::ParameterList validParams; validParams.set("name", "", "Person's name"); validParams.setThis code shows how to define a parameter list with three parameters, where the name is required, the age is an integer greater than 0, and the salary is a non-negative double. Teuchos ParameterList is part of the Teuchos package library, which is a set of C++ tools for scientific computing and engineering applications. The package also includes other useful classes for memory management, input/output, linear algebra, and parallel computing. It is widely used in the Trilinos project, which is a collection of open-source libraries for scalable and performant simulations.("age", 0, "Person's age", true); validParams.set ("salary", -1.0, "Person's salary", true, &Teuchos::anyGreaterThanOrEqual , 0.0);