libMesh::DiffContext Class Reference

#include <diff_context.h>

Inheritance diagram for libMesh::DiffContext:

Public Types

typedef std::map< const
NumericVector< Number >
*, std::pair< DenseVector
< Number >, std::vector
< DenseSubVector< Number >
* > > >::iterator 
localized_vectors_iterator
 

Public Member Functions

 DiffContext (const System &)
 
virtual ~DiffContext ()
 
virtual void elem_reinit (Real)
 
virtual void elem_side_reinit (Real)
 
virtual void elem_edge_reinit (Real)
 
unsigned int n_vars () const
 
const Systemget_system () const
 
const DenseVector< Number > & get_elem_solution () const
 
DenseVector< Number > & get_elem_solution ()
 
const DenseSubVector< Number > & get_elem_solution (unsigned int var) const
 
const DenseVector< Number > & get_elem_fixed_solution () const
 
DenseVector< Number > & get_elem_fixed_solution ()
 
const DenseSubVector< Number > & get_elem_fixed_solution (unsigned int var) const
 
const DenseVector< Number > & get_elem_residual () const
 
DenseVector< Number > & get_elem_residual ()
 
const DenseSubVector< Number > & get_elem_residual (unsigned int var) const
 
DenseSubVector< Number > & get_elem_residual (unsigned int var)
 
const DenseMatrix< Number > & get_elem_jacobian () const
 
DenseMatrix< Number > & get_elem_jacobian ()
 
const DenseSubMatrix< Number > & get_elem_jacobian (unsigned int var1, unsigned int var2) const
 
DenseSubMatrix< Number > & get_elem_jacobian (unsigned int var1, unsigned int var2)
 
const std::vector< Number > & get_qois () const
 
std::vector< Number > & get_qois ()
 
const std::vector< DenseVector
< Number > > & 
get_qoi_derivatives () const
 
std::vector< DenseVector
< Number > > & 
get_qoi_derivatives ()
 
const DenseSubVector< Number > & get_qoi_derivatives (unsigned int qoi, unsigned int var) const
 
DenseSubVector< Number > & get_qoi_derivatives (unsigned int qoi, unsigned int var)
 
const std::vector< dof_id_type > & get_dof_indices () const
 
std::vector< dof_id_type > & get_dof_indices ()
 
const std::vector< dof_id_type > & get_dof_indices (unsigned int var) const
 
Real get_system_time () const
 
Real get_time () const
 
void set_time (Real time_in)
 
Real get_elem_solution_derivative () const
 
Real get_fixed_solution_derivative () const
 
bool is_adjoint () const
 
bool & is_adjoint ()
 
void set_deltat_pointer (Real *dt)
 
Real get_deltat_value ()
 
void add_localized_vector (NumericVector< Number > &_localized_vector, const System &_sys)
 
DenseVector< Number > & get_localized_vector (const NumericVector< Number > &_localized_vector)
 
const DenseVector< Number > & get_localized_vector (const NumericVector< Number > &_localized_vector) const
 
DenseSubVector< Number > & get_localized_subvector (const NumericVector< Number > &_localized_vector, unsigned int _var)
 
const DenseSubVector< Number > & get_localized_subvector (const NumericVector< Number > &_localized_vector, unsigned int _var) const
 

Public Attributes

Real time
 
const Real system_time
 
Real elem_solution_derivative
 
Real fixed_solution_derivative
 

Protected Attributes

std::map< const NumericVector
< Number > *, std::pair
< DenseVector< Number >
, std::vector< DenseSubVector
< Number > * > > > 
localized_vectors
 
DenseVector< Numberelem_solution
 
std::vector< DenseSubVector
< Number > * > 
elem_subsolutions
 
DenseVector< Numberelem_fixed_solution
 
std::vector< DenseSubVector
< Number > * > 
elem_fixed_subsolutions
 
DenseVector< Numberelem_residual
 
DenseMatrix< Numberelem_jacobian
 
std::vector< Numberelem_qoi
 
std::vector< DenseVector
< Number > > 
elem_qoi_derivative
 
std::vector< std::vector
< DenseSubVector< Number > * > > 
elem_qoi_subderivatives
 
std::vector< DenseSubVector
< Number > * > 
elem_subresiduals
 
std::vector< std::vector
< DenseSubMatrix< Number > * > > 
elem_subjacobians
 
std::vector< dof_id_typedof_indices
 
std::vector< std::vector
< dof_id_type > > 
dof_indices_var
 

Private Attributes

Real_deltat
 
const System_system
 
bool _is_adjoint
 

Detailed Description

This class provides all data required for a physics package (e.g. a DifferentiableSystem subclass) to perform local element residual and jacobian integrations.

This class is part of the new DifferentiableSystem framework, which is still experimental. Users of this framework should beware of bugs and future API changes.

Author
Roy H. Stogner 2009

Definition at line 57 of file diff_context.h.

Member Typedef Documentation

typedef std::map<const NumericVector<Number>*, std::pair<DenseVector<Number>, std::vector<DenseSubVector<Number>*> > >::iterator libMesh::DiffContext::localized_vectors_iterator

Typedef for the localized_vectors iterator

Definition at line 340 of file diff_context.h.

Constructor & Destructor Documentation

libMesh::DiffContext::DiffContext ( const System sys)
explicit

Constructor. Optionally initializes required data structures.

Definition at line 27 of file diff_context.C.

References elem_fixed_solution, elem_fixed_subsolutions, elem_jacobian, elem_qoi, elem_qoi_derivative, elem_qoi_subderivatives, elem_residual, elem_solution, elem_subjacobians, elem_subresiduals, elem_subsolutions, libMesh::System::n_vars(), libMesh::System::qoi, and libMesh::System::use_fixed_solution.

27  :
28  time(sys.time),
29  system_time(sys.time),
32  dof_indices_var(sys.n_vars()),
33  _deltat(NULL),
34  _system(sys),
35  _is_adjoint(false)
36 {
37  // Finally initialize solution/residual/jacobian data structures
38  unsigned int nv = sys.n_vars();
39 
40  elem_subsolutions.reserve(nv);
41  elem_subresiduals.reserve(nv);
42  elem_subjacobians.resize(nv);
43  if (sys.use_fixed_solution)
44  elem_fixed_subsolutions.reserve(nv);
45 
46  // If the user resizes sys.qoi, it will invalidate us
47  std::size_t n_qoi = sys.qoi.size();
48  elem_qoi.resize(n_qoi);
49  elem_qoi_derivative.resize(n_qoi);
50  elem_qoi_subderivatives.resize(n_qoi);
51  for (std::size_t q=0; q != n_qoi; ++q)
52  elem_qoi_subderivatives[q].reserve(nv);
53 
54  for (unsigned int i=0; i != nv; ++i)
55  {
56  elem_subsolutions.push_back(new DenseSubVector<Number>(elem_solution));
57  elem_subresiduals.push_back(new DenseSubVector<Number>(elem_residual));
58  for (std::size_t q=0; q != n_qoi; ++q)
59  elem_qoi_subderivatives[q].push_back(new DenseSubVector<Number>(elem_qoi_derivative[q]));
60  elem_subjacobians[i].reserve(nv);
61 
62  if (sys.use_fixed_solution)
63  elem_fixed_subsolutions.push_back
64  (new DenseSubVector<Number>(elem_fixed_solution));
65 
66  for (unsigned int j=0; j != nv; ++j)
67  {
68  elem_subjacobians[i].push_back
69  (new DenseSubMatrix<Number>(elem_jacobian));
70  }
71  }
72 }
libMesh::DiffContext::~DiffContext ( )
virtual

Destructor.

Definition at line 76 of file diff_context.C.

References elem_fixed_subsolutions, elem_qoi_subderivatives, elem_subjacobians, elem_subresiduals, elem_subsolutions, and localized_vectors.

77 {
78  for (std::size_t i=0; i != elem_subsolutions.size(); ++i)
79  {
80  delete elem_subsolutions[i];
81  delete elem_subresiduals[i];
82  for (std::size_t q=0; q != elem_qoi_subderivatives.size(); ++q)
83  delete elem_qoi_subderivatives[q][i];
84  if (!elem_fixed_subsolutions.empty())
85  delete elem_fixed_subsolutions[i];
86 
87  for (std::size_t j=0; j != elem_subjacobians[i].size(); ++j)
88  delete elem_subjacobians[i][j];
89  }
90 
91  // We also need to delete all the DenseSubVectors from the localized_vectors map
92  // localized_vectors iterators
93  std::map<const NumericVector<Number>*, std::pair<DenseVector<Number>, std::vector<DenseSubVector<Number>*> > >::iterator localized_vectors_it = localized_vectors.begin();
94  std::map<const NumericVector<Number>*, std::pair<DenseVector<Number>, std::vector<DenseSubVector<Number>*> > >::iterator localized_vectors_end = localized_vectors.end();
95 
96  // Loop over every localized_vector
97  for(; localized_vectors_it != localized_vectors_end; ++localized_vectors_it)
98  {
99  // Grab the DenseSubVector to be deleted
100  std::vector<DenseSubVector<Number>* >& localized_vector_dsv = localized_vectors_it->second.second;
101 
102  // Loop over that vector and delete each entry
103  for(std::size_t i=0; i != localized_vector_dsv.size(); ++i)
104  delete localized_vector_dsv[i];
105  }
106 }

Member Function Documentation

void libMesh::DiffContext::add_localized_vector ( NumericVector< Number > &  _localized_vector,
const System _sys 
)

Adds a vector to the map of localized vectors. We can later evaluate interior_values, interior_gradients and side_values for these fields these vectors represent.

Definition at line 125 of file diff_context.C.

References localized_vectors, and libMesh::System::n_vars().

126 {
127  // Make an empty pair keyed with a reference to this _localized_vector
128  localized_vectors[&_localized_vector] = std::make_pair(DenseVector<Number>(), std::vector<DenseSubVector<Number>*>());
129 
130  unsigned int nv = _sys.n_vars();
131 
132  localized_vectors[&_localized_vector].second.reserve(nv);
133 
134  // Fill the DenseSubVector with nv copies of DenseVector
135  for(unsigned int i=0; i != nv; ++i)
136  localized_vectors[&_localized_vector].second.push_back(new DenseSubVector<Number>(localized_vectors[&_localized_vector].first));
137 }
virtual void libMesh::DiffContext::elem_edge_reinit ( Real  )
inlinevirtual

Gives derived classes the opportunity to reinitialize data needed for an edge integration at a new point within a timestep

Reimplemented in libMesh::FEMContext.

Definition at line 90 of file diff_context.h.

90 {}
virtual void libMesh::DiffContext::elem_reinit ( Real  )
inlinevirtual

Gives derived classes the opportunity to reinitialize data (FE objects in FEMSystem, for example) needed for an interior integration at a new point within a timestep

Reimplemented in libMesh::FEMContext.

Definition at line 78 of file diff_context.h.

Referenced by libMesh::EulerSolver::element_residual(), and libMesh::Euler2Solver::element_residual().

78 {}
virtual void libMesh::DiffContext::elem_side_reinit ( Real  )
inlinevirtual

Gives derived classes the opportunity to reinitialize data needed for a side integration at a new point within a timestep

Reimplemented in libMesh::FEMContext.

Definition at line 84 of file diff_context.h.

Referenced by libMesh::EulerSolver::side_residual(), and libMesh::Euler2Solver::side_residual().

84 {}
Real libMesh::DiffContext::get_deltat_value ( )

Returns the value currently pointed to by this class's _deltat member

Definition at line 117 of file diff_context.C.

References _deltat, and libMesh::libmesh_assert().

Referenced by libMesh::FEMContext::_update_time_from_system().

118 {
120 
121  return *_deltat;
122 }
const std::vector<dof_id_type>& libMesh::DiffContext::get_dof_indices ( ) const
inline
std::vector<dof_id_type>& libMesh::DiffContext::get_dof_indices ( )
inline

Non-const accessor for element dof indices

Definition at line 241 of file diff_context.h.

References dof_indices.

242  { return dof_indices; }
const std::vector<dof_id_type>& libMesh::DiffContext::get_dof_indices ( unsigned int  var) const
inline

Accessor for element dof indices of a particular variable corresponding to the index argument.

Definition at line 248 of file diff_context.h.

References dof_indices_var.

249  { return dof_indices_var[var]; }
DenseVector<Number>& libMesh::DiffContext::get_elem_fixed_solution ( )
inline

Non-const accessor for element fixed solution.

Definition at line 132 of file diff_context.h.

References elem_fixed_solution.

133  { return elem_fixed_solution; }
const DenseSubVector<Number>& libMesh::DiffContext::get_elem_fixed_solution ( unsigned int  var) const
inline

Accessor for element fixed solution of a particular variable corresponding to the variable index argument.

Definition at line 139 of file diff_context.h.

References elem_fixed_subsolutions.

140  { return *(elem_fixed_subsolutions[var]); }
const DenseMatrix<Number>& libMesh::DiffContext::get_elem_jacobian ( ) const
inline
DenseMatrix<Number>& libMesh::DiffContext::get_elem_jacobian ( )
inline

Non-const accessor for element Jacobian.

Definition at line 177 of file diff_context.h.

References elem_jacobian.

178  { return elem_jacobian; }
const DenseSubMatrix<Number>& libMesh::DiffContext::get_elem_jacobian ( unsigned int  var1,
unsigned int  var2 
) const
inline

Const accessor for element Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 184 of file diff_context.h.

References elem_subjacobians.

185  { return *(elem_subjacobians[var1][var2]); }
DenseSubMatrix<Number>& libMesh::DiffContext::get_elem_jacobian ( unsigned int  var1,
unsigned int  var2 
)
inline

Non-const accessor for element Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 191 of file diff_context.h.

References elem_subjacobians.

192  { return *(elem_subjacobians[var1][var2]); }
const DenseVector<Number>& libMesh::DiffContext::get_elem_residual ( ) const
inline
DenseVector<Number>& libMesh::DiffContext::get_elem_residual ( )
inline

Non-const accessor for element residual.

Definition at line 151 of file diff_context.h.

References elem_residual.

152  { return elem_residual; }
const DenseSubVector<Number>& libMesh::DiffContext::get_elem_residual ( unsigned int  var) const
inline

Const accessor for element residual of a particular variable corresponding to the variable index argument.

Definition at line 158 of file diff_context.h.

References elem_subresiduals.

159  { return *(elem_subresiduals[var]); }
DenseSubVector<Number>& libMesh::DiffContext::get_elem_residual ( unsigned int  var)
inline

Non-const accessor for element residual of a particular variable corresponding to the variable index argument.

Definition at line 165 of file diff_context.h.

References elem_subresiduals.

166  { return *(elem_subresiduals[var]); }
DenseVector<Number>& libMesh::DiffContext::get_elem_solution ( )
inline

Non-const accessor for element solution.

Definition at line 113 of file diff_context.h.

References elem_solution.

114  { return elem_solution; }
const DenseSubVector<Number>& libMesh::DiffContext::get_elem_solution ( unsigned int  var) const
inline

Accessor for element solution of a particular variable corresponding to the variable index argument.

Definition at line 120 of file diff_context.h.

References elem_subsolutions.

121  { return *(elem_subsolutions[var]); }
Real libMesh::DiffContext::get_elem_solution_derivative ( ) const
inline

Definition at line 269 of file diff_context.h.

References elem_solution_derivative.

270  { return elem_solution_derivative; }
Real libMesh::DiffContext::get_fixed_solution_derivative ( ) const
inline

Definition at line 272 of file diff_context.h.

References fixed_solution_derivative.

273  { return fixed_solution_derivative; }
DenseSubVector< Number > & libMesh::DiffContext::get_localized_subvector ( const NumericVector< Number > &  _localized_vector,
unsigned int  _var 
)

Return a reference to DenseSubVector localization of _localized_vector at variable _var contained in the localized_vectors map

Definition at line 155 of file diff_context.C.

References localized_vectors.

Referenced by libMesh::FEMContext::interior_values().

156 {
157  return *localized_vectors[&_localized_vector].second[_var];
158 }
const DenseSubVector< Number > & libMesh::DiffContext::get_localized_subvector ( const NumericVector< Number > &  _localized_vector,
unsigned int  _var 
) const

const accessible version of get_localized_subvector function

Definition at line 161 of file diff_context.C.

References libMesh::libmesh_assert(), and localized_vectors.

162 {
163  std::map<const NumericVector<Number>*, std::pair<DenseVector<Number>, std::vector<DenseSubVector<Number>*> > >::const_iterator
164  localized_vectors_it = localized_vectors.find(&_localized_vector);
165  libmesh_assert(localized_vectors_it != localized_vectors.end());
166  return *localized_vectors_it->second.second[_var];
167 }
DenseVector< Number > & libMesh::DiffContext::get_localized_vector ( const NumericVector< Number > &  _localized_vector)

Return a reference to DenseVector localization of _localized_vector contained in the localized_vectors map

Definition at line 140 of file diff_context.C.

References localized_vectors.

141 {
142  return localized_vectors[&_localized_vector].first;
143 }
const DenseVector< Number > & libMesh::DiffContext::get_localized_vector ( const NumericVector< Number > &  _localized_vector) const

const accessible version of get_localized_vector function

Definition at line 146 of file diff_context.C.

References libMesh::libmesh_assert(), and localized_vectors.

147 {
148  std::map<const NumericVector<Number>*, std::pair<DenseVector<Number>, std::vector<DenseSubVector<Number>*> > >::const_iterator
149  localized_vectors_it = localized_vectors.find(&_localized_vector);
150  libmesh_assert(localized_vectors_it != localized_vectors.end());
151  return localized_vectors_it->second.first;
152 }
const std::vector<DenseVector<Number> >& libMesh::DiffContext::get_qoi_derivatives ( ) const
inline

Const accessor for QoI derivatives.

Definition at line 209 of file diff_context.h.

References elem_qoi_derivative.

210  { return elem_qoi_derivative; }
std::vector<DenseVector<Number> >& libMesh::DiffContext::get_qoi_derivatives ( )
inline

Non-const accessor for QoI derivatives.

Definition at line 215 of file diff_context.h.

References elem_qoi_derivative.

216  { return elem_qoi_derivative; }
const DenseSubVector<Number>& libMesh::DiffContext::get_qoi_derivatives ( unsigned int  qoi,
unsigned int  var 
) const
inline

Const accessor for QoI derivative of a particular qoi and variable corresponding to the index arguments.

Definition at line 222 of file diff_context.h.

References elem_qoi_subderivatives.

223  { return *(elem_qoi_subderivatives[qoi][var]); }
DenseSubVector<Number>& libMesh::DiffContext::get_qoi_derivatives ( unsigned int  qoi,
unsigned int  var 
)
inline

Non-const accessor for QoI derivative of a particular qoi and variable corresponding to the index arguments.

Definition at line 229 of file diff_context.h.

References elem_qoi_subderivatives.

230  { return *(elem_qoi_subderivatives[qoi][var]); }
const std::vector<Number>& libMesh::DiffContext::get_qois ( ) const
inline

Const accessor for QoI vector.

Definition at line 197 of file diff_context.h.

References elem_qoi.

198  { return elem_qoi; }
std::vector<Number>& libMesh::DiffContext::get_qois ( )
inline

Non-const accessor for QoI vector.

Definition at line 203 of file diff_context.h.

References elem_qoi.

204  { return elem_qoi; }
const System& libMesh::DiffContext::get_system ( ) const
inline

Accessor for associated system.

Definition at line 101 of file diff_context.h.

References _system.

Referenced by libMesh::DGFEMContext::neighbor_side_fe_reinit().

102  { return _system; }
Real libMesh::DiffContext::get_system_time ( ) const
inline

Accessor for the time variable stored in the system class.

Definition at line 254 of file diff_context.h.

References system_time.

255  { return system_time; }
Real libMesh::DiffContext::get_time ( ) const
inline

Accessor for the time for which the current nonlinear_solution is defined.

Definition at line 260 of file diff_context.h.

References time.

261  { return time; }
bool libMesh::DiffContext::is_adjoint ( ) const
inline

Accessor for querying whether we need to do a primal or adjoint solve

Definition at line 279 of file diff_context.h.

References _is_adjoint.

Referenced by libMesh::FEMSystem::build_context().

280  { return _is_adjoint; }
bool& libMesh::DiffContext::is_adjoint ( )
inline

Accessor for setting whether we need to do a primal or adjoint solve

Definition at line 286 of file diff_context.h.

References _is_adjoint.

287  { return _is_adjoint; }
unsigned int libMesh::DiffContext::n_vars ( ) const
inline

Number of variables in solution.

Definition at line 95 of file diff_context.h.

References dof_indices_var.

96  { return libmesh_cast_int<unsigned int>(dof_indices_var.size()); }
void libMesh::DiffContext::set_deltat_pointer ( Real dt)

Points the _deltat member of this class at a timestep value stored in the creating System, for example DiffSystem::deltat

Definition at line 109 of file diff_context.C.

References _deltat.

Referenced by libMesh::FEMSystem::build_context(), and libMesh::FEMSystem::init_context().

110 {
111  // We may actually want to be able to set this pointer to NULL, so
112  // don't report an error for that.
113  _deltat = dt;
114 }
void libMesh::DiffContext::set_time ( Real  time_in)
inline

Set the time for which the current nonlinear_solution is defined.

Definition at line 266 of file diff_context.h.

References time.

267  { time = time_in; }

Member Data Documentation

Real* libMesh::DiffContext::_deltat
private

Default NULL, can optionally be used to point to a timestep value in the System-derived class responsible for creating this DiffContext.

In DiffSystem's build_context() function, is assigned to point to the deltat member of that class.

Accessible via public get_deltat()/set_deltat() methods of this class.

Always test for NULL before using!

Definition at line 435 of file diff_context.h.

Referenced by get_deltat_value(), and set_deltat_pointer().

bool libMesh::DiffContext::_is_adjoint
private

Is this context to be used for a primal or adjoint solve?

Definition at line 445 of file diff_context.h.

Referenced by is_adjoint().

const System& libMesh::DiffContext::_system
private

A reference to the system this context is constructed with

Definition at line 440 of file diff_context.h.

Referenced by get_system().

DenseVector<Number> libMesh::DiffContext::elem_fixed_solution
protected

Element by element components of nonlinear_solution at a fixed point in a timestep, for optional use by e.g. stabilized methods

Definition at line 385 of file diff_context.h.

Referenced by DiffContext(), get_elem_fixed_solution(), and libMesh::FEMContext::pre_fe_reinit().

DenseMatrix<Number> libMesh::DiffContext::elem_jacobian
protected

Element jacobian: derivatives of elem_residual with respect to elem_solution

Definition at line 397 of file diff_context.h.

Referenced by DiffContext(), get_elem_jacobian(), and libMesh::FEMContext::pre_fe_reinit().

std::vector<Number> libMesh::DiffContext::elem_qoi
protected

Element quantity of interest contributions

Definition at line 402 of file diff_context.h.

Referenced by DiffContext(), and get_qois().

std::vector<DenseVector<Number> > libMesh::DiffContext::elem_qoi_derivative
protected

Element quantity of interest derivative contributions

Definition at line 407 of file diff_context.h.

Referenced by DiffContext(), get_qoi_derivatives(), and libMesh::FEMContext::pre_fe_reinit().

std::vector<std::vector<DenseSubVector<Number> *> > libMesh::DiffContext::elem_qoi_subderivatives
protected
DenseVector<Number> libMesh::DiffContext::elem_residual
protected

Element residual vector

Definition at line 391 of file diff_context.h.

Referenced by DiffContext(), get_elem_residual(), and libMesh::FEMContext::pre_fe_reinit().

DenseVector<Number> libMesh::DiffContext::elem_solution
protected

Element by element components of nonlinear_solution as adjusted by a time_solver

Definition at line 377 of file diff_context.h.

Referenced by DiffContext(), get_elem_solution(), and libMesh::FEMContext::pre_fe_reinit().

Real libMesh::DiffContext::elem_solution_derivative

The derivative of elem_solution with respect to the nonlinear solution, for use by systems constructing jacobians with elem_fixed_solution based methods

Definition at line 310 of file diff_context.h.

Referenced by libMesh::EulerSolver::element_residual(), libMesh::Euler2Solver::element_residual(), get_elem_solution_derivative(), libMesh::EulerSolver::side_residual(), and libMesh::Euler2Solver::side_residual().

std::vector<std::vector<DenseSubMatrix<Number> *> > libMesh::DiffContext::elem_subjacobians
protected
std::vector<DenseSubVector<Number> *> libMesh::DiffContext::elem_subresiduals
protected

Element residual subvectors and Jacobian submatrices

Definition at line 413 of file diff_context.h.

Referenced by DiffContext(), get_elem_residual(), libMesh::FEMContext::pre_fe_reinit(), and ~DiffContext().

Real libMesh::DiffContext::fixed_solution_derivative

The derivative of elem_fixed_solution with respect to the nonlinear solution, for use by systems constructing jacobians with elem_fixed_solution based methods

Definition at line 317 of file diff_context.h.

Referenced by libMesh::EulerSolver::element_residual(), libMesh::Euler2Solver::element_residual(), libMesh::SteadySolver::element_residual(), get_fixed_solution_derivative(), libMesh::EulerSolver::side_residual(), libMesh::Euler2Solver::side_residual(), and libMesh::SteadySolver::side_residual().

std::map<const NumericVector<Number>*, std::pair<DenseVector<Number>, std::vector<DenseSubVector<Number>*> > > libMesh::DiffContext::localized_vectors
protected

Contains pointers to vectors the user has asked to be localized, keyed with pairs of element localized versions of that vector and per variable views

Definition at line 371 of file diff_context.h.

Referenced by add_localized_vector(), get_localized_subvector(), get_localized_vector(), libMesh::FEMContext::pre_fe_reinit(), and ~DiffContext().

const Real libMesh::DiffContext::system_time

This is the time stored in the System class at the time this context was created, i.e. the time at the beginning of the current timestep. This value gets set in the constructor and unlike DiffContext::time, is not tweaked mid-timestep by transient solvers: it remains equal to the value it was assigned at construction.

Definition at line 303 of file diff_context.h.

Referenced by libMesh::FEMContext::_update_time_from_system(), and get_system_time().

Real libMesh::DiffContext::time

For time-dependent problems, this is the time t for which the current nonlinear_solution is defined. FIXME - this needs to be tweaked mid-timestep by all transient solvers!

Definition at line 294 of file diff_context.h.

Referenced by libMesh::FEMContext::_update_time_from_system(), get_time(), and set_time().


The documentation for this class was generated from the following files:

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:59 UTC

Hosted By:
SourceForge.net Logo