mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
-- changes to make div calculation
This commit is contained in:
parent
e66ded8fe7
commit
516553d890
@ -110,7 +110,7 @@ class ASMHandler {
|
|||||||
const Dune::FieldVector<double,esize>* S,
|
const Dune::FieldVector<double,esize>* S,
|
||||||
const LeafIterator& cell,
|
const LeafIterator& cell,
|
||||||
Vector* b=NULL);
|
Vector* b=NULL);
|
||||||
|
void addMatElement(int i,int j,double val){ A[i][j] += val;}
|
||||||
//! \brief Extract values corresponding to cell
|
//! \brief Extract values corresponding to cell
|
||||||
//! \param[in] u The global load vector
|
//! \param[in] u The global load vector
|
||||||
//! \param[in] it An iterator to the cell we want to extract values for
|
//! \param[in] it An iterator to the cell we want to extract values for
|
||||||
|
@ -35,6 +35,10 @@ class Elasticity {
|
|||||||
//! \param[in] point (Reference) coordinates of quadrature point
|
//! \param[in] point (Reference) coordinates of quadrature point
|
||||||
//! \param[in] Jinv Jacobian matrix in quadrature point
|
//! \param[in] Jinv Jacobian matrix in quadrature point
|
||||||
//! \param[out] B The B matrix
|
//! \param[out] B The B matrix
|
||||||
|
template<int funcdim>
|
||||||
|
void getBVector(Dune::FieldVector<ctype,funcdim>& BVector,
|
||||||
|
const Dune::FieldVector<ctype,dim>& point);
|
||||||
|
|
||||||
template<int components, int funcdim>
|
template<int components, int funcdim>
|
||||||
void getBmatrix(Dune::FieldMatrix<ctype,components,funcdim>& B,
|
void getBmatrix(Dune::FieldMatrix<ctype,components,funcdim>& B,
|
||||||
const Dune::FieldVector<ctype,dim>& point,
|
const Dune::FieldVector<ctype,dim>& point,
|
||||||
|
@ -71,6 +71,21 @@ void Elasticity<GridType>::getBmatrix(Dune::FieldMatrix<ctype,components,funcdim
|
|||||||
B[i][j] = temp[k%rows][k/rows];
|
B[i][j] = temp[k%rows][k/rows];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class GridType>
|
||||||
|
template<int funcdims>
|
||||||
|
void Elasticity<GridType>::getBVector(Dune::FieldVector<ctype,funcdims>& Bvector,
|
||||||
|
const Dune::FieldVector<ctype,dim>& point)
|
||||||
|
{
|
||||||
|
P1ShapeFunctionSet<ctype,ctype,dim> basis
|
||||||
|
= P1ShapeFunctionSet<ctype,ctype,dim>::instance();
|
||||||
|
|
||||||
|
Dune::FieldMatrix<ctype,funcdims,dim> N;
|
||||||
|
for (int i=0;i < funcdims; i++){
|
||||||
|
Bvector[i] = basis[i].evaluateFunction(point);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template <class GridType>
|
template <class GridType>
|
||||||
template<int comp, int funcdim>
|
template<int comp, int funcdim>
|
||||||
void Elasticity<GridType>::getStiffnessMatrix(
|
void Elasticity<GridType>::getStiffnessMatrix(
|
||||||
|
@ -44,7 +44,14 @@ class MeshColorizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Calculate the coloring
|
//! \brief Calculate the coloring
|
||||||
void calcGroups();
|
void calcGroups(){
|
||||||
|
tg[0].resize(1);
|
||||||
|
tg[0].reserve(grid.size(0));
|
||||||
|
for (int i = 0; i < grid.size(0); ++i)
|
||||||
|
tg[0][0].push_back(i);
|
||||||
|
tg[1].clear();
|
||||||
|
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
IntMat tg[2]; //!< The color groups
|
IntMat tg[2]; //!< The color groups
|
||||||
const GridType& grid; //!< Reference to grid being colored
|
const GridType& grid; //!< Reference to grid being colored
|
||||||
|
Loading…
Reference in New Issue
Block a user