OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::Field Class Referenceabstract

Abstract class representing field. More...

#include <field.h>

+ Inheritance diagram for oofem::Field:

Public Member Functions

 Field (FieldType b)
 Constructor. More...
 
virtual ~Field ()
 
virtual int evaluateAt (FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep)=0
 Evaluates the field at given point. More...
 
virtual int evaluateAt (FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep)=0
 Evaluates the field at given DofManager. More...
 
FieldType giveType ()
 Returns the type of receiver. More...
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode)=0
 Stores receiver state to output stream. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode)=0
 Restores the receiver state previously written in stream. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 
virtual const char * giveClassName () const =0
 

Protected Attributes

FieldType type
 

Detailed Description

Abstract class representing field.

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

Definition at line 80 of file field.h.

Constructor & Destructor Documentation

oofem::Field::Field ( FieldType  b)
inline

Constructor.

Creates a field of given type associated to given domain.

Definition at line 89 of file field.h.

virtual oofem::Field::~Field ( )
inlinevirtual

Definition at line 90 of file field.h.

Member Function Documentation

std::string oofem::Field::errorInfo ( const char *  func) const

Returns string for prepending output (used by error reporting macros).

Definition at line 40 of file field.C.

References giveClassName().

virtual int oofem::Field::evaluateAt ( FloatArray answer,
const FloatArray coords,
ValueModeType  mode,
TimeStep tStep 
)
pure 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.

Implemented in oofem::UnstructuredGridField, oofem::PrimaryField, oofem::UniformGridField, oofem::InternalVariableField, oofem::DofManValueField, oofem::SmoothedNodalInternalVariableField, and oofem::MaskedPrimaryField.

virtual int oofem::Field::evaluateAt ( FloatArray answer,
DofManager dman,
ValueModeType  mode,
TimeStep tStep 
)
pure 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)

Implemented in oofem::UnstructuredGridField, oofem::PrimaryField, oofem::DofManValueField, oofem::UniformGridField, oofem::InternalVariableField, oofem::SmoothedNodalInternalVariableField, and oofem::MaskedPrimaryField.

virtual const char* oofem::Field::giveClassName ( ) const
pure virtual
FieldType oofem::Field::giveType ( )
inline

Returns the type of receiver.

Definition at line 120 of file field.h.

References oofem::errorInfo().

virtual contextIOResultType oofem::Field::restoreContext ( DataStream stream,
ContextMode  mode 
)
pure 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.

Implemented in oofem::UnstructuredGridField, oofem::PrimaryField, oofem::DofManValueField, oofem::UniformGridField, oofem::DofDistributedPrimaryField, oofem::InternalVariableField, oofem::SmoothedNodalInternalVariableField, and oofem::MaskedPrimaryField.

virtual contextIOResultType oofem::Field::saveContext ( DataStream stream,
ContextMode  mode 
)
pure 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.

Implemented in oofem::UnstructuredGridField, oofem::PrimaryField, oofem::DofManValueField, oofem::UniformGridField, oofem::DofDistributedPrimaryField, oofem::InternalVariableField, oofem::SmoothedNodalInternalVariableField, and oofem::MaskedPrimaryField.

Member Data Documentation

FieldType oofem::Field::type
protected

Definition at line 83 of file field.h.


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