diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index 83dca05b08f843daf6386e205b49140b9c753189..32935f927bdf02f77f280fbf8d82385b81b0ff1d 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -55,14 +55,14 @@ ProjectData::ProjectData(BaseLib::ConfigTree const& project_config, std::string const& project_directory, std::string const& output_directory) { - // geometry std::string const geometry_file = BaseLib::copyPathToFileName( + //! \ogs_file_param{prj__geometry} project_config.getConfParam<std::string>("geometry"), project_directory ); detail::readGeometry(geometry_file, *_geoObjects); - // mesh std::string const mesh_file = BaseLib::copyPathToFileName( + //! \ogs_file_param{prj__mesh} project_config.getConfParam<std::string>("mesh"), project_directory ); @@ -74,26 +74,28 @@ ProjectData::ProjectData(BaseLib::ConfigTree const& project_config, } _mesh_vec.push_back(mesh); - // curves + //! \ogs_file_param{prj__curves} parseCurves(project_config.getConfSubtreeOptional("curves")); - // process variables + //! \ogs_file_param{prj__process_variables} parseProcessVariables(project_config.getConfSubtree("process_variables")); - // parameters + //! \ogs_file_param{prj__parameters} parseParameters(project_config.getConfSubtree("parameters")); - // processes + //! \ogs_file_param{prj__processes} parseProcesses(project_config.getConfSubtree("processes")); - // output + //! \ogs_file_param{prj__output} parseOutput(project_config.getConfSubtree("output"), output_directory); - // timestepping + //! \ogs_file_param{prj__time_stepping} parseTimeStepping(project_config.getConfSubtree("time_stepping")); + //! \ogs_file_param{prj__linear_solvers} parseLinearSolvers(project_config.getConfSubtree("linear_solvers")); + //! \ogs_file_param{prj__nonlinear_solvers} parseNonlinearSolvers(project_config.getConfSubtree("nonlinear_solvers")); } @@ -156,13 +158,16 @@ void ProjectData::buildProcesses() { for (auto const& pc : _process_configs) { + //! \ogs_file_param{process__type} auto const type = pc.peekConfParam<std::string>("type"); + //! \ogs_file_param{process__nonlinear_solver} auto const nl_slv_name = pc.getConfParam<std::string>("nonlinear_solver"); auto& nl_slv = BaseLib::getOrError(_nonlinear_solvers, nl_slv_name, "A nonlinear solver with the given name has not been defined."); auto time_disc = NumLib::createTimeDiscretization<GlobalVector>( + //! \ogs_file_param{process__time_discretization} pc.getConfSubtree("time_discretization") ); @@ -258,6 +263,7 @@ void ProjectData::parseProcessVariables( // _process_variables.reserve(process_variables_config.size()); for (auto var_config + //! \ogs_file_param{prj__process_variables__process_variable} : process_variables_config.getConfSubtreeList("process_variable")) { // TODO Extend to referenced meshes. _process_variables.emplace_back(var_config, *_mesh_vec[0], *_geoObjects); @@ -269,9 +275,12 @@ void ProjectData::parseParameters(BaseLib::ConfigTree const& parameters_config) using namespace ProcessLib; DBUG("Reading parameters:"); + //! \ogs_file_param{prj__parameters__parameter} for (auto parameter_config : parameters_config.getConfSubtreeList("parameter")) { + //! \ogs_file_param{parameter__name} auto name = parameter_config.getConfParam<std::string>("name"); + //! \ogs_file_param{parameter__type} auto type = parameter_config.peekConfParam<std::string>("type"); // Create parameter based on the provided type. @@ -300,8 +309,10 @@ void ProjectData::parseParameters(BaseLib::ConfigTree const& parameters_config) void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config) { DBUG("Reading processes:"); + //! \ogs_file_param{prj__processes__process} for (auto process_config : processes_config.getConfSubtreeList("process")) { // process type must be specified. + //! \ogs_file_param{process__type} process_config.peekConfParam<std::string>("type"); process_config.ignoreConfParam("name"); _process_configs.push_back(std::move(process_config)); @@ -311,6 +322,7 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config) void ProjectData::parseOutput(BaseLib::ConfigTree const& output_config, std::string const& output_directory) { + //! \ogs_file_param{prj__output__type} output_config.checkConfParam("type", "VTK"); DBUG("Parse output configuration:"); @@ -335,8 +347,10 @@ void ProjectData::parseLinearSolvers(BaseLib::ConfigTree const& config) { DBUG("Reading linear solver configuration."); + //! \ogs_file_param{prj__linear_solvers__linear_solver} for (auto conf : config.getConfSubtreeList("linear_solver")) { + //! \ogs_file_param{prj__linear_solvers__linear_solver__name} auto const name = conf.getConfParam<std::string>("name"); BaseLib::insertIfKeyUniqueElseError(_linear_solvers, name, @@ -350,12 +364,15 @@ void ProjectData::parseNonlinearSolvers(BaseLib::ConfigTree const& config) { DBUG("Reading linear solver configuration."); + //! \ogs_file_param{prj__nonlinear_solvers__nonlinear_solver} for (auto conf : config.getConfSubtreeList("nonlinear_solver")) { + //! \ogs_file_param{prj__nonlinear_solvers__nonlinear_solver__linear_solver} auto const ls_name = conf.getConfParam<std::string>("linear_solver"); auto& linear_solver = BaseLib::getOrError(_linear_solvers, ls_name, "A linear solver with the given name does not exist."); + //! \ogs_file_param{prj__nonlinear_solvers__nonlinear_solver__name} auto const name = conf.getConfParam<std::string>("name"); BaseLib::insertIfKeyUniqueElseError(_nonlinear_solvers, name, @@ -368,7 +385,9 @@ void ProjectData::parseNonlinearSolvers(BaseLib::ConfigTree const& config) static std::unique_ptr<MathLib::PiecewiseLinearInterpolation> createPiecewiseLinearInterpolation(BaseLib::ConfigTree const& config) { + //! \ogs_file_param{prj__curves__curve__coords} auto coords = config.getConfParam<std::vector<double>>("coords"); + //! \ogs_file_param{prj__curves__curve__values} auto values = config.getConfParam<std::vector<double>>("values"); if (coords.empty() || values.empty()) { @@ -393,8 +412,10 @@ void ProjectData::parseCurves( DBUG("Reading curves configuration."); + //! \ogs_file_param{prj__curves__curve} for (auto conf : config->getConfSubtreeList("curve")) { + //! \ogs_file_param{prj__curves__curve__name} auto const name = conf.getConfParam<std::string>("name"); BaseLib::insertIfKeyUniqueElseError( _curves, diff --git a/Applications/ApplicationsLib/UncoupledProcessesTimeLoop.h b/Applications/ApplicationsLib/UncoupledProcessesTimeLoop.h index 0fd8e68dd137a407e194e2da9e9d2a4e7c52ccda..0a14ed9db546ac161537f3779cfb789be0386256 100644 --- a/Applications/ApplicationsLib/UncoupledProcessesTimeLoop.h +++ b/Applications/ApplicationsLib/UncoupledProcessesTimeLoop.h @@ -231,6 +231,7 @@ template<typename Matrix, typename Vector> std::unique_ptr<UncoupledProcessesTimeLoop<Matrix, Vector> > createUncoupledProcessesTimeLoop(BaseLib::ConfigTree const& conf) { + //! \ogs_file_param{prj__time_stepping__type} auto const type = conf.peekConfParam<std::string>("type"); std::unique_ptr<NumLib::ITimeStepAlgorithm> timestepper; diff --git a/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp index c093eb6171e31afc77a50286ae93fed0ffefa39d..6c476c09d98132b43f4f996add767f9be952e85d 100644 --- a/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp @@ -57,6 +57,7 @@ bool BoostXmlGmlInterface::readFile(const std::string &fname) std::unique_ptr<MapNameId> ply_names{new MapNameId}; std::unique_ptr<MapNameId> sfc_names{new MapNameId}; + //! \ogs_file_param{gml__name} auto geo_name = doc->getConfParam<std::string>("name"); if (geo_name.empty()) { @@ -64,12 +65,14 @@ bool BoostXmlGmlInterface::readFile(const std::string &fname) std::abort(); } + //! \ogs_file_param{gml__points} for (auto st : doc->getConfSubtreeList("points")) { readPoints(st, *points, *pnt_names); _geo_objects.addPointVec(std::move(points), geo_name, pnt_names.release()); } + //! \ogs_file_param{gml__polylines} for (auto st : doc->getConfSubtreeList("polylines")) { readPolylines(st, @@ -79,6 +82,7 @@ bool BoostXmlGmlInterface::readFile(const std::string &fname) *ply_names); } + //! \ogs_file_param{gml__surfaces} for (auto st : doc->getConfSubtreeList("surfaces")) { readSurfaces(st, @@ -103,11 +107,16 @@ void BoostXmlGmlInterface::readPoints(BaseLib::ConfigTree const& pointsRoot, std::vector<GeoLib::Point*>& points, std::map<std::string, std::size_t>& pnt_names ) { + //! \ogs_file_param{gml__points__point} for (auto const pt : pointsRoot.getConfParamList("point")) { + //! \ogs_file_attr{gml__points__point__id} auto const p_id = pt.getConfAttribute<std::size_t>("id"); + //! \ogs_file_attr{gml__points__point__x} auto const p_x = pt.getConfAttribute<double>("x"); + //! \ogs_file_attr{gml__points__point__y} auto const p_y = pt.getConfAttribute<double>("y"); + //! \ogs_file_attr{gml__points__point__z} auto const p_z = pt.getConfAttribute<double>("z"); auto const p_size = points.size(); @@ -115,6 +124,7 @@ void BoostXmlGmlInterface::readPoints(BaseLib::ConfigTree const& pointsRoot, "The point id is not unique."); points.push_back(new GeoLib::Point(p_x, p_y, p_z, p_id)); + //! \ogs_file_attr{gml__points__point__name} if (auto const p_name = pt.getConfAttributeOptional<std::string>("name")) { if (p_name->empty()) { @@ -135,8 +145,10 @@ void BoostXmlGmlInterface::readPolylines( std::vector<std::size_t> const& pnt_id_map, std::map<std::string, std::size_t>& ply_names) { + //! \ogs_file_param{gml__polylines__polyline} for (auto const pl : polylinesRoot.getConfSubtreeList("polyline")) { + //! \ogs_file_attr{gml__polylines__polyline__id} auto const id = pl.getConfAttribute<std::size_t>("id"); // The id is not used but must be present in the GML file. // That's why pl.ignore...() cannot be used. @@ -144,6 +156,7 @@ void BoostXmlGmlInterface::readPolylines( polylines.push_back(new GeoLib::Polyline(points)); + //! \ogs_file_attr{gml__polylines__polyline__name} if (auto const p_name = pl.getConfAttributeOptional<std::string>("name")) { if (p_name->empty()) { @@ -154,6 +167,7 @@ void BoostXmlGmlInterface::readPolylines( BaseLib::insertIfKeyUniqueElseError(ply_names, *p_name, polylines.size()-1, "The polyline name is not unique."); + //! \ogs_file_param{gml__polylines__polyline__pnt} for (auto const pt : pl.getConfParamList<std::size_t>("pnt")) { polylines.back()->addPoint(pnt_id_map[_idx_map[pt]]); } @@ -173,14 +187,17 @@ void BoostXmlGmlInterface::readSurfaces( const std::vector<std::size_t>& pnt_id_map, std::map<std::string, std::size_t>& sfc_names) { + //! \ogs_file_param{gml__surfaces__surface} for (auto const& sfc : surfacesRoot.getConfSubtreeList("surface")) { + //! \ogs_file_attr{gml__surfaces__surface__id} auto const id = sfc.getConfAttribute<std::size_t>("id"); // The id is not used but must be present in the GML file. // That's why sfc.ignore...() cannot be used. (void) id; surfaces.push_back(new GeoLib::Surface(points)); + //! \ogs_file_attr{gml__surfaces__surface__name} if (auto const s_name = sfc.getConfAttributeOptional<std::string>("name")) { if (s_name->empty()) { @@ -191,9 +208,13 @@ void BoostXmlGmlInterface::readSurfaces( BaseLib::insertIfKeyUniqueElseError(sfc_names, *s_name, surfaces.size()-1, "The surface name is not unique."); + //! \ogs_file_param{gml__surfaces__surface__element} for (auto const& element : sfc.getConfParamList("element")) { + //! \ogs_file_attr{gml__surfaces__surface__element__p1} auto const p1_attr = element.getConfAttribute<std::size_t>("p1"); + //! \ogs_file_attr{gml__surfaces__surface__element__p2} auto const p2_attr = element.getConfAttribute<std::size_t>("p2"); + //! \ogs_file_attr{gml__surfaces__surface__element__p3} auto const p3_attr = element.getConfAttribute<std::size_t>("p3"); auto const p1 = pnt_id_map[_idx_map[p1_attr]]; diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp index 2cada257341543c6d3a3d56ca0a13bc19abf6a4a..e519610b7dcdd1277e263a9caad823d060810ab1 100644 --- a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp +++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp @@ -143,19 +143,24 @@ EigenLinearSolver::~EigenLinearSolver() = default; void EigenLinearSolver::setOption(BaseLib::ConfigTree const& option) { ignoreOtherLinearSolvers(option, "eigen"); + //! \ogs_file_param{linear_solver__eigen} auto const ptSolver = option.getConfSubtreeOptional("eigen"); if (!ptSolver) return; + //! \ogs_file_param{linear_solver__eigen__solver_type} if (auto solver_type = ptSolver->getConfParamOptional<std::string>("solver_type")) { _option.solver_type = _option.getSolverType(*solver_type); } + //! \ogs_file_param{linear_solver__eigen__precon_type} if (auto precon_type = ptSolver->getConfParamOptional<std::string>("precon_type")) { _option.precon_type = _option.getPreconType(*precon_type); } + //! \ogs_file_param{linear_solver__eigen__error_tolerance} if (auto error_tolerance = ptSolver->getConfParamOptional<double>("error_tolerance")) { _option.error_tolerance = *error_tolerance; } + //! \ogs_file_param{linear_solver__eigen__max_iteration_step} if (auto max_iteration_step = ptSolver->getConfParamOptional<int>("max_iteration_step")) { _option.max_iterations = *max_iteration_step; } diff --git a/MathLib/LinAlg/Lis/LisOption.h b/MathLib/LinAlg/Lis/LisOption.h index 37e3822f133b7f4f8685f3a62debf308c6f39cb6..e2f6c5309a11d604175703182cf7f7816377f563 100644 --- a/MathLib/LinAlg/Lis/LisOption.h +++ b/MathLib/LinAlg/Lis/LisOption.h @@ -44,6 +44,7 @@ struct LisOption { if (options) { ignoreOtherLinearSolvers(*options, "lis"); + //! \ogs_file_param{linear_solver__lis} if (auto s = options->getConfParamOptional<std::string>("lis")) { if (!s->empty()) { _option_string += " " + *s; diff --git a/MathLib/LinAlg/PETSc/PETScLinearSolver.cpp b/MathLib/LinAlg/PETSc/PETScLinearSolver.cpp index 9a93ddd4859728fe77f823f470f6a19e9c966ac1..bf9dd80db7f650ba1208c28265c7f0df31bc9e09 100644 --- a/MathLib/LinAlg/PETSc/PETScLinearSolver.cpp +++ b/MathLib/LinAlg/PETSc/PETScLinearSolver.cpp @@ -33,13 +33,16 @@ PETScLinearSolver::PETScLinearSolver(const std::string /*prefix*/, if (option) { ignoreOtherLinearSolvers(*option, "petsc"); + //! \ogs_file_param{linear_solver__petsc} if (auto const subtree = option->getConfSubtreeOptional("petsc")) { - if (auto const parameters = subtree->getConfParamOptional<std::string>( - "parameters")) { + if (auto const parameters = + //! \ogs_file_param{linear_solver__petsc__parameters} + subtree->getConfParamOptional<std::string>("parameters")) { petsc_options = *parameters; } + //! \ogs_file_param{linear_solver__petsc__prefix} if (auto const pre = subtree->getConfParamOptional<std::string>("prefix")) { if (!pre->empty()) prefix = *pre + "_"; diff --git a/MathLib/ODE/CVodeSolver.cpp b/MathLib/ODE/CVodeSolver.cpp index 23279fe46f10f7c633a31b4443cea7f00b8d6d9a..97112d43b16a1923f1e58b6e1aa2112182985bcf 100644 --- a/MathLib/ODE/CVodeSolver.cpp +++ b/MathLib/ODE/CVodeSolver.cpp @@ -133,7 +133,8 @@ CVodeSolverImpl::CVodeSolverImpl(const BaseLib::ConfigTree& config, const unsigned num_equations) { if (auto const param = - config.getConfParamOptional<std::string>("linear_multistep_method")) + //! \ogs_file_param{ode_solver__CVODE__linear_multistep_method} + config.getConfParamOptional<std::string>("linear_multistep_method")) { DBUG("setting linear multistep method (config: %s)", param->c_str()); @@ -152,8 +153,9 @@ CVodeSolverImpl::CVodeSolverImpl(const BaseLib::ConfigTree& config, } } - if (auto const param = config.getConfParamOptional<std::string>( - "nonlinear_solver_iteration")) + if (auto const param = + //! \ogs_file_param{ode_solver__CVODE__nonlinear_solver_iteration} + config.getConfParamOptional<std::string>("nonlinear_solver_iteration")) { DBUG("setting nonlinear solver iteration (config: %s)", param->c_str()); diff --git a/NumLib/ODESolver/NonlinearSolver-impl.h b/NumLib/ODESolver/NonlinearSolver-impl.h index 1d356d06e89c9dd8f43bc1abfed7f8da3e83b8ba..6edfa7f3295ca5508f94c8bdd40687823fdcbc5b 100644 --- a/NumLib/ODESolver/NonlinearSolver-impl.h +++ b/NumLib/ODESolver/NonlinearSolver-impl.h @@ -262,8 +262,11 @@ createNonlinearSolver(MathLib::LinearSolver<Matrix, Vector>& linear_solver, { using AbstractNLS = NonlinearSolverBase<Matrix, Vector>; + //! \ogs_file_param{prj__nonlinear_solvers__nonlinear_solver__type} auto const type = config.getConfParam<std::string>("type"); + //! \ogs_file_param{prj__nonlinear_solvers__nonlinear_solver__tol} auto const tol = config.getConfParam<double>("tol"); + //! \ogs_file_param{prj__nonlinear_solvers__nonlinear_solver__max_iter} auto const max_iter = config.getConfParam<unsigned>("max_iter"); if (type == "Picard") diff --git a/NumLib/ODESolver/TimeDiscretizationBuilder.h b/NumLib/ODESolver/TimeDiscretizationBuilder.h index 5e8d5a8751801992c83dfdc591073389615673a7..7acda0aea8b4e24e33418de0e3699a36748048df 100644 --- a/NumLib/ODESolver/TimeDiscretizationBuilder.h +++ b/NumLib/ODESolver/TimeDiscretizationBuilder.h @@ -24,6 +24,7 @@ createTimeDiscretization(BaseLib::ConfigTree const& config) { using T = std::unique_ptr<TimeDiscretization<Vector> >; + //! \ogs_file_param{process__time_discretization__type} auto const type = config.getConfParam<std::string>("type"); if (type == "BackwardEuler") { @@ -33,10 +34,12 @@ createTimeDiscretization(BaseLib::ConfigTree const& config) using ConcreteTD = ForwardEuler<Vector>; return T(new ConcreteTD); } else if (type == "CrankNicolson") { + //! \ogs_file_param{process__time_discretization__CrankNicolson__theta} auto const theta = config.getConfParam<double>("theta"); using ConcreteTD = CrankNicolson<Vector>; return T(new ConcreteTD(theta)); } else if (type == "BackwardDifferentiationFormula") { + //! \ogs_file_param{process__time_discretization__BackwardDifferentiationFormula__order} auto const order = config.getConfParam<unsigned>("order"); using ConcreteTD = BackwardDifferentiationFormula<Vector>; return T(new ConcreteTD(order)); diff --git a/NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp b/NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp index ad17ce94e598ee3ba4c1e56e13a43ef54b330cb2..ea4e0e61eb4d0cad5b17a8e4e5d1912ada19b8e1 100644 --- a/NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp +++ b/NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp @@ -35,10 +35,14 @@ FixedTimeStepping::FixedTimeStepping(double t0, double tn, double dt) std::unique_ptr<ITimeStepAlgorithm> FixedTimeStepping::newInstance(BaseLib::ConfigTree const& config) { + //! \ogs_file_param{prj__time_stepping__type} config.checkConfParam("type", "FixedTimeStepping"); + //! \ogs_file_param{prj__time_stepping__FixedTimeStepping__t_initial} auto const t_initial = config.getConfParam<double>("t_initial"); + //! \ogs_file_param{prj__time_stepping__FixedTimeStepping__t_end} auto const t_end = config.getConfParam<double>("t_end"); + //! \ogs_file_param{prj__time_stepping__FixedTimeStepping__timesteps} auto const delta_ts = config.getConfSubtree("timesteps"); std::vector<double> timesteps; @@ -46,6 +50,7 @@ FixedTimeStepping::newInstance(BaseLib::ConfigTree const& config) double delta_t = 0.0; // TODO: consider adding call "listNonEmpty" to config tree + //! \ogs_file_param{prj__time_stepping__FixedTimeStepping__timesteps__pair} auto const range = delta_ts.getConfSubtreeList("pair"); if (range.begin() == range.end()) { ERR("no timesteps have been given"); @@ -53,7 +58,9 @@ FixedTimeStepping::newInstance(BaseLib::ConfigTree const& config) } for (auto const pair : range) { + //! \ogs_file_param{prj__time_stepping__FixedTimeStepping__timesteps__pair__repeat} auto const repeat = pair.getConfParam<std::size_t>("repeat"); + //! \ogs_file_param{prj__time_stepping__FixedTimeStepping__timesteps__pair__delta_t} delta_t = pair.getConfParam<double>("delta_t"); if (repeat == 0) { diff --git a/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.h b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.h index 6ca68d79db632f8f641889edf58fddb311f32831..92f9d83c756df436a98b63d81c8f47911d32e97a 100644 --- a/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.h +++ b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.h @@ -154,18 +154,24 @@ createGroundwaterFlowProcess( std::vector<std::unique_ptr<ParameterBase>> const& parameters, BaseLib::ConfigTree const& config) { + //! \ogs_file_param{process__type} config.checkConfParam("type", "GROUNDWATER_FLOW"); DBUG("Create GroundwaterFlowProcess."); // Process variable. - auto process_variables = - findProcessVariables(variables, config, { "process_variable" }); + auto process_variables = findProcessVariables(variables, config, { + //! \ogs_file_param_special{process__GROUNDWATER_FLOW__process_variables__process_variable} + "process_variable" + }); // Hydraulic conductivity parameter. auto& hydraulic_conductivity = findParameter<double, MeshLib::Element const&>( - config, "hydraulic_conductivity", parameters); + config, + //! \ogs_file_param_special{process__GROUNDWATER_FLOW__hydraulic_conductivity} + "hydraulic_conductivity", + parameters); DBUG("Use \'%s\' as hydraulic conductivity parameter.", hydraulic_conductivity.name.c_str()); @@ -174,11 +180,21 @@ createGroundwaterFlowProcess( hydraulic_conductivity }; - SecondaryVariableCollection<typename GlobalSetup::VectorType> - secondary_variables{config.getConfSubtreeOptional("secondary_variables"), - { "darcy_velocity_x", "darcy_velocity_y", "darcy_velocity_z" }}; + SecondaryVariableCollection<typename GlobalSetup::VectorType> secondary_variables { + //! \ogs_file_param{process__secondary_variables} + config.getConfSubtreeOptional("secondary_variables"), + { + //! \ogs_file_param_special{process__GROUNDWATER_FLOW__secondary_variables__darcy_velocity_x} + "darcy_velocity_x", + //! \ogs_file_param_special{process__GROUNDWATER_FLOW__secondary_variables__darcy_velocity_y} + "darcy_velocity_y", + //! \ogs_file_param_special{process__GROUNDWATER_FLOW__secondary_variables__darcy_velocity_z} + "darcy_velocity_z" + } + }; ProcessOutput<typename GlobalSetup::VectorType> + //! \ogs_file_param{process__output} process_output{config.getConfSubtree("output"), process_variables, secondary_variables}; diff --git a/ProcessLib/InitialCondition.cpp b/ProcessLib/InitialCondition.cpp index 3ea7de869081caa001f9f3ab67b082f497df6ffa..d3abd14fb7cdd9acb701adb62245f7b8499e0611 100644 --- a/ProcessLib/InitialCondition.cpp +++ b/ProcessLib/InitialCondition.cpp @@ -23,8 +23,10 @@ namespace ProcessLib std::unique_ptr<InitialCondition> createUniformInitialCondition( BaseLib::ConfigTree const& config, int const /*n_components*/) { + //! \ogs_file_param{initial_condition__type} config.checkConfParam("type", "Uniform"); + //! \ogs_file_param{initial_condition__Uniform__value} auto value = config.getConfParam<double>("value"); DBUG("Using value %g", value); @@ -37,6 +39,10 @@ std::unique_ptr<InitialCondition> createMeshPropertyInitialCondition( MeshLib::Mesh const& mesh, int const n_components) { + //! \ogs_file_param{initial_condition__type} + config.checkConfParam("type", "MeshProperty"); + + //! \ogs_file_param{initial_condition__MeshProperty__field_name} auto field_name = config.getConfParam<std::string>("field_name"); DBUG("Using field_name %s", field_name.c_str()); diff --git a/ProcessLib/NeumannBcConfig.h b/ProcessLib/NeumannBcConfig.h index 1664b26fb0f23e3b20c82fa12f9e7cbaf2b4ed9e..fa5660e85c03e256387f9b31b06ac4aaf478e2b2 100644 --- a/ProcessLib/NeumannBcConfig.h +++ b/ProcessLib/NeumannBcConfig.h @@ -48,8 +48,10 @@ public: : BoundaryConditionConfig(geometry) { DBUG("Constructing NeumannBcConfig from config."); + //! \ogs_file_param{boundary_condition__type} config.checkConfParam("type", "UniformNeumann"); + //! \ogs_file_param{boundary_condition__UniformNeumann__value} double const value = config.getConfParam<double>("value"); DBUG("Using value %g", value); diff --git a/ProcessLib/Output.cpp b/ProcessLib/Output.cpp index 0646f2bd9a5fdd07b19d4473ed0fcd28f33a3744..9fb85ad84f15f8f061bfc2363f9c482d1667df0e 100644 --- a/ProcessLib/Output.cpp +++ b/ProcessLib/Output.cpp @@ -50,13 +50,18 @@ newInstance(const BaseLib::ConfigTree &config, std::string const& output_directo { std::unique_ptr<Output> out{ new Output{ BaseLib::joinPaths(output_directory, - config.getConfParam<std::string>("prefix"))}}; + //! \ogs_file_param{prj__output__prefix} + config.getConfParam<std::string>("prefix"))}}; + //! \ogs_file_param{prj__output__timesteps} if (auto const timesteps = config.getConfSubtreeOptional("timesteps")) { + //! \ogs_file_param{prj__output__timesteps__pair} for (auto pair : timesteps->getConfSubtreeList("pair")) { + //! \ogs_file_param{prj__output__timesteps__pair__repeat} auto repeat = pair.getConfParam<unsigned>("repeat"); + //! \ogs_file_param{prj__output__timesteps__pair__each_steps} auto each_steps = pair.getConfParam<unsigned>("each_steps"); assert(repeat != 0 && each_steps != 0); diff --git a/ProcessLib/Parameter.cpp b/ProcessLib/Parameter.cpp index 45e956acd41a6e5ae1c075ba333c16e6fe8421de..33b937d0a3f7acb2c1cc9a7bf61d8348e6938c44 100644 --- a/ProcessLib/Parameter.cpp +++ b/ProcessLib/Parameter.cpp @@ -19,7 +19,9 @@ namespace ProcessLib std::unique_ptr<ParameterBase> createConstParameter( BaseLib::ConfigTree const& config) { + //! \ogs_file_param{parameter__type} config.checkConfParam("type", "Constant"); + //! \ogs_file_param{parameter__Constant__value} auto value = config.getConfParam<double>("value"); DBUG("Using value %g", value); @@ -29,7 +31,9 @@ std::unique_ptr<ParameterBase> createConstParameter( std::unique_ptr<ParameterBase> createMeshPropertyParameter( BaseLib::ConfigTree const& config, MeshLib::Mesh const& mesh) { + //! \ogs_file_param{parameter__type} config.checkConfParam("type", "MeshProperty"); + //! \ogs_file_param{parameter__MeshProperty__field_name} auto field_name = config.getConfParam<std::string>("field_name"); DBUG("Using field_name %s", field_name.c_str()); diff --git a/ProcessLib/Process.cpp b/ProcessLib/Process.cpp index 4ae6e359f6c89cd055cc1cc71088cac743e45c5e..4a1c20e50221d85abed3f302e8064b6f76ba9cd5 100644 --- a/ProcessLib/Process.cpp +++ b/ProcessLib/Process.cpp @@ -16,6 +16,7 @@ ProcessVariable& findProcessVariable( BaseLib::ConfigTree const& pv_config, std::string const& tag) { // Find process variable name in process config. + //! \ogs_file_special std::string const name = pv_config.getConfParam<std::string>(tag); // Find corresponding variable by name. @@ -49,6 +50,7 @@ findProcessVariables( std::vector<std::reference_wrapper<ProcessVariable>> vars; vars.reserve(tag_names.size()); + //! \ogs_file_param{process__process_variables} auto const pv_conf = process_config.getConfSubtree("process_variables"); for (auto const& tag : tag_names) { diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h index 9b97d21e0b8a012a14ae44e787323afd17dc7e40..78a66cf118f7694bc492d71d7d82d131d5247bd5 100644 --- a/ProcessLib/Process.h +++ b/ProcessLib/Process.h @@ -372,6 +372,7 @@ Parameter<ParameterArgs...>& findParameter( std::vector<std::unique_ptr<ParameterBase>> const& parameters) { // Find parameter name in process config. + //! \ogs_file_special auto const name = process_config.getConfParam<std::string>(tag); // Find corresponding parameter by name. diff --git a/ProcessLib/ProcessOutput.h b/ProcessLib/ProcessOutput.h index 9757f6b6e487675d5c687594a6e8e5a837a3f5b1..03e7279899a1605d67aa32616aae1cff11451364 100644 --- a/ProcessLib/ProcessOutput.h +++ b/ProcessLib/ProcessOutput.h @@ -27,8 +27,10 @@ struct ProcessOutput final process_variables, SecondaryVariableCollection<GlobalVector> const& secondary_variables) { + //! \ogs_file_param{process__output__variables} auto const out_vars = output_config.getConfSubtree("variables"); + //! \ogs_file_param{process__output__variables__variable} for (auto out_var : out_vars.getConfParamList<std::string>("variable")) { if (output_variables.find(out_var) != output_variables.cend()) @@ -64,6 +66,7 @@ struct ProcessOutput final // debug output if (auto const param = + //! \ogs_file_param{process__output__output_iteration_results} output_config.getConfParamOptional<bool>("output_iteration_results")) { DBUG("output_iteration_results: %s", (*param) ? "true" : "false"); diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp index 953f2800453017c8948acd876a67a5f849b6d927..d3072e65be68f7fdf6c941dc9323f3c1c01a1ce5 100644 --- a/ProcessLib/ProcessVariable.cpp +++ b/ProcessLib/ProcessVariable.cpp @@ -21,15 +21,20 @@ namespace ProcessLib ProcessVariable::ProcessVariable(BaseLib::ConfigTree const& config, MeshLib::Mesh& mesh, GeoLib::GEOObjects const& geometries) - : _name(config.getConfParam<std::string>("name")), - _mesh(mesh), - _n_components(config.getConfParam<int>("components")) + : + //! \ogs_file_param{prj__process_variables__process_variable__name} + _name(config.getConfParam<std::string>("name")), + _mesh(mesh), + //! \ogs_file_param{prj__process_variables__process_variable__components} + _n_components(config.getConfParam<int>("components")) { DBUG("Constructing process variable %s", this->_name.c_str()); // Initial condition + //! \ogs_file_param{prj__process_variables__process_variable__initial_condition} if (auto ic_config = config.getConfSubtreeOptional("initial_condition")) { + //! \ogs_file_param{initial_condition__type} auto const type = ic_config->peekConfParam<std::string>("type"); if (type == "Uniform") { @@ -52,14 +57,18 @@ ProcessVariable::ProcessVariable(BaseLib::ConfigTree const& config, } // Boundary conditions + //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions} if (auto bcs_config = config.getConfSubtreeOptional("boundary_conditions")) { - for (auto bc_config - : bcs_config->getConfSubtreeList("boundary_condition")) + for (auto bc_config : + //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition} + bcs_config->getConfSubtreeList("boundary_condition")) { auto const geometrical_set_name = + //! \ogs_file_param{boundary_condition__geometrical_set} bc_config.getConfParam<std::string>("geometrical_set"); auto const geometry_name = + //! \ogs_file_param{boundary_condition__geometry} bc_config.getConfParam<std::string>("geometry"); GeoLib::GeoObject const* const geometry = @@ -69,6 +78,7 @@ ProcessVariable::ProcessVariable(BaseLib::ConfigTree const& config, GeoLib::convertGeoTypeToString(geometry->getGeoType()).c_str()); // Construct type dependent boundary condition + //! \ogs_file_param{boundary_condition__type} auto const type = bc_config.peekConfParam<std::string>("type"); if (type == "UniformDirichlet") diff --git a/ProcessLib/SecondaryVariable.h b/ProcessLib/SecondaryVariable.h index 9983763728d8d3d491c3278e45b60925f9d36279..6615eec225dd81c204f4f998bef3ebd66642135e 100644 --- a/ProcessLib/SecondaryVariable.h +++ b/ProcessLib/SecondaryVariable.h @@ -115,6 +115,7 @@ public: // read which variables are defined in the config for (auto const& tag_name : tag_names) { + //! \ogs_file_special if (auto var_name = config->getConfParamOptional<std::string>(tag_name)) { // TODO check primary vars, too diff --git a/ProcessLib/UniformDirichletBoundaryCondition.h b/ProcessLib/UniformDirichletBoundaryCondition.h index f614c40ca426eebfbe025429061d4a83302e7bda..9c5d91308beb38477a15c64963b15cd5b6500bf3 100644 --- a/ProcessLib/UniformDirichletBoundaryCondition.h +++ b/ProcessLib/UniformDirichletBoundaryCondition.h @@ -42,8 +42,10 @@ public: : _geometry(geometry) { DBUG("Constructing UniformDirichletBoundaryCondition from config."); + //! \ogs_file_param{boundary_condition__type} config.checkConfParam("type", "UniformDirichlet"); + //! \ogs_file_param{boundary_condition__UniformDirichlet__value} _value = config.getConfParam<double>("value"); DBUG("Using value %g", _value); }