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

Add inflow and outflow boundary condition descriptors

parent 31608e4a
Branches
Tags
1 merge request!167Improve fluxing based remapping
...@@ -16,7 +16,9 @@ class IBoundaryConditionDescriptor ...@@ -16,7 +16,9 @@ class IBoundaryConditionDescriptor
fourier, fourier,
fixed, fixed,
free, free,
inflow,
neumann, neumann,
outflow,
symmetry symmetry
}; };
......
#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
#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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment