MaMiCo
1.2
Toggle main menu visibility
Loading...
Searching...
No Matches
coupling
BoundaryForceController.h
1
// Copyright (C) 2015 Technische Universitaet Muenchen
2
// This file is part of the Mamico project. For conditions of distribution
3
// and use, please see the copyright notice in Mamico's main folder, or at
4
// www5.in.tum.de/mamico
5
#ifndef _MOLECULARDYNAMICS_COUPLING_BOUNDARYFORCECONTROLLER_H_
6
#define _MOLECULARDYNAMICS_COUPLING_BOUNDARYFORCECONTROLLER_H_
7
8
#include "coupling/datastructures/CouplingCellWithLinkedCells.h"
9
#include "coupling/interface/MDSolverInterface.h"
10
11
namespace
coupling
{
12
template
<
class
LinkedCell,
unsigned
int
dim>
class
BoundaryForceController
;
13
}
14
25
template
<
class
LinkedCell,
unsigned
int
dim>
class
coupling::BoundaryForceController
{
26
public
:
29
BoundaryForceController
(
coupling::interface::MDSolverInterface<LinkedCell, dim>
*
const
mdSolverInterface) :
_mdSolverInterface
(mdSolverInterface) {}
31
virtual
~BoundaryForceController
() {}
32
38
virtual
void
applyBoundaryForce
(
coupling::datastructures::CouplingCellWithLinkedCells<LinkedCell, dim>
& cell) = 0;
39
44
virtual
double
getPotentialEnergy
(
const
tarch::la::Vector<dim, double>
& position)
const
{
return
0; }
45
49
virtual
tarch::la::Vector<dim, double>
getForce
(
const
tarch::la::Vector<dim, double>
& position)
const
{
return
tarch::la::Vector<dim, double>
(0.0); }
50
51
protected
:
52
coupling::interface::MDSolverInterface<LinkedCell, dim>
*
const
_mdSolverInterface
;
53
};
54
#endif
// _MOLECULARDYNAMICS_COUPLING_BOUNDARYFORCECONTROLLER_H_
coupling::BoundaryForceController
controller for forces acting at open MD boundaries
Definition
BoundaryForceController.h:25
coupling::BoundaryForceController::~BoundaryForceController
virtual ~BoundaryForceController()
A simple destructor.
Definition
BoundaryForceController.h:31
coupling::BoundaryForceController::applyBoundaryForce
virtual void applyBoundaryForce(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell)=0
applies the boundary force on a boundary cell
coupling::BoundaryForceController::BoundaryForceController
BoundaryForceController(coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
A simple constructor.
Definition
BoundaryForceController.h:29
coupling::BoundaryForceController::_mdSolverInterface
coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface
interface of the molecular dynamics solver
Definition
BoundaryForceController.h:52
coupling::BoundaryForceController::getPotentialEnergy
virtual double getPotentialEnergy(const tarch::la::Vector< dim, double > &position) const
calculates the potential energy for a given position
Definition
BoundaryForceController.h:44
coupling::BoundaryForceController::getForce
virtual tarch::la::Vector< dim, double > getForce(const tarch::la::Vector< dim, double > &position) const
calculates the boundary force for the given particle position
Definition
BoundaryForceController.h:49
coupling::datastructures::CouplingCellWithLinkedCells
defines the cell type with cell-averaged quantities. Derived from the class coupling::datastructures:...
Definition
CouplingCellWithLinkedCells.h:26
coupling::interface::MDSolverInterface
interface to the MD simulation
Definition
MDSolverInterface.h:25
tarch::la::Vector
Definition
Vector.h:25
coupling
everything necessary for coupling operations, is defined in here
Definition
AdditiveMomentumInsertion.h:15
Generated by
1.17.0