53RigidArmNode :: RigidArmNode(
int n,
Domain *aDomain) :
Node(n, aDomain)
61 Node :: initializeFrom(ir, priority);
69RigidArmNode :: postInitialize()
71 Node :: postInitialize();
77 if (
masterMask.giveSize() != this->dofidmask.giveSize() ) {
82 std::map< DofIDItem, IntArray > masterDofID;
83 std::map< DofIDItem, FloatArray > masterContribution;
90 int masterNdofs =
masterNode->giveNumberOfDofs();
93 for (
int &nodeNum: masterNodes ) {
100 for (
Dof *dof: *
this ) {
104 sdof->
initialize(masterNodes, masterDofID [
id ], masterContribution [
id ]);
111 if ( ( * masterNode )->giveParallelMode() !=
parallel_mode ) {
112 OOFEM_WARNING(
"mismatch in parallel mode of RigidArmNode and master", 1);
121RigidArmNode :: checkConsistency()
125 result = Node :: checkConsistency();
136 if ( this->
masterMask.at(i) && this->dofArray [ i - 1 ]->isPrimaryDof() ) {
137 OOFEM_ERROR(
"incompatible mastermask and doftype data");
146RigidArmNode :: computeMasterContribution(std::map< DofIDItem, IntArray > &masterDofID,
147 std::map< DofIDItem, FloatArray > &masterContribution)
153 int numberOfMasterDofs =
masterNode->giveNumberOfDofs();
157 uvw.
at(1) = this->
dofidmask->findFirstIndexOf(R_u);
158 uvw.
at(2) = this->
dofidmask->findFirstIndexOf(R_v);
159 uvw.
at(3) = this->
dofidmask->findFirstIndexOf(R_w);
168 for (
int i = 1; i <= this->
dofidmask->giveSize(); i++ ) {
171 masterDofID [ id ].resize(numberOfMasterDofs);
172 masterContribution [ id ].resize(numberOfMasterDofs);
181 R_uvw.at(3) = ( ( int ) R_v );
185 R_uvw.at(2) = -( ( int ) R_w );
187 }
else if (
id == D_v ) {
189 R_uvw.at(3) = -( ( int ) R_u );
193 R_uvw.at(1) = ( ( int ) R_w );
195 }
else if (
id == D_w ) {
197 R_uvw.at(2) = ( ( int ) R_u );
201 R_uvw.at(1) = -( ( int ) R_v );
212 masterDofID [ id ].at(k) = ( int )
id;
213 masterContribution [ id ].at(k) = 1.0;
215 for (
int j = 1; j <= 3; j++ ) {
216 if ( R_uvw.at(j) != 0 ) {
217 int sign = R_uvw.at(j) < 0 ? -1 : 1;
220 masterDofID [ id ].at(k) = sign * R_uvw.at(j);
221 masterContribution [ id ].at(k) = sign * xyz.
at(j);
224 masterDofID [ id ].resizeWithValues(k);
225 masterContribution [ id ].resizeWithValues(k);
235 IntArray fullDofMask = {D_u, D_v, D_w, R_u, R_v, R_w};
237 bool mhasg2l =
masterNode->computeL2GTransformation(TMG2L, fullDofMask);
246 TR.
at(1,5) = xyz.
at(3);
247 TR.
at(1,6) = -xyz.
at(2);
248 TR.
at(2,4) = -xyz.
at(3);
249 TR.
at(2,6) = xyz.
at(1);
250 TR.
at(3,4) = xyz.
at(2);
251 TR.
at(3,5) = -xyz.
at(1);
253 if (hasg2l && mhasg2l) {
259 }
else if (mhasg2l) {
266 for (
int i = 1; i <= this->
dofidmask.giveSize(); i++ ) {
270 masterContribution [ id ].resize(
dofidmask.giveSize());
272 for (
int j = 1; j <= this->
dofidmask.giveSize(); j++ ) {
274 masterContribution [ id ].at(j) = T.
at(
id,
dofidmask.at(j));
275 }
else if (
dofidmask.findFirstIndexOf(
id) == j ) {
276 masterContribution [ id ].at(j) = 1;
#define REGISTER_DofManager(class)
IntArray dofidmask
List of additional dof ids to include.
static ParamKey IPK_DofManager_mastermask
int giveNumberOfDofs() const
dofManagerParallelMode parallel_mode
void updateLocalNumbering(EntityRenumberingFunctor &f) override
const FloatArray & giveCoordinates() const
Dof * giveDofWithID(int dofID) const
DofIDItem giveDofID() const
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
int number
Component number.
Index giveSize() const
Returns the size of receiver.
void resizeWithValues(Index s, std::size_t allocChunk=0)
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
void rotatedWith(FloatMatrix &r, char mode)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
double at(std::size_t i, std::size_t j) const
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
void beUnitMatrix()
Sets receiver to unity matrix.
Node(int n, Domain *aDomain)
bool hasLocalCS()
Returns nonzero if node has prescribed local coordinate system.
std::unique_ptr< FloatMatrix > localCoordinateSystem
bool computeL2GTransformation(FloatMatrix &answer, const IntArray &dofIDArry) override
static ParamKey IPK_RigidArmNode_master
int masterDofMngr
Number of master DofManager (Node).
void computeMasterContribution(std::map< DofIDItem, IntArray > &masterDofID, std::map< DofIDItem, FloatArray > &masterContribution)
Node * masterNode
Pointer to master Node.
static ParamKey IPK_RigidArmNode_mastermask
void initialize(const IntArray &masterNodes, const IntArray &mstrDofID, const FloatArray &mstrContribution)
#define OOFEM_WARNING(...)
#define PM_DOFMAN_ERROR_IFNOTSET(_pm, _componentnum, _paramkey)
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)