Skip to content
Snippets Groups Projects
Commit b5dec2db authored by Gauthier Becker's avatar Gauthier Becker
Browse files

Remove umap from staticUnkonowsField now update of displacement is

managed in staticDofManager 
parent 3ed1ab6e
No related branches found
No related tags found
No related merge requests found
...@@ -55,9 +55,9 @@ template<class T> struct dofTraits ...@@ -55,9 +55,9 @@ template<class T> struct dofTraits
{ {
typedef T VecType; typedef T VecType;
typedef T MatType; typedef T MatType;
inline static void gemm(VecType &r, const MatType &m, const VecType &v, inline static void gemm(VecType &r, const MatType &m, const VecType &v,
double alpha, double beta) double alpha, double beta)
{ {
r = beta * r + alpha * m * v; r = beta * r + alpha * m * v;
} }
}; };
...@@ -68,7 +68,7 @@ template<class T> struct dofTraits<fullMatrix<T> > ...@@ -68,7 +68,7 @@ template<class T> struct dofTraits<fullMatrix<T> >
typedef fullMatrix<T> MatType; typedef fullMatrix<T> MatType;
inline static void gemm (VecType &r, const MatType &m, const VecType &v, inline static void gemm (VecType &r, const MatType &m, const VecType &v,
double alpha, double beta) double alpha, double beta)
{ {
r.gemm(m, v, alpha,beta); r.gemm(m, v, alpha,beta);
} }
}; };
...@@ -132,10 +132,10 @@ class dofManager{ ...@@ -132,10 +132,10 @@ class dofManager{
void _parallelFinalize(); void _parallelFinalize();
public: public:
dofManager(linearSystem<dataMat> *l, bool isParallel=false) dofManager(linearSystem<dataMat> *l, bool isParallel=false)
: _current(l), _isParallel(isParallel), _parallelFinalized(false) : _current(l), _isParallel(isParallel), _parallelFinalized(false)
{ {
_linearSystems["A"] = l; _linearSystems["A"] = l;
} }
dofManager(linearSystem<dataMat> *l1, linearSystem<dataMat> *l2) dofManager(linearSystem<dataMat> *l1, linearSystem<dataMat> *l2)
: _current(l1), _isParallel(false), _parallelFinalized(false) : _current(l1), _isParallel(false), _parallelFinalized(false)
...@@ -178,7 +178,7 @@ class dofManager{ ...@@ -178,7 +178,7 @@ class dofManager{
if (ghosted.find(key) != ghosted.end()) return; if (ghosted.find(key) != ghosted.end()) return;
ghosted[key] = procId; ghosted[key] = procId;
} }
inline void numberDof(Dof key) virtual inline void numberDof(Dof key) // derived in staticDofManager in NonLinearSolver project
{ {
if (fixed.find(key) != fixed.end()) return; if (fixed.find(key) != fixed.end()) return;
if (constraints.find(key) != constraints.end()) return; if (constraints.find(key) != constraints.end()) return;
...@@ -275,7 +275,7 @@ class dofManager{ ...@@ -275,7 +275,7 @@ class dofManager{
getDofValue(v->getNum(), Dof::createTypeWithTwoInts(iComp, iField), value); getDofValue(v->getNum(), Dof::createTypeWithTwoInts(iComp, iField), value);
} }
inline void insertInSparsityPatternLinConst(const Dof &R, const Dof &C) inline void insertInSparsityPatternLinConst(const Dof &R, const Dof &C)
{ {
std::map<Dof, int>::iterator itR = unknown.find(R); std::map<Dof, int>::iterator itR = unknown.find(R);
if (itR != unknown.end()) if (itR != unknown.end())
...@@ -348,7 +348,7 @@ class dofManager{ ...@@ -348,7 +348,7 @@ class dofManager{
assembleLinConst(R, C, value); assembleLinConst(R, C, value);
} }
} }
inline void assemble(std::vector<Dof> &R, std::vector<Dof> &C, inline void assemble(std::vector<Dof> &R, std::vector<Dof> &C,
const fullMatrix<dataMat> &m) const fullMatrix<dataMat> &m)
{ {
if (_isParallel && !_parallelFinalized) _parallelFinalize(); if (_isParallel && !_parallelFinalized) _parallelFinalize();
...@@ -628,7 +628,7 @@ void dofManager<T>::_parallelFinalize() ...@@ -628,7 +628,7 @@ void dofManager<T>::_parallelFinalize()
} }
} }
int index; int index;
while (MPI_Waitany (2*Msg::GetCommSize(), reqRecv0, &index, &status) == 0 && while (MPI_Waitany (2*Msg::GetCommSize(), reqRecv0, &index, &status) == 0 &&
index != MPI_UNDEFINED) { index != MPI_UNDEFINED) {
if (status.MPI_TAG == 0) { if (status.MPI_TAG == 0) {
for (int j = 0; j < nRequested[index]; j++) { for (int j = 0; j < nRequested[index]; j++) {
...@@ -638,7 +638,7 @@ void dofManager<T>::_parallelFinalize() ...@@ -638,7 +638,7 @@ void dofManager<T>::_parallelFinalize()
Msg::Error ("ghost Dof does not exist on parent process"); Msg::Error ("ghost Dof does not exist on parent process");
send1[index][j] = it->second; send1[index][j] = it->second;
} }
MPI_Isend(send1[index], nRequested[index], MPI_INT, index, 1, MPI_Isend(send1[index], nRequested[index], MPI_INT, index, 1,
MPI_COMM_WORLD, &reqSend1[index]); MPI_COMM_WORLD, &reqSend1[index]);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment