#include <transient_system.h>
typedef TransientSystem< Base > sys_type
TransientSystem (EquationSystems &es, const std::string &name, const unsigned int number)
virtual ~TransientSystem ()
sys_type & system ()
virtual void clear ()
virtual void reinit ()
virtual std::string system_type () const
Number old_solution (const unsigned int global_dof_number) const
Number older_solution (const unsigned int global_dof_number) const
AutoPtr< NumericVector< Number > > old_local_solution
AutoPtr< NumericVector< Number > > older_local_solution
virtual void init_data ()
virtual void re_update ()
Definition at line 47 of file transient_system.h.
Definition at line 67 of file transient_system.h.
Definition at line 37 of file transient_system.C.
References TransientSystem< Base >::old_local_solution, and TransientSystem< Base >::older_local_solution.
:
Base (es, name, number)
{
old_local_solution =
AutoPtr<NumericVector<Number> >
(&(this->add_vector('_transient_old_local_solution')));
older_local_solution =
AutoPtr<NumericVector<Number> >
(&(this->add_vector('_transient_older_local_solution')));
}
Definition at line 54 of file transient_system.C.
{
this->clear();
// We still have AutoPtrs for API compatibility, but
// now that we're System::add_vector()ing these, we can trust
// the base class to handle memory management
old_local_solution.release();
older_local_solution.release();
}
Definition at line 68 of file transient_system.C.
{
// clear the parent data
Base::clear();
// the old & older local solutions
// are now deleted by System!
// old_local_solution->clear();
// older_local_solution->clear();
// FIXME: This preserves maximum backwards compatibility,
// but is probably grossly unnecessary:
old_local_solution.release();
older_local_solution.release();
old_local_solution =
AutoPtr<NumericVector<Number> >
(&(this->add_vector('_transient_old_local_solution')));
older_local_solution =
AutoPtr<NumericVector<Number> >
(&(this->add_vector('_transient_older_local_solution')));
}
Definition at line 95 of file transient_system.C.
References libMeshEnums::GHOSTED, and libMeshEnums::SERIAL.
{
// initialize parent data
Base::init_data();
// Initialize the old & older solutions
// Using new ghosted vectors if enabled
#ifdef LIBMESH_ENABLE_GHOSTED
old_local_solution->init (this->n_dofs(), this->n_local_dofs(),
this->get_dof_map().get_send_list(), false,
GHOSTED);
older_local_solution->init (this->n_dofs(), this->n_local_dofs(),
this->get_dof_map().get_send_list(), false,
GHOSTED);
#else
old_local_solution->init (this->n_dofs(), false, SERIAL);
older_local_solution->init (this->n_dofs(), false, SERIAL);
#endif
}
Definition at line 171 of file transient_system.C.
{
// Check the sizes
libmesh_assert (global_dof_number < this->get_dof_map().n_dofs());
libmesh_assert (global_dof_number < old_local_solution->size());
return (*old_local_solution)(global_dof_number);
}
Definition at line 183 of file transient_system.C.
{
// Check the sizes
libmesh_assert (global_dof_number < this->get_dof_map().n_dofs());
libmesh_assert (global_dof_number < older_local_solution->size());
return (*older_local_solution)(global_dof_number);
}
Definition at line 132 of file transient_system.C.
References Utility::iota().
{
// re_update the parent system
Base::re_update ();
//const std::vector<unsigned int>& send_list = Base::_dof_map.get_send_list ();
// Explicitly build a send_list
std::vector<unsigned int> send_list(Base::solution->size());
Utility::iota (send_list.begin(), send_list.end(), 0);
const unsigned int first_local_dof = Base::get_dof_map().first_dof();
const unsigned int end_local_dof = Base::get_dof_map().end_dof();
// Check sizes
libmesh_assert (end_local_dof >= first_local_dof);
libmesh_assert (send_list.size() >= end_local_dof - first_local_dof);
libmesh_assert (older_local_solution->size() >= send_list.size());
libmesh_assert (old_local_solution->size() >= send_list.size());
// Make sure we have something to do
if (first_local_dof == end_local_dof)
return;
// Update the old & older solutions with the send_list,
// which may have changed since their last update.
older_local_solution->localize (first_local_dof,
end_local_dof-1,
send_list);
old_local_solution->localize (first_local_dof,
end_local_dof-1,
send_list);
}
Definition at line 118 of file transient_system.C.
{
// initialize parent data
Base::reinit();
// Project the old & older vectors to the new mesh
// The System::reinit handles this now
// this->project_vector (*old_local_solution);
// this->project_vector (*older_local_solution);
}
Definition at line 72 of file transient_system.h.
{ return *this; }
Definition at line 158 of file transient_system.h.
{
std::string type = 'Transient';
type += Base::system_type ();
return type;
}
Definition at line 115 of file transient_system.h.
Referenced by TransientSystem< Base >::TransientSystem().
Definition at line 123 of file transient_system.h.
Referenced by TransientSystem< Base >::TransientSystem().
Generated automatically by Doxygen for libMesh from the source code.