ppap4lmp  0.7.2
AddInertiaMoment Class Reference

AddInertiaMoment adds inertia moment to an Element object. More...

#include <add_inertia_moment.h>

Inheritance diagram for AddInertiaMoment:
Collaboration diagram for AddInertiaMoment:

Public Member Functions

 AddInertiaMoment (const ElPtr &elem)
 Constructor of AddInertiaMoment class. More...
 
- Public Member Functions inherited from Adder
 Updater ()=default
 Constructor of Updater class. More...
 
- Public Member Functions inherited from Updater
 Updater ()=default
 Constructor of Updater class. More...
 
void compute (const ElPtr &elem, const int elementid, Json &data)
 Managing computation to update Element::data. More...
 
void remove_from_skippable_elementids (const int elementid)
 Remove Element::elementid from skippable_elementids. More...
 
const ShPtr< Generator > & get_ext_generator ()
 Get ext_generator of this object. More...
 

Protected Member Functions

virtual void compute_impl (Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override
 This method overrides Updater::compute_impl. More...
 
- Protected Member Functions inherited from Adder
virtual void compute_body (const ElPtr &elem, Json &data) override
 Compute properties and add them to Element::data given as a mutable reference. More...
 
- Protected Member Functions inherited from Updater
virtual void compute_common (const ElPtr &elem, Json &data)
 Common part of compute_body. More...
 

Additional Inherited Members

- Protected Attributes inherited from Updater
ShPtr< Generatorext_generator
 

Detailed Description

AddInertiaMoment adds inertia moment to an Element object.

An object of this class computes elements of 3x3 matrix of inertia moment (a.k.a. inertia matrix, inertia tensor) of a parent Element object from masses and positions of a child Element object, and adds it to the parent object. The object of this class owns the child object as ext_generator, and is appended to the parent object using its Element::append_updater. An example of child is an Element object containing data for atoms, and an example of parent* is an Element object containing data for molecules.

The terms child and parent are used because a parent object consists of a child object. In terms of time series, however, the child is created earlier than the parent.

About usage in Python, please see pybind::py_add_inertia_moment.

Definition at line 34 of file add_inertia_moment.h.

Constructor & Destructor Documentation

◆ AddInertiaMoment()

AddInertiaMoment::AddInertiaMoment ( const ElPtr elem)

Constructor of AddInertiaMoment class.

Parameters
elemA child Element object. This parameter is assigned to ext_generator.
Required property
  • id : int
  • mass : float
  • xu : float
  • yu : float
  • zu : float

Definition at line 16 of file add_inertia_moment.cpp.

Member Function Documentation

◆ compute_impl()

void AddInertiaMoment::compute_impl ( Json data,
JsonToVoidFunc  check_required_keys,
JsonToBoolFunc  check_optional_keys 
)
overrideprotectedvirtual

This method overrides Updater::compute_impl.

Property to be added
  • I_xx : float
  • I_yy : float
  • I_zz : float
  • I_xy : float
  • I_xz : float
  • I_yz : float
Required property
  • atom-ids : array of integers
  • xu : float
  • yu : float
  • zu : float
  • atom-weights : array of floats (optional)

Implements Updater.

Definition at line 24 of file add_inertia_moment.cpp.

Here is the call graph for this function:

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