Flow123d
release_3.0.0-973-g92f55e826
|
Go to the documentation of this file.
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->get_loc_dof_indices(ele, indices);
324 for(idof=0; idof<ndofs; idof++) field_ptr->get_data_vec()[ indices[idof] ] = (*vec_seq.
data_ptr())[ ndofs*ele.idx()+idof ];
unsigned int data_size() const
void make_dof_handler(const Mesh *mesh)
Create DofHandler object.
std::string field_name_
field name read from input
std::shared_ptr< std::vector< LongIdx > > boundary_dofs_
FieldFlag::Flags flags_
Field flags.
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_
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.
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
static const int registrar
Registrar of class to factory.
static VectorMPI sequential(unsigned int size)
FiniteElement< 1 > * fe1_
Same as previous, but represents 1D element.
Dedicated class for storing path to input and output files.
@ equivalent_msh
equivalent mesh (default value)
Input::Record in_rec_
Accessor to Input::Record.
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.
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
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.
Provides the numbering of the finite element degrees of freedom on the computational mesh.
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
void interpolate_intersection(ElementDataCache< double >::ComponentDataPtr data_vec)
Interpolate data (use intersection library) over all elements of target mesh.
Representation of one time step..
Abstract class for description of finite elements.
void distribute_dofs(std::shared_ptr< DiscreteSpace > ds)
Distributes degrees of freedom on the mesh needed for the given discrete space.
std::shared_ptr< DOFHandlerMultiDim > sequential()
Returns sequential version of the current dof handler.
DataInterpolation interpolation_
Specify type of FE data interpolation.
OutputTime::DiscreteSpace discretization_
Specify section where to find the field data in input mesh file.
std::shared_ptr< FieldFE< spacedim, Value > > create_field(VectorMPI &vec_seq, Mesh &mesh, unsigned int n_comp)
@ gauss_p0
P0 interpolation (with the use of Gaussian distribution)
FiniteElement< 3 > * fe3_
Same as previous, but represents 3D element.
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
std::shared_ptr< std::vector< T > > ComponentDataPtr
FieldAlgorithmBase< spacedim, Value >::Point Point
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list)
FilePath reader_file_
mesh reader file
VectorMPI set_fe_data(std::shared_ptr< DOFHandlerMultiDim > dh, unsigned int component_index=0, VectorMPI dof_values=VectorMPI::sequential(0))
static const Input::Type::Record & get_input_type()
Implementation.
VectorMPI get_data_vec() const
void calculate_native_values(ElementDataCache< double >::ComponentDataPtr data_cache)
Calculate native data over all elements of target mesh.
static const Input::Type::Selection & get_disc_selection_input_type()
@ identic_msh
identical mesh
bool set_time(const TimeStep &time) override
void fill_output_data(VectorMPI &vec_seq, std::shared_ptr< FieldFE< spacedim, Value > > field_ptr)
FiniteElement< 2 > * fe2_
Same as previous, but represents 2D element.
Class MappingP1 implements the affine transformation of the unit cell onto the actual cell.
void fill_boundary_dofs()
VectorDataPtr data_ptr()
Getter for shared pointer of output data.
virtual ~FieldFE()
Destructor.
Compound finite element on dim dimensional simplex.
unsigned int size() const
Return size of output data.
FEValueHandler< 1, spacedim, Value > value_handler1_
Value handler that allows get value of 1D elements.
Implementation of range helper class.