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

Field defined by values fefined on unstructured grid. More...

#include <unstructuredgridfield.h>

+ Inheritance diagram for oofem::UnstructuredGridField:
+ Collaboration diagram for oofem::UnstructuredGridField:

Classes

class  Cell
 
class  CellContainingPointFunctor
 
class  CellInsertionFunctor
 
class  Vertex
 

Public Member Functions

 UnstructuredGridField (int nvert, int ncells, double octreeOriginShift=0.0)
 Constructor. More...
 
virtual ~UnstructuredGridField ()
 
void setVertexValue (int num, const FloatArray &vv)
 
void addVertex (int num, FloatArray &coords)
 
VertexgetVertex (int num)
 
void addCell (int num, Element_Geometry_Type type, IntArray &vertices)
 
int evaluateAt (FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep) override
 Evaluates the field at given point. More...
 
int evaluateAt (FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep) override
 Implementaton of Field::evaluateAt for DofManager. More...
 
contextIOResultType saveContext (DataStream &stream, ContextMode mode) override
 Stores receiver state to output stream. More...
 
contextIOResultType restoreContext (DataStream &stream, ContextMode mode) override
 Restores the receiver state previously written in stream. More...
 
const char * giveClassName () const override
 
- 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 Member Functions

void initOctree ()
 

Protected Attributes

std::vector< CellcellList
 
std::vector< VertexvertexList
 
std::vector< FloatArrayvalueList
 
OctreeSpatialLocalizerT< CellspatialLocalizer
 Spatial Localizer. More...
 
long int octreeTimeStamp
 octree build time stamp More...
 
long int timeStamp
 receiver timestamp More...
 
double octreeOriginShift
 octree origin shift More...
 
- Protected Attributes inherited from oofem::Field
FieldType type
 

Detailed Description

Field defined by values fefined on unstructured grid.

This implementation does not require that underlying grid is oofem mesh (composed of DofMagars and Elements), but rather simple objects (Vertices and Cells) which in turn does not have to provide complex FE services. Typically used to map extermal field to mupif.

Definition at line 63 of file unstructuredgridfield.h.

Constructor & Destructor Documentation

oofem::UnstructuredGridField::UnstructuredGridField ( int  nvert,
int  ncells,
double  octreeOriginShift = 0.0 
)
inline

Constructor.

Creates a field, with unspecified field values.

Definition at line 314 of file unstructuredgridfield.h.

virtual oofem::UnstructuredGridField::~UnstructuredGridField ( )
inlinevirtual

Definition at line 321 of file unstructuredgridfield.h.

Member Function Documentation

void oofem::UnstructuredGridField::addCell ( int  num,
Element_Geometry_Type  type,
IntArray vertices 
)
inline

Definition at line 334 of file unstructuredgridfield.h.

void oofem::UnstructuredGridField::addVertex ( int  num,
FloatArray coords 
)
inline

Definition at line 327 of file unstructuredgridfield.h.

int oofem::UnstructuredGridField::evaluateAt ( FloatArray answer,
const FloatArray coords,
ValueModeType  mode,
TimeStep tStep 
)
inlineoverridevirtual

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 339 of file unstructuredgridfield.h.

References oofem::FloatArray::at(), oofem::UnstructuredGridField::Cell::getVertexNum(), oofem::OctreeSpatialLocalizerT< T >::giveDataOnFilter(), oofem::UnstructuredGridField::Cell::giveNumberOfVertices(), oofem::UnstructuredGridField::Cell::interpolate(), and OOFEM_ERROR.

int oofem::UnstructuredGridField::evaluateAt ( FloatArray answer,
DofManager dman,
ValueModeType  mode,
TimeStep tStep 
)
inlineoverridevirtual

Implementaton of Field::evaluateAt for DofManager.

Implements oofem::Field.

Definition at line 388 of file unstructuredgridfield.h.

References oofem::DofManager::giveCoordinates().

Vertex* oofem::UnstructuredGridField::getVertex ( int  num)
inline
const char* oofem::UnstructuredGridField::giveClassName ( ) const
inlineoverridevirtual
Returns
Class name of the receiver.

Implements oofem::Field.

Definition at line 414 of file unstructuredgridfield.h.

contextIOResultType oofem::UnstructuredGridField::restoreContext ( DataStream stream,
ContextMode  mode 
)
inlineoverridevirtual

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 411 of file unstructuredgridfield.h.

References oofem::CIO_OK.

contextIOResultType oofem::UnstructuredGridField::saveContext ( DataStream stream,
ContextMode  mode 
)
inlineoverridevirtual

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 402 of file unstructuredgridfield.h.

References oofem::CIO_OK.

void oofem::UnstructuredGridField::setVertexValue ( int  num,
const FloatArray vv 
)
inline

Definition at line 323 of file unstructuredgridfield.h.

Member Data Documentation

std::vector<Cell> oofem::UnstructuredGridField::cellList
protected

Definition at line 296 of file unstructuredgridfield.h.

double oofem::UnstructuredGridField::octreeOriginShift
protected

octree origin shift

Definition at line 309 of file unstructuredgridfield.h.

long int oofem::UnstructuredGridField::octreeTimeStamp
protected

octree build time stamp

Definition at line 305 of file unstructuredgridfield.h.

OctreeSpatialLocalizerT<Cell> oofem::UnstructuredGridField::spatialLocalizer
protected

Spatial Localizer.

It is build upon request. Provides the spatial localization services.

Definition at line 303 of file unstructuredgridfield.h.

long int oofem::UnstructuredGridField::timeStamp
protected

receiver timestamp

Definition at line 307 of file unstructuredgridfield.h.

std::vector<FloatArray> oofem::UnstructuredGridField::valueList
protected

Definition at line 298 of file unstructuredgridfield.h.

std::vector<Vertex> oofem::UnstructuredGridField::vertexList
protected

Definition at line 297 of file unstructuredgridfield.h.


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

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