PlasCom2  1.0
XPACC Multi-physics simluation application
MaxwellBC.C
Go to the documentation of this file.
1 #include <iostream>
2 #include "Simulation.H"
3 
4 
5 
6 namespace Maxwell {
7 
8  namespace bc {
9 
10 
11  int ComputeDirichletBC(const std::vector<size_t> &bufferIndices, double *variable, const double &value)
12  {
13 
14  std::vector<size_t>::const_iterator bufferIndicesIt = bufferIndices.begin();
15  while(bufferIndicesIt != bufferIndices.end()) {
16  size_t bufferIndex(*bufferIndicesIt++);
17  variable[bufferIndex] = value;
18  }
19 
20  return(0);
21 
22  }
23 
24 
25  int ComputeSATDirichletBC(const std::vector<size_t> &bufferIndices, double *rhsVar, double *stateVar,
26  const double &value, const double &weight)
27  {
28 
29  std::vector<size_t>::const_iterator bufferIndicesIt = bufferIndices.begin();
30  while(bufferIndicesIt != bufferIndices.end()) {
31  size_t bufferIndex(*bufferIndicesIt++);
32  rhsVar[bufferIndex] = rhsVar[bufferIndex]-weight*(stateVar[bufferIndex]-value);
33  }
34 
35  return(0);
36 
37  }
38 
39 
40  }
41 
42 }
int ComputeSATDirichletBC(const std::vector< size_t > &bufferIndices, double *rhsVar, double *stateVar, const double &value, const double &weight)
Definition: MaxwellBC.C:25
int ComputeDirichletBC(const std::vector< size_t > &bufferIndices, double *variable, const double &value)
Definition: MaxwellBC.C:11