Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

PetscSolverFeti.cc 1.75 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.


#include "parallel/PetscSolverFeti.h"
#include "parallel/StdMpi.h"
#include "parallel/MpiHelper.h"

namespace AMDiS {

  using namespace std;


#ifdef HAVE_PETSC_DEV 
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
  void PetscSolverFeti::updateDofData(int nComponents)
  {
    FUNCNAME("PetscSolverFeti::updateDofData()");
   
    definePrimals();
  }


  void PetscSolverFeti::definePrimals()
  {
    FUNCNAME("PetscSolverFeti::definePrimals()");

    TEST_EXIT_DBG(meshDistributor->getMesh()->getDim() == 2)
      ("Works for 2D problems only!");

    primals = meshDistributor->getBoundaryDofInfo().geoDofs[VERTEX];
    globalPrimalIndex.clear();
   
    int nRankPrimals = 0;
    for (DofContainerSet::iterator it = primals.begin(); 
	 it != primals.end(); ++it)
      if (meshDistributor->getIsRankDof(**it)) {
	globalPrimalIndex[**it] = nRankPrimals;
	nRankPrimals++;
      }

    int nOverallPrimals = 0, rStartPrimals = 0;
    mpi::getDofNumbering(meshDistributor->getMpiComm(),
			 nRankPrimals, rStartPrimals, nOverallPrimals);

    for (DofMapping::iterator it = globalPrimalIndex.begin();
	 it != globalPrimalIndex.end(); ++it)
      it->second += rStartPrimals;

    MSG_DBG("nRankPrimals = %d   nOverallPrimals = %d\n",
	    nRankPrimals, nOverallPrimals);
  }


62 63 64 65 66 67 68 69 70 71 72 73 74
  void PetscSolverFeti::fillPetscMatrix(Matrix<DOFMatrix*> *mat, SystemVector *vec)
  {
    FUNCNAME("PetscSolverFeti::fillPetscMatrix()");   
  }


  void PetscSolverFeti::solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo)
  {
    FUNCNAME("PetscSolverFeti::solvePetscMatrix()");
  }
#endif

}