Select Git revision
MeshLineNodeBoundary.cpp
BoundaryCondition.hpp 2.83 KiB
#ifndef BOUNDARY_CONDITION_HANDLER_HPP
#define BOUNDARY_CONDITION_HANDLER_HPP
#include <vector>
#include <memory>
#include <Array.hpp>
#include <RefNodeList.hpp>
#include <MeshNodeBoundary.hpp>
class BoundaryCondition
{
public:
enum Type {
velocity,
normal_velocity,
pressure,
symmetry
};
const Type m_type;
protected:
BoundaryCondition(const Type& type)
: m_type(type)
{
;
}
public:
const Type& type() const
{
return m_type;
}
virtual ~BoundaryCondition() = default;
};
class PressureBoundaryCondition
: public BoundaryCondition
{
private:
const double m_value;
const size_t m_number_of_faces;
Array<const unsigned int> m_face_list;
public:
double value() const
{
return m_value;
}
const size_t& numberOfFaces() const
{
return m_number_of_faces;
}
const Array<const unsigned int>& faceList() const
{
return m_face_list;
}
PressureBoundaryCondition(const double& value,
const std::vector<unsigned int>& faces)
: BoundaryCondition(BoundaryCondition::pressure),
m_value(value),
m_number_of_faces(faces.size())
{