36 #ifndef ABSTRACTFESURFACENTEGRALASSEMBLER_HPP_ 37 #define ABSTRACTFESURFACENTEGRALASSEMBLER_HPP_ 39 #include "AbstractFeAssemblerCommon.hpp" 40 #include "GaussianQuadratureRule.hpp" 41 #include "BoundaryConditionsContainer.hpp" 42 #include "PetscVecTools.hpp" 43 #include "PetscMatTools.hpp" 60 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
92 c_vector<double, ELEMENT_DIM>& rPhi,
98 return zero_vector<double>(ELEMENT_DIM*PROBLEM_DIM);
112 c_vector<double, PROBLEM_DIM*ELEMENT_DIM>& rBSurfElem);
142 assert(pBoundaryConditions);
143 this->mpBoundaryConditions = pBoundaryConditions;
148 template <
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
157 assert(pBoundaryConditions);
164 template <
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
171 template <
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
184 c_vector<double, PROBLEM_DIM*ELEMENT_DIM> b_surf_elem;
189 const BoundaryElement<ELEMENT_DIM-1,SPACE_DIM>& r_surf_element = *(neumann_iterator->first);
192 const size_t STENCIL_SIZE=PROBLEM_DIM*ELEMENT_DIM;
193 unsigned p_indices[STENCIL_SIZE];
195 PetscVecTools::AddMultipleValues<STENCIL_SIZE>(this->
mVectorToAssemble, p_indices, b_surf_elem);
204 template <
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
207 c_vector<double, PROBLEM_DIM*ELEMENT_DIM>& rBSurfElem)
209 c_vector<double, SPACE_DIM> weighted_direction;
210 double jacobian_determinant;
211 mpMesh->GetWeightedDirectionForBoundaryElement(rSurfaceElement.
GetIndex(), weighted_direction, jacobian_determinant);
216 c_vector<double, ELEMENT_DIM> phi;
233 for (
unsigned i=0; i<rSurfaceElement.
GetNumNodes(); i++)
235 const c_vector<double, SPACE_DIM> node_loc = rSurfaceElement.
GetNode(i)->rGetLocation();
253 #endif // ABSTRACTFESURFACENTEGRALASSEMBLER_HPP_
virtual void AssembleOnSurfaceElement(const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > &rSurfaceElement, c_vector< double, PROBLEM_DIM *ELEMENT_DIM > &rBSurfElem)
c_vector< double, DIM > & rGetLocation()
static void BeginEvent(unsigned event)
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
virtual void ResetInterpolatedQuantities()
std::map< const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > *, const AbstractBoundaryCondition< SPACE_DIM > * >::const_iterator NeumannMapIterator
unsigned GetNumQuadPoints() const
Node< SPACE_DIM > * GetNode(unsigned localIndex) const
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > * mpBoundaryConditions
GaussianQuadratureRule< ELEMENT_DIM-1 > * mpSurfaceQuadRule
LinearBasisFunction< ELEMENT_DIM-1 > SurfaceBasisFunction
unsigned GetNumNodes() const
void GetStiffnessMatrixGlobalIndices(unsigned problemDim, unsigned *pIndices) const
AbstractFeSurfaceIntegralAssembler(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > *pBoundaryConditions)
static void ComputeBasisFunctions(const ChastePoint< ELEMENT_DIM > &rPoint, c_vector< double, ELEMENT_DIM+1 > &rReturnValue)
virtual void IncrementInterpolatedQuantities(double phiI, const Node< SPACE_DIM > *pNode)
void ResetBoundaryConditionsContainer(BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > *pBoundaryConditions)
unsigned GetIndex() const
double GetWeight(unsigned index) const
virtual ~AbstractFeSurfaceIntegralAssembler()
static void EndEvent(unsigned event)
const ChastePoint< ELEMENT_DIM > & rGetQuadPoint(unsigned index) const
virtual c_vector< double, PROBLEM_DIM *ELEMENT_DIM > ComputeVectorSurfaceTerm(const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > &rSurfaceElement, c_vector< double, ELEMENT_DIM > &rPhi, ChastePoint< SPACE_DIM > &rX)