OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::DofManValueField Class Reference

Class representing field defined by nodal values associated to given domain. More...

#include <dofmanvalfield.h>

+ Inheritance diagram for oofem::DofManValueField:
+ Collaboration diagram for oofem::DofManValueField:

Public Member Functions

 DofManValueField (FieldType b, Domain *d)
 Constructor. More...
 
virtual ~DofManValueField ()
 
virtual int evaluateAt (FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep)
 Evaluates the field at given point. More...
 
virtual int evaluateAt (FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep)
 Evaluates the field at given DofManager. More...
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode)
 Stores receiver state to output stream. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode)
 Restores the receiver state previously written in stream. More...
 
void setDofManValue (int dofMan, FloatArray value)
 Sets the value associated to given dofManager. More...
 
virtual const char * giveClassName () const
 
- Public Member Functions inherited from oofem::Field
 Field (FieldType b)
 Constructor. More...
 
virtual ~Field ()
 
FieldType giveType ()
 Returns the type of receiver. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 

Protected Attributes

Domaindomain
 Associated domain (need its elements to interpolate) More...
 
std::vector< FloatArraydmanvallist
 Array of dofman values. More...
 
- Protected Attributes inherited from oofem::Field
FieldType type
 

Detailed Description

Class representing field defined by nodal values associated to given domain.

Field represent the spatial distribution of certain variable. The implementation allows to set individual dofMan values; However, in the current implementation doe not allow to specify values for different time steps.

Definition at line 51 of file dofmanvalfield.h.

Constructor & Destructor Documentation

oofem::DofManValueField::DofManValueField ( FieldType  b,
Domain d 
)

Constructor.

Creates an empty field of given type associated to given domain.

Definition at line 44 of file dofmanvalfield.C.

References dmanvallist, domain, and oofem::Domain::giveNumberOfDofManagers().

virtual oofem::DofManValueField::~DofManValueField ( )
inlinevirtual

Definition at line 64 of file dofmanvalfield.h.

Member Function Documentation

int oofem::DofManValueField::evaluateAt ( FloatArray answer,
const FloatArray coords,
ValueModeType  mode,
TimeStep tStep 
)
virtual

Evaluates the field at given point.

Parameters
coordsCoordinates of the point of interest
answerField evaluated at coordinate.
tStepTime step to evaluate for.
modeMode of value (total, velocity,...).
Returns
Zero if ok, otherwise nonzero.

Implements oofem::Field.

Definition at line 52 of file dofmanvalfield.C.

References oofem::FloatArray::add(), oofem::FloatArray::at(), dmanvallist, domain, oofem::FEInterpolation::evalN(), oofem::Element::giveDofManagerNumber(), oofem::SpatialLocalizer::giveElementContainingPoint(), oofem::Element::giveInterpolation(), oofem::FloatArray::giveSize(), oofem::Domain::giveSpatialLocalizer(), and oofem::FEInterpolation::global2local().

int oofem::DofManValueField::evaluateAt ( FloatArray answer,
DofManager dman,
ValueModeType  mode,
TimeStep tStep 
)
virtual

Evaluates the field at given DofManager.

This potentially can be resolved quickly, as receiver data may be described using values at dof managers. Here an additional issue exists: one needs to make sure, that passed dman is from the same domain, so that its number can be used to perform suggested quick evaluation.

If this is not the case (the field is described differently), the response can be evaluated using dofman coordinates in a standard way.

Parameters
[out]answerEvaluated field for dman.
dmanReference to dof manager.
modeMode of value (total, velocity,...).
tStepTime step to evaluate for.
Returns
Zero if ok, nonzero Error code (0-ok, 1-failed)

Implements oofem::Field.

Definition at line 84 of file dofmanvalfield.C.

References dmanvallist, and oofem::FEMComponent::giveNumber().

virtual const char* oofem::DofManValueField::giveClassName ( ) const
inlinevirtual
Returns
Class name of the receiver.

Implements oofem::Field.

Definition at line 119 of file dofmanvalfield.h.

contextIOResultType oofem::DofManValueField::restoreContext ( DataStream stream,
ContextMode  mode 
)
virtual

Restores the receiver state previously written in stream.

Reads the FEMComponent class-id in order to allow test consistency.

Parameters
streamInput stream.
modeDetermines amount of info in stream (state, definition,...).
Returns
contextIOResultType.
Exceptions
Throwsan ContextIOERR exception if error encountered.

Implements oofem::Field.

Definition at line 103 of file dofmanvalfield.C.

References oofem::CIO_OK.

contextIOResultType oofem::DofManValueField::saveContext ( DataStream stream,
ContextMode  mode 
)
virtual

Stores receiver state to output stream.

Writes the FEMComponent class-id in order to allow test whether correct data are then restored.

Parameters
streamOutput stream.
modeDetermines amount of info in stream (state, definition,...).
Returns
contextIOResultType.
Exceptions
Throwsan ContextIOERR exception if error encountered.

Implements oofem::Field.

Definition at line 97 of file dofmanvalfield.C.

References oofem::CIO_OK.

void oofem::DofManValueField::setDofManValue ( int  dofMan,
FloatArray  value 
)

Sets the value associated to given dofManager.

Definition at line 91 of file dofmanvalfield.C.

References dmanvallist.

Member Data Documentation

std::vector< FloatArray > oofem::DofManValueField::dmanvallist
protected

Array of dofman values.

Definition at line 57 of file dofmanvalfield.h.

Referenced by DofManValueField(), evaluateAt(), and setDofManValue().

Domain* oofem::DofManValueField::domain
protected

Associated domain (need its elements to interpolate)

Definition at line 55 of file dofmanvalfield.h.

Referenced by DofManValueField(), and evaluateAt().


The documentation for this class was generated from the following files:

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:34 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011