OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
prescribedgradientbcweakdirichlet.C
Go to the documentation of this file.
1 /*
2  * prescribedgradientbcweakdirichlet.C
3  *
4  * Created on: May 19, 2014
5  * Author: svennine
6  */
7 
9 
10 #include "classfactory.h"
11 
12 namespace oofem {
13 REGISTER_BoundaryCondition(PrescribedGradientBCWeakDirichlet);
14 
17 {
18  // TODO Auto-generated constructor stub
19 }
20 
22 {
23  // TODO Auto-generated destructor stub
24 }
25 
27 {
28  mMeshIsPeriodic = false;
29 
31 }
32 
34 {
35  bool enforceCornerPeriodicity = false;
36  int numSides = 4;
37  createTractionMesh(enforceCornerPeriodicity, numSides);
38 }
39 
41 {
42  oX = {
43  iPos [ 0 ] - mCenterCoord [ 0 ], iPos [ 1 ] - mCenterCoord [ 1 ]
44  };
45 }
46 
47 void PrescribedGradientBCWeakDirichlet :: checkIfCorner(bool &oIsCorner, bool &oDuplicatable, const FloatArray &iPos, const double &iNodeDistTol) const
48 {
49  oIsCorner = false;
50  oDuplicatable = false;
51 
52  FloatArray cornerPos = mLC;
53  if ( iPos.distance(cornerPos) < iNodeDistTol ) {
54  oIsCorner = true;
55  oDuplicatable = true;
56  }
57 
58  cornerPos = {
59  mUC [ 0 ], mLC [ 1 ]
60  };
61  if ( iPos.distance(cornerPos) < iNodeDistTol ) {
62  oIsCorner = true;
63  oDuplicatable = true;
64  }
65 
66  cornerPos = {
67  mUC [ 0 ], mUC [ 1 ]
68  };
69  if ( iPos.distance(cornerPos) < iNodeDistTol ) {
70  oIsCorner = true;
71  oDuplicatable = true;
72  }
73 
74  cornerPos = {
75  mLC [ 0 ], mUC [ 1 ]
76  };
77  if ( iPos.distance(cornerPos) < iNodeDistTol ) {
78  oIsCorner = true;
79  oDuplicatable = true;
80  }
81 }
82 } /* namespace oofem */
virtual void checkIfCorner(bool &oIsCorner, bool &oDuplicatable, const FloatArray &iPos, const double &iNodeDistTol) const
bool mMeshIsPeriodic
true -> the traction lives only on gammaPlus, so that we get strong periodicity as a special case...
REGISTER_BoundaryCondition(BoundaryCondition)
Class and object Domain.
Definition: domain.h:115
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
FloatArray mUC
Upper corner of domain (assuming a rectangular RVE)
virtual void giveBoundaryCoordVector(FloatArray &oX, const FloatArray &iPos) const
double distance(const FloatArray &x) const
Computes the distance between position represented by receiver and position given as parameter...
Definition: floatarray.C:489
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void createTractionMesh(bool iEnforceCornerPeriodicity, int iNumSides)
Imposes a prescribed gradient weakly on the boundary with an independent traction discretization...
Class representing vector of real numbers.
Definition: floatarray.h:82
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual void postInitialize()
Performs post initialization steps.
Class representing the general Input Record.
Definition: inputrecord.h:101
FloatArray mLC
Lower corner of domain (assuming a rectangular RVE)
the oofem namespace is to define a context or scope in which all oofem names are defined.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011