|
OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
This class provides an communication context for distributed memory parallelism. More...
#include <parallelcontext.h>
Collaboration diagram for oofem::ParallelContext:Public Member Functions | |
| ParallelContext (EngngModel *e) | |
| Creates a context belonging to a system of equations in a given engineering model. More... | |
| ~ParallelContext () | |
| void | init (int newDi) |
| Initiates the mapping for given domain. More... | |
| int | giveNumberOfLocalEqs () |
| int | giveNumberOfGlobalEqs () |
| int | giveNumberOfNaturalEqs () |
| Natural2GlobalOrdering * | giveN2Gmap () |
| Natural2LocalOrdering * | giveN2Lmap () |
Convenience functions for working with distributed arrays. | |
| bool | isLocal (DofManager *dman) |
| double | localNorm (const FloatArray &src) |
| Norm for a locally distributed array. More... | |
| double | dotProduct (const FloatArray &a, const FloatArray &b) |
| Dot product for a distributed array. More... | |
| double | localDotProduct (const FloatArray &a, const FloatArray &b) |
| Dot product for a locally distributed array. More... | |
| double | accumulate (double local) |
| Accumulates the global value. More... | |
| void | accumulate (const FloatArray &local, FloatArray &global) |
| Accumulates the global value. More... | |
Protected Attributes | |
| int | di |
| EngngModel * | emodel |
| Natural2GlobalOrdering | n2g |
| Natural2LocalOrdering | n2l |
This class provides an communication context for distributed memory parallelism.
Tasks:
Definition at line 54 of file parallelcontext.h.
| oofem::ParallelContext::ParallelContext | ( | EngngModel * | e | ) |
Creates a context belonging to a system of equations in a given engineering model.
| e | Engineering model to work with. |
Definition at line 43 of file parallelcontext.C.
| oofem::ParallelContext::~ParallelContext | ( | ) |
Definition at line 51 of file parallelcontext.C.
| double oofem::ParallelContext::accumulate | ( | double | local | ) |
Accumulates the global value.
Definition at line 169 of file parallelcontext.C.
References emodel, oofem::EngngModel::giveParallelComm(), and oofem::EngngModel::isParallel().
Referenced by oofem::NRSolver::checkConvergence(), oofem::CylindricalALM::checkConvergence(), oofem::StaggeredSolver::checkConvergenceDofIdArray(), oofem::CylindricalALM::computeDeltaLambda(), oofem::ZZErrorEstimator::estimateError(), and oofem::CylindricalALM::solve().
| void oofem::ParallelContext::accumulate | ( | const FloatArray & | local, |
| FloatArray & | global | ||
| ) |
Accumulates the global value.
Definition at line 184 of file parallelcontext.C.
References emodel, oofem::EngngModel::giveParallelComm(), oofem::FloatArray::givePointer(), oofem::FloatArray::giveSize(), oofem::EngngModel::isParallel(), and oofem::FloatArray::resize().
| double oofem::ParallelContext::dotProduct | ( | const FloatArray & | a, |
| const FloatArray & | b | ||
| ) |
Dot product for a distributed array.
Common for convergence criterion and such.
|
inline |
Definition at line 112 of file parallelcontext.h.
Referenced by oofem::PetscSparseMtrx::assemble(), oofem::PetscSparseMtrx::buildInternalStructure(), and oofem::PetscSparseMtrx::scatterL2G().
|
inline |
Definition at line 113 of file parallelcontext.h.
Referenced by oofem::PetscSparseMtrx::buildInternalStructure(), localDotProduct(), localNorm(), and oofem::PetscSparseMtrx::scatterL2G().
| int oofem::ParallelContext::giveNumberOfGlobalEqs | ( | ) |
Definition at line 91 of file parallelcontext.C.
References di, emodel, oofem::EngngModel::giveNumberOfDomainEquations(), oofem::Natural2GlobalOrdering::giveNumberOfGlobalEqs(), oofem::EngngModel::isParallel(), and n2g.
Referenced by init().
| int oofem::ParallelContext::giveNumberOfLocalEqs | ( | ) |
Definition at line 75 of file parallelcontext.C.
References di, emodel, oofem::EngngModel::giveNumberOfDomainEquations(), oofem::Natural2GlobalOrdering::giveNumberOfLocalEqs(), oofem::EngngModel::isParallel(), and n2g.
Referenced by init().
| int oofem::ParallelContext::giveNumberOfNaturalEqs | ( | ) |
Definition at line 106 of file parallelcontext.C.
References di, emodel, and oofem::EngngModel::giveNumberOfDomainEquations().
Referenced by oofem::PetscSparseMtrx::buildInternalStructure(), init(), and oofem::PetscSparseMtrx::scatterG2L().
| void oofem::ParallelContext::init | ( | int | newDi | ) |
Initiates the mapping for given domain.
| di | Domain index. |
Definition at line 55 of file parallelcontext.C.
References di, emodel, giveNumberOfGlobalEqs(), giveNumberOfLocalEqs(), giveNumberOfNaturalEqs(), oofem::EngngModel::giveRank(), oofem::Natural2GlobalOrdering::init(), oofem::Natural2LocalOrdering::init(), oofem::EngngModel::isParallel(), n2g, and n2l.
| bool oofem::ParallelContext::isLocal | ( | DofManager * | dman | ) |
Definition at line 113 of file parallelcontext.C.
References emodel, and oofem::EngngModel::isParallel().
Referenced by oofem::NRSolver::checkConvergence(), oofem::StaggeredSolver::checkConvergenceDofIdArray(), oofem::CylindricalALM::convertHPCMap(), and oofem::NRSolver::initPrescribedEqs().
| double oofem::ParallelContext::localDotProduct | ( | const FloatArray & | a, |
| const FloatArray & | b | ||
| ) |
Dot product for a locally distributed array.
Common for convergence criterion and such.
Definition at line 148 of file parallelcontext.C.
References oofem::FloatArray::dotProduct(), emodel, giveN2Lmap(), oofem::Natural2LocalOrdering::giveNewEq(), oofem::EngngModel::giveParallelComm(), oofem::FloatArray::giveSize(), oofem::EngngModel::isParallel(), and n2l.
Referenced by oofem::CylindricalALM::computeDeltaLambda(), oofem::CylindricalALM::do_lineSearch(), and oofem::CylindricalALM::solve().
| double oofem::ParallelContext::localNorm | ( | const FloatArray & | src | ) |
Norm for a locally distributed array.
Common for convergence criterion and such.
Definition at line 127 of file parallelcontext.C.
References oofem::FloatArray::computeNorm(), emodel, giveN2Lmap(), oofem::Natural2LocalOrdering::giveNewEq(), oofem::EngngModel::giveParallelComm(), oofem::FloatArray::giveSize(), oofem::EngngModel::isParallel(), and n2l.
Referenced by oofem::NRSolver::checkConvergence(), oofem::CylindricalALM::checkConvergence(), oofem::StaggeredSolver::checkConvergenceDofIdArray(), oofem::CylindricalALM::computeDeltaLambda(), oofem::CylindricalALM::do_lineSearch(), oofem::DynamicRelaxationSolver::solve(), oofem::StaggeredSolver::solve(), oofem::NRSolver::solve(), and oofem::CylindricalALM::solve().
|
protected |
Definition at line 57 of file parallelcontext.h.
Referenced by giveNumberOfGlobalEqs(), giveNumberOfLocalEqs(), giveNumberOfNaturalEqs(), and init().
|
protected |
Definition at line 58 of file parallelcontext.h.
Referenced by accumulate(), giveNumberOfGlobalEqs(), giveNumberOfLocalEqs(), giveNumberOfNaturalEqs(), init(), isLocal(), localDotProduct(), and localNorm().
|
protected |
Definition at line 60 of file parallelcontext.h.
Referenced by giveNumberOfGlobalEqs(), giveNumberOfLocalEqs(), and init().
|
protected |
Definition at line 61 of file parallelcontext.h.
Referenced by init(), localDotProduct(), and localNorm().