Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new lattice2dboundary element and latticedamage material #54

Closed
wants to merge 60 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5e4b758
Added LatticeLinearElastic and LatticeDamage material models. Updated…
adsci Apr 4, 2019
d3d31fe
Added Lattice3D and Lattice3DBoundary elements + related tests
adsci Apr 5, 2019
a27af64
Added LTRSpaceBoundary element and VTKXMLPeriodic export module
adsci May 3, 2019
1ae2531
Removed leftover test output files
adsci May 3, 2019
42fdb9d
LTRSpaceBoundaryTruss and LTRSpaceBoundaryVoigt elements and changes …
adsci May 14, 2019
fad16a9
LTRSpaceBoundaryMembrane element and related tests
adsci May 14, 2019
761bc6f
LTRSpaceBoundaryBeam and LTRSpaceBoundaryPlate elements, VTKXMLPeriod…
adsci May 17, 2019
a10bda9
VTKXML output for LIBeam3d elements
adsci May 23, 2019
fb124e9
Optional segment length in IntElPoint element. Bondceb02 test case
adsci May 27, 2019
41851dc
Added giveReferenceNode method in LIBeam3d
adsci May 29, 2019
45e69c0
LIBeam3dBoundary element, VTKXMLPeriodic export, and test case
adsci May 29, 2019
310dc23
Additional LIBeam3dBoundary elements depending on macro element type
adsci May 30, 2019
742f6be
Fixed a small bug in VTKXMLPeriodic export module
adsci Jun 4, 2019
25fb052
Set specification option for FiberedCS and improved output
adsci Jun 6, 2019
8bd99ce
Fixed a bug in beam element export in VTKXMLPeriodic export module
adsci Jun 13, 2019
034a045
Merge remote-tracking branch 'adsci/periodicRC3d'
adsci Jun 18, 2019
bcd3275
Characteristic length for LTRSpaceBoundary elements
adsci Jun 19, 2019
5dc6279
Added latticelinks
graspel Jun 21, 2019
05014e0
fix of length
graspel Jun 21, 2019
6364113
added link element
graspel Jul 19, 2019
da705df
fixed bugs
graspel Jul 19, 2019
3a33284
small improv
graspel Jul 19, 2019
9b406bb
more link additions
graspel Jul 25, 2019
b68b264
update
graspel Jul 31, 2019
832e641
Adding vof support for transport elements, adding prototype implement…
bpatzak Jul 4, 2019
eef5db9
Adding support for solution dependent external forces in NR solver, i…
nitramkaroh Jul 24, 2019
be466aa
Initial version of python bindings based on pybind11
bpatzak Jul 27, 2019
77dcb80
Further work on pybind11 bindings
bpatzak Jul 27, 2019
9990f84
Continuing work on pybind11 bindings
bpatzak Jul 28, 2019
c349a9f
Continuing work on pybind11 bindings
bpatzak Jul 30, 2019
54e30f4
add rotational stiffness
graspel Aug 6, 2019
7a10d10
more link element changes
graspel Aug 11, 2019
17d83c9
added beam rve tests
graspel Aug 14, 2019
8f0b3ff
updated and added rve tests
graspel Aug 14, 2019
5716908
merge
graspel Aug 22, 2019
e30e573
additional bond test with blocked rotational DOF
graspel Aug 23, 2019
3fd9977
added different bond laws to linkslip
graspel Sep 5, 2019
88f7499
additional bond test
graspel Sep 5, 2019
9c2d773
changes in slip model
graspel Sep 27, 2019
220b565
Output of current load level in matlab export module
adsci Sep 22, 2019
72477d3
Added giveMaterial method to FiberedCrossSection
adsci Sep 22, 2019
30ee24a
Interface jump - interface traction output for linkslip material model
adsci Sep 28, 2019
6d3db42
Initialize status variables in slip model
adsci Sep 28, 2019
0fc2f67
Test case for linkslip material model
adsci Sep 28, 2019
3f87609
clean up of status of linkslip
graspel Sep 28, 2019
61363b7
Intro of link boundary elements
graspel Oct 7, 2019
481e88b
resolve commit
graspel Oct 7, 2019
49ef211
added a few more models from the old oofem
graspel Oct 8, 2019
c5952d9
more additions
graspel Oct 17, 2019
4a03a96
additional lattice materials
graspel Oct 17, 2019
e74f8f1
new lattice2dboundary element and latticedamage material
graspel Oct 18, 2019
febfcdc
merge
graspel Oct 18, 2019
cd9a6a2
Fixed merge
graspel Oct 18, 2019
6648b24
cleaned up
graspel Oct 18, 2019
29f8133
Addition of 3d lattice elements
graspel Oct 18, 2019
580f7dd
Adding latticelink elements and materials
graspel Oct 18, 2019
3b01de9
fixed merge
graspel Oct 18, 2019
edc54c6
added material manual
graspel Oct 18, 2019
430bd5b
cleaning up periodic export
graspel Oct 19, 2019
1701ec5
Restructuring in periodic export module
graspel Oct 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Restructuring in periodic export module
  • Loading branch information
graspel committed Oct 19, 2019
commit 1701ec54b744901d1959be896f11f913486a5d2b
308 changes: 162 additions & 146 deletions src/oofemlib/vtkxmlperiodicexportmodule.C

Large diffs are not rendered by default.

21 changes: 10 additions & 11 deletions src/oofemlib/vtkxmlperiodicexportmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@

namespace oofem {
/**
* Represents VTK (Visualization Toolkit) export module. It uses VTK (.vtu) file format, Unstructured grid dataset.
* The export of data is done on Region By Region basis, possibly taking care about possible nonsmooth character of
* some internal variables at region boundaries.
* Each region is usually exported as a single piece. When region contains composite cells, these are assumed to be
* exported in individual subsequent pieces after the default one for the particular region.


*
*
* Represents VTK (Visualization Toolkit) export module for periodic cells. It uses VTK (.vtu) file format
* It extends vtkxmlexportmodule by introducing methods to deal with boundary elements.
* @author: Ignatios Athanasiadis, Adam Sciegaj, Peter Grassl
*
*/
class OOFEM_EXPORT VTKXMLPeriodicExportModule : public VTKXMLExportModule
{
Expand All @@ -62,7 +61,7 @@ class OOFEM_EXPORT VTKXMLPeriodicExportModule : public VTKXMLExportModule
IntArray locationMap;
IntArray elementNodePeriodicMap;
int elemNodes;

void giveSwitches(IntArray &answer, int location);

public:
Expand All @@ -78,9 +77,9 @@ class OOFEM_EXPORT VTKXMLPeriodicExportModule : public VTKXMLExportModule
void setupVTKPiece(VTKPiece &vtkPiece, TimeStep *tStep, int region) override;

int initRegionNodeNumbering(IntArray &mapG2L, IntArray &mapL2G,
int &regionDofMans,
int &totalcells,
Domain *domain, TimeStep *tStep, int reg) override;
int &regionDofMans,
int &totalcells,
Domain *domain, TimeStep *tStep, int reg) override;

void exportPrimaryVars(VTKPiece &vtkPiece, IntArray &mapG2L, IntArray &mapL2G, int region, TimeStep *tStep) override;
void exportIntVars(VTKPiece &vtkPiece, IntArray &mapG2L, IntArray &mapL2G, int region, TimeStep *tStep) override;
Expand Down
164 changes: 96 additions & 68 deletions src/sm/Elements/3D/ltrspaceboundary.C
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ Interface *
LTRSpaceBoundary :: giveInterface(InterfaceType interface)
{
if ( interface == NodalAveragingRecoveryModelInterfaceType ) {
return static_cast< NodalAveragingRecoveryModelInterface * >(this);
return static_cast< NodalAveragingRecoveryModelInterface * >( this );
} else if ( interface == SpatialLocalizerInterfaceType ) {
return static_cast< SpatialLocalizerInterface * >(this);
return static_cast< SpatialLocalizerInterface * >( this );
}

return NULL;
Expand All @@ -99,14 +99,14 @@ LTRSpaceBoundary :: computeGlobalCoordinates(FloatArray &answer, const FloatArra

answer.clear();
for ( int i = 1; i <= 4; i++ ) {
if ( location.at(i) != 0) { //recalculate vertex coordinates
if ( location.at(i) != 0 ) { //recalculate vertex coordinates
IntArray switches;
FloatArray vertexCoords;
recalculateCoordinates(i, vertexCoords);

answer.add( n.at(i), vertexCoords );
answer.add(n.at(i), vertexCoords);
} else {
answer.add( n.at(i), cellgeo.giveVertexCoordinates(i) );
answer.add(n.at(i), cellgeo.giveVertexCoordinates(i) );
}
}

Expand All @@ -116,7 +116,7 @@ LTRSpaceBoundary :: computeGlobalCoordinates(FloatArray &answer, const FloatArra
void
LTRSpaceBoundary :: giveDofManDofIDMask(int inode, IntArray &answer) const
{
if (inode == 5) {
if ( inode == 5 ) {
answer = { D_u, D_v, D_w, R_u, R_v, R_w, V_u, V_v, V_w };
} else {
answer = { D_u, D_v, D_w };
Expand Down Expand Up @@ -155,13 +155,22 @@ LTRSpaceBoundary :: computeVolumeAround(GaussPoint *gp)
recalculateCoordinates(3, v3);
recalculateCoordinates(4, v4);

x1 = v1.at(1); x2 = v2.at(1); x3 = v3.at(1); x4 = v4.at(1);
y1 = v1.at(2); y2 = v2.at(2); y3 = v3.at(2); y4 = v4.at(2);
z1 = v1.at(3); z2 = v2.at(3); z3 = v3.at(3); z4 = v4.at(3);
x1 = v1.at(1);
x2 = v2.at(1);
x3 = v3.at(1);
x4 = v4.at(1);
y1 = v1.at(2);
y2 = v2.at(2);
y3 = v3.at(2);
y4 = v4.at(2);
z1 = v1.at(3);
z2 = v2.at(3);
z3 = v3.at(3);
z4 = v4.at(3);

detJ = ( ( x4 - x1 ) * ( y2 - y1 ) * ( z3 - z1 ) - ( x4 - x1 ) * ( y3 - y1 ) * ( z2 - z1 ) +
( x3 - x1 ) * ( y4 - y1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( y4 - y1 ) * ( z3 - z1 ) +
( x2 - x1 ) * ( y3 - y1 ) * ( z4 - z1 ) - ( x3 - x1 ) * ( y2 - y1 ) * ( z4 - z1 ) );
( x3 - x1 ) * ( y4 - y1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( y4 - y1 ) * ( z3 - z1 ) +
( x2 - x1 ) * ( y3 - y1 ) * ( z4 - z1 ) - ( x3 - x1 ) * ( y2 - y1 ) * ( z4 - z1 ) );

if ( detJ <= 0.0 ) {
OOFEM_ERROR("negative volume");
Expand All @@ -185,19 +194,28 @@ LTRSpaceBoundary :: computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int li
recalculateCoordinates(3, v3);
recalculateCoordinates(4, v4);

x1 = v1.at(1); x2 = v2.at(1); x3 = v3.at(1); x4 = v4.at(1);
y1 = v1.at(2); y2 = v2.at(2); y3 = v3.at(2); y4 = v4.at(2);
z1 = v1.at(3); z2 = v2.at(3); z3 = v3.at(3); z4 = v4.at(3);
x1 = v1.at(1);
x2 = v2.at(1);
x3 = v3.at(1);
x4 = v4.at(1);
y1 = v1.at(2);
y2 = v2.at(2);
y3 = v3.at(2);
y4 = v4.at(2);
z1 = v1.at(3);
z2 = v2.at(3);
z3 = v3.at(3);
z4 = v4.at(3);

detJ = ( ( x4 - x1 ) * ( y2 - y1 ) * ( z3 - z1 ) - ( x4 - x1 ) * ( y3 - y1 ) * ( z2 - z1 ) +
( x3 - x1 ) * ( y4 - y1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( y4 - y1 ) * ( z3 - z1 ) +
( x2 - x1 ) * ( y3 - y1 ) * ( z4 - z1 ) - ( x3 - x1 ) * ( y2 - y1 ) * ( z4 - z1 ) );
( x3 - x1 ) * ( y4 - y1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( y4 - y1 ) * ( z3 - z1 ) +
( x2 - x1 ) * ( y3 - y1 ) * ( z4 - z1 ) - ( x3 - x1 ) * ( y2 - y1 ) * ( z4 - z1 ) );

if ( detJ <= 0.0 ) {
OOFEM_ERROR("negative volume");
}

dNdx.resize(4,3);
dNdx.resize(4, 3);
dNdx.at(1, 1) = -( ( y3 - y2 ) * ( z4 - z2 ) - ( y4 - y2 ) * ( z3 - z2 ) );
dNdx.at(2, 1) = ( y4 - y3 ) * ( z1 - z3 ) - ( y1 - y3 ) * ( z4 - z3 );
dNdx.at(3, 1) = -( ( y1 - y4 ) * ( z2 - z4 ) - ( y2 - y4 ) * ( z1 - z4 ) );
Expand Down Expand Up @@ -231,7 +249,6 @@ LTRSpaceBoundary :: computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int li
void
LTRSpaceBoundary :: computeDeformationGradientVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
{

FloatArray u;
this->computeVectorOf({ D_u, D_v, D_w }, VM_Total, tStep, u); // solution vector
if ( initialDisplacements ) {
Expand Down Expand Up @@ -265,19 +282,28 @@ LTRSpaceBoundary :: computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer)
recalculateCoordinates(3, v3);
recalculateCoordinates(4, v4);

x1 = v1.at(1); x2 = v2.at(1); x3 = v3.at(1); x4 = v4.at(1);
y1 = v1.at(2); y2 = v2.at(2); y3 = v3.at(2); y4 = v4.at(2);
z1 = v1.at(3); z2 = v2.at(3); z3 = v3.at(3); z4 = v4.at(3);
x1 = v1.at(1);
x2 = v2.at(1);
x3 = v3.at(1);
x4 = v4.at(1);
y1 = v1.at(2);
y2 = v2.at(2);
y3 = v3.at(2);
y4 = v4.at(2);
z1 = v1.at(3);
z2 = v2.at(3);
z3 = v3.at(3);
z4 = v4.at(3);

detJ = ( ( x4 - x1 ) * ( y2 - y1 ) * ( z3 - z1 ) - ( x4 - x1 ) * ( y3 - y1 ) * ( z2 - z1 ) +
( x3 - x1 ) * ( y4 - y1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( y4 - y1 ) * ( z3 - z1 ) +
( x2 - x1 ) * ( y3 - y1 ) * ( z4 - z1 ) - ( x3 - x1 ) * ( y2 - y1 ) * ( z4 - z1 ) );
( x3 - x1 ) * ( y4 - y1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( y4 - y1 ) * ( z3 - z1 ) +
( x2 - x1 ) * ( y3 - y1 ) * ( z4 - z1 ) - ( x3 - x1 ) * ( y2 - y1 ) * ( z4 - z1 ) );

if ( detJ <= 0.0 ) {
OOFEM_ERROR("negative volume");
}

dNdx.resize(4,3);
dNdx.resize(4, 3);
dNdx.at(1, 1) = -( ( y3 - y2 ) * ( z4 - z2 ) - ( y4 - y2 ) * ( z3 - z2 ) );
dNdx.at(2, 1) = ( y4 - y3 ) * ( z1 - z3 ) - ( y1 - y3 ) * ( z4 - z3 );
dNdx.at(3, 1) = -( ( y1 - y4 ) * ( z2 - z4 ) - ( y2 - y4 ) * ( z1 - z4 ) );
Expand Down Expand Up @@ -322,10 +348,10 @@ LTRSpaceBoundary :: computeStrainVector(FloatArray &answer, GaussPoint *gp, Time
}

this->computeTransformationMatrix(T, tStep);
dispVec.beProductOf(T,u);
dispVec.beProductOf(T, u);

this->computeBmatrixAt(gp, B);
answer.beProductOf(B,dispVec);
answer.beProductOf(B, dispVec);
}

void
Expand All @@ -338,7 +364,7 @@ LTRSpaceBoundary :: giveInternalForcesVector(FloatArray &answer, TimeStep *tStep
answer.clear();
fintsub.resize(12);

for ( auto &gp : *this->giveDefaultIntegrationRulePtr() ) {
for ( auto &gp : * this->giveDefaultIntegrationRulePtr() ) {
StructuralMaterialStatus *matStat = static_cast< StructuralMaterialStatus * >( gp->giveMaterialStatus() );

// Engineering (small strain) stress
Expand All @@ -348,7 +374,7 @@ LTRSpaceBoundary :: giveInternalForcesVector(FloatArray &answer, TimeStep *tStep
vStress = matStat->giveStressVector();
} else {
if ( !this->isActivated(tStep) ) {
vStrain.resize( StructuralMaterial :: giveSizeOfVoigtSymVector( gp->giveMaterialMode() ) );
vStrain.resize(StructuralMaterial :: giveSizeOfVoigtSymVector(gp->giveMaterialMode() ) );
vStrain.zero();
}
this->computeStrainVector(vStrain, gp, tStep);
Expand All @@ -361,7 +387,7 @@ LTRSpaceBoundary :: giveInternalForcesVector(FloatArray &answer, TimeStep *tStep

if ( vStress.giveSize() == 6 ) {
FloatArray stressTemp;
StructuralMaterial :: giveReducedSymVectorForm( stressTemp, vStress, gp->giveMaterialMode() );
StructuralMaterial :: giveReducedSymVectorForm(stressTemp, vStress, gp->giveMaterialMode() );
fintsub.plusProduct(B, stressTemp, dV);
} else {
fintsub.plusProduct(B, vStress, dV);
Expand All @@ -371,14 +397,14 @@ LTRSpaceBoundary :: giveInternalForcesVector(FloatArray &answer, TimeStep *tStep
this->computeTransformationMatrix(T, tStep);
Tt.beTranspositionOf(T);

answer.beProductOf(Tt,fintsub);
answer.beProductOf(Tt, fintsub);
}

void
LTRSpaceBoundary :: computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
{
FloatMatrix Korig, T, Tt, TtK;
NLStructuralElement :: computeStiffnessMatrix(Korig,rMode,tStep);
NLStructuralElement :: computeStiffnessMatrix(Korig, rMode, tStep);

this->computeTransformationMatrix(T, tStep);
Tt.beTranspositionOf(T);
Expand All @@ -392,69 +418,72 @@ LTRSpaceBoundary :: computeTransformationMatrix(FloatMatrix &answer, TimeStep *t
{
FloatArray unitCellSize;
unitCellSize.resize(3);
unitCellSize.at(1)=this->giveNode(5)->giveCoordinate(1);
unitCellSize.at(2)=this->giveNode(5)->giveCoordinate(2);
unitCellSize.at(3)=this->giveNode(5)->giveCoordinate(3);
unitCellSize.at(1) = this->giveNode(5)->giveCoordinate(1);
unitCellSize.at(2) = this->giveNode(5)->giveCoordinate(2);
unitCellSize.at(3) = this->giveNode(5)->giveCoordinate(3);

IntArray switches1, switches2, switches3, switches4;
this->giveSwitches(switches1, this->location.at(1));
this->giveSwitches(switches2, this->location.at(2));
this->giveSwitches(switches3, this->location.at(3));
this->giveSwitches(switches4, this->location.at(4));
this->giveSwitches( switches1, this->location.at(1) );
this->giveSwitches( switches2, this->location.at(2) );
this->giveSwitches( switches3, this->location.at(3) );
this->giveSwitches( switches4, this->location.at(4) );

FloatMatrix k1, k2, k3, k4;
k1.resize(3,9); k2.resize(3,9); k3.resize(3,9); k4.resize(3,9);
k1.resize(3, 9);
k2.resize(3, 9);
k3.resize(3, 9);
k4.resize(3, 9);

for ( int i = 1; i <= 3; i++ ) {
k1.at(i, 3*i-2) = unitCellSize.at(1)*switches1.at(1);
k1.at(i, 3*i-1) = unitCellSize.at(2)*switches1.at(2);
k1.at(i, 3*i) = unitCellSize.at(3)*switches1.at(3);
k1.at(i, 3 * i - 2) = unitCellSize.at(1) * switches1.at(1);
k1.at(i, 3 * i - 1) = unitCellSize.at(2) * switches1.at(2);
k1.at(i, 3 * i) = unitCellSize.at(3) * switches1.at(3);
}

for ( int i = 1; i <= 3; i++ ) {
k2.at(i, 3*i-2) = unitCellSize.at(1)*switches2.at(1);
k2.at(i, 3*i-1) = unitCellSize.at(2)*switches2.at(2);
k2.at(i, 3*i) = unitCellSize.at(3)*switches2.at(3);
k2.at(i, 3 * i - 2) = unitCellSize.at(1) * switches2.at(1);
k2.at(i, 3 * i - 1) = unitCellSize.at(2) * switches2.at(2);
k2.at(i, 3 * i) = unitCellSize.at(3) * switches2.at(3);
}

for ( int i = 1; i <= 3; i++ ) {
k3.at(i, 3*i-2) = unitCellSize.at(1)*switches3.at(1);
k3.at(i, 3*i-1) = unitCellSize.at(2)*switches3.at(2);
k3.at(i, 3*i) = unitCellSize.at(3)*switches3.at(3);
k3.at(i, 3 * i - 2) = unitCellSize.at(1) * switches3.at(1);
k3.at(i, 3 * i - 1) = unitCellSize.at(2) * switches3.at(2);
k3.at(i, 3 * i) = unitCellSize.at(3) * switches3.at(3);
}

for ( int i = 1; i <= 3; i++ ) {
k4.at(i, 3*i-2) = unitCellSize.at(1)*switches4.at(1);
k4.at(i, 3*i-1) = unitCellSize.at(2)*switches4.at(2);
k4.at(i, 3*i) = unitCellSize.at(3)*switches4.at(3);
k4.at(i, 3 * i - 2) = unitCellSize.at(1) * switches4.at(1);
k4.at(i, 3 * i - 1) = unitCellSize.at(2) * switches4.at(2);
k4.at(i, 3 * i) = unitCellSize.at(3) * switches4.at(3);
}

answer.resize(12,12);
answer.resize(12, 12);
answer.beUnitMatrix();
answer.resizeWithData(12,21);
answer.resizeWithData(12, 21);

answer.assemble(k1, {1,2,3}, {13,14,15,16,17,18,19,20,21});
answer.assemble(k2, {4,5,6}, {13,14,15,16,17,18,19,20,21});
answer.assemble(k3, {7,8,9}, {13,14,15,16,17,18,19,20,21});
answer.assemble(k4, {10,11,12}, {13,14,15,16,17,18,19,20,21});
answer.assemble(k1, { 1, 2, 3 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21 });
answer.assemble(k2, { 4, 5, 6 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21 });
answer.assemble(k3, { 7, 8, 9 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21 });
answer.assemble(k4, { 10, 11, 12 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21 });
}

void
LTRSpaceBoundary :: recalculateCoordinates(int nodeNumber, FloatArray &coords)
{
FloatArray unitCellSize;
unitCellSize.resize(3);
unitCellSize.at(1)=this->giveNode(5)->giveCoordinate(1);
unitCellSize.at(2)=this->giveNode(5)->giveCoordinate(2);
unitCellSize.at(3)=this->giveNode(5)->giveCoordinate(3);
unitCellSize.at(1) = this->giveNode(5)->giveCoordinate(1);
unitCellSize.at(2) = this->giveNode(5)->giveCoordinate(2);
unitCellSize.at(3) = this->giveNode(5)->giveCoordinate(3);

IntArray switches;
this->giveSwitches(switches, this->location.at(nodeNumber));
this->giveSwitches( switches, this->location.at(nodeNumber) );

coords.resize(3);
coords.at(1) = this->giveNode(nodeNumber)->giveCoordinate(1) + switches.at(1)*unitCellSize.at(1);
coords.at(2) = this->giveNode(nodeNumber)->giveCoordinate(2) + switches.at(2)*unitCellSize.at(2);
coords.at(3) = this->giveNode(nodeNumber)->giveCoordinate(3) + switches.at(3)*unitCellSize.at(3);
coords.at(1) = this->giveNode(nodeNumber)->giveCoordinate(1) + switches.at(1) * unitCellSize.at(1);
coords.at(2) = this->giveNode(nodeNumber)->giveCoordinate(2) + switches.at(2) * unitCellSize.at(2);
coords.at(3) = this->giveNode(nodeNumber)->giveCoordinate(3) + switches.at(3) * unitCellSize.at(3);

return;
}
Expand Down Expand Up @@ -482,12 +511,12 @@ LTRSpaceBoundary :: giveLengthInDir(const FloatArray &normalToCrackPlane)

FloatArray coords(3);
recalculateCoordinates(1, coords);
minDis = maxDis = normalToCrackPlane.dotProduct( coords, coords.giveSize() );
minDis = maxDis = normalToCrackPlane.dotProduct(coords, coords.giveSize() );

for ( int i = 2; i <= nnode; i++ ) {
FloatArray coords(3);
recalculateCoordinates(i, coords);
double dis = normalToCrackPlane.dotProduct( coords, coords.giveSize() );
double dis = normalToCrackPlane.dotProduct(coords, coords.giveSize() );
if ( dis > maxDis ) {
maxDis = dis;
} else if ( dis < minDis ) {
Expand All @@ -500,7 +529,7 @@ LTRSpaceBoundary :: giveLengthInDir(const FloatArray &normalToCrackPlane)

void
LTRSpaceBoundary :: NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node,
InternalStateType type, TimeStep *tStep)
InternalStateType type, TimeStep *tStep)
{
GaussPoint *gp;

Expand All @@ -512,5 +541,4 @@ LTRSpaceBoundary :: NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answe
gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0);
giveIPValue(answer, gp, type, tStep);
}

} // end namespace oofem
Loading