Skip to content
Snippets Groups Projects
Commit 557a1192 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add fixed boundary condition descriptor

parent ab38cbb3
No related branches found
No related tags found
1 merge request!96Add random number engine encapsulation.
#ifndef FIXED_BOUNDARY_CONDITION_DESCRIPTOR_HPP
#define FIXED_BOUNDARY_CONDITION_DESCRIPTOR_HPP
#include <language/utils/FunctionSymbolId.hpp>
#include <scheme/IBoundaryConditionDescriptor.hpp>
#include <scheme/IBoundaryDescriptor.hpp>
#include <memory>
class FixedBoundaryConditionDescriptor : public IBoundaryConditionDescriptor
{
private:
std::ostream&
_write(std::ostream& os) const final
{
os << "fixed(" << m_name << ',' << *m_boundary_descriptor << ")";
return os;
}
const std::string_view m_name;
std::shared_ptr<const IBoundaryDescriptor> m_boundary_descriptor;
public:
std::string_view
name() const
{
return m_name;
}
const IBoundaryDescriptor&
boundaryDescriptor() const
{
return *m_boundary_descriptor;
}
Type
type() const final
{
return Type::fixed;
}
FixedBoundaryConditionDescriptor(const std::string_view name,
std::shared_ptr<const IBoundaryDescriptor> boundary_descriptor)
: m_name{name}, m_boundary_descriptor(boundary_descriptor)
{
;
}
FixedBoundaryConditionDescriptor(const FixedBoundaryConditionDescriptor&) = delete;
FixedBoundaryConditionDescriptor(FixedBoundaryConditionDescriptor&&) = delete;
~FixedBoundaryConditionDescriptor() = default;
};
#endif // FIXED_BOUNDARY_CONDITION_DESCRIPTOR_HPP
......@@ -10,6 +10,7 @@ class IBoundaryConditionDescriptor
{
dirichlet,
fourier,
fixed,
free,
neumann,
symmetry
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment