Continuum Membrane 719025a62b1e384a6ff80e2f2a223ef4012153dc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
Force Class Reference

This class includes 7 components in calculating force exerted on vertrices: force due to membrane bending, area constraint, volume constraint, membrane thickness constraint, lipid tilting, regularization, and spline. More...

#include <Force.hpp>

Public Member Functions

 Force ()
 Construct a new Force object with all force components set to zero.
 
 Force (const Force &force)
 Construct a new Force object with all force components set to the same as the input force, i.e. create a deepcopy of the input force.
 
Matrixcalculate_total_force ()
 Set forceTotal to the sum of 7 force components.
 
void set_all_zero ()
 Reset all force components to zero without reallocating matrices.
 
double get_total_force_magnitude ()
 Get the magnitude (norm) of total force.
 
std::string to_string_full ()
 Returns a string representation of the force values for various properties.
 
std::string to_string_full_at_vertex (const int i)
 Returns a string representation of the forces acting on a vertex for each property.
 

Public Attributes

Matrix forceCurvature
 Force due to membrane bending.
 
Matrix forceArea
 Force due to area constraint.
 
Matrix forceVolume
 Force due to volume constraint; set 0 if membrane is flat.
 
Matrix forceThickness
 Force due to membrane thickness change.
 
Matrix forceTilt
 Force due to lipid tilting.
 
Matrix forceRegularization
 
Matrix forceHarmonicBond
 
Matrix forceTotal
 Total force by summing up the 7 force terms.
 

Friends

std::ostream & operator<< (std::ostream &stream, const Force &force)
 Overrides the operator<< in ostream. Outputs force in the format of (forceTotal[0], forceTotal[1], forceTotal[2]). Used in command line output.
 

Detailed Description

This class includes 7 components in calculating force exerted on vertrices: force due to membrane bending, area constraint, volume constraint, membrane thickness constraint, lipid tilting, regularization, and spline.

Constructor & Destructor Documentation

◆ Force() [1/2]

Force::Force ( )

Construct a new Force object with all force components set to zero.

◆ Force() [2/2]

Force::Force ( const Force force)

Construct a new Force object with all force components set to the same as the input force, i.e. create a deepcopy of the input force.

Parameters
force

Member Function Documentation

◆ calculate_total_force()

Matrix & Force::calculate_total_force ( )

Set forceTotal to the sum of 7 force components.

Returns
gsl_matrix of calculated total force.

◆ get_total_force_magnitude()

double Force::get_total_force_magnitude ( )

Get the magnitude (norm) of total force.

Returns
double magnitude of the total force
Note
This method assumes total force is up to date. If not, please use calculate_total_force() to update the total force.

◆ set_all_zero()

void Force::set_all_zero ( )

Reset all force components to zero without reallocating matrices.

◆ to_string_full()

std::string Force::to_string_full ( )

Returns a string representation of the force values for various properties.

Parameters
forceA Force object to extract the force values from.
Returns
A string containing the force values for each property, separated by newlines.

◆ to_string_full_at_vertex()

std::string Force::to_string_full_at_vertex ( const int  i)

Returns a string representation of the forces acting on a vertex for each property.

Parameters
iThe index of the vertex to extract the forces from.
Returns
A string containing the force values for each property at the specified vertex, separated by newlines.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
const Force force 
)
friend

Overrides the operator<< in ostream. Outputs force in the format of (forceTotal[0], forceTotal[1], forceTotal[2]). Used in command line output.

Note
Only outputs forceTotal. Please use Force::to_full_string() or Force::to_full_string_at_vertex() for all components.

Member Data Documentation

◆ forceArea

Matrix Force::forceArea

Force due to area constraint.

◆ forceCurvature

Matrix Force::forceCurvature

Force due to membrane bending.

◆ forceHarmonicBond

Matrix Force::forceHarmonicBond

Force due to harmonic bond between the membrane and the attached spline, which can be a single particle or a lattice. The calculations are defined separately in spline_points.cpp due to it requiring the coordinate information of the spline points.

◆ forceRegularization

Matrix Force::forceRegularization

Regularization force; this does not change the geometry of actual limit surface. Instead, it restrains the shape of each mesh triangle to be as close to equilateral triangle as possible to avoid deformation of the triangular mesh.

◆ forceThickness

Matrix Force::forceThickness

Force due to membrane thickness change.

◆ forceTilt

Matrix Force::forceTilt

Force due to lipid tilting.

◆ forceTotal

Matrix Force::forceTotal

Total force by summing up the 7 force terms.

◆ forceVolume

Matrix Force::forceVolume

Force due to volume constraint; set 0 if membrane is flat.


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