MPS-Basic
Loading...
Searching...
No Matches
PressureCalculator::DirichletBoundaryCondition Class Reference

Dirichlet boundary condition. More...

#include <dirichlet_boundary_condition.hpp>

Public Member Functions

bool contains (int id) const
 Check if the boundary condition contains the particle.
 
double value (int id) const
 Get the boundary condition value.
 
void set (int id, double value)
 Set the boundary condition value.
 
 DirichletBoundaryCondition ()=default
 

Private Attributes

std::unordered_map< int, double > values
 boundary condition values
 

Detailed Description

Dirichlet boundary condition.

Dirichlet boundary condition is used to set the pressure of particles on the boundary of the fluid domain. This class controls the id of particles that attach Dirichlet boundary conditions and the value of pressure for those particles.

Definition at line 14 of file dirichlet_boundary_condition.hpp.

Constructor & Destructor Documentation

◆ DirichletBoundaryCondition()

PressureCalculator::DirichletBoundaryCondition::DirichletBoundaryCondition ( )
default

Member Function Documentation

◆ contains()

bool DirichletBoundaryCondition::contains ( int id) const

Check if the boundary condition contains the particle.

Parameters
idParticle id
Returns
True if the boundary condition contains the particle

Definition at line 5 of file dirichlet_boundary_condition.cpp.

5 {
6 return this->values.find(id) != this->values.end();
7}
std::unordered_map< int, double > values
boundary condition values
Here is the caller graph for this function:

◆ value()

double DirichletBoundaryCondition::value ( int id) const

Get the boundary condition value.

Parameters
idParticle id
Returns
Boundary condition value

Definition at line 9 of file dirichlet_boundary_condition.cpp.

9 {
10 return this->values.at(id);
11}
Here is the caller graph for this function:

◆ set()

void DirichletBoundaryCondition::set ( int id,
double value )

Set the boundary condition value.

Parameters
idParticle id
valueBoundary condition value

Definition at line 13 of file dirichlet_boundary_condition.cpp.

13 {
14 this->values[id] = value;
15}
double value(int id) const
Get the boundary condition value.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ values

std::unordered_map<int, double> PressureCalculator::DirichletBoundaryCondition::values
private

boundary condition values

key: particle id value: boundary condition value

Definition at line 46 of file dirichlet_boundary_condition.hpp.


The documentation for this class was generated from the following files: