MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::ZhouBoundaryForceController< LinkedCell, dim > Class Template Reference

applies the boundary force from Zhou et al. in boundary cell. More...

#include <ZhouBoundaryForceController.h>

Inheritance diagram for coupling::ZhouBoundaryForceController< LinkedCell, dim >:
Collaboration diagram for coupling::ZhouBoundaryForceController< LinkedCell, dim >:

Public Member Functions

 ZhouBoundaryForceController (const double &density, const double &temperature, const tarch::la::Vector< 2 *dim, bool > &boundary, coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
 A simple constructor.
 
virtual ~ZhouBoundaryForceController ()
 Destructor.
 
virtual void applyBoundaryForce (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell)
 applies the Zhou boundary force on a boundary cell
 
virtual double getPotentialEnergy (const tarch::la::Vector< dim, double > &position) const
 calculates the potential energy for a given position
 
virtual tarch::la::Vector< dim, double > getForce (const tarch::la::Vector< dim, double > &position) const
 calculates the boundary force for the given particle position
 
- Public Member Functions inherited from coupling::BoundaryForceController< LinkedCell, dim >
 BoundaryForceController (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
 A simple constructor.
 
virtual ~BoundaryForceController ()
 A simple destructor.
 

Private Attributes

const double _density
 the mean density
 
const double _temperature
 the mean temperature
 
const tarch::la::Vector< 2 *dim, bool > _boundary
 indicates at which boundaries to apply the force
 
coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim > _zhouBoundaryForce
 the cell mapping for the application of the force
 

Additional Inherited Members

- Protected Attributes inherited from coupling::BoundaryForceController< LinkedCell, dim >
coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface
 interface of the molecular dynamics solver
 

Detailed Description

template<class LinkedCell, unsigned int dim>
class coupling::ZhouBoundaryForceController< LinkedCell, dim >

applies the boundary force from Zhou et al. in boundary cell.

For details on the forcing, check out the descriptions in cell-mappings/ZhouBoundaryForce.

Template Parameters
LinkedCellthe LinkedCell class is given by the implementation of linked cells in the molecular dynamics simulation
dimthe integer dim refers to the spacial dimension of the simulation, can be 1, 2, or 3
Author
Philipp Neumann

Constructor & Destructor Documentation

◆ ZhouBoundaryForceController()

template<class LinkedCell, unsigned int dim>
coupling::ZhouBoundaryForceController< LinkedCell, dim >::ZhouBoundaryForceController ( const double & density,
const double & temperature,
const tarch::la::Vector< 2 *dim, bool > & boundary,
coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface )
inline

A simple constructor.

Parameters
densitythe mean density for the setup
temperaturethe mean temperature for the setup
boundarya vector of booleans indicating at which boundaries the force shall be applied
mdSolverInterfacea reference to the interface of the MD solver

Member Function Documentation

◆ applyBoundaryForce()

template<class LinkedCell, unsigned int dim>
virtual void coupling::ZhouBoundaryForceController< LinkedCell, dim >::applyBoundaryForce ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell)
inlinevirtual

applies the Zhou boundary force on a boundary cell

iterates over all linked cells of the given coupling cell and applies the cellmapping for the Zhou boundary force

Parameters
cellthe macroscopic boundary cell to apply the boundary force

Implements coupling::BoundaryForceController< LinkedCell, dim >.

◆ getForce()

template<class LinkedCell, unsigned int dim>
virtual tarch::la::Vector< dim, double > coupling::ZhouBoundaryForceController< LinkedCell, dim >::getForce ( const tarch::la::Vector< dim, double > & position) const
inlinevirtual

calculates the boundary force for the given particle position

Parameters
positionparticle position for the force calculation
Returns
the boundary force at the given position

Reimplemented from coupling::BoundaryForceController< LinkedCell, dim >.

◆ getPotentialEnergy()

template<class LinkedCell, unsigned int dim>
virtual double coupling::ZhouBoundaryForceController< LinkedCell, dim >::getPotentialEnergy ( const tarch::la::Vector< dim, double > & position) const
inlinevirtual

calculates the potential energy for a given position

Parameters
positionthe position for which the potential energy will be calculated
Returns
the potential energy at the given position

Reimplemented from coupling::BoundaryForceController< LinkedCell, dim >.

Member Data Documentation

◆ _boundary

template<class LinkedCell, unsigned int dim>
const tarch::la::Vector<2 * dim, bool> coupling::ZhouBoundaryForceController< LinkedCell, dim >::_boundary
private

indicates at which boundaries to apply the force

A boolean vector which indicates where to apply the boundary force. Per dimension it has two enteries. They refer to the boundaries in the following order: left (small x), right (high x), front (small y), back (high y), bottom (small z), top (high z).


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