|
IFEM
90A354
|
Class for storage of a global nodal force vector with assembly methods. More...
#include <GlbForceVec.h>


Public Member Functions | |
| GlbForceVec (const SAM &_sam) | |
| The constructor only sets its reference to the SAM object. | |
| virtual | ~GlbForceVec () |
| Empty destructor. | |
| bool | initNodeMap (const std::vector< int > &globalNodes, size_t nfc) |
| Initializes the global node map and allocates the force vector. More... | |
| virtual void | initialize (char=0) |
| Initializes the global nodal force vector to zero. | |
| virtual bool | finalize (bool=false) |
| Finalizes the global nodal force vector after element assembly. | |
| virtual bool | assemble (const LocalIntegral *elmObj, int elmId) |
| Adds a set of element nodal forces into the global nodal forces. More... | |
| Vec3 | getForce (int node) const |
| Returns the global nodal force vector for a specified node. More... | |
| Vec3 | getTotalForce () const |
| Returns the sum of the nodal forces, i.e. total force. | |
| int | getForce (size_t indx, Vec3 &force) const |
| Returns the global nodal force vector for a specified node. More... | |
| size_t | size () const |
| Returns the size in terms of number of nodes with nodal forces. | |
Public Member Functions inherited from GlobalIntegral | |
| GlobalIntegral () | |
| The default constructor. | |
| virtual | ~GlobalIntegral () |
| Empty destructor. | |
| virtual bool | threadSafe () const |
| Returns true if all elements can be assembled in parallel. | |
| virtual bool | haveContributions (size_t, const std::vector< Property > &) const |
| Returns false if no contributions from a specified patch. | |
Private Attributes | |
| const SAM & | sam |
| Data for FE assembly management. | |
| Matrix | F |
| Global nodal forces. | |
| std::vector< int > | nodeNum |
| Global node numbers with forces. | |
| std::map< int, size_t > | nodeMap |
| Maps from global node number to force index. | |
Class for storage of a global nodal force vector with assembly methods.
|
virtual |
Adds a set of element nodal forces into the global nodal forces.
| [in] | elmObj | Pointer to the element nodal forces to add into *this |
| [in] | elmId | Global number of the element associated with *elmObj |
Reimplemented from GlobalIntegral.
References ElmMats::b, F, SAM::getElmNodes(), SAM::getNodeDOFs(), ElmMats::getRHSVector(), nodeMap, utl::matrix< T >::rows(), and sam.
| Vec3 GlbForceVec::getForce | ( | int | node | ) | const |
Returns the global nodal force vector for a specified node.
| [in] | node | 1-based global node number to return the forces for |
References F, utl::matrix< T >::getColumn(), and nodeMap.
Referenced by HDF5Writer::writeNodalForces().
| int GlbForceVec::getForce | ( | size_t | indx, |
| Vec3 & | force | ||
| ) | const |
Returns the global nodal force vector for a specified node.
| [in] | indx | 0-based node index to return the forces for |
| [out] | force | The force at the sepcified node |
References utl::matrix< T >::cols(), F, utl::matrix< T >::getColumn(), and nodeNum.
| bool GlbForceVec::initNodeMap | ( | const std::vector< int > & | globalNodes, |
| size_t | nfc | ||
| ) |
Initializes the global node map and allocates the force vector.
| [in] | globalNodes | The global node numbers that will have force terms |
| [in] | nfc | Number of force components |
References F, SAM::getNoNodes(), nodeMap, nodeNum, utl::matrix< T >::resize(), and sam.
Referenced by SIM::initBoundaryNodeMap().