v0.8.23
Public Member Functions | Public Attributes | List of all members
AnalyticalDirichletHelmholtzBC::DirichletBC Struct Reference

#include <users_modules/helmholtz/src/AnalyticalDirichletHelmholtz.hpp>

Inheritance diagram for AnalyticalDirichletHelmholtzBC::DirichletBC:
[legend]
Collaboration diagram for AnalyticalDirichletHelmholtzBC::DirichletBC:
[legend]

Public Member Functions

 DirichletBC (MoFEM::Interface &m_field, const string &field, Mat A, Vec X, Vec F)
 
 DirichletBC (MoFEM::Interface &m_field, const string &field)
 
PetscErrorCode iNitalize ()
 
PetscErrorCode iNitalize (Range &tris)
 

Public Attributes

Range * tRis_ptr
 

Detailed Description

Definition at line 188 of file AnalyticalDirichletHelmholtz.hpp.

Constructor & Destructor Documentation

◆ DirichletBC() [1/2]

AnalyticalDirichletHelmholtzBC::DirichletBC::DirichletBC ( MoFEM::Interface m_field,
const string &  field,
Mat  A,
Vec  X,
Vec  F 
)

◆ DirichletBC() [2/2]

AnalyticalDirichletHelmholtzBC::DirichletBC::DirichletBC ( MoFEM::Interface m_field,
const string &  field 
)

Member Function Documentation

◆ iNitalize() [1/2]

PetscErrorCode AnalyticalDirichletHelmholtzBC::DirichletBC::iNitalize ( )

Definition at line 241 of file AnalyticalDirichletHelmholtz.cpp.

241  {
242  PetscFunctionBegin;
243  if(mapZeroRows.empty()) {
244  if(tRis_ptr == NULL) {
245  SETERRQ(PETSC_COMM_SELF,1,"need to initialised from AnalyticalDirichletHelmholtzBC::solveProblem");
246  }
248  }
249  PetscFunctionReturn(0);
250  }
CHKERRQ(ierr)

◆ iNitalize() [2/2]

PetscErrorCode AnalyticalDirichletHelmholtzBC::DirichletBC::iNitalize ( Range &  tris)

Definition at line 252 of file AnalyticalDirichletHelmholtz.cpp.

252  {
253  PetscFunctionBegin;
254  ParallelComm* pcomm = ParallelComm::get_pcomm(&mField.get_moab(),MYPCOMM_INDEX);
255  Range ents;
256  rval = mField.get_moab().get_connectivity(tris,ents,true); CHKERRQ_MOAB(rval);
257  ierr = mField.get_moab().get_adjacencies(tris,1,false,ents,moab::Interface::UNION); CHKERRQ(ierr);
258  ents.merge(tris);
259  for(Range::iterator eit = ents.begin();eit!=ents.end();eit++) {
260  for(_IT_NUMEREDDOF_ROW_BY_NAME_ENT_PART_FOR_LOOP_(problemPtr,fieldName,*eit,pcomm->rank(),dof)) {
261  mapZeroRows[dof->get()->getPetscGlobalDofIdx()] = dof->get()->getFieldData();
262  }
263  }
264  dofsIndices.resize(mapZeroRows.size());
265  dofsValues.resize(mapZeroRows.size());
266  int ii = 0;
267  std::map<DofIdx,FieldData>::iterator mit = mapZeroRows.begin();
268  for(;mit!=mapZeroRows.end();mit++,ii++) {
269  dofsIndices[ii] = mit->first;
270  dofsValues[ii] = mit->second;
271  }
272  PetscFunctionReturn(0);
273  }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:514
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
#define _IT_NUMEREDDOF_ROW_BY_NAME_ENT_PART_FOR_LOOP_(PROBLEMPTR, NAME, ENT, PART, IT)
use with loops to iterate row DOFs
CHKERRQ(ierr)
#define MYPCOMM_INDEX
default communicator number PCOMM
Definition: definitions.h:284

Member Data Documentation

◆ tRis_ptr

Range* AnalyticalDirichletHelmholtzBC::DirichletBC::tRis_ptr

Definition at line 198 of file AnalyticalDirichletHelmholtz.hpp.


The documentation for this struct was generated from the following files: