OOFEM 3.0
Loading...
Searching...
No Matches
oofem::NumericalMethod Class Reference

#include <nummet.h>

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

Public Member Functions

 NumericalMethod (Domain *d, EngngModel *m)
virtual ~NumericalMethod ()
 Destructor.
EngngModelgiveEngngModel ()
virtual void initializeFrom (InputRecord &ir)
virtual void reinitialize ()
virtual void setDomain (Domain *d)
virtual void saveContext (DataStream &stream, ContextMode mode)
virtual void restoreContext (DataStream &stream, ContextMode mode)

Protected Attributes

Domaindomain
 Pointer to domain.
EngngModelengngModel
 Pointer to engineering model.

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 ConvergedReason 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

◆ NumericalMethod()

oofem::NumericalMethod::NumericalMethod ( Domain * d,
EngngModel * m )
inline

Constructor.

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

Definition at line 94 of file nummet.h.

References domain, and engngModel.

Referenced by oofem::GJacobi::GJacobi(), oofem::LineSearchNM::LineSearchNM(), oofem::SparseGeneralEigenValueSystemNM::SparseGeneralEigenValueSystemNM(), oofem::SparseLinearSystemNM::SparseLinearSystemNM(), and oofem::SparseNonLinearSystemNM::SparseNonLinearSystemNM().

◆ ~NumericalMethod()

virtual oofem::NumericalMethod::~NumericalMethod ( )
inlinevirtual

Destructor.

Definition at line 96 of file nummet.h.

Member Function Documentation

◆ giveEngngModel()

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

Definition at line 99 of file nummet.h.

References engngModel.

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

◆ initializeFrom()

◆ reinitialize()

virtual void oofem::NumericalMethod::reinitialize ( )
inlinevirtual

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.

◆ restoreContext()

virtual void oofem::NumericalMethod::restoreContext ( DataStream & stream,
ContextMode mode )
inlinevirtual

Reimplemented in oofem::CylindricalALM.

Definition at line 117 of file nummet.h.

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

◆ saveContext()

virtual void oofem::NumericalMethod::saveContext ( DataStream & stream,
ContextMode mode )
inlinevirtual

Reimplemented in oofem::CylindricalALM.

Definition at line 116 of file nummet.h.

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

◆ setDomain()

virtual void oofem::NumericalMethod::setDomain ( Domain * d)
inlinevirtual

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

Definition at line 114 of file nummet.h.

References domain.

Member Data Documentation

◆ domain

◆ engngModel


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011