ExtendedBidomainNeumannSurfaceTermAssembler.hpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef EXTENDEDBIDOMAINNEUMANNSURFACETERMASSEMBLER_HPP_
00037 #define EXTENDEDBIDOMAINNEUMANNSURFACETERMASSEMBLER_HPP_
00038
00039 #include "AbstractFeSurfaceIntegralAssembler.hpp"
00040
00041
00049 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00050 class ExtendedBidomainNeumannSurfaceTermAssembler : public AbstractFeSurfaceIntegralAssembler<ELEMENT_DIM,SPACE_DIM,3>
00051 {
00052 protected:
00071 virtual c_vector<double, 3*ELEMENT_DIM> ComputeVectorSurfaceTerm(
00072 const BoundaryElement<ELEMENT_DIM-1,SPACE_DIM> &rSurfaceElement,
00073 c_vector<double,ELEMENT_DIM> &rPhi,
00074 ChastePoint<SPACE_DIM> &rX);
00075
00076 public:
00083 ExtendedBidomainNeumannSurfaceTermAssembler(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh,
00084 BoundaryConditionsContainer<ELEMENT_DIM,SPACE_DIM,3>* pBoundaryConditions)
00085 : AbstractFeSurfaceIntegralAssembler<ELEMENT_DIM,SPACE_DIM,3>(pMesh, pBoundaryConditions)
00086 {
00087 }
00088 };
00089
00090
00091 #define COVERAGE_IGNORE //no non-zero Neumann BC allowed at the moment in extended bidomain problems
00092 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00093 c_vector<double, 3*ELEMENT_DIM> ExtendedBidomainNeumannSurfaceTermAssembler<ELEMENT_DIM,SPACE_DIM>::ComputeVectorSurfaceTerm(
00094 const BoundaryElement<ELEMENT_DIM-1,SPACE_DIM> &rSurfaceElement,
00095 c_vector<double,ELEMENT_DIM> &rPhi,
00096 ChastePoint<SPACE_DIM> &rX)
00097 {
00098
00099 double sigma_i_times_grad_phi_i_first_cell_dot_n = this->mpBoundaryConditions->GetNeumannBCValue(&rSurfaceElement, rX, 0);
00100 double sigma_i_times_grad_phi_i_second_cell_dot_n = this->mpBoundaryConditions->GetNeumannBCValue(&rSurfaceElement, rX, 1);
00101 double sigma_e_times_grad_phi_e_dot_n = this->mpBoundaryConditions->GetNeumannBCValue(&rSurfaceElement, rX, 2);
00102
00103 c_vector<double, 3*ELEMENT_DIM> ret;
00104
00105 for (unsigned i=0; i<3*ELEMENT_DIM; i = i + 3)
00106 {
00107 ret(i) = rPhi(i)*sigma_i_times_grad_phi_i_first_cell_dot_n;
00108 ret(i+1) = rPhi(i)*sigma_i_times_grad_phi_i_second_cell_dot_n;
00109 ret(i+2) = rPhi(i)*(sigma_i_times_grad_phi_i_first_cell_dot_n + sigma_i_times_grad_phi_i_second_cell_dot_n + sigma_e_times_grad_phi_e_dot_n);
00110 }
00111 return ret;
00112 }
00113 #undef COVERAGE_IGNORE
00114
00115 #endif // EXTENDEDBIDOMAINNEUMANNSURFACETERMASSEMBLER_HPP_