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

This base class is an abstraction for numerical algorithm. More...

#include <nummet.h>

+ Inheritance diagram for oofem::NumericalMethod:
+ Collaboration diagram for oofem::NumericalMethod:

Public Member Functions

 NumericalMethod (Domain *d, EngngModel *m)
 Constructor. More...
virtual ~NumericalMethod ()
 Destructor. More...
EngngModelgiveEngngModel ()
virtual IRResultType initializeFrom (InputRecord *ir)
virtual void reinitialize ()
 Reinitializes the receiver. More...
virtual void setDomain (Domain *d)
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)

Protected Attributes

 Pointer to domain. More...
 Pointer to engineering model. More...

Detailed Description

This base class is an abstraction for numerical algorithm.

Generally, the particular instances (instances of derived classes) perform some sequence of numerical operations on given data to obtain the solution. The derived class should declare the interface for specific problem type (like solution of linear system). The interface usually consist in declaring virtual abstract function solve, with parameters corresponding to problem under consideration. The solve method should return value of NM_Status type. (Other parameters can be provided via instanciateFrom service, which receives the init record of Engng method). The data are specified using parameters passed to solve method (so called mapping). Typically, each particular Engng model instance is responsible for mapping of its governing equation components to corresponding numerical components. Such mapping allows the numerical method implementation to be independent of a particular physical problem by strictly dealing with numerical components, which are mapped to corresponding physical components of governing equation, that are hidden to numerical method.

It should be pointed out, that all numerical methods solving the same numerical problem use the same compulsory names for the corresponding numerical components - this is enforced by using the same base problem-specific class. It is therefore possible to use any suitable instance of the NumericalMethod class to the solve problem, and leave the whole engineering model code, including mapping, unchanged, because all instances of the Numerical method class provide the common interface. Similarly, a high-level numerical method instance may use services of another low-level numerical method instance. The numerical method instance may also represent interface to an existing procedure written in C or Fortran.

Definition at line 80 of file nummet.h.

Constructor & Destructor Documentation

oofem::NumericalMethod::NumericalMethod ( Domain d,
EngngModel m 


dDomain which the receiver belongs to.
mEngineering model which the receiver belongs to.

Definition at line 94 of file nummet.h.

virtual oofem::NumericalMethod::~NumericalMethod ( )


Definition at line 96 of file nummet.h.

Member Function Documentation

EngngModel* oofem::NumericalMethod::giveEngngModel ( )
Engineering model receiver is connected to.

Definition at line 99 of file nummet.h.

Referenced by oofem::FETISolver::setUpCommunicationMaps(), oofem::FETISolver::solve(), and oofem::FETISolver::unpackSolution().

virtual void oofem::NumericalMethod::reinitialize ( )

Reinitializes the receiver.

This is used, when topology of problem has changed (for example after adaptive refinement or load transfer in parallel applications). This is necessary for numerical methods, that cache some data between solution steps and that may depend on domain or problem topology. The caching of data by receiver is intended only for speeding up the calculation, but numerical method must be always able to generate this data again. This method clears receiver cached data dependent on topology, when it changes.

Reimplemented in oofem::CylindricalALM, and oofem::NRSolver.

Definition at line 112 of file nummet.h.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), oofem::NonLinearStatic::unpackMigratingData(), and oofem::SUPG::updateDomainLinks().

virtual contextIOResultType oofem::NumericalMethod::restoreContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 

Reimplemented in oofem::CylindricalALM.

Definition at line 117 of file nummet.h.

References oofem::CIO_OK.

Referenced by oofem::EngngModel::restoreContext().

virtual contextIOResultType oofem::NumericalMethod::saveContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 

Reimplemented in oofem::CylindricalALM.

Definition at line 116 of file nummet.h.

References oofem::CIO_OK.

Referenced by oofem::EngngModel::saveContext().

Member Data Documentation

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