OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Implementation of polyline nonlocal barrier. More...
#include <polylinenonlocalbarrier.h>
Public Member Functions | |
PolylineNonlocalBarrier (int n, Domain *aDomain) | |
Constructor. More... | |
virtual | ~PolylineNonlocalBarrier () |
Virtual destructor. More... | |
virtual bool | isActivated (const FloatArray &c1, const FloatArray &c2) |
virtual void | applyConstraint (const FloatArray &c1, const FloatArray &c2, double &weight, bool &shieldFlag, NonlocalMaterialExtensionInterface *nei) |
Abstract method modifying the integration weight between master (c1) and source (c2) point. More... | |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
virtual double | calculateMinimumDistanceFromBoundary (const FloatArray &coords) |
Abstract method calculating the minimum distance of the Gauss Point from the nonlocal boundaries. More... | |
double | giveDistancePointLine (const FloatArray &coordsA, const FloatArray &coordsB, const FloatArray &coordsGP) |
This function computes the length of the normal to the line defined by 2 vertices that passes through the given Gauss Point. More... | |
virtual const char * | giveInputRecordName () const |
virtual const char * | giveClassName () const |
Public Member Functions inherited from oofem::NonlocalBarrier | |
NonlocalBarrier (int n, Domain *aDomain) | |
Constructor. More... | |
virtual | ~NonlocalBarrier () |
Destructor. More... | |
Public Member Functions inherited from oofem::FEMComponent | |
FEMComponent (int n, Domain *d) | |
Regular constructor, creates component with given number and belonging to given domain. More... | |
virtual | ~FEMComponent () |
Virtual destructor. More... | |
Domain * | giveDomain () const |
virtual void | setDomain (Domain *d) |
Sets associated Domain. More... | |
int | giveNumber () const |
void | setNumber (int num) |
Sets number of receiver. More... | |
virtual void | updateLocalNumbering (EntityRenumberingFunctor &f) |
Local renumbering support. More... | |
virtual void | giveInputRecord (DynamicInputRecord &input) |
Setups the input record string of receiver. More... | |
virtual contextIOResultType | saveContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Stores receiver state to output stream. More... | |
virtual contextIOResultType | restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Restores the receiver state previously written in stream. More... | |
virtual int | checkConsistency () |
Allows programmer to test some internal data, before computation begins. More... | |
virtual void | printOutputAt (FILE *file, TimeStep *tStep) |
Prints output of receiver to stream, for given time step. More... | |
virtual void | printYourself () |
Prints receiver state on stdout. Useful for debugging. More... | |
virtual Interface * | giveInterface (InterfaceType t) |
Interface requesting service. More... | |
std::string | errorInfo (const char *func) const |
Returns string for prepending output (used by error reporting macros). More... | |
Protected Attributes | |
int | localXCoordIndx |
Local x-coordinate index. More... | |
int | localYCoordIndx |
Local y-coordinate index. More... | |
IntArray | vertexNodes |
List of polyline vertices. More... | |
Protected Attributes inherited from oofem::FEMComponent | |
int | number |
Component number. More... | |
Domain * | domain |
Link to domain object, useful for communicating with other FEM components. More... | |
Implementation of polyline nonlocal barrier.
It is a composite one-dimensional cell consisting of one or more connected lines. The polyline is defined by an ordered list of n+1 vertices (nodes), where n is the number of lines in the polyline. Each pair of points (i,i+1) defines a line.
The purpose of this class is to model barrier for nonlocal averaging process (visibility criterion). Usually, the given remote integration point influences to the source point nonlocal average if the averaging function at source point and evaluated for remote point has nonzero value. The barrier allows to exclude additional points, which may be close enough, but due to several reasons there is no influence between these points (for example, they can be separated by a notch).
Definition at line 65 of file polylinenonlocalbarrier.h.
oofem::PolylineNonlocalBarrier::PolylineNonlocalBarrier | ( | int | n, |
Domain * | aDomain | ||
) |
Constructor.
Creates an element with number n belonging to domain aDomain.
n | Barrier's number |
aDomain | Pointer to the domain to which element belongs. |
|
virtual |
Virtual destructor.
Definition at line 55 of file polylinenonlocalbarrier.C.
|
virtual |
Abstract method modifying the integration weight between master (c1) and source (c2) point.
c1 | Coordinates of master point. | |
c2 | Coordinates of source point. | |
weight | Original integration weight; on output modified weight. | |
[out] | shieldFlag | Set to true if shielding is activated. |
nei | The element with the non local material extension. |
Implements oofem::NonlocalBarrier.
Definition at line 61 of file polylinenonlocalbarrier.C.
References isActivated().
|
virtual |
Abstract method calculating the minimum distance of the Gauss Point from the nonlocal boundaries.
coords | Coordinates of the Gauss Point |
maxPossibleDistance | Distance from the boundary beyond which the nonlocal radius(as it is interpreted in each weight function) becomes equal to the user-defined |
Implements oofem::NonlocalBarrier.
Definition at line 122 of file polylinenonlocalbarrier.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FEMComponent::domain, giveDistancePointLine(), oofem::Domain::giveNode(), oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), oofem::min(), and vertexNodes.
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 105 of file polylinenonlocalbarrier.h.
double oofem::PolylineNonlocalBarrier::giveDistancePointLine | ( | const FloatArray & | coordsA, |
const FloatArray & | coordsB, | ||
const FloatArray & | coordsGP | ||
) |
This function computes the length of the normal to the line defined by 2 vertices that passes through the given Gauss Point.
If the intersection point lies outside the line segment the minimum of the distances between the Gauss Point and the two vertices is returned
coordsA | Coordinates of the ith vertex of the polyline |
coordsB | Coordinates of the (i+1)th vertex of the polyline |
coordsGP | Coordinates of the Gauss Point whose nonlocal interactions domain is modified based on the distance based averaging |
Definition at line 147 of file polylinenonlocalbarrier.C.
References oofem::FloatArray::add(), oofem::FloatArray::computeNorm(), oofem::FloatArray::computeSquaredNorm(), oofem::FloatArray::dotProduct(), oofem::FloatArray::subtract(), and oofem::FloatArray::times().
Referenced by calculateMinimumDistanceFromBoundary().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 104 of file polylinenonlocalbarrier.h.
References _IFT_PolylineNonlocalBarrier_Name.
|
virtual |
Initializes receiver according to object description stored in input record.
This function is called immediately after creating object using constructor. Input record can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record.
ir | Input record to initialize from. |
Reimplemented from oofem::FEMComponent.
Definition at line 184 of file polylinenonlocalbarrier.C.
References _IFT_PolylineNonlocalBarrier_vertexnodes, _IFT_PolylineNonlocalBarrier_xcoordindx, _IFT_PolylineNonlocalBarrier_ycoordindx, IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_OK, localXCoordIndx, localYCoordIndx, and vertexNodes.
|
virtual |
Definition at line 74 of file polylinenonlocalbarrier.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FEMComponent::domain, oofem::Node::giveCoordinate(), oofem::Domain::giveNode(), oofem::IntArray::giveSize(), localXCoordIndx, localYCoordIndx, and vertexNodes.
Referenced by applyConstraint().
|
protected |
Local x-coordinate index.
Definition at line 69 of file polylinenonlocalbarrier.h.
Referenced by initializeFrom(), and isActivated().
|
protected |
Local y-coordinate index.
Definition at line 71 of file polylinenonlocalbarrier.h.
Referenced by initializeFrom(), and isActivated().
|
protected |
List of polyline vertices.
Definition at line 73 of file polylinenonlocalbarrier.h.
Referenced by calculateMinimumDistanceFromBoundary(), initializeFrom(), and isActivated().