diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt index 0bbbf41a4ed883532193bc6c7312a1d8ce0b362d..462610a1eafb98dc707c07cdd00abd2855eab413 100644 --- a/Applications/CLI/CMakeLists.txt +++ b/Applications/CLI/CMakeLists.txt @@ -34,8 +34,7 @@ if(OGS_USE_PYTHON) # this is up to you). TODO: Enable further compiler/linker flags. target_link_libraries( ogs_embedded_python PUBLIC pybind11::embed - PRIVATE ProcessLibBoundaryConditionPythonModule - ProcessLibSourceTermPythonModule + PRIVATE ProcessLibBoundaryConditionAndSourceTermPythonModule ) target_compile_definitions( ogs_embedded_python diff --git a/Applications/CLI/ogs_embedded_python.cpp b/Applications/CLI/ogs_embedded_python.cpp index e41db52527d4bc0eed47d8e97f5732bbb85bc90a..604466d5f02af6aef5aedfc1795e122a75f7e7b9 100644 --- a/Applications/CLI/ogs_embedded_python.cpp +++ b/Applications/CLI/ogs_embedded_python.cpp @@ -12,9 +12,9 @@ #include <pybind11/embed.h> #include "BaseLib/Logging.h" -#include "ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionModule.h" -#include "ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionModule.h" -#include "ProcessLib/SourceTerms/Python/PythonSourceTermModule.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryConditionModule.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionModule.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermModule.h" PYBIND11_EMBEDDED_MODULE(OpenGeoSys, m) { diff --git a/ProcessLib/BoundaryCondition/BoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/BoundaryCondition.h similarity index 98% rename from ProcessLib/BoundaryCondition/BoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/BoundaryCondition.h index 3b65d2d9eaa3c28d0195e69f0e7b0a4a9d715f61..488b5d3d64ece2f2c0e88340072ac908b602027a 100644 --- a/ProcessLib/BoundaryCondition/BoundaryCondition.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/BoundaryCondition.h @@ -22,7 +22,7 @@ namespace NumLib class LocalToGlobalIndexMap; template <typename> struct IndexValueVector; -} +} // namespace NumLib namespace ParameterLib { struct ParameterBase; diff --git a/ProcessLib/BoundaryCondition/BoundaryConditionCollection.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/BoundaryConditionCollection.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/BoundaryConditionCollection.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/BoundaryConditionCollection.cpp diff --git a/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h b/ProcessLib/BoundaryConditionAndSourceTerm/BoundaryConditionCollection.h similarity index 96% rename from ProcessLib/BoundaryCondition/BoundaryConditionCollection.h rename to ProcessLib/BoundaryConditionAndSourceTerm/BoundaryConditionCollection.h index 06e9a425a8e828d8aca6aa927bbfc26604e39083..3a28d9eb58ba6cacc8ff35848f5eb4ca6c5637c8 100644 --- a/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/BoundaryConditionCollection.h @@ -10,11 +10,10 @@ #pragma once +#include "BoundaryCondition.h" #include "NumLib/IndexValueVector.h" #include "ProcessLib/ProcessVariable.h" -#include "BoundaryCondition.h" - namespace ProcessLib { class BoundaryConditionCollection final @@ -35,7 +34,8 @@ public: getKnownSolutions(double const t, GlobalVector const& x) const { auto const n_bcs = _boundary_conditions.size(); - for (std::size_t i=0; i<n_bcs; ++i) { + for (std::size_t i = 0; i < n_bcs; ++i) + { auto const& bc = *_boundary_conditions[i]; auto& dirichlet_storage = _dirichlet_bcs[i]; bc.getEssentialBCValues(t, x, dirichlet_storage); @@ -73,7 +73,8 @@ public: } private: - mutable std::vector<NumLib::IndexValueVector<GlobalIndexType>> _dirichlet_bcs; + mutable std::vector<NumLib::IndexValueVector<GlobalIndexType>> + _dirichlet_bcs; std::vector<std::unique_ptr<BoundaryCondition>> _boundary_conditions; std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& _parameters; diff --git a/ProcessLib/BoundaryCondition/BoundaryConditionConfig.h b/ProcessLib/BoundaryConditionAndSourceTerm/BoundaryConditionConfig.h similarity index 100% rename from ProcessLib/BoundaryCondition/BoundaryConditionConfig.h rename to ProcessLib/BoundaryConditionAndSourceTerm/BoundaryConditionConfig.h diff --git a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/ConstraintDirichletBoundaryCondition.cpp similarity index 89% rename from ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/ConstraintDirichletBoundaryCondition.cpp index 8f18986a8a928cdd538eb546dba30cc2b78fe1e0..d6ab011c9d3638c735c401ee7bdfee74769bedb8 100644 --- a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp +++ b/ProcessLib/BoundaryConditionAndSourceTerm/ConstraintDirichletBoundaryCondition.cpp @@ -17,7 +17,7 @@ #include "MeshLib/MeshSearch/NodeSearch.h" // for getUniqueNodes #include "MeshLib/Node.h" #include "ParameterLib/Utils.h" -#include "ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/CreateLocalAssemblers.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Utils/CreateLocalAssemblers.h" namespace ProcessLib { @@ -78,8 +78,9 @@ ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition( "bulk_node_ids", MeshLib::MeshItemType::Node, 1); auto const& bulk_nodes = bulk_mesh.getNodes(); - auto get_bulk_element_face_id = [&](auto const bulk_element_id, - MeshLib::Element const* bc_elem) { + auto get_bulk_element_face_id = + [&](auto const bulk_element_id, MeshLib::Element const* bc_elem) + { auto const* bulk_elem = _bulk_mesh.getElement(bulk_element_id); std::array<MeshLib::Node*, 3> nodes{ {bulk_nodes[(*bulk_node_ids)[bc_elem->getNode(0)->getID()]], @@ -89,18 +90,20 @@ ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition( }; _bulk_ids.reserve(bc_elements.size()); - std::transform(begin(bc_elements), end(bc_elements), - std::back_inserter(_bulk_ids), [&](auto const* bc_element) { - auto const bulk_element_id = - (*bulk_element_ids)[bc_element->getID()]; - return std::make_pair(bulk_element_id, - get_bulk_element_face_id( - bulk_element_id, bc_element)); - }); + std::transform( + begin(bc_elements), end(bc_elements), std::back_inserter(_bulk_ids), + [&](auto const* bc_element) + { + auto const bulk_element_id = + (*bulk_element_ids)[bc_element->getID()]; + return std::make_pair( + bulk_element_id, + get_bulk_element_face_id(bulk_element_id, bc_element)); + }); const int shape_function_order = 1; - BoundaryConditionOrSourceTerm::createLocalAssemblers< + BoundaryConditionAndSourceTerm::createLocalAssemblers< ConstraintDirichletBoundaryConditionLocalAssembler>( _bulk_mesh.getDimension(), _bc_mesh.getElements(), *_dof_table_boundary, shape_function_order, _local_assemblers, _bc_mesh.isAxiallySymmetric(), @@ -121,9 +124,8 @@ void ConstraintDirichletBoundaryCondition::preTimestep( x, t, [this](std::size_t const element_id, MathLib::Point3d const& pnt, double const t, - std::vector<GlobalVector*> const& x) { - return _getFlux(element_id, pnt, t, x); - }); + std::vector<GlobalVector*> const& x) + { return _getFlux(element_id, pnt, t, x); }); } } @@ -138,7 +140,8 @@ void ConstraintDirichletBoundaryCondition::getEssentialBCValues( std::vector<std::pair<GlobalIndexType, double>> tmp_bc_values; - auto isFlux = [&](const std::size_t element_id) { + auto isFlux = [&](const std::size_t element_id) + { return _lower ? _flux_values[element_id] < _constraint_threshold : _flux_values[element_id] > _constraint_threshold; }; @@ -193,9 +196,8 @@ void ConstraintDirichletBoundaryCondition::getEssentialBCValues( // first: sort the (node id, value) pairs according to the node id std::sort(tmp_bc_values.begin(), tmp_bc_values.end(), [](std::pair<GlobalIndexType, double> const& a, - std::pair<GlobalIndexType, double> const& b) { - return a.first < b.first; - }); + std::pair<GlobalIndexType, double> const& b) + { return a.first < b.first; }); // second: average the values over equal node id ranges unsigned cnt = 1; GlobalIndexType current_id = tmp_bc_values.begin()->first; @@ -259,11 +261,10 @@ createConstraintDirichletBoundaryCondition( const int process_id = 0; auto process_variables = constraining_process.getProcessVariables(process_id); - auto constraining_pv = std::find_if( - process_variables.cbegin(), process_variables.cend(), - [&constraining_process_variable](ProcessVariable const& pv) { - return pv.getName() == constraining_process_variable; - }); + auto constraining_pv = + std::find_if(process_variables.cbegin(), process_variables.cend(), + [&constraining_process_variable](ProcessVariable const& pv) + { return pv.getName() == constraining_process_variable; }); if (constraining_pv == std::end(process_variables)) { auto const& constraining_process_variable_name = @@ -320,9 +321,8 @@ createConstraintDirichletBoundaryCondition( lower, [&constraining_process](std::size_t const element_id, MathLib::Point3d const& pnt, double const t, - std::vector<GlobalVector*> const& x) { - return constraining_process.getFlux(element_id, pnt, t, x); - }); + std::vector<GlobalVector*> const& x) + { return constraining_process.getFlux(element_id, pnt, t, x); }); } } // namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/ConstraintDirichletBoundaryCondition.h similarity index 99% rename from ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/ConstraintDirichletBoundaryCondition.h index 1f0cd564321bed64bbea6365298bed2cfa757ebc..d8d0d2e8a4da79911435c83fd8824c3ce168340d 100644 --- a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/ConstraintDirichletBoundaryCondition.h @@ -11,12 +11,11 @@ #pragma once #include "BoundaryCondition.h" +#include "ConstraintDirichletBoundaryConditionLocalAssembler.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" #include "NumLib/IndexValueVector.h" #include "ParameterLib/Parameter.h" -#include "ConstraintDirichletBoundaryConditionLocalAssembler.h" - namespace ProcessLib { /// The ConstraintDirichletBoundaryCondition class describes a Dirichlet-type diff --git a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryConditionAndSourceTerm/ConstraintDirichletBoundaryConditionLocalAssembler.h similarity index 97% rename from ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryConditionLocalAssembler.h rename to ProcessLib/BoundaryConditionAndSourceTerm/ConstraintDirichletBoundaryConditionLocalAssembler.h index 3cdf60405a9a2bb58f63c945a5f1a3a36b5122b5..0d3d8e44e75280cd16fd9bef128fe03d89d36f0e 100644 --- a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryConditionLocalAssembler.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/ConstraintDirichletBoundaryConditionLocalAssembler.h @@ -21,7 +21,6 @@ namespace ProcessLib { - struct IntegrationPointData final { IntegrationPointData(double const& detJ, @@ -72,9 +71,8 @@ public: /// @param bulk_ids Pairs of bulk element ids and bulk element face ids. ConstraintDirichletBoundaryConditionLocalAssembler( MeshLib::Element const& surface_element, - std::size_t /* local_matrix_size */, - bool const is_axially_symmetric, unsigned const integration_order, - MeshLib::Mesh const& bulk_mesh, + std::size_t /* local_matrix_size */, bool const is_axially_symmetric, + unsigned const integration_order, MeshLib::Mesh const& bulk_mesh, std::vector<std::pair<std::size_t, unsigned>> bulk_ids) : _surface_element(surface_element), _integration_method(integration_order), diff --git a/ProcessLib/BoundaryCondition/CreateBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/CreateBoundaryCondition.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/CreateBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateBoundaryCondition.cpp diff --git a/ProcessLib/BoundaryCondition/CreateBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/CreateBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/CreateBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/CreateDirichletBoundaryConditionWithinTimeInterval.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/CreateDirichletBoundaryConditionWithinTimeInterval.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/CreateDirichletBoundaryConditionWithinTimeInterval.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateDirichletBoundaryConditionWithinTimeInterval.cpp diff --git a/ProcessLib/BoundaryCondition/CreateDirichletBoundaryConditionWithinTimeInterval.h b/ProcessLib/BoundaryConditionAndSourceTerm/CreateDirichletBoundaryConditionWithinTimeInterval.h similarity index 100% rename from ProcessLib/BoundaryCondition/CreateDirichletBoundaryConditionWithinTimeInterval.h rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateDirichletBoundaryConditionWithinTimeInterval.h diff --git a/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/CreateNodalSourceTerm.cpp similarity index 100% rename from ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateNodalSourceTerm.cpp diff --git a/ProcessLib/SourceTerms/CreateNodalSourceTerm.h b/ProcessLib/BoundaryConditionAndSourceTerm/CreateNodalSourceTerm.h similarity index 97% rename from ProcessLib/SourceTerms/CreateNodalSourceTerm.h rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateNodalSourceTerm.h index 27c48c120468b2eb28bad483dec77553653cda06..f88f940d8fb2bd7bc2a14bd6f7a66f62beeef0ac 100644 --- a/ProcessLib/SourceTerms/CreateNodalSourceTerm.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/CreateNodalSourceTerm.h @@ -43,4 +43,4 @@ std::unique_ptr<SourceTerm> createNodalSourceTerm( std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters); -} // namespace ProcessLib +} // namespace ProcessLib diff --git a/ProcessLib/SourceTerms/CreateSourceTerm.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.cpp similarity index 100% rename from ProcessLib/SourceTerms/CreateSourceTerm.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.cpp diff --git a/ProcessLib/SourceTerms/CreateSourceTerm.h b/ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.h similarity index 100% rename from ProcessLib/SourceTerms/CreateSourceTerm.h rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.h index 013fe9c95ecfb032943eeb8f1bc63b9aa134af22..b8ca68e3fa153af7bafbf224b0941c2ffe4af6c0 100644 --- a/ProcessLib/SourceTerms/CreateSourceTerm.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.h @@ -10,8 +10,8 @@ #pragma once -#include <vector> #include <memory> +#include <vector> #include "ParameterLib/Parameter.h" diff --git a/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/CreateVolumetricSourceTerm.cpp similarity index 100% rename from ProcessLib/SourceTerms/CreateVolumetricSourceTerm.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateVolumetricSourceTerm.cpp diff --git a/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.h b/ProcessLib/BoundaryConditionAndSourceTerm/CreateVolumetricSourceTerm.h similarity index 97% rename from ProcessLib/SourceTerms/CreateVolumetricSourceTerm.h rename to ProcessLib/BoundaryConditionAndSourceTerm/CreateVolumetricSourceTerm.h index f5a632eea09c781c9795f66eb67dccc4564ee8af..99cf10ac8611da0c53f29dad19bf6cefa4ea9c7a 100644 --- a/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/CreateVolumetricSourceTerm.h @@ -44,4 +44,4 @@ std::unique_ptr<SourceTerm> createVolumetricSourceTerm( std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters, unsigned const integration_order, unsigned const shapefunction_order); -} // namespace ProcessLib +} // namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.cpp similarity index 89% rename from ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.cpp index 2090ec8e7f0b24e5067f9fb589253f4ba8bed1c1..d75678fd330a99fb6795c1f464ad57b54deb6806 100644 --- a/ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.cpp +++ b/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.cpp @@ -60,16 +60,18 @@ void DeactivatedSubdomainDirichlet::getEssentialBCValues( .template getPropertyVector<std::size_t>( "bulk_element_ids", MeshLib::MeshItemType::Cell, 1); - auto is_inactive = [&](MeshLib::Element const* const e) { - return none_of( - begin(*_active_element_ids), end(*_active_element_ids), - [&](auto const id) { return id == bulk_element_ids[e->getID()]; }); + auto is_inactive = [&](MeshLib::Element const* const e) + { + return none_of(begin(*_active_element_ids), end(*_active_element_ids), + [&](auto const id) + { return id == bulk_element_ids[e->getID()]; }); }; std::vector<MeshLib::Node*> inactive_nodes_in_bc_mesh; std::copy_if(begin(_subdomain.inner_nodes), end(_subdomain.inner_nodes), back_inserter(inactive_nodes_in_bc_mesh), - [&](MeshLib::Node* const n) { + [&](MeshLib::Node* const n) + { const auto& connected_elements = n->getElements(); return std::all_of(begin(connected_elements), @@ -80,7 +82,8 @@ void DeactivatedSubdomainDirichlet::getEssentialBCValues( { std::copy_if(begin(_subdomain.outer_nodes), end(_subdomain.outer_nodes), back_inserter(inactive_nodes_in_bc_mesh), - [&](MeshLib::Node* const n) { + [&](MeshLib::Node* const n) + { const auto& connected_elements = n->getElements(); return std::all_of(begin(connected_elements), @@ -89,7 +92,8 @@ void DeactivatedSubdomainDirichlet::getEssentialBCValues( }); } - auto time_interval_contains = [&](double const t) { + auto time_interval_contains = [&](double const t) + { return _time_interval.getSupportMin() <= t && t <= _time_interval.getSupportMax(); }; diff --git a/ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.h b/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.h similarity index 100% rename from ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.h rename to ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.h diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryCondition.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryCondition.cpp diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/DirichletBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionAuxiliaryFunctions.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionAuxiliaryFunctions.cpp diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.h b/ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionAuxiliaryFunctions.h similarity index 96% rename from ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.h rename to ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionAuxiliaryFunctions.h index 6d20027d48a5c426328400279c2ee40c9fa51049..062173de945dc12f6ffc1df7ce283c83e63b90e1 100644 --- a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionAuxiliaryFunctions.h @@ -18,20 +18,21 @@ #pragma once #include <vector> + #include "MathLib/LinAlg/GlobalMatrixVectorTypes.h" namespace MeshLib { class Mesh; class Node; -} +} // namespace MeshLib namespace NumLib { class LocalToGlobalIndexMap; template <typename> struct IndexValueVector; -} +} // namespace NumLib namespace ParameterLib { diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionWithinTimeInterval.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionWithinTimeInterval.cpp diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.h b/ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionWithinTimeInterval.h similarity index 98% rename from ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.h rename to ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionWithinTimeInterval.h index c6e07e8efb64bcc3178121025e885107b184ab06..f3f850d8a1b1d9c6816c051ddb70c07b06da19c1 100644 --- a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/DirichletBoundaryConditionWithinTimeInterval.h @@ -22,7 +22,7 @@ namespace BaseLib { class ConfigTree; struct TimeInterval; -} +} // namespace BaseLib namespace MeshLib { diff --git a/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h b/ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryCondition-impl.h similarity index 96% rename from ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h rename to ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryCondition-impl.h index dfd07225c6f4d23179df06a81cdd489a44fb48d9..1d997e15f31751e63c051c081245fc22f3833acc 100644 --- a/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryCondition-impl.h @@ -9,7 +9,7 @@ */ #include "GenericNaturalBoundaryConditionLocalAssembler.h" -#include "ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/CreateLocalAssemblers.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Utils/CreateLocalAssemblers.h" namespace ProcessLib { @@ -65,7 +65,7 @@ GenericNaturalBoundaryCondition<BoundaryConditionData, _dof_table_boundary.reset(dof_table_bulk.deriveBoundaryConstrainedMap( variable_id, {component_id}, std::move(bc_mesh_subset))); - BoundaryConditionOrSourceTerm::createLocalAssemblers< + BoundaryConditionAndSourceTerm::createLocalAssemblers< LocalAssemblerImplementation>( global_dim, _bc_mesh.getElements(), *_dof_table_boundary, shapefunction_order, _local_assemblers, _bc_mesh.isAxiallySymmetric(), diff --git a/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/GenericNaturalBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryConditionLocalAssembler.h similarity index 100% rename from ProcessLib/BoundaryCondition/GenericNaturalBoundaryConditionLocalAssembler.h rename to ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryConditionLocalAssembler.h diff --git a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp diff --git a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/HCNonAdvectiveFreeComponentFlowBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/HCNonAdvectiveFreeComponentFlowBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryConditionAndSourceTerm/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h similarity index 100% rename from ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h rename to ProcessLib/BoundaryConditionAndSourceTerm/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h diff --git a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/NeumannBoundaryCondition.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/NeumannBoundaryCondition.cpp diff --git a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/NeumannBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/NeumannBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/NeumannBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/NeumannBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryConditionAndSourceTerm/NeumannBoundaryConditionLocalAssembler.h similarity index 100% rename from ProcessLib/BoundaryCondition/NeumannBoundaryConditionLocalAssembler.h rename to ProcessLib/BoundaryConditionAndSourceTerm/NeumannBoundaryConditionLocalAssembler.h diff --git a/ProcessLib/SourceTerms/NodalSourceTerm.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/NodalSourceTerm.cpp similarity index 100% rename from ProcessLib/SourceTerms/NodalSourceTerm.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/NodalSourceTerm.cpp diff --git a/ProcessLib/SourceTerms/NodalSourceTerm.h b/ProcessLib/BoundaryConditionAndSourceTerm/NodalSourceTerm.h similarity index 100% rename from ProcessLib/SourceTerms/NodalSourceTerm.h rename to ProcessLib/BoundaryConditionAndSourceTerm/NodalSourceTerm.h diff --git a/ProcessLib/BoundaryCondition/NormalTractionBoundaryCondition-impl.h b/ProcessLib/BoundaryConditionAndSourceTerm/NormalTractionBoundaryCondition-impl.h similarity index 96% rename from ProcessLib/BoundaryCondition/NormalTractionBoundaryCondition-impl.h rename to ProcessLib/BoundaryConditionAndSourceTerm/NormalTractionBoundaryCondition-impl.h index 460fdc8d2f70957e62504e8c28ca08d7431d6665..f74824c975e139d41bd9c8af51b0655e1fc849b6 100644 --- a/ProcessLib/BoundaryCondition/NormalTractionBoundaryCondition-impl.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/NormalTractionBoundaryCondition-impl.h @@ -15,7 +15,7 @@ #include "MeshLib/MeshSearch/NodeSearch.h" #include "NormalTractionBoundaryConditionLocalAssembler.h" #include "ParameterLib/Utils.h" -#include "ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/CreateLocalAssemblers.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Utils/CreateLocalAssemblers.h" namespace ProcessLib { @@ -51,7 +51,7 @@ NormalTractionBoundaryCondition<GlobalDim, LocalAssemblerImplementation>:: _dof_table_boundary.reset(dof_table_bulk.deriveBoundaryConstrainedMap( variable_id, component_ids, std::move(bc_mesh_subset))); - BoundaryConditionOrSourceTerm::detail::createLocalAssemblers< + BoundaryConditionAndSourceTerm::detail::createLocalAssemblers< GlobalDim, LocalAssemblerImplementation>( *_dof_table_boundary, shapefunction_order, _bc_mesh.getElements(), _local_assemblers, _bc_mesh.isAxiallySymmetric(), _integration_order, diff --git a/ProcessLib/BoundaryCondition/NormalTractionBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/NormalTractionBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/NormalTractionBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/NormalTractionBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/NormalTractionBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryConditionAndSourceTerm/NormalTractionBoundaryConditionLocalAssembler.h similarity index 99% rename from ProcessLib/BoundaryCondition/NormalTractionBoundaryConditionLocalAssembler.h rename to ProcessLib/BoundaryConditionAndSourceTerm/NormalTractionBoundaryConditionLocalAssembler.h index 321cfed06b934506583799710927a9d9acaa30b0..66533ee18a14f012d22ca7e27fb9a8dbf88c688b 100644 --- a/ProcessLib/BoundaryCondition/NormalTractionBoundaryConditionLocalAssembler.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/NormalTractionBoundaryConditionLocalAssembler.h @@ -10,13 +10,12 @@ #pragma once +#include "GenericNaturalBoundaryConditionLocalAssembler.h" #include "MathLib/LinAlg/Eigen/EigenMapTools.h" #include "MeshLib/Elements/FaceRule.h" #include "NumLib/DOF/DOFTableUtil.h" #include "ParameterLib/Parameter.h" -#include "GenericNaturalBoundaryConditionLocalAssembler.h" - namespace ProcessLib { namespace NormalTractionBoundaryCondition @@ -104,7 +103,6 @@ public: for (unsigned ip = 0; ip < n_integration_points; ip++) { - double const integration_weight = _integration_method.getWeightedPoint(ip).getWeight() * shape_matrices_u[ip].integralMeasure * diff --git a/ProcessLib/BoundaryCondition/PhaseFieldIrreversibleDamageOracleBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/PhaseFieldIrreversibleDamageOracleBoundaryCondition.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/PhaseFieldIrreversibleDamageOracleBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/PhaseFieldIrreversibleDamageOracleBoundaryCondition.cpp diff --git a/ProcessLib/BoundaryCondition/PhaseFieldIrreversibleDamageOracleBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/PhaseFieldIrreversibleDamageOracleBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/PhaseFieldIrreversibleDamageOracleBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/PhaseFieldIrreversibleDamageOracleBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/PrimaryVariableConstraintDirichletBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/PrimaryVariableConstraintDirichletBoundaryCondition.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/PrimaryVariableConstraintDirichletBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/PrimaryVariableConstraintDirichletBoundaryCondition.cpp diff --git a/ProcessLib/BoundaryCondition/PrimaryVariableConstraintDirichletBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/PrimaryVariableConstraintDirichletBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/PrimaryVariableConstraintDirichletBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/PrimaryVariableConstraintDirichletBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryCondition.h similarity index 96% rename from ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryCondition.h index 330a051afe6abfc61e7ff6c1c72a87c5a7202de1..874ad28aded133a1c2aa938a6a82e2e6241b44e4 100644 --- a/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryCondition.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryCondition.h @@ -19,8 +19,8 @@ #include "BHEInflowPythonBoundaryConditionPythonSideInterface.h" #include "BaseLib/Error.h" #include "NumLib/IndexValueVector.h" -#include "ProcessLib/BoundaryCondition/BoundaryCondition.h" -#include "ProcessLib/BoundaryCondition/GenericNaturalBoundaryConditionLocalAssembler.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/BoundaryCondition.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryConditionLocalAssembler.h" #include "ProcessLib/HeatTransportBHE/BHE/BHETypes.h" #include "ProcessLib/Utils/CreateLocalAssemblers.h" #include "ProcessLib/Utils/ProcessUtils.h" diff --git a/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionModule.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryConditionModule.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionModule.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryConditionModule.cpp diff --git a/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionModule.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryConditionModule.h similarity index 100% rename from ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionModule.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryConditionModule.h diff --git a/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionPythonSideInterface.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryConditionPythonSideInterface.h similarity index 94% rename from ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionPythonSideInterface.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryConditionPythonSideInterface.h index 150aa5d7582cbc557520d5de823ebe39a24a374b..46be109f4998c28c265474014b8e97d6cbf92a57 100644 --- a/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionPythonSideInterface.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryConditionPythonSideInterface.h @@ -41,7 +41,8 @@ public: } /*! - * transfer BHE network dataframe to TESPy and get Tin and flow rate from TESPy + * transfer BHE network dataframe to TESPy and get Tin and flow rate from + * TESPy * * \return a tuple (if use tespyThermalSolver, if convergence achieved * in tespy, BHE Tin value, BHE flow rate from TESPy) @@ -50,10 +51,9 @@ public: * inflow temperature and flow rate for all BHEs. */ virtual std::tuple<bool, bool, std::vector<double>, std::vector<double>> - tespySolver( - double /*t*/, - std::vector<double> const& /*Tin_val*/, - std::vector<double> const& /*Tout_val*/) const + tespySolver(double /*t*/, + std::vector<double> const& /*Tin_val*/, + std::vector<double> const& /*Tout_val*/) const { _overridden_tespy = false; return std::tuple<bool, bool, std::vector<double>, std::vector<double>>{ diff --git a/ProcessLib/BoundaryCondition/Python/CMakeLists.txt b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt similarity index 58% rename from ProcessLib/BoundaryCondition/Python/CMakeLists.txt rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt index 1e4dc304374bc600e467218c29f1a237b31dd005..00320b44c7c5f3ab6404a9059c81f671d38d4629 100644 --- a/ProcessLib/BoundaryCondition/Python/CMakeLists.txt +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt @@ -1,15 +1,21 @@ ogs_add_library( - ProcessLibBoundaryConditionPython + ProcessLibBoundaryConditionAndSourceTermPython PythonBoundaryCondition.cpp PythonBoundaryCondition.h PythonBoundaryConditionLocalAssembler.h PythonBoundaryConditionPythonSideInterface.h BHEInflowPythonBoundaryCondition.h BHEInflowPythonBoundaryConditionPythonSideInterface.h + CreatePythonSourceTerm.cpp + CreatePythonSourceTerm.h + PythonSourceTerm.cpp + PythonSourceTerm.h + PythonSourceTermLocalAssembler.h + PythonSourceTermPythonSideInterface.h ) target_compile_definitions( - ProcessLibBoundaryConditionPython + ProcessLibBoundaryConditionAndSourceTermPython PUBLIC OGS_USE_PYTHON # Enabled elements OGS_MAX_ELEMENT_DIM=${OGS_MAX_ELEMENT_DIM} @@ -21,19 +27,21 @@ target_compile_definitions( ) target_link_libraries( - ProcessLibBoundaryConditionPython PUBLIC BaseLib MathLib MeshLib NumLib - ${Python3_LIBRARIES} + ProcessLibBoundaryConditionAndSourceTermPython PUBLIC BaseLib MathLib MeshLib NumLib + ${Python3_LIBRARIES} PRIVATE pybind11::pybind11 ) # For the embedded Python module ogs_add_library( - ProcessLibBoundaryConditionPythonModule PythonBoundaryConditionModule.cpp + ProcessLibBoundaryConditionAndSourceTermPythonModule PythonBoundaryConditionModule.cpp PythonBoundaryConditionModule.h BHEInflowPythonBoundaryConditionModule.cpp BHEInflowPythonBoundaryConditionModule.h + PythonSourceTermModule.cpp + PythonSourceTermModule.h ) target_link_libraries( - ProcessLibBoundaryConditionPythonModule - PUBLIC ProcessLibBoundaryConditionPython pybind11::pybind11 + ProcessLibBoundaryConditionAndSourceTermPythonModule + PUBLIC ProcessLibBoundaryConditionAndSourceTermPython pybind11::pybind11 ) diff --git a/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CreatePythonSourceTerm.cpp similarity index 97% rename from ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/CreatePythonSourceTerm.cpp index b795463fb0940286775cebcd6792676b15764103..3e05f7bc10d2e1a19784aacb5e8ca80e47a27f4c 100644 --- a/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CreatePythonSourceTerm.cpp @@ -15,7 +15,7 @@ #include "BaseLib/ConfigTree.h" #include "MeshLib/Mesh.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" -#include "ProcessLib/SourceTerms/SourceTerm.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/SourceTerm.h" #include "PythonSourceTerm.h" namespace ProcessLib diff --git a/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CreatePythonSourceTerm.h similarity index 100% rename from ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/CreatePythonSourceTerm.h diff --git a/ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryCondition.cpp similarity index 98% rename from ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryCondition.cpp index deed7068845ef7cdd7c238123797804d96588748..15d6f05f0dfeb95d17c9eb2b0e85fa081f8dee17 100644 --- a/ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.cpp +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryCondition.cpp @@ -16,7 +16,7 @@ #include "BaseLib/ConfigTree.h" #include "MeshLib/MeshSearch/NodeSearch.h" -#include "ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/CreateLocalAssemblers.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Utils/CreateLocalAssemblers.h" #include "PythonBoundaryConditionLocalAssembler.h" namespace @@ -75,7 +75,7 @@ PythonBoundaryCondition::PythonBoundaryCondition( _dof_table_boundary = _bc_data.dof_table_bulk.deriveBoundaryConstrainedMap( std::move(bc_mesh_subset)); - BoundaryConditionOrSourceTerm::createLocalAssemblers< + BoundaryConditionAndSourceTerm::createLocalAssemblers< PythonBoundaryConditionLocalAssembler>( global_dim, _bc_data.boundary_mesh.getElements(), *_dof_table_boundary, shapefunction_order, _local_assemblers, diff --git a/ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryCondition.h similarity index 94% rename from ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryCondition.h index bb2f2a94ef3e29fdcda728b9b6b2a9323a224196..6bd8a8c1de9e7604e2be8575e7392d7c025755c5 100644 --- a/ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryCondition.h @@ -12,9 +12,8 @@ #include "NumLib/DOF/LocalToGlobalIndexMap.h" #include "NumLib/IndexValueVector.h" -#include "ProcessLib/BoundaryCondition/BoundaryCondition.h" -#include "ProcessLib/BoundaryCondition/GenericNaturalBoundaryConditionLocalAssembler.h" - +#include "ProcessLib/BoundaryConditionAndSourceTerm/BoundaryCondition.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryConditionLocalAssembler.h" #include "PythonBoundaryConditionPythonSideInterface.h" namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionLocalAssembler.h similarity index 98% rename from ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionLocalAssembler.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionLocalAssembler.h index 9bbcf0b68eef73e713822deeadd54cb1a48762af..44aecfb0c5acf804cabae9257de004412baee730 100644 --- a/ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionLocalAssembler.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionLocalAssembler.h @@ -10,12 +10,10 @@ #pragma once -#include "PythonBoundaryCondition.h" - #include "MathLib/LinAlg/Eigen/EigenMapTools.h" #include "NumLib/DOF/DOFTableUtil.h" -#include "ProcessLib/BoundaryCondition/GenericNaturalBoundaryConditionLocalAssembler.h" - +#include "ProcessLib/BoundaryConditionAndSourceTerm/GenericNaturalBoundaryConditionLocalAssembler.h" +#include "PythonBoundaryCondition.h" #include "PythonBoundaryConditionPythonSideInterface.h" namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionModule.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionModule.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionModule.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionModule.cpp diff --git a/ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionModule.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionModule.h similarity index 99% rename from ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionModule.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionModule.h index 3d2daf036a68b6c62b4565eab2d9b8b45a4a97c4..2534a2bc8dae0e8922079d9e28825e72de08f9f7 100644 --- a/ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionModule.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionModule.h @@ -11,6 +11,7 @@ #pragma once #include <pybind11/pybind11.h> + #include "BaseLib/ExportSymbol.h" namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionPythonSideInterface.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionPythonSideInterface.h similarity index 100% rename from ProcessLib/BoundaryCondition/Python/PythonBoundaryConditionPythonSideInterface.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonBoundaryConditionPythonSideInterface.h diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTerm.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTerm.cpp similarity index 94% rename from ProcessLib/SourceTerms/Python/PythonSourceTerm.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTerm.cpp index 12cb687bd2087dda6850bbbdff03c77f8964c5ef..91c145ebafb0555e17cffffb52f38c6e0b2038de 100644 --- a/ProcessLib/SourceTerms/Python/PythonSourceTerm.cpp +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTerm.cpp @@ -16,7 +16,7 @@ #include "MeshLib/MeshSearch/NodeSearch.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" -#include "ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/CreateLocalAssemblers.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Utils/CreateLocalAssemblers.h" #include "PythonSourceTermLocalAssembler.h" namespace @@ -71,7 +71,7 @@ PythonSourceTerm::PythonSourceTerm( _source_term_data(std::move(source_term_data)), _flush_stdout(flush_stdout) { - BoundaryConditionOrSourceTerm::createLocalAssemblers< + BoundaryConditionAndSourceTerm::createLocalAssemblers< PythonSourceTermLocalAssembler>( global_dim, _source_term_data.source_term_mesh.getElements(), *_source_term_dof_table, shapefunction_order, _local_assemblers, diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTerm.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTerm.h similarity index 97% rename from ProcessLib/SourceTerms/Python/PythonSourceTerm.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTerm.h index 44e0492196ed7befa9f488863f3b30351e88194a..3890ef76cc27bcf4191ecf84e7cac1750a701fd5 100644 --- a/ProcessLib/SourceTerms/Python/PythonSourceTerm.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTerm.h @@ -10,7 +10,7 @@ #pragma once -#include "ProcessLib/SourceTerms/SourceTerm.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/SourceTerm.h" #include "PythonSourceTermLocalAssemblerInterface.h" #include "PythonSourceTermPythonSideInterface.h" diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTermLocalAssembler.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermLocalAssembler.h similarity index 99% rename from ProcessLib/SourceTerms/Python/PythonSourceTermLocalAssembler.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermLocalAssembler.h index 6626ce7e1cc752a8a1a6c7f79e2d2870e15ff785..e642ffd27ea39000d8f6da52acb567ab6b4a2a8e 100644 --- a/ProcessLib/SourceTerms/Python/PythonSourceTermLocalAssembler.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermLocalAssembler.h @@ -103,7 +103,7 @@ public: // gather primary variables typename ShapeMatricesType::template MatrixType<ShapeFunction::NPOINTS, - Eigen::Dynamic> + Eigen::Dynamic> primary_variables_mat(num_nodes, num_comp_total); for (int var = 0; var < num_var; ++var) { diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTermLocalAssemblerInterface.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermLocalAssemblerInterface.h similarity index 99% rename from ProcessLib/SourceTerms/Python/PythonSourceTermLocalAssemblerInterface.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermLocalAssemblerInterface.h index 6be906d23c0433b901ca98c0519db6e3b09a9b19..8b9120d8ba4c410dc53608f63b7aabcd71299d2a 100644 --- a/ProcessLib/SourceTerms/Python/PythonSourceTermLocalAssemblerInterface.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermLocalAssemblerInterface.h @@ -16,7 +16,6 @@ namespace SourceTerms { namespace Python { - class PythonSourceTermLocalAssemblerInterface { public: diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermModule.cpp similarity index 100% rename from ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermModule.cpp diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTermModule.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermModule.h similarity index 99% rename from ProcessLib/SourceTerms/Python/PythonSourceTermModule.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermModule.h index e574a7833261cc11390ce5abdbc3eddc7762691c..7079ec165cd891b674f1a8376dbb19962adb83c8 100644 --- a/ProcessLib/SourceTerms/Python/PythonSourceTermModule.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermModule.h @@ -11,6 +11,7 @@ #pragma once #include <pybind11/pybind11.h> + #include "BaseLib/ExportSymbol.h" namespace ProcessLib diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTermPythonSideInterface.h b/ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermPythonSideInterface.h similarity index 100% rename from ProcessLib/SourceTerms/Python/PythonSourceTermPythonSideInterface.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Python/PythonSourceTermPythonSideInterface.h diff --git a/ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/RobinBoundaryCondition.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/RobinBoundaryCondition.cpp diff --git a/ProcessLib/BoundaryCondition/RobinBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/RobinBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/RobinBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/RobinBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/RobinBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryConditionAndSourceTerm/RobinBoundaryConditionLocalAssembler.h similarity index 100% rename from ProcessLib/BoundaryCondition/RobinBoundaryConditionLocalAssembler.h rename to ProcessLib/BoundaryConditionAndSourceTerm/RobinBoundaryConditionLocalAssembler.h diff --git a/ProcessLib/BoundaryCondition/SolutionDependentDirichletBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/SolutionDependentDirichletBoundaryCondition.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/SolutionDependentDirichletBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/SolutionDependentDirichletBoundaryCondition.cpp diff --git a/ProcessLib/BoundaryCondition/SolutionDependentDirichletBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/SolutionDependentDirichletBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/SolutionDependentDirichletBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/SolutionDependentDirichletBoundaryCondition.h diff --git a/ProcessLib/SourceTerms/SourceTerm.h b/ProcessLib/BoundaryConditionAndSourceTerm/SourceTerm.h similarity index 100% rename from ProcessLib/SourceTerms/SourceTerm.h rename to ProcessLib/BoundaryConditionAndSourceTerm/SourceTerm.h diff --git a/ProcessLib/SourceTerms/SourceTermCollection.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermCollection.cpp similarity index 100% rename from ProcessLib/SourceTerms/SourceTermCollection.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/SourceTermCollection.cpp diff --git a/ProcessLib/SourceTerms/SourceTermCollection.h b/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermCollection.h similarity index 96% rename from ProcessLib/SourceTerms/SourceTermCollection.h rename to ProcessLib/BoundaryConditionAndSourceTerm/SourceTermCollection.h index af922046283ef1c9ec16af3303d258072db50136..19e5c19bcd9449814e6064d3ac8cafcb26822a2d 100644 --- a/ProcessLib/SourceTerms/SourceTermCollection.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermCollection.h @@ -11,7 +11,7 @@ #pragma once #include "ProcessLib/ProcessVariable.h" -#include "ProcessLib/SourceTerms/SourceTerm.h" +#include "SourceTerm.h" namespace ProcessLib { diff --git a/ProcessLib/SourceTerms/SourceTermConfig.h b/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermConfig.h similarity index 100% rename from ProcessLib/SourceTerms/SourceTermConfig.h rename to ProcessLib/BoundaryConditionAndSourceTerm/SourceTermConfig.h diff --git a/ProcessLib/SourceTerms/SourceTermIntegrationPointData.h b/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermIntegrationPointData.h similarity index 99% rename from ProcessLib/SourceTerms/SourceTermIntegrationPointData.h rename to ProcessLib/BoundaryConditionAndSourceTerm/SourceTermIntegrationPointData.h index b5002ca982dd72e86926eeff9ccb84b92a5dc8d8..9fb7e18e19ba2cdbf0c2d5068c72c953fa485ea8 100644 --- a/ProcessLib/SourceTerms/SourceTermIntegrationPointData.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermIntegrationPointData.h @@ -10,14 +10,13 @@ #pragma once +#include "MathLib/LinAlg/Eigen/EigenMapTools.h" #include "NumLib/Extrapolation/ExtrapolatableElement.h" #include "NumLib/Function/Interpolation.h" #include "ProcessLib/LocalAssemblerInterface.h" -#include "MathLib/LinAlg/Eigen/EigenMapTools.h" namespace ProcessLib { - template <typename NodalRowVectorType> struct SourceTermIntegrationPointData final { diff --git a/ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/CreateLocalAssemblers.h b/ProcessLib/BoundaryConditionAndSourceTerm/Utils/CreateLocalAssemblers.h similarity index 97% rename from ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/CreateLocalAssemblers.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Utils/CreateLocalAssemblers.h index b12f7808662f9126d5b55ec30c3c6e4b4abe150d..d6299bbfea2bc4237dbe67bee3346eb3da9750e4 100644 --- a/ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/CreateLocalAssemblers.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Utils/CreateLocalAssemblers.h @@ -17,7 +17,7 @@ namespace ProcessLib { -namespace BoundaryConditionOrSourceTerm +namespace BoundaryConditionAndSourceTerm { namespace detail { @@ -97,5 +97,5 @@ void createLocalAssemblers( "Meshes with dimension greater than three are not supported."); } } -} // namespace BoundaryConditionOrSourceTerm +} // namespace BoundaryConditionAndSourceTerm } // namespace ProcessLib diff --git a/ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/LocalDataInitializer.h b/ProcessLib/BoundaryConditionAndSourceTerm/Utils/LocalDataInitializer.h similarity index 99% rename from ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/LocalDataInitializer.h rename to ProcessLib/BoundaryConditionAndSourceTerm/Utils/LocalDataInitializer.h index 032af2890b6b911177875cd52b2d48169a7bd6d5..8ab6dd77725eaf13191f24ab77650c6a8c240b22 100644 --- a/ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/LocalDataInitializer.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Utils/LocalDataInitializer.h @@ -114,7 +114,7 @@ static_assert(false, "The macro OGS_MAX_ELEMENT_ORDER is undefined."); namespace ProcessLib { -namespace BoundaryConditionOrSourceTerm +namespace BoundaryConditionAndSourceTerm { /// The LocalDataInitializer is a functor creating a local assembler data with /// corresponding to the mesh element type shape functions and calling @@ -389,7 +389,7 @@ private: } }; -} // namespace BoundaryConditionOrSourceTerm +} // namespace BoundaryConditionAndSourceTerm } // namespace ProcessLib #undef ENABLED_ELEMENT_TYPE_SIMPLEX #undef ENABLED_ELEMENT_TYPE_CUBOID diff --git a/ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/VariableDependentNeumannBoundaryCondition.cpp similarity index 100% rename from ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryCondition.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/VariableDependentNeumannBoundaryCondition.cpp diff --git a/ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryCondition.h b/ProcessLib/BoundaryConditionAndSourceTerm/VariableDependentNeumannBoundaryCondition.h similarity index 100% rename from ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryCondition.h rename to ProcessLib/BoundaryConditionAndSourceTerm/VariableDependentNeumannBoundaryCondition.h diff --git a/ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryConditionAndSourceTerm/VariableDependentNeumannBoundaryConditionLocalAssembler.h similarity index 99% rename from ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryConditionLocalAssembler.h rename to ProcessLib/BoundaryConditionAndSourceTerm/VariableDependentNeumannBoundaryConditionLocalAssembler.h index 0f7d9c6c73b54705caf0b8891e00c2f75e07c3e0..8866826090198d962aade1c4962b819378b663b6 100644 --- a/ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryConditionLocalAssembler.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/VariableDependentNeumannBoundaryConditionLocalAssembler.h @@ -10,13 +10,12 @@ #pragma once +#include "GenericNaturalBoundaryConditionLocalAssembler.h" #include "MeshLib/PropertyVector.h" #include "NumLib/DOF/DOFTableUtil.h" #include "NumLib/Function/Interpolation.h" #include "ParameterLib/MeshNodeParameter.h" -#include "GenericNaturalBoundaryConditionLocalAssembler.h" - namespace ProcessLib { struct VariableDependentNeumannBoundaryConditionData diff --git a/ProcessLib/SourceTerms/VolumetricSourceTerm.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/VolumetricSourceTerm.cpp similarity index 91% rename from ProcessLib/SourceTerms/VolumetricSourceTerm.cpp rename to ProcessLib/BoundaryConditionAndSourceTerm/VolumetricSourceTerm.cpp index 62be8d56432bdb5a0d6684e8067e50cd633a9348..e8ec38890c8b207742723a2045ff38207b692d70 100644 --- a/ProcessLib/SourceTerms/VolumetricSourceTerm.cpp +++ b/ProcessLib/BoundaryConditionAndSourceTerm/VolumetricSourceTerm.cpp @@ -10,7 +10,7 @@ #include "VolumetricSourceTerm.h" -#include "ProcessLib/Utils/ForBoundaryConditionOrSourceTerm/CreateLocalAssemblers.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Utils/CreateLocalAssemblers.h" namespace ProcessLib { @@ -22,7 +22,7 @@ VolumetricSourceTerm::VolumetricSourceTerm( : SourceTerm(std::move(source_term_dof_table)), _source_term_parameter(source_term_parameter) { - BoundaryConditionOrSourceTerm::createLocalAssemblers< + BoundaryConditionAndSourceTerm::createLocalAssemblers< VolumetricSourceTermLocalAssembler>( bulk_mesh_dimension, source_term_mesh.getElements(), *_source_term_dof_table, shapefunction_order, _local_assemblers, diff --git a/ProcessLib/SourceTerms/VolumetricSourceTerm.h b/ProcessLib/BoundaryConditionAndSourceTerm/VolumetricSourceTerm.h similarity index 100% rename from ProcessLib/SourceTerms/VolumetricSourceTerm.h rename to ProcessLib/BoundaryConditionAndSourceTerm/VolumetricSourceTerm.h diff --git a/ProcessLib/SourceTerms/VolumetricSourceTermFEM.h b/ProcessLib/BoundaryConditionAndSourceTerm/VolumetricSourceTermFEM.h similarity index 100% rename from ProcessLib/SourceTerms/VolumetricSourceTermFEM.h rename to ProcessLib/BoundaryConditionAndSourceTerm/VolumetricSourceTermFEM.h diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index f1b2e308d5da780a973698c7bfa3bc245e2caea9..2ca5eb570389119993bdf0eea5f7531bb9213b77 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -12,18 +12,16 @@ foreach(process ${_processes_list}) endforeach() get_source_files(SOURCES) -append_source_files(SOURCES BoundaryCondition) +append_source_files(SOURCES BoundaryConditionAndSourceTerm) +append_source_files(SOURCES BoundaryConditionAndSourceTerm/Utils) append_source_files(SOURCES SurfaceFlux) append_source_files(SOURCES Output) -append_source_files(SOURCES SourceTerms) append_source_files(SOURCES Utils) -append_source_files(SOURCES Utils/ForBoundaryConditionOrSourceTerm) ogs_add_library(ProcessLib ${SOURCES}) if(OGS_USE_PYTHON) - add_subdirectory(BoundaryCondition/Python) - add_subdirectory(SourceTerms/Python) + add_subdirectory(BoundaryConditionAndSourceTerm/Python) endif() target_link_libraries( @@ -35,8 +33,7 @@ target_link_libraries( MeshGeoToolsLib MeshLib NumLib - $<$<TARGET_EXISTS:ProcessLibBoundaryConditionPython>:ProcessLibBoundaryConditionPython> - $<$<TARGET_EXISTS:ProcessLibSourceTermPython>:ProcessLibSourceTermPython> + $<$<TARGET_EXISTS:ProcessLibBoundaryConditionAndSourceTermPython>:ProcessLibBoundaryConditionAndSourceTermPython> $<$<TARGET_EXISTS:petsc>:petsc> nlohmann_json PRIVATE ParameterLib GitInfoLib $<$<TARGET_EXISTS:InSituLib>:InSituLib> diff --git a/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEBottomDirichletBoundaryCondition.h b/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEBottomDirichletBoundaryCondition.h index 56dd63dfc6e0f8ec67370d0a1c6e64c93fe5874c..d14a2364f0244925ce1dba35c6e79606979ec7e5 100644 --- a/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEBottomDirichletBoundaryCondition.h +++ b/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEBottomDirichletBoundaryCondition.h @@ -11,7 +11,7 @@ #pragma once #include "NumLib/IndexValueVector.h" -#include "ProcessLib/BoundaryCondition/BoundaryCondition.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/BoundaryCondition.h" namespace ProcessLib::HeatTransportBHE { diff --git a/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEInflowDirichletBoundaryCondition.h b/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEInflowDirichletBoundaryCondition.h index ecbee2727c2f171458d5a61cdbd4a7a0aeddfe2b..227ecf327a833ee6c0747ed68abaa589a8e9c047 100644 --- a/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEInflowDirichletBoundaryCondition.h +++ b/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEInflowDirichletBoundaryCondition.h @@ -11,7 +11,7 @@ #pragma once #include "NumLib/IndexValueVector.h" -#include "ProcessLib/BoundaryCondition/BoundaryCondition.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/BoundaryCondition.h" namespace ProcessLib::HeatTransportBHE { diff --git a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp index 7df77b4228adb9b7e9c97bf3ee852264fc98e3bf..64eadb6851f1401433da35026f30fa7d4e31f464 100644 --- a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp +++ b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp @@ -14,7 +14,7 @@ #include "BoundaryConditions/BHEBottomDirichletBoundaryCondition.h" #include "BoundaryConditions/BHEInflowDirichletBoundaryCondition.h" -#include "ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryCondition.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryCondition.h" #include "ProcessLib/HeatTransportBHE/BHE/MeshUtils.h" #include "ProcessLib/HeatTransportBHE/LocalAssemblers/CreateLocalAssemblers.h" #include "ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerBHE.h" diff --git a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h index ef86e9fb9187b0ec5c1105157bf3a466f1141067..aaf2c65d99dff8f667e8136a6ee8b28cd3b9039e 100644 --- a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h +++ b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h @@ -14,7 +14,7 @@ #include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" #include "MeshLib/PropertyVector.h" -#include "ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionPythonSideInterface.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/Python/BHEInflowPythonBoundaryConditionPythonSideInterface.h" #include "ProcessLib/HeatTransportBHE/BHE/BHETypes.h" namespace MeshLib { diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h index ed08de5d98589d9128965940522fc75b9a1957d0..47d8e78795db5c2ccbf1e076eebe45087a860ea6 100644 --- a/ProcessLib/Process.h +++ b/ProcessLib/Process.h @@ -18,11 +18,11 @@ #include "NumLib/ODESolver/ODESystem.h" #include "NumLib/ODESolver/TimeDiscretization.h" #include "ParameterLib/Parameter.h" -#include "ProcessLib/BoundaryCondition/BoundaryConditionCollection.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/BoundaryConditionCollection.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/SourceTermCollection.h" #include "ProcessLib/Output/ExtrapolatorData.h" #include "ProcessLib/Output/IntegrationPointWriter.h" #include "ProcessLib/Output/SecondaryVariable.h" -#include "ProcessLib/SourceTerms/SourceTermCollection.h" #include "ProcessVariable.h" #include "VectorMatrixAssembler.h" diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp index d76d16ddfe372c15c8c9faa58dac52d037515938..c1b5b0ef1b3140a0ea6e51cf90f4c062b36bf92b 100644 --- a/ProcessLib/ProcessVariable.cpp +++ b/ProcessLib/ProcessVariable.cpp @@ -19,12 +19,12 @@ #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" #include "ParameterLib/Utils.h" -#include "ProcessLib/BoundaryCondition/BoundaryCondition.h" -#include "ProcessLib/BoundaryCondition/CreateBoundaryCondition.h" -#include "ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/BoundaryCondition.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/CreateBoundaryCondition.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/SourceTerm.h" #include "ProcessLib/CreateDeactivatedSubdomain.h" -#include "ProcessLib/SourceTerms/CreateSourceTerm.h" -#include "ProcessLib/SourceTerms/SourceTerm.h" namespace { @@ -305,8 +305,7 @@ void ProcessVariable::updateDeactivatedSubdomains(double const time) return true; } - auto const& deactivated_materialIDs = - ds.materialIDs; + auto const& deactivated_materialIDs = ds.materialIDs; auto const& element_center = getCenterOfGravity(*_mesh.getElement(i)); if (std::binary_search(deactivated_materialIDs.begin(), diff --git a/ProcessLib/ProcessVariable.h b/ProcessLib/ProcessVariable.h index 01edb1583f0d6f8742ba12a862b396214ff30768..ffc0eda028951853f766790fbc7dc7c80c9c077d 100644 --- a/ProcessLib/ProcessVariable.h +++ b/ProcessLib/ProcessVariable.h @@ -11,10 +11,9 @@ #pragma once #include "MathLib/LinAlg/GlobalMatrixVectorTypes.h" - #include "ParameterLib/Parameter.h" -#include "ProcessLib/BoundaryCondition/BoundaryConditionConfig.h" -#include "ProcessLib/SourceTerms/SourceTermConfig.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/BoundaryConditionConfig.h" +#include "ProcessLib/BoundaryConditionAndSourceTerm/SourceTermConfig.h" // DeactivatedSubdomain cannot be forwardly declared because that // std::unique_ptr<DeactivatedSubdomain> type member requires its full diff --git a/ProcessLib/SourceTerms/Python/CMakeLists.txt b/ProcessLib/SourceTerms/Python/CMakeLists.txt deleted file mode 100644 index 7d320026cb1f0a5b209d8ac484a590354b0cb828..0000000000000000000000000000000000000000 --- a/ProcessLib/SourceTerms/Python/CMakeLists.txt +++ /dev/null @@ -1,38 +0,0 @@ -ogs_add_library( - ProcessLibSourceTermPython - CreatePythonSourceTerm.cpp - CreatePythonSourceTerm.h - PythonSourceTerm.cpp - PythonSourceTerm.h - PythonSourceTermLocalAssembler.h - PythonSourceTermPythonSideInterface.h -) - -target_compile_definitions( - ProcessLibSourceTermPython - PUBLIC OGS_USE_PYTHON - # Enabled elements - OGS_MAX_ELEMENT_DIM=${OGS_MAX_ELEMENT_DIM} - OGS_MAX_ELEMENT_ORDER=${OGS_MAX_ELEMENT_ORDER} - $<$<BOOL:${OGS_ENABLE_ELEMENT_SIMPLEX}>:OGS_ENABLE_ELEMENT_SIMPLEX> - $<$<BOOL:${OGS_ENABLE_ELEMENT_CUBOID}>:OGS_ENABLE_ELEMENT_CUBOID> - $<$<BOOL:${OGS_ENABLE_ELEMENT_PRISM}>:OGS_ENABLE_ELEMENT_PRISM> - $<$<BOOL:${OGS_ENABLE_ELEMENT_PYRAMID}>:OGS_ENABLE_ELEMENT_PYRAMID> -) - -target_link_libraries( - ProcessLibSourceTermPython PUBLIC BaseLib MathLib MeshLib NumLib - ${Python3_LIBRARIES} - PRIVATE pybind11::pybind11 -) - -# For the embedded Python module -ogs_add_library( - ProcessLibSourceTermPythonModule PythonSourceTermModule.cpp - PythonSourceTermModule.h -) - -target_link_libraries( - ProcessLibSourceTermPythonModule PUBLIC ProcessLibSourceTermPython - pybind11::pybind11 -)