diff --git a/src/scheme/IBoundaryConditionDescriptor.hpp b/src/scheme/IBoundaryConditionDescriptor.hpp index f99eff9355f6fdf6fbd65ad1898f3cba655af284..1350aa4dba4f7f6739b7de6689c10554ceec6971 100644 --- a/src/scheme/IBoundaryConditionDescriptor.hpp +++ b/src/scheme/IBoundaryConditionDescriptor.hpp @@ -16,7 +16,9 @@ class IBoundaryConditionDescriptor fourier, fixed, free, + inflow, neumann, + outflow, symmetry }; diff --git a/src/scheme/InflowBoundaryConditionDescriptor.hpp b/src/scheme/InflowBoundaryConditionDescriptor.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e648c1593cb4316f0cc77a4f18946b0457d65b5e --- /dev/null +++ b/src/scheme/InflowBoundaryConditionDescriptor.hpp @@ -0,0 +1,55 @@ +#ifndef INFLOW_BOUNDARY_CONDITION_DESCRIPTOR_HPP +#define INFLOW_BOUNDARY_CONDITION_DESCRIPTOR_HPP + +#include <language/utils/FunctionSymbolId.hpp> +#include <mesh/IBoundaryDescriptor.hpp> +#include <scheme/IBoundaryConditionDescriptor.hpp> + +#include <memory> + +class InflowBoundaryConditionDescriptor : public IBoundaryConditionDescriptor +{ + private: + std::ostream& + _write(std::ostream& os) const final + { + os << "inflow(" << ',' << *m_boundary_descriptor << ")"; + return os; + } + + std::shared_ptr<const IBoundaryDescriptor> m_boundary_descriptor; + const FunctionSymbolId m_function_symbol_id; + + public: + FunctionSymbolId + functionSymbolId() const + { + return m_function_symbol_id; + } + + const IBoundaryDescriptor& + boundaryDescriptor() const final + { + return *m_boundary_descriptor; + } + + Type + type() const final + { + return Type::inflow; + } + + InflowBoundaryConditionDescriptor(std::shared_ptr<const IBoundaryDescriptor> boundary_descriptor, + const FunctionSymbolId& function_symbol_id) + : m_boundary_descriptor(boundary_descriptor), m_function_symbol_id{function_symbol_id} + { + ; + } + + InflowBoundaryConditionDescriptor(const InflowBoundaryConditionDescriptor&) = delete; + InflowBoundaryConditionDescriptor(InflowBoundaryConditionDescriptor&&) = delete; + + ~InflowBoundaryConditionDescriptor() = default; +}; + +#endif // INFLOW_BOUNDARY_CONDITION_DESCRIPTOR_HPP diff --git a/src/scheme/OutflowBoundaryConditionDescriptor.hpp b/src/scheme/OutflowBoundaryConditionDescriptor.hpp new file mode 100644 index 0000000000000000000000000000000000000000..83ef7a775a81269a5d3930ed2e07d5634d99959a --- /dev/null +++ b/src/scheme/OutflowBoundaryConditionDescriptor.hpp @@ -0,0 +1,46 @@ +#ifndef OUTFLOW_BOUNDARY_CONDITION_DESCRIPTOR_HPP +#define OUTFLOW_BOUNDARY_CONDITION_DESCRIPTOR_HPP + +#include <mesh/IBoundaryDescriptor.hpp> +#include <scheme/IBoundaryConditionDescriptor.hpp> + +#include <memory> + +class OutflowBoundaryConditionDescriptor : public IBoundaryConditionDescriptor +{ + private: + std::ostream& + _write(std::ostream& os) const final + { + os << "outflow(" << *m_boundary_descriptor << ")"; + return os; + } + + std::shared_ptr<const IBoundaryDescriptor> m_boundary_descriptor; + + public: + const IBoundaryDescriptor& + boundaryDescriptor() const final + { + return *m_boundary_descriptor; + } + + Type + type() const final + { + return Type::outflow; + } + + OutflowBoundaryConditionDescriptor(std::shared_ptr<const IBoundaryDescriptor> boundary_descriptor) + : m_boundary_descriptor(boundary_descriptor) + { + ; + } + + OutflowBoundaryConditionDescriptor(const OutflowBoundaryConditionDescriptor&) = delete; + OutflowBoundaryConditionDescriptor(OutflowBoundaryConditionDescriptor&&) = delete; + + ~OutflowBoundaryConditionDescriptor() = default; +}; + +#endif // OUTFLOW_BOUNDARY_CONDITION_DESCRIPTOR_HPP