|
| OldSolutionCoefs (const libMesh::System &sys_in, const std::vector< unsigned int > *vars) |
|
| OldSolutionCoefs (const OldSolutionCoefs &in) |
|
DSNA | eval_at_node (const FEMContext &c, unsigned int i, unsigned int elem_dim, const Node &n, bool extra_hanging_dofs, Real=0.) |
|
DSNA | eval_at_point (const FEMContext &c, unsigned int i, const Point &p, Real time, bool skip_context_check) |
|
void | eval_mixed_derivatives (const FEMContext &libmesh_dbg_var(c), unsigned int i, unsigned int dim, const Node &n, std::vector< DSNA > &derivs) |
|
void | eval_old_dofs (const Elem &elem, unsigned int node_num, unsigned int var_num, std::vector< dof_id_type > &indices, std::vector< DSNA > &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< DSNA > &values) |
|
template<> |
DynamicSparseNumberArray< Real, dof_id_type > | eval_at_point (const FEMContext &c, unsigned int i, const Point &p, Real, bool skip_context_check) |
|
template<> |
VectorValue< DynamicSparseNumberArray< Real, dof_id_type > > | eval_at_point (const FEMContext &c, unsigned int i, const Point &p, Real, bool skip_context_check) |
|
template<> |
DynamicSparseNumberArray< Real, dof_id_type > | eval_at_node (const FEMContext &c, unsigned int i, unsigned int, const Node &n, bool extra_hanging_dofs, Real) |
|
template<> |
VectorValue< DynamicSparseNumberArray< Real, dof_id_type > > | eval_at_node (const FEMContext &c, unsigned int i, unsigned int elem_dim, const Node &n, bool extra_hanging_dofs, 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::OldSolutionCoefs< Output, point_output >
The OldSolutionCoefs input functor class can be used with GenericProjector to read solution transfer coefficients on a just-refined-and-coarsened mesh.
- Author
- Roy H. Stogner
- Date
- 2017
Definition at line 517 of file system_projection.C.
template<typename Output, void(FEMContext::*)(unsigned int, const Point &, Output &, const Real) const point_output>
Definition at line 642 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().
644 LOG_SCOPE (
"check_old_context(c,p)",
"OldSolutionBase");
645 const Elem & elem = c.get_elem();
663 for (
auto & child : elem.child_ref_range())
664 if (child.close_to_point(p, master_tol))
675 if (!elem.get_old_dof_object())
691 libmesh_assert_equal_to
694 for (
auto & child : elem.child_ref_range())
695 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>
Definition at line 550 of file system_projection.C.
References dim, libMesh::DofObject::dof_number(), libMesh::DofObject::get_old_dof_object(), libMesh::index_range(), libMesh::Utility::iota(), libMesh::DofObject::n_comp(), and libMesh::DofObject::n_vars().
556 LOG_SCOPE (
"eval_mixed_derivatives",
"OldSolutionCoefs");
559 libmesh_assert_less(c.get_elem().get_node_index(&n),
560 c.get_elem().n_vertices());
567 const unsigned int n_mixed = (
dim-1) * (
dim-1);
568 derivs.resize(n_mixed);
572 const DofObject * old_dof_object = n.get_old_dof_object();
573 if (old_dof_object &&
574 old_dof_object->n_vars(this->sys.number()) &&
575 old_dof_object->n_comp(this->sys.number(), var))
578 old_dof_object->dof_number(this->
sys.
number(), var,
dim);
579 std::vector<dof_id_type> old_ids(n_mixed);
580 std::iota(old_ids.begin(), old_ids.end(), first_old_id);
584 derivs[d_i].resize(1);
585 derivs[d_i].raw_at(0) = 1;
586 derivs[d_i].raw_index(0) = old_ids[d_i];
591 std::fill(derivs.begin(), derivs.end(), 0);
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
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
template<typename Output , void(FEMContext::*)(unsigned int, const Point &, Output &, const Real) const point_output>
Definition at line 627 of file system_projection.C.
References libMesh::DofObject::dof_number(), libMesh::DofObject::get_old_dof_object_ref(), libMesh::index_range(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::Elem::parent(), libMesh::Elem::refinement_flag(), and libMesh::DofObject::var_to_vg_and_offset().
634 LOG_SCOPE (
"eval_old_dofs(elem)",
"OldSolutionCoefs");
638 const Elem & old_elem =
640 *elem.parent() : elem;
643 const unsigned int nc =
646 std::vector<dof_id_type> old_dof_indices(nc);
654 const DofObject & old_dof_object = old_elem.get_old_dof_object_ref();
656 const auto [vg, vig] =
657 elem.var_to_vg_and_offset(sys_num,var_num);
659 const unsigned int n_comp = elem.n_comp_group(sys_num,vg);
660 libmesh_assert_greater(elem.n_systems(), sys_num);
661 libmesh_assert_greater_equal(n_comp, nc);
663 for (
unsigned int i=0; i<nc; i++)
666 old_dof_object.dof_number(sys_num, vg, vig, i, n_comp);
668 elem.dof_number(sys_num, vg, vig, i, n_comp);
672 old_dof_indices[i] = d_old;
677 values.resize(old_dof_indices.size());
682 values[i].raw_at(0) = 1;
683 values[i].raw_index(0) = old_dof_indices[i];
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...