Go to the documentation of this file.
44#ifdef __MPI_PARALLEL_MODE
51ParallelContext :: ~ParallelContext()
55ParallelContext :: init(
int newDi)
59#ifdef __MPI_PARALLEL_MODE
60 if (
emodel->isParallel() ) {
65 #ifdef __VERBOSE_PARALLEL
75ParallelContext :: giveNumberOfLocalEqs()
77#ifdef __MPI_PARALLEL_MODE
78 if (
emodel->isParallel() ) {
79 return n2g.giveNumberOfLocalEqs();
84#ifdef __MPI_PARALLEL_MODE
91ParallelContext :: giveNumberOfGlobalEqs()
93#ifdef __MPI_PARALLEL_MODE
94 if (
emodel->isParallel() ) {
95 return n2g.giveNumberOfGlobalEqs();
100#ifdef __MPI_PARALLEL_MODE
106ParallelContext :: giveNumberOfNaturalEqs()
116 if (
emodel->isParallel() ) {
117 return this->giveN2GMap()->isLocal(dman);
129#ifdef __MPI_PARALLEL_MODE
130 if (
emodel->isParallel() ) {
131 double norm2 = 0.0, norm2_tot;
134 for (
int i = 0; i < size; i++ ) {
135 if (
n2l->giveNewEq(i + 1) ) {
136 norm2 += src(i) * src(i);
139 MPI_Allreduce( & norm2, & norm2_tot, 1, MPI_DOUBLE, MPI_SUM, this->
emodel->giveParallelComm() );
140 return sqrt(norm2_tot);
150#ifdef __MPI_PARALLEL_MODE
151 if (
emodel->isParallel() ) {
152 double val = 0.0, val_tot = 0.0;
155 for (
int i = 0; i < size; i++ ) {
156 if (
n2l->giveNewEq(i + 1) ) {
160 MPI_Allreduce( & val, & val_tot, 1, MPI_DOUBLE, MPI_SUM, this->
emodel->giveParallelComm() );
169ParallelContext :: accumulate(
double local)
171#ifdef __MPI_PARALLEL_MODE
172 if (
emodel->isParallel() ) {
174 MPI_Allreduce( & local, & global, 1, MPI_DOUBLE, MPI_SUM, this->
emodel->giveParallelComm() );
186#ifdef __MPI_PARALLEL_MODE
187 if (
emodel->isParallel() ) {
191 MPI_Allreduce( local.
givePointer(), global.
givePointer(), size, MPI_DOUBLE, MPI_SUM, this->emodel->giveParallelComm() );
195#ifdef __MPI_PARALLEL_MODE
double computeNorm() const
double dotProduct(const FloatArray &x) const
Index giveSize() const
Returns the size of receiver.
const double * givePointer() const
int giveNumberOfLocalEqs()
Natural2GlobalOrdering n2g
Natural2LocalOrdering n2l
int giveNumberOfGlobalEqs()
Natural2LocalOrdering * giveN2Lmap()
int giveNumberOfNaturalEqs()
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