Hello,

I want to apply dirichlet boundary conditions which change their value
over time:

class BdyFunction : public FunctionBase<Number>
{
public:
  BdyFunction (unsigned int var, Real disp) : _var(var), _disp(disp)
    { this->_initialized = true; }

  virtual Number operator() (const Point&, const Real = 0)
    { libmesh_not_implemented(); }

  virtual void operator() (const Point& p,
                           const Real time,
                           DenseVector<Number>& output)
    {
      output.zero();
      output(_var) = _disp*time
    }

  virtual AutoPtr<FunctionBase<Number> > clone() const
    { return AutoPtr<FunctionBase<Number> > (new BdyFunction(_var, _disp)); }

private:
  const unsigned int _var;
  Real _disp;
};


and then add it with sth like this

  std::set<boundary_id_type> top;
  top.insert(5);
  BdyFunction bfunc(w_var, -0.1);
  this->get_dof_map().add_dirichlet_boundary(DirichletBoundary (top, w_only, 
&bfunc));

in a FEMSystem::init_data(..)

Are there any additional step necessary in each timestep to apply the boundary
conditions or what else am I missing?

Robert

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to