IncrementallyObjectiveTimeIntegration.h 1.64 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 38 39 40 41 42 43 44 45
#ifndef _IncrementallyObjectiveTimeIntegration_h_
#define _IncrementallyObjectiveTimeIntegration_h_
// Xfem
#include "xEntityFilter.h"
#include "xMesh.h"
// boost
#include <boost/iterator/filter_iterator.hpp>

namespace xfem
{
class xGeomElem;
template <typename T>
class xEval;
class xTensor2;
}

class JaumannTimeIntegration
{
public:
  typedef boost::filter_iterator<xfem::xEntityFilter, xfem::xIter> IterDomain;
  typedef std::vector<AOMD::mEntity*>::const_iterator              IterOldDomain;

  JaumannTimeIntegration(const xfem::xEval<xfem::xTensor2>& eval_spin_tensor_,
                         const xfem::xEval<xfem::xTensor2>& eval_stress_rate_contrib_before_ls_advance_,
                         const xfem::xEval<xfem::xTensor2>& eval_stress_rate_contrib_after_ls_advance_);
  void initialize(IterDomain begin, const IterDomain& end);
  void restore(IterDomain begin, const IterDomain& end);
  void clear(IterOldDomain old_begin, const IterOldDomain& old_end);
  void project(IterDomain begin, const IterDomain& end);
  void compute_before_ls_advance(IterDomain begin, const IterDomain& end, double time_step);
  void compute_after_ls_advance(IterDomain begin, const IterDomain& end, double time_step);
  unsigned int getStressField() { return stress_tag; }
private:
  unsigned int stress_tag;
  xfem::xTensor2 spin, buf;
  const xfem::xEval<xfem::xTensor2>& eval_spin_tensor;
  const xfem::xEval<xfem::xTensor2>& eval_stress_rate_contrib_before_ls_advance;
  const xfem::xEval<xfem::xTensor2>& eval_stress_rate_contrib_after_ls_advance;
};

#endif