diff --git a/src/language/modules/SchemeModule.cpp b/src/language/modules/SchemeModule.cpp index a6dcec9c8d510e36a8b70547eafbf11775acef8a..542690a4ffcfb73ba174f0014b358548208d830f 100644 --- a/src/language/modules/SchemeModule.cpp +++ b/src/language/modules/SchemeModule.cpp @@ -6,6 +6,7 @@ #include <mesh/Mesh.hpp> #include <scheme/DirichletBoundaryConditionDescriptor.hpp> #include <scheme/FourierBoundaryConditionDescriptor.hpp> +#include <scheme/FreeBoundaryConditionDescriptor.hpp> #include <scheme/IBoundaryConditionDescriptor.hpp> #include <scheme/IBoundaryDescriptor.hpp> #include <scheme/NamedBoundaryDescriptor.hpp> diff --git a/src/scheme/FreeBoundaryConditionDescriptor.hpp b/src/scheme/FreeBoundaryConditionDescriptor.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b0eb2ceb218d77cae347a44219f13d278a25aee5 --- /dev/null +++ b/src/scheme/FreeBoundaryConditionDescriptor.hpp @@ -0,0 +1,46 @@ +#ifndef FREE_BOUNDARY_CONDITION_DESCRIPTOR_HPP +#define FREE_BOUNDARY_CONDITION_DESCRIPTOR_HPP + +#include <scheme/IBoundaryConditionDescriptor.hpp> +#include <scheme/IBoundaryDescriptor.hpp> + +#include <memory> + +class FreeBoundaryConditionDescriptor : public IBoundaryConditionDescriptor +{ + private: + std::ostream& + _write(std::ostream& os) const final + { + os << "free(" << *m_boundary_descriptor << ")"; + return os; + } + + std::shared_ptr<const IBoundaryDescriptor> m_boundary_descriptor; + + public: + const IBoundaryDescriptor& + boundaryDescriptor() const + { + return *m_boundary_descriptor; + } + + Type + type() const final + { + return Type::free; + } + + FreeBoundaryConditionDescriptor(std::shared_ptr<const IBoundaryDescriptor> boundary_descriptor) + : m_boundary_descriptor(boundary_descriptor) + { + ; + } + + FreeBoundaryConditionDescriptor(const FreeBoundaryConditionDescriptor&) = delete; + FreeBoundaryConditionDescriptor(FreeBoundaryConditionDescriptor&&) = delete; + + ~FreeBoundaryConditionDescriptor() = default; +}; + +#endif // FREE_BOUNDARY_CONDITION_DESCRIPTOR_HPP diff --git a/src/scheme/IBoundaryConditionDescriptor.hpp b/src/scheme/IBoundaryConditionDescriptor.hpp index be25ba73180f001ee264e9087379dc15ee03f378..30a25db66f1278e72eb2bea0ce7a017d8022da65 100644 --- a/src/scheme/IBoundaryConditionDescriptor.hpp +++ b/src/scheme/IBoundaryConditionDescriptor.hpp @@ -10,6 +10,7 @@ class IBoundaryConditionDescriptor { dirichlet, fourier, + free, neumann, symmetry };