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

Abstract class representing a field of an internal variable. More...

#include <intvarfield.h>

+ Inheritance diagram for oofem::InternalVariableField:
+ Collaboration diagram for oofem::InternalVariableField:

Public Member Functions

 InternalVariableField (InternalStateType ist, FieldType b, MaterialMappingAlgorithmType mma_type, Domain *d)
 Constructor. More...
 
virtual ~InternalVariableField ()
 
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...
 
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

MaterialMappingAlgorithmmma
 Material mapping algorithm used. More...
 
InternalStateType type
 InternalStateType. More...
 
Domaindomain
 Source domain. More...
 
- Protected Attributes inherited from oofem::Field
FieldType type
 

Detailed Description

Abstract class representing a field of an internal variable.

Field represent the spatial distribution of certain variable and is able to evaluate its value at any point of interest. The field is usually associated to the specific domain.

It uses MaterialMappingAlgorithm interface to perform interpolation. Note, that some classes implementing MaterialMappingAlgorithm may require that elements implement corresponding interface.

Definition at line 56 of file intvarfield.h.

Constructor & Destructor Documentation

oofem::InternalVariableField::InternalVariableField ( InternalStateType  ist,
FieldType  b,
MaterialMappingAlgorithmType  mma_type,
Domain d 
)

Constructor.

Creates a internal variable field of given type associated to given domain.

Parameters
istPhysical meaning of field.
bField type.
mma_typeAlgorithm used to map materials.
dDomain which field belongs to.

Definition at line 41 of file intvarfield.C.

References oofem::classFactory, oofem::ClassFactory::createMaterialMappingAlgorithm(), domain, mma, and type.

oofem::InternalVariableField::~InternalVariableField ( )
virtual

Definition at line 49 of file intvarfield.C.

References mma.

Member Function Documentation

int oofem::InternalVariableField::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.

Use MaterialMappingAlgorithm classes to do the job

Implements oofem::Field.

Definition at line 57 of file intvarfield.C.

References oofem::MaterialMappingAlgorithm::__init(), oofem::MaterialMappingAlgorithm::__mapVariable(), oofem::Set::addAllElements(), oofem::IntArray::at(), domain, mma, and type.

Referenced by evaluateAt().

int oofem::InternalVariableField::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 dofManagers. 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 dofManager.
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 71 of file intvarfield.C.

References evaluateAt(), oofem::DofManager::giveCoordinates(), and oofem::DofManager::hasCoordinates().

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

Implements oofem::Field.

Definition at line 82 of file intvarfield.h.

contextIOResultType oofem::InternalVariableField::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 87 of file intvarfield.C.

References oofem::CIO_OK.

contextIOResultType oofem::InternalVariableField::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 81 of file intvarfield.C.

References oofem::CIO_OK.

Member Data Documentation

Domain* oofem::InternalVariableField::domain
protected

Source domain.

Definition at line 64 of file intvarfield.h.

Referenced by evaluateAt(), and InternalVariableField().

MaterialMappingAlgorithm* oofem::InternalVariableField::mma
protected

Material mapping algorithm used.

Definition at line 60 of file intvarfield.h.

Referenced by evaluateAt(), InternalVariableField(), and ~InternalVariableField().

InternalStateType oofem::InternalVariableField::type
protected

InternalStateType.

Definition at line 62 of file intvarfield.h.

Referenced by evaluateAt(), and InternalVariableField().


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