49 template <
int spacedim,
class Value>
123 void set_mesh(
const Mesh *mesh,
bool boundary_domain)
override;
171 std::shared_ptr<DOFHandlerMultiDim>
dh_;
245 template <
int spacedim,
class Value>
248 std::shared_ptr<DOFHandlerMultiDim> dh;
263 std::shared_ptr< FiniteElement<0> > fe0_ptr = std::make_shared< FE_P_disc<0> >(0);
264 std::shared_ptr< FiniteElement<1> > fe1_ptr = std::make_shared< FE_P_disc<1> >(0);
265 std::shared_ptr< FiniteElement<2> > fe2_ptr = std::make_shared< FE_P_disc<2> >(0);
266 std::shared_ptr< FiniteElement<3> > fe3_ptr = std::make_shared< FE_P_disc<3> >(0);
274 std::shared_ptr< FiniteElement<0> > fe0_ptr = std::make_shared< FE_P_disc<0> >(0);
275 std::shared_ptr< FiniteElement<1> > fe1_ptr = std::make_shared< FE_P_disc<1> >(0);
276 std::shared_ptr< FiniteElement<2> > fe2_ptr = std::make_shared< FE_P_disc<2> >(0);
277 std::shared_ptr< FiniteElement<3> > fe3_ptr = std::make_shared< FE_P_disc<3> >(0);
285 ASSERT(
false).error(
"Should not happen!\n");
290 std::shared_ptr<DiscreteSpace> ds = std::make_shared<EqualOrderDiscreteSpace>( &mesh, fe0, fe1, fe2, fe3);
295 std::shared_ptr< FieldFE<spacedim, Value> > field_ptr = std::make_shared< FieldFE<spacedim, Value> >();
308 template <
int spacedim,
class Value>
311 auto dh = field_ptr->get_dofhandler();
312 unsigned int ndofs = dh->max_elem_dofs();
322 for (
auto ele : dh->mesh()->elements_range()) {
323 dh->cell_accessor_from_element(ele.idx()).get_loc_dof_indices(indices);
324 for(idof=0; idof<ndofs; idof++) field_ptr->get_data_vec()[ indices[idof] ] = (*vec_seq.
data_ptr())[ ndofs*ele.idx()+idof ];
Class MappingP1 implements the affine transformation of the unit cell onto the actual cell...
std::shared_ptr< DOFHandlerMultiDim > sequential()
Returns sequential version of the current dof handler.
virtual ~FieldFE()
Destructor.
unsigned int size() const
Return size of output data.
Declaration of class which handles the ordering of degrees of freedom (dof) and mappings between loca...
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list)
void interpolate_gauss(ElementDataCache< double >::ComponentDataPtr data_vec)
Interpolate data (use Gaussian distribution) over all elements of target mesh.
FEValueHandler< 0, spacedim, Value > value_handler0_
Value handler that allows get value of 0D elements.
std::shared_ptr< std::vector< T > > ComponentDataPtr
P0 interpolation (with the use of calculation of intersections)
std::string field_name_
field name read from input
std::shared_ptr< FieldFE< spacedim, Value > > create_field(VectorMPI &vec_seq, Mesh &mesh, unsigned int n_comp)
VectorMPI get_data_vec() const
FEValueHandler< 2, spacedim, Value > value_handler2_
Value handler that allows get value of 2D elements.
VectorMPI data_vec_
Store data of Field.
void distribute_dofs(std::shared_ptr< DiscreteSpace > ds)
Distributes degrees of freedom on the mesh needed for the given discrete space.
FilePath reader_file_
mesh reader file
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
FieldAlgorithmBase< spacedim, Value >::Point Point
Class FESystem for compound finite elements.
VectorDataPtr data_ptr()
Getter for shared pointer of output data.
void fill_output_data(VectorMPI &vec_seq, std::shared_ptr< FieldFE< spacedim, Value > > field_ptr)
static const int registrar
Registrar of class to factory.
void set_mesh(const Mesh *mesh, bool boundary_domain) override
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
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.
bool set_time(const TimeStep &time) override
FiniteElement< 3 > * fe3_
Same as previous, but represents 3D element.
static const Input::Type::Selection & get_interp_selection_input_type()
std::shared_ptr< std::vector< LongIdx > > boundary_dofs_
void fill_boundary_dofs()
FieldAlgorithmBase< spacedim, Value > FactoryBaseType
unsigned int data_size() const
bool boundary_domain_
Is set in set_mesh method. Value true means, that we accept only boundary element accessors in the va...
OutputTime::DiscreteSpace discretization_
Specify section where to find the field data in input mesh file.
std::shared_ptr< DOFHandlerMultiDim > dh_
DOF handler object.
static const Input::Type::Record & get_input_type()
Implementation.
DataInterpolation interpolation_
Specify type of FE data interpolation.
Compound finite element on dim dimensional simplex.
Definitions of basic Lagrangean finite elements with polynomial shape functions.
Provides the numbering of the finite element degrees of freedom on the computational mesh...
void interpolate_intersection(ElementDataCache< double >::ComponentDataPtr data_vec)
Interpolate data (use intersection library) over all elements of target mesh.
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm)
Space< spacedim >::Point Point
VectorMPI set_fe_data(std::shared_ptr< DOFHandlerMultiDim > dh, unsigned int component_index=0, VectorMPI dof_values=VectorMPI::sequential(0))
FEValueHandler< 1, spacedim, Value > value_handler1_
Value handler that allows get value of 1D elements.
Dedicated class for storing path to input and output files.
FiniteElement< 1 > * fe1_
Same as previous, but represents 1D element.
std::shared_ptr< DOFHandlerMultiDim > get_dofhandler() const
static const Input::Type::Selection & get_disc_selection_input_type()
FiniteElement< 2 > * fe2_
Same as previous, but represents 2D element.
Input::Record in_rec_
Accessor to Input::Record.
static VectorMPI sequential(unsigned int size)
FieldFE(unsigned int n_comp=0)
std::vector< LongIdx > dof_indices_
Array of indexes to data_vec_, used for get/set values.
FiniteElement< 0 > * fe0_
virtual void init_from_input(const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data)
Abstract class for description of finite elements.
equivalent mesh (default value)
void calculate_native_values(ElementDataCache< double >::ComponentDataPtr data_cache)
Calculate native data over all elements of target mesh.
FieldFlag::Flags flags_
Field flags.
Representation of one time step..
void make_dof_handler(const Mesh *mesh)
Create DofHandler object.
Implementation of range helper class.
void native_data_to_cache(ElementDataCache< double > &output_data_cache)
P0 interpolation (with the use of Gaussian distribution)
unsigned int n_comp() const