EvalFrontAdvanceFromFieldDiscontinuity.h 1.41 KB
Newer Older
1
/*
2 3
    This source code is subject to non-permissive licence,
    see the DamageBandDyn/LICENSE file for conditions.
4
*/
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#ifndef _EvalFrontAdvanceFromFieldDiscontinuity_h_
#define _EvalFrontAdvanceFromFieldDiscontinuity_h_
// Xfem
#include "xAlgorithm.h"
#include "xSpacePolynomial.h"

class EvalFrontAdvanceFromFieldDiscontinuity : public xfem::xEval<double>
{
  typedef double result_type;
 private:
  typedef xfem::xAssemblerBasic<> Assembler_t;
  typedef Assembler_t::matrix_type Matrix_t;
  typedef Assembler_t::vector_type Vector_t;
  typedef xfem::xValOperator<xfem::xIdentity<double> > ValOp_t;
  typedef xfem::xFormBilinearWithLaw<ValOp_t, xfem::xEval<double>, ValOp_t> FormBilinear_t;
  typedef xfem::xFormLinearWithLoad<ValOp_t, xfem::xEval<double> > FormLinear_t;
 public:
  EvalFrontAdvanceFromFieldDiscontinuity();
  ~EvalFrontAdvanceFromFieldDiscontinuity();

  template <typename SOLVER>
  void compute(SOLVER& solver, xfem::xMesh& front_mesh, const xfem::xEval<double>& eval_disc, xfem::xEval<double>& eval_disc_grad_flux, xfem::xEntityToEntity upper);

  inline void operator()(const xfem::xGeomElem* geom_appro, const xfem::xGeomElem* geom_integ, result_type& result) const;

 private:
  xfem::xDoubleManager* double_manager; // TODO it should not be a pointer but it avoids a strange BUG !
  const xfem::xSpacePolynomialLagrange space;
  xfem::xField* field;
};

#include "EvalFrontAdvanceFromFieldDiscontinuity_imp.h"
#endif