35 #include "tr2shell7phfi.h" 41 #include "equationid.h" 53 FEI3dTrQuad Tr2Shell7PhFi :: interpolation;
55 IntArray Tr2Shell7PhFi :: ordering_disp(42);
56 IntArray Tr2Shell7PhFi :: ordering_disp_inv(42);
57 IntArray Tr2Shell7PhFi :: ordering_base(42);
58 IntArray Tr2Shell7PhFi :: ordering_base_inv(42);
59 IntArray Tr2Shell7PhFi:: ordering_all(1);
60 IntArray Tr2Shell7PhFi:: ordering_damage(1);
61 IntArray Tr2Shell7PhFi :: ordering_gr(1);
62 IntArray Tr2Shell7PhFi :: ordering_gr_edge(21);
63 bool Tr2Shell7PhFi :: __initialized = Tr2Shell7PhFi :: initOrdering();
67 Tr2Shell7PhFi:: Tr2Shell7PhFi(
int n, Domain *aDomain) : Shell7BasePhFi(n, aDomain)
71 this->ordering_damage.resize(0);
72 this->ordering_gr.resize(0);
73 this->ordering_disp_inv.resize(0);
75 IntArray localDam, localDisp(7);
78 localDisp.setValues(7, 1, 2, 3, 19, 20, 21, 37);
80 for (
int i = 1; i <= numberOfLayers; i++)
83 localDam.followedBy(7 + i);
86 int numDofsPerNode = 7 + numberOfLayers;
90 this->ordering_damage.followedBy(localDam);
91 this->ordering_gr.followedBy(localDisp);
92 this->ordering_gr.followedBy(localDam);
93 this->ordering_disp_inv.followedBy(localDisp);
100 localDisp.at(6) += 3;
101 localDisp.at(7) += 1;
103 localDam.add(numberOfLayers);
108 this->ordering_all.resize(0);
109 this->ordering_all = this->ordering_disp;
110 this->ordering_all.followedBy(ordering_damage);
115 IntArray temp_x(0), temp_m(0), temp_dam(0), local_temp_x(0), local_temp_m(0), local_temp_gam(0), local_temp_dam(0);
116 temp_x.setValues(3, 1, 2, 3);
117 temp_m.setValues(3, 4, 5, 6);
120 for (
int i = 1; i <= numberOfLayers; i++) {
121 temp_dam.followedBy(7 + i);
126 local_temp_x.followedBy(temp_x);
127 local_temp_m.followedBy(temp_m);
128 local_temp_gam.followedBy(temp_gam);
129 local_temp_dam.followedBy(temp_dam);
130 temp_x.add(numDofsPerNode);
131 temp_m.add(numDofsPerNode);
132 temp_gam +=numDofsPerNode;
133 temp_dam.add(numDofsPerNode);
141 ordering_disp.resize(0);
142 ordering_damage.resize(0);
143 this->ordering_disp.followedBy(local_temp_x);
144 this->ordering_disp.followedBy(local_temp_m);
145 this->ordering_disp.followedBy(local_temp_gam);
146 this->ordering_damage = local_temp_dam;
153 Tr2Shell7PhFi :: giveDofManDofIDMask_u(IntArray &answer)
155 Shell7BasePhFi :: giveDofManDofIDMask_u(answer);
159 Tr2Shell7PhFi :: giveDofManDofIDMask_d(IntArray &answer)
161 Shell7BasePhFi :: giveDofManDofIDMask_d(answer);
165 Tr2Shell7PhFi:: giveOrdering(SolutionField fieldType)
const 167 OOFEM_ERROR(
"Tr2Shell7PhFi :: giveOrdering not implemented: Use Tr2Shell7PhFi :: giveOrderingPhFi instead");
174 Tr2Shell7PhFi:: giveOrderingPhFi(SolutionFieldPhFi fieldType)
const 176 if ( fieldType == All ) {
177 return this->ordering_all;
178 }
else if ( fieldType == Displacement ) {
179 return this->ordering_disp;
180 }
else if ( fieldType == Damage ) {
181 return this->ordering_damage;
182 }
else if ( fieldType == AllInv ) {
183 return this->ordering_gr;
185 OOFEM_ERROR(
"Tr2Shell7PhFi :: giveOrdering: the requested ordering is not implemented")
191 Tr2Shell7PhFi :: giveOrdering_All()
const 193 return this->ordering_base;
197 Tr2Shell7PhFi :: giveOrdering_AllInv()
const 200 return this->ordering_base_inv;
204 Tr2Shell7PhFi :: giveOrdering_Disp()
const 206 return this->ordering_disp;
210 Tr2Shell7PhFi :: giveOrdering_Damage()
const 212 return this->ordering_damage;
217 Tr2Shell7PhFi:: giveLocalNodeCoords(FloatArray &nodeLocalXiCoords, FloatArray &nodeLocalEtaCoords)
219 nodeLocalXiCoords.setValues(6, 1., 0., 0., .5, 0., .5);
220 nodeLocalEtaCoords.setValues(6, 0., 1., 0., .5, .5, 0.);
224 FEInterpolation *Tr2Shell7PhFi:: giveInterpolation()
const {
return &
interpolation; }
229 Tr2Shell7PhFi:: computeGaussPoints()
234 specialIntegrationRulesArray =
new IntegrationRule * [ 3 ];
239 specialIntegrationRulesArray [ 1 ] =
new GaussIntegrationRule(1,
this);
240 specialIntegrationRulesArray [ 1 ]->SetUpPointsOnWedge(nPointsTri, 1, _3dMat);
244 specialIntegrationRulesArray [ 2 ] =
new GaussIntegrationRule(1,
this);
245 specialIntegrationRulesArray [ 2 ]->SetUpPointsOnLine(nPointsEdge, _3dMat);
250 LayeredCrossSection *
layeredCS =
dynamic_cast< LayeredCrossSection *
>( Tr2Shell7PhFi:: giveCrossSection() );
251 if ( layeredCS == NULL ) {
252 OOFEM_ERROR(
"Tr2Shell7PhFionly supports layered cross section");
254 this->numberOfIntegrationRules = layeredCS->giveNumberOfLayers();
255 this->
numberOfGaussPoints = layeredCS->giveNumberOfLayers() * nPointsTri * layeredCS->giveNumIntegrationPointsInLayer();
260 specialIntegrationRulesArray [ 0 ] =
new GaussIntegrationRule(1,
this);
261 specialIntegrationRulesArray [ 0 ]->SetUpPointsOnLine(layeredCS->giveNumIntegrationPointsInLayer(), _3dMat);
269 Tr2Shell7PhFi:: giveEdgeDofMapping(IntArray &answer,
int iEdge)
const 278 answer.setValues(21, 1, 2, 3, 8, 9, 10, 22, 23, 24, 4, 5, 6, 11, 12, 13, 25, 26, 27, 7, 14, 28);
279 }
else if ( iEdge == 2 ) {
281 answer.setValues(21, 8, 9, 10, 15, 16, 17, 29, 30, 31, 11, 12, 13, 18, 19, 20, 32, 33, 34, 14, 21, 35);
282 }
else if ( iEdge == 3 ) {
284 answer.setValues(21, 15, 16, 17, 1, 2, 3, 36, 37, 38, 18, 19, 20, 4, 5, 6, 39, 40, 41, 21, 7, 42);
286 _error(
"giveEdgeDofMapping: wrong edge number");
292 Tr2Shell7PhFi:: giveSurfaceDofMapping(IntArray &answer,
int iSurf)
const 295 for (
int i = 1; i <= 42; i++ ) {
302 Tr2Shell7PhFi:: computeAreaAround(GaussPoint *gp,
double xi)
304 FloatArray G1, G2, temp;
306 FloatArray lcoords(3);
307 lcoords.at(1) = gp->giveCoordinate(1);
308 lcoords.at(2) = gp->giveCoordinate(2);
311 G1.beColumnOf(Gcov, 1);
312 G2.beColumnOf(Gcov, 2);
313 temp.beVectorProductOf(G1, G2);
314 double detJ = temp.computeNorm();
315 return detJ * gp->giveWeight();
321 Tr2Shell7PhFi:: computeVolumeAroundLayer(GaussPoint *gp,
int layer)
326 lcoords = * gp->giveCoordinates();
328 detJ = Gcov.giveDeterminant() * 0.5 * this->layeredCS->giveLayerThickness(layer);
329 return detJ * gp->giveWeight();
334 Tr2Shell7PhFi:: compareMatrices(
const FloatMatrix &matrix1,
const FloatMatrix &matrix2, FloatMatrix &answer)
337 answer.resize(ndofs, ndofs);
338 for (
int i = 1; i <= ndofs; i++ ) {
339 for (
int j = 1; j <= 18; j++ ) {
340 if ( fabs( matrix1.at(i, j) ) > 1.0e-12 ) {
341 double diff = ( matrix1.at(i, j) - matrix2.at(i, j) );
342 double relDiff = diff / matrix1.at(i, j);
343 if ( fabs(relDiff) < 1.0e-4 ) {
344 answer.at(i, j) = 0.0;
345 }
else if ( fabs(diff) < 1.0e3 ) {
346 answer.at(i, j) = 0.0;
348 answer.at(i, j) = relDiff;
351 answer.at(i, j) = -1.0;
LayeredCrossSection * layeredCS
void evalInitialCovarBaseVectorsAt(const FloatArray &lCoords, FloatMatrix &Gcov)
int numberOfGaussPoints
Number of integration points as specified by nip.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
the oofem namespace is to define a context or scope in which all oofem names are defined.
static FEI3dTrQuad interpolation
int numberOfDofMans
Number of dofmanagers.