I think I find the problem. I didn't specify map of boundary_values. I still worried about correctness of my method.
On Thursday, July 6, 2023 at 2:15:38 PM UTC+3:30 Mohammad Amir Kiani Fordoei wrote: > Dear Wolfgang > > *The error is:* > > /home/amir/eclipse-workspace/mech1/mech.cc:894:45: error: no matching > function for call to ‘interpolate_boundary_values(dealii::DoFHandler<3, > 3>&, unsigned int&, Step18::IncrementalBoundaryValues<3>, > dealii::ComponentMask)’ > > 894 | VectorTools::interpolate_boundary_values( > > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ > > 895 | dof_handler > > | ~~~~~~~~~~~ > > 896 | , boundary_id_tag > > | ~~~~~~~~~~~~~~~~~ > > 897 | , IncrementalBoundaryValues <dim>(present_time, > present_timestep,Vector_of_BC_Value) > > | > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 898 | , fe.component_mask(Vector_of_BC_status) ); > > > *That part of code:* > > > prm.enter_subsection("Geometry_info"); > > unsigned int Number_of_BC=prm.get_integer("Number_of_boundary_id"); > > prm.leave_subsection(); > > > prm.enter_subsection("Boundary_condition_info"); > > > std::string temp_BC_value_info > =prm.get("Assign_boundary_value_info");//getting > BC value > > std::vector<std::string> vetor_of_BC_value_info= Utilities:: > split_string_list (temp_BC_value_info, ' ');//splitting BC values to > vector > > > std::string temp_BC_status_info =prm.get("Assign_status_of_component_info" > );//getting status of BC value > > std::vector<std::string> BC_comp_status_info= Utilities::split_string_list > (temp_BC_status_info, ' ');//splitting status of BC value > > > unsigned int Number_of_dof_for_each_BC_value_components =prm.get_integer( > "Number_of_boundary_dof"); > > unsigned int > Length_of_BC_value_and_component=Number_of_dof_for_each_BC_value_components+1;// > > length of information for BC (value or component status) > > prm.leave_subsection(); > > > for (unsigned int i=0;i<Number_of_BC;i++)//loop over all boundary ids > > { > > unsigned int boundary_id_tag = std::stoi(vetor_of_BC_value_info > [Length_of_BC_value_and_component*i]);//getting tag of BC > > std::vector<double> Vector_of_BC_Value; > > std::vector<bool> Vector_of_BC_status; > > > for (unsigned int j=1;j<Length_of_BC_value_and_component;j++)//loop over > dof of BC > > { > > double boundary_id_value= std::stod(vetor_of_BC_value_info > [Length_of_BC_value_and_component*i+j]); > > Vector_of_BC_Value.push_back(boundary_id_value);//assigning value of each > component > > bool boundary_id_comp_status=false; > > if (BC_comp_status_info [Length_of_BC_value_and_component*i+j]=="true") > > { > > boundary_id_comp_status=true; > > } > > else > > { > > boundary_id_comp_status=false; > > } > > Vector_of_BC_status.push_back(boundary_id_comp_status); > > } > > > VectorTools::interpolate_boundary_values( > > dof_handler > > , boundary_id_tag > > , IncrementalBoundaryValues <dim>(present_time, present_timestep > ,Vector_of_BC_Value) > > , fe.component_mask(Vector_of_BC_status) ); > > //, Vector_of_BC_status ); > > > temp_BC_status_info.clear(); > > temp_BC_value_info.clear(); > > Vector_of_BC_status.clear(); > > Vector_of_BC_Value.clear(); > > } > > > I also added my doe and its prm > I really appreciate your kindness. > On Wednesday, July 5, 2023 at 7:23:27 PM UTC+3:30 Wolfgang Bangerth wrote: > >> On 7/4/23 09:28, Mohammad Amir Kiani Fordoei wrote: >> > So, I defined two extra vector <bool> which indicate presence or >> absence >> > (being free dof) of displacement vector as below >> > a) [true,true,true] >> > b) [true, false,true] >> > But, I couldn't use them as input in interpolate_boundary_values >> (error: no >> > matching function for call to ‘interpolate_boundary_values) >> > Also, I couldn't find a matching function FEValuesExtractors::Vector >> for these >> > cases. >> >> Amir, >> can you show us the code and what the complete error message is? >> >> Best >> W. >> >> -- >> ------------------------------------------------------------------------ >> Wolfgang Bangerth email: bang...@colostate.edu >> www: http://www.math.colostate.edu/~bangerth/ >> >> >> -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/24b37c05-d454-48d1-974c-7a2f4cba21c7n%40googlegroups.com.