51 assert(rFixedNodes.size()==rFixedNodeLocations.size());
52 this->mDirichletNodes = rFixedNodes;
54 this->mDirichletNodeValues.clear();
55 for (
unsigned i=0; i<this->mDirichletNodes.size(); i++)
57 unsigned index = this->mDirichletNodes[i];
58 c_vector<double,DIM> displacement;
59 for (
unsigned j=0; j<DIM; j++)
61 double location = rFixedNodeLocations[i](j);
64 if (location != this->FREE)
66 displacement(j) = location - this->mrMesh.GetNode(index)->rGetLocation()[j];
70 displacement(j) = this->FREE;
73 this->mDirichletNodeValues.push_back(displacement);
81 mIsHomogeneousMaterial =
true;
82 mCompressibilityType = compressibilityType;
84 mIncompressibleMaterialLaws.clear();
85 mCompressibleMaterialLaws.clear();
89 if (compressibilityType == INCOMPRESSIBLE)
92 CheckCastSuccess(compressibilityType, p_law);
93 mIncompressibleMaterialLaws.push_back(p_law);
98 CheckCastSuccess(compressibilityType, p_law);
99 mCompressibleMaterialLaws.push_back(p_law);
107 mIsHomogeneousMaterial =
false;
108 mCompressibilityType = compressibilityType;
110 mIncompressibleMaterialLaws.clear();
111 mCompressibleMaterialLaws.clear();
113 assert(this->mrMesh.GetNumElements() == rMaterialLaws.size());
115 if (compressibilityType == INCOMPRESSIBLE)
117 for (
unsigned i=0; i<rMaterialLaws.size(); i++)
119 assert(rMaterialLaws[i]);
121 CheckCastSuccess(compressibilityType, p_law);
122 mIncompressibleMaterialLaws.push_back(p_law);
127 for (
unsigned i=0; i<rMaterialLaws.size(); i++)
129 assert(rMaterialLaws[i]);
131 CheckCastSuccess(compressibilityType, p_law);
132 mCompressibleMaterialLaws.push_back(p_law);