5 #ifndef _GENERICIBDISCRETIZATION_H_
6 #define _GENERICIBDISCRETIZATION_H_
23 template <
class X,
class Diag,
class OffDiag>
96 for(
int f=0; f<nFaces; f++)
98 const int c0 = faceCells(f,0);
99 const int c1 = faceCells(f,1);
106 const int ibFace = ibFaceIndex[f];
110 const X& facePhi = ibPhi[ibFace];
113 rCell[c0] += assembler.
getCoeff01(f)*(facePhi-cellPhi[c1]);
122 rCell[c1] += assembler.
getCoeff10(f)*(facePhi-cellPhi[c0]);
146 for(
int c=0; c<nCells; c++)
149 cellPhi[c] = xB[c] /
T_Scalar(wB[c]);
Matrix & getMatrix(const Index &rowIndex, const Index &colIndex)
const StorageSite & getIBFaces() const
Vector< T_Scalar, 3 > VectorT3
Array< VectorT3 > VectorT3Array
CRMatrix< Diag, OffDiag, X > CCMatrix
NumTypeTraits< X >::T_Scalar T_Scalar
OffDiag & getCoeff10(const int np)
const GeomFields & _geomFields
const CRConnectivity & getAllFaceCells() const
pair< const Field *, const StorageSite * > ArrayIndex
void discretize(const Mesh &mesh, MultiFieldMatrix &mfmatrix, MultiField &xField, MultiField &rField)
const StorageSite & getFaces() const
const StorageSite & getCells() const
OffDiag & getCoeff01(const int np)
CCMatrix::OffDiagArray OffDiagArray
void setDirichlet(const int nr)
PairWiseAssembler & getPairWiseAssembler(const CRConnectivity &pairs)
vector< Mesh * > MeshList
CCMatrix::PairWiseAssembler CCAssembler
CCMatrix::DiagArray DiagArray
GenericIBDiscretization(const MeshList &meshes, const GeomFields &geomFields, Field &phiField)