Flow123d
master-3768d5dec
|
Go to the documentation of this file.
49 template <
int spacedim,
class Value>
69 DECLARE_EXCEPTION( ExcInvalidElemeDim, <<
"Dimension of element in target mesh must be 0, 1 or 2! elm.idx() = " << EI_ElemIdx::val <<
".\n" );
163 void set_mesh(
const Mesh *mesh,
bool boundary_domain)
override;
231 template <
unsigned int dim>
235 unsigned int i_dof,
unsigned int i_qp)
238 for (
unsigned int c=0; c<Value::NRows_*Value::NCols_; ++c)
239 v(c/spacedim,c%spacedim) =
fe_values_[dim].shape_value_component(i_dof, i_qp, c);
240 if (Value::NRows_ == Value::NCols_)
246 template<
unsigned int dim>
248 auto fe_system_ptr = std::dynamic_pointer_cast<FESystem<dim>>(
dh_->ds()->fe()[
Dim<dim>{}] );
249 ASSERT(fe_system_ptr !=
nullptr).error(
"Wrong type, must be FESystem!\n");
250 this->
fe_item_[dim].comp_index_ = fe_system_ptr->function_space()->dof_indices()[block_index].component_offset;
251 this->
fe_item_[dim].range_begin_ = fe_system_ptr->fe_dofs(block_index)[0];
252 this->
fe_item_[dim].range_end_ = this->
fe_item_[dim].range_begin_ + fe_system_ptr->fe()[block_index]->n_dofs();
256 template<
unsigned int dim>
258 this->
fe_item_[dim].comp_index_ = 0;
259 this->
fe_item_[dim].range_begin_ = 0;
265 std::shared_ptr<DOFHandlerMultiDim>
dh_;
325 template <
int spacedim,
class Value>
326 std::shared_ptr<FieldFE<spacedim, Value> >
create_field_fe(std::shared_ptr<DOFHandlerMultiDim> dh,
331 std::shared_ptr< FieldFE<spacedim, Value> > field_ptr = std::make_shared< FieldFE<spacedim, Value> >();
333 field_ptr->set_fe_data( dh, dh->create_vector(), block_index );
335 field_ptr->set_fe_data( dh, *
vec, block_index );
342 template <
int spacedim,
class Value>
346 std::shared_ptr<DOFHandlerMultiDim> dh_par = std::make_shared<DOFHandlerMultiDim>(mesh);
347 std::shared_ptr<DiscreteSpace> ds = std::make_shared<EqualOrderDiscreteSpace>( &mesh, fe);
348 dh_par->distribute_dofs(ds);
350 return create_field_fe<spacedim,Value>(dh_par);
unsigned int data_size() const
std::string field_name_
field name read from input
std::shared_ptr< std::vector< IntIdx > > boundary_dofs_
std::shared_ptr< EquivalentMeshMap > source_target_mesh_elm_map_
Maps element indices from computational mesh to the source (data).
FieldFlag::Flags flags_
Field flags.
FieldFE(unsigned int n_comp=0)
std::shared_ptr< DOFHandlerMultiDim > conc_dof_handler_
unsigned int range_begin_
void local_to_ghost_data_scatter_end()
Call end scatter functions (local to ghost) on data vector.
FEValueHandler< 0, spacedim, Value > value_handler0_
Value handler that allows get value of 0D elements.
void cache_update(FieldValueCache< typename Value::element_type > &data_cache, ElementCacheMap &cache_map, unsigned int region_patch_idx) override
Armor::ArmaMat< typename Value::element_type, Value::NRows_, Value::NCols_ > handle_fe_shape(unsigned int dim, unsigned int i_dof, unsigned int i_qp)
static const int registrar
Registrar of class to factory.
void calculate_native_values(ElementDataCache< double >::CacheData data_cache)
Calculate native data over all elements of target mesh.
Directing class of FieldValueCache.
Dedicated class for storing path to input and output files.
@ equivalent_msh
equivalent mesh (default value)
Input::Record in_rec_
Accessor to Input::Record.
void local_to_ghost_data_scatter_begin()
Call begin scatter functions (local to ghost) on data vector.
Declaration of class which handles the ordering of degrees of freedom (dof) and mappings between loca...
bool boundary_domain_
Is set in set_mesh method. Value true means, that we accept only boundary element accessors in the va...
Space< spacedim >::Point Point
Class FESystem for compound finite elements.
VectorMPI data_vec_
Store data of Field.
void cache_reinit(const ElementCacheMap &cache_map) override
Definitions of basic Lagrangean finite elements with polynomial shape functions.
virtual void init_from_input(const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data)
std::shared_ptr< DOFHandlerMultiDim > get_dofhandler() const
MixedPtr< FiniteElement > fe_
std::shared_ptr< DOFHandlerMultiDim > dh_
DOF handler object.
virtual const Value::return_type & value(const Point &p, const ElementAccessor< spacedim > &elm)
static const Input::Type::Selection & get_interp_selection_input_type()
void set_mesh(const Mesh *mesh, bool boundary_domain) override
@ interp_p0
P0 interpolation (with the use of calculation of intersections)
double default_value_
Default value of element if not set in mesh data file.
FEValueHandler< 3, spacedim, Value > value_handler3_
Value handler that allows get value of 3D elements.
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
Representation of one time step..
Abstract class for description of finite elements.
Common abstract parent of all Field<...> classes.
DataInterpolation interpolation_
Specify type of FE data interpolation.
std::array< FEItem, 4 > fe_item_
Holds specific data of field evaluation over all dimensions.
OutputTime::DiscreteSpace discretization_
Specify section where to find the field data in input mesh file.
void interpolate_gauss(ElementDataCache< double >::CacheData data_vec)
Interpolate data (use Gaussian distribution) over all elements of target mesh.
@ gauss_p0
P0 interpolation (with the use of Gaussian distribution)
void calculate_identic_values(ElementDataCache< double >::CacheData data_cache)
Calculate data of identict_mesh interpolation on input data over all elements of target mesh.
std::shared_ptr< FieldBaseType > FieldBasePtr
void native_data_to_cache(ElementDataCache< double > &output_data_cache)
FEValueHandler< 2, spacedim, Value > value_handler2_
Value handler that allows get value of 2D elements.
FieldAlgorithmBase< spacedim, Value > FactoryBaseType
VectorMPI set_fe_data(std::shared_ptr< DOFHandlerMultiDim > dh, VectorMPI dof_values=VectorMPI::sequential(0), unsigned int block_index=FieldFE< spacedim, Value >::undef_uint)
std::shared_ptr< std::vector< T > > CacheData
FieldAlgorithmBase< spacedim, Value >::Point Point
FilePath reader_file_
mesh reader file
Base class for Mesh and BCMesh.
virtual void value_list(const Armor::array &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list)
static const Input::Type::Record & get_input_type()
Implementation.
std::shared_ptr< FieldFE< spacedim, Value > > create_field_fe(std::shared_ptr< DOFHandlerMultiDim > dh, VectorMPI *vec=nullptr, unsigned int block_index=FieldFE< spacedim, Value >::undef_uint)
void fill_fe_system_data(unsigned int block_index)
std::vector< FEValues< spacedim > > fe_values_
List of FEValues objects of dimensions 0,1,2,3 used for value calculation.
DECLARE_EXCEPTION(ExcInvalidElemeDim,<< "Dimension of element in target mesh must be 0, 1 or 2! elm.idx() = "<< EI_ElemIdx::val<< ".\n")
static VectorMPI sequential(unsigned int size)
static const Input::Type::Selection & get_disc_selection_input_type()
@ identic_msh
identical mesh
void interpolate_intersection(ElementDataCache< double >::CacheData data_vec)
Interpolate data (use intersection library) over all elements of target mesh.
bool set_time(const TimeStep &time) override
static const unsigned int undef_uint
void fill_boundary_dofs()
Field< spacedim, Value >::FieldBasePtr create_field(Input::Record rec, const FieldCommon &field) override
virtual ~FieldFE()
Destructor.
Base class for quadrature rules on simplices in arbitrary dimensions.
void make_dof_handler(const MeshBase *mesh)
Create DofHandler object.
TYPEDEF_ERR_INFO(EI_ElemIdx, unsigned int)
typename arma::Mat< Type >::template fixed< nr, nc > ArmaMat
Field< spacedim, Value >::FactoryBase FieldFactoryBaseType
NativeFactory(unsigned int index, std::shared_ptr< DOFHandlerMultiDim > conc_dof_handler, VectorMPI dof_vector=VectorMPI::sequential(0))
Constructor.
FEValueHandler< 1, spacedim, Value > value_handler1_
Value handler that allows get value of 1D elements.
Quadrature init_quad(std::shared_ptr< EvalPoints > eval_points)
Initialize FEValues object of given dimension.
Implementation of range helper class.
void calculate_equivalent_values(ElementDataCache< double >::CacheData data_cache)
Calculate data of equivalent_mesh interpolation on input over all elements of target mesh.