|
| OldSolutionValue (const libMesh::System &sys_in, const NumericVector< Number > &old_sol, const std::vector< unsigned int > *vars) |
|
| OldSolutionValue (const OldSolutionValue &in) |
|
Output | eval_at_node (const FEMContext &c, unsigned int i, unsigned int elem_dim, const Node &n, bool, Real=0.) |
|
Output | eval_at_point (const FEMContext &c, unsigned int i, const Point &p, Real, bool skip_context_check) |
|
template<typename T = Output, typename std::enable_if< std::is_same< T, Number >::value, int >::type = 0> |
void | eval_mixed_derivatives (const FEMContext &libmesh_dbg_var(c), unsigned int i, unsigned int dim, const Node &n, std::vector< Output > &derivs) |
|
template<typename T = Output, typename std::enable_if<!std::is_same< T, Number >::value, int >::type = 0> |
void | eval_mixed_derivatives (const FEMContext &, unsigned int, unsigned int, const Node &, std::vector< Output > &) |
|
void | eval_old_dofs (const Elem &elem, unsigned int node_num, unsigned int var_num, std::vector< dof_id_type > &indices, std::vector< DofValueType > &values) |
|
void | eval_old_dofs (const Elem &elem, const FEType &fe_type, unsigned int sys_num, unsigned int var_num, std::vector< dof_id_type > &indices, std::vector< DofValueType > &values) |
|
template<> |
Number | eval_at_node (const FEMContext &c, unsigned int i, unsigned int, const Node &n, bool extra_hanging_dofs, Real) |
|
template<> |
Gradient | eval_at_node (const FEMContext &c, unsigned int i, unsigned int, const Node &n, bool extra_hanging_dofs, Real) |
|
template<> |
Gradient | eval_at_node (const FEMContext &c, unsigned int i, unsigned int elem_dim, const Node &n, bool extra_hanging_dofs, Real) |
|
template<> |
Tensor | eval_at_node (const FEMContext &, unsigned int, unsigned int, const Node &, bool, Real) |
|
template<> |
void | get_shape_outputs (FEAbstract &fe) |
|
template<> |
void | get_shape_outputs (FEAbstract &fe) |
|
template<> |
void | get_shape_outputs (FEAbstract &fe) |
|
template<> |
void | get_shape_outputs (FEAbstract &fe) |
|
template<> |
void | get_shape_outputs (FEAbstract &fe) |
|
template<> |
void | get_shape_outputs (FEAbstract &fe) |
|
template<> |
void | get_shape_outputs (FEAbstract &fe) |
|
template<> |
void | get_shape_outputs (FEAbstract &fe) |
|
void | init_context (FEMContext &c) |
|
bool | is_grid_projection () |
|
template<typename Output, void(FEMContext::*)(unsigned int, const Point &, Output &, const Real) const point_output>
class libMesh::OldSolutionValue< Output, point_output >
The OldSolutionValue input functor class can be used with GenericProjector to read values from a solution on a just-refined-and-coarsened mesh.
- Author
- Roy H. Stogner
- Date
- 2016
Definition at line 719 of file generic_projector.h.
template<typename Output, void(FEMContext::*)(unsigned int, const Point &, Output &, const Real) const point_output>
Definition at line 629 of file generic_projector.h.
References libMesh::Elem::child_ref_range(), libMesh::FEMContext::get_elem(), libMesh::DofObject::get_old_dof_object(), libMesh::Elem::hmax(), libMesh::Elem::JUST_COARSENED, libMesh::Elem::JUST_REFINED, libMesh::libmesh_assert(), libMesh::Elem::parent(), libMesh::Real, and libMesh::Elem::refinement_flag().
631 LOG_SCOPE (
"check_old_context(c,p)",
"OldSolutionBase");
632 const Elem & elem = c.get_elem();
650 for (
auto & child : elem.child_ref_range())
651 if (child.close_to_point(p, master_tol))
662 if (!elem.get_old_dof_object())
678 libmesh_assert_equal_to
681 for (
auto & child : elem.child_ref_range())
682 if (child.close_to_point(p, master_tol))
virtual void pre_fe_reinit(const System &, const Elem *e)
Reinitializes local data vectors/matrices on the current geometric element.
const Elem & get_elem() const
Accessor for current Elem object.
virtual bool close_to_point(const Point &p, Real tol) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const Real out_of_elem_tol
bool has_elem() const
Test for current Elem object.
template<typename Output, void(FEMContext::*)(unsigned int, const Point &, Output &, const Real) const point_output>
template<typename T = Output, typename std::enable_if< std::is_same< T, Number >::value, int >::type = 0>
Definition at line 776 of file generic_projector.h.
References dim, libMesh::DofObject::dof_number(), libMesh::DofObject::get_old_dof_object(), libMesh::Utility::iota(), libMesh::DofObject::n_comp(), and libMesh::DofObject::n_vars().
782 LOG_SCOPE (
"eval_mixed_derivatives",
"OldSolutionValue");
785 libmesh_assert_less(c.get_elem().get_node_index(&n),
786 c.get_elem().n_vertices());
793 const unsigned int n_mixed = (
dim-1) * (
dim-1);
794 derivs.resize(n_mixed);
798 const DofObject * old_dof_object = n.get_old_dof_object();
799 if (old_dof_object &&
800 old_dof_object->n_vars(this->sys.number()) &&
801 old_dof_object->n_comp(this->sys.number(), var))
804 old_dof_object->dof_number(this->
sys.
number(), var,
dim);
805 std::vector<dof_id_type> old_ids(n_mixed);
806 std::iota(old_ids.begin(), old_ids.end(), first_old_id);
811 std::fill(derivs.begin(), derivs.end(), 0);
const NumericVector< Number > & old_solution
virtual void get(const std::vector< numeric_index_type > &index, T *values) const
Access multiple components at once.
void iota(ForwardIter first, ForwardIter last, T value)
Utility::iota was created back when std::iota was just an SGI STL extension.
unsigned int number() const
std::vector< unsigned int > component_to_var
template<typename Output, void(FEMContext::*)(unsigned int, const Point &, Output &, const Real) const point_output>
template<typename T = Output, typename std::enable_if<!std::is_same< T, Number >::value, int >::type = 0>
Definition at line 817 of file generic_projector.h.
820 libmesh_error_msg(
"eval_mixed_derivatives should only be applicable for Hermite finite element " 821 "types. I don't know how you got here");
template<typename Output, void(FEMContext::*)(unsigned int, const Point &, Output &, const Real) const point_output>
Definition at line 868 of file generic_projector.h.
References libMesh::DofObject::dof_number(), libMesh::DofObject::get_old_dof_object_ref(), libMesh::DofObject::invalid_id, libMesh::Elem::JUST_REFINED, libMesh::DofObject::n_comp_group(), libMesh::FEInterface::n_dofs_per_elem(), libMesh::DofObject::n_systems(), libMesh::Elem::parent(), libMesh::Elem::refinement_flag(), and libMesh::DofObject::var_to_vg_and_offset().
875 LOG_SCOPE (
"eval_old_dofs(elem)",
"OldSolutionValue");
879 const Elem & old_elem =
881 *elem.parent() : elem;
895 const DofObject & old_dof_object = old_elem.get_old_dof_object_ref();
896 libmesh_assert_greater(elem.n_systems(), sys_num);
898 const std::pair<unsigned int, unsigned int>
899 vg_and_offset = elem.var_to_vg_and_offset(sys_num,var_num);
900 const unsigned int vg = vg_and_offset.first;
901 const unsigned int vig = vg_and_offset.second;
903 unsigned int n_comp = old_dof_object.n_comp_group(sys_num,vg);
904 n_comp = std::min(n_comp, nc);
906 std::vector<dof_id_type> old_dof_indices(n_comp);
908 for (
unsigned int i=0; i != n_comp; ++i)
911 old_dof_object.dof_number(sys_num, vg, vig, i, n_comp);
913 elem.dof_number(sys_num, vg, vig, i, n_comp);
917 old_dof_indices[i] = d_old;
921 values.resize(n_comp);
924 for (
unsigned int i=n_comp; i != nc; ++i)
927 elem.dof_number(sys_num, vg, vig, i, n_comp);
932 values.resize(nc, 0);
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
const NumericVector< Number > & old_solution
virtual void get(const std::vector< numeric_index_type > &index, T *values) const
Access multiple components at once.
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.