P
Also ich habe zunächst mal für beide structs einen default-Konstruktor geschrieben:
template <int dim>
struct PointInformation
{
PointInformation():point(),
normal_vector(),
gap(0.0),
dist(0.0),
dof(),
boundary_index(0) {}
Point<dim> point, normal_vector;
double gap, dist;
std::vector<unsigned int> dof;
int boundary_index;
};
struct PointInformation3D
{
PointInformation3D():dof(),
neighbours(),
boundary_index(0) {}
std::vector<unsigned int> dof;
std::list<std::vector<std::vector<unsigned int> > > neighbours;
int boundary_index;
};
Außerdem habe ich alle Membervariabeln initialisiert:
template <int dim>
SignoriniRotatingSolver2<dim>::SignoriniRotatingSolver2(SolverControl &sc, DoFHandler<dim> &dof_handler, double precondition_omega, const Vector<double> _complete_displacement, const double _kn):
solver_control(&sc), dofhandler(dof_handler), omega(precondition_omega),
contact_dofs(), m(0), obs_vector(), point_information_list(), support_points(),
boundary_indicator(), direction(), u_0(), gap(), obstacle_function(),
complete_displacement(_complete_displacement), kn(_kn)
{
n=dof_handler.n_dofs();
MappingQ<dim> mapping(1);
support_points.resize(n);
DoFTools::map_dofs_to_support_points(mapping, dofhandler, support_points);
}
Leider hat das alles noch nicht den gewünschten Erfolg gebracht.
Hier mal die Ausgabe beim Kompilieren im Debug Mode:
Makefile:146: lib/Makefile.dep: Datei oder Verzeichnis nicht gefunden
=====waves=======3d================== Remaking lib/Makefile.dep
=====waves=======3d====debug=====MT== functions.cc
source/functions.cc:85: warning: unused parameter ‘p’
source/functions.cc: In instantiation of ‘void RelativeVelocity<dim>::vector_value(const Point<dim>&, Vector<double>&) const [with int dim = 3]’:
source/functions.cc:223: instantiated from here
source/functions.cc:190: warning: unused parameter ‘p’
=====waves=======3d====debug=====MT== input.cc
source/input.cc: In instantiation of ‘double Input<dim>::mikro_height_func(double, double, double) [with int dim = 3]’:
source/input.cc:225: instantiated from here
source/input.cc:26: warning: unused parameter ‘x’
source/input.cc:26: warning: unused parameter ‘y’
source/input.cc:26: warning: unused parameter ‘z’
source/input.cc: In instantiation of ‘double Input<dim>::mikro_height(double, double, double) [with int dim = 3]’:
source/input.cc:225: instantiated from here
source/input.cc:41: warning: unused parameter ‘z’
=====waves=======3d====debug=====MT== input_werkzeug.cc
source/input_werkzeug.cc: In instantiation of ‘double InputWerkzeug<dim>::mikro_height_func(double, double, double) [with int dim = 3]’:
source/input_werkzeug.cc:238: instantiated from here
source/input_werkzeug.cc:26: warning: unused parameter ‘x’
source/input_werkzeug.cc:26: warning: unused parameter ‘y’
source/input_werkzeug.cc:26: warning: unused parameter ‘z’
source/input_werkzeug.cc: In instantiation of ‘double InputWerkzeug<dim>::mikro_height(double, double, double) [with int dim = 3]’:
source/input_werkzeug.cc:238: instantiated from here
source/input_werkzeug.cc:54: warning: unused parameter ‘z’
=====waves=======3d====debug=====MT== my_assembler.cc
source/../include/my_assembler.h: In constructor ‘MyAssembler<dim>::MyAssembler(DoFHandler<dim>&, FESystem<dim>&, SparsityPattern&, std::vector<double, std::allocator<double> >, std::vector<PointHistory<dim>, std::allocator<PointHistory<dim> > >, double, bool) [with int dim = 3]’:
source/my_assembler.cc:1192: instantiated from here
source/../include/my_assembler.h:39: warning: ‘MyAssembler<3>::materialpara_liste’ will be initialized after
source/../include/my_assembler.h:32: warning: ‘const double MyAssembler<3>::mu_G’
source/../include/my_assembler.h:51: warning: when initialized here
source/../include/my_assembler.h:32: warning: ‘MyAssembler<3>::mu_G’ will be initialized after
source/../include/my_assembler.h:30: warning: ‘const double MyAssembler<3>::mu_B’
source/../include/my_assembler.h:51: warning: when initialized here
source/../include/my_assembler.h:31: warning: ‘MyAssembler<3>::kappa_G’ will be initialized after
source/../include/my_assembler.h:29: warning: ‘const double MyAssembler<3>::kappa_B’
source/../include/my_assembler.h:51: warning: when initialized here
source/../include/my_assembler.h:34: warning: ‘MyAssembler<3>::fliessgrenze_G’ will be initialized after
source/../include/my_assembler.h:33: warning: ‘const double MyAssembler<3>::fliessgrenze_B’
source/../include/my_assembler.h:51: warning: when initialized here
source/my_assembler.cc: At global scope:
source/my_assembler.cc: In instantiation of ‘void MyAssembler<dim>::compute_nl_term(const Vector<double>&, const Vector<double>&, Vector<double>&, const typename DoFHandler<dim>::active_cell_iterator&, const typename DoFHandler<dim>::active_cell_iterator&) [with int dim = 3]’:
source/my_assembler.cc:1192: instantiated from here
source/my_assembler.cc:47: warning: unused parameter ‘old_data’
source/my_assembler.cc: In instantiation of ‘void MyAssembler<dim>::compute_nl_matrix(const Vector<double>&, const Vector<double>&, SparseMatrix<double>&, const typename DoFHandler<dim>::active_cell_iterator&, const typename DoFHandler<dim>::active_cell_iterator&) [with int dim = 3]’:
source/my_assembler.cc:1192: instantiated from here
source/my_assembler.cc:208: warning: unused parameter ‘old_data’
source/my_assembler.cc: In instantiation of ‘void MyAssembler<dim>::update_quadrature_point_history(Vector<double>&, std::vector<PointHistory<dim>, std::allocator<PointHistory<dim> > >, Vector<double>&, SymmetricTensor<2, dim>&, SymmetricTensor<2, dim>&) [with int dim = 3]’:
source/my_assembler.cc:1192: instantiated from here
source/my_assembler.cc:608: warning: unused parameter ‘quadrature_point_history’
source/my_assembler.cc: In instantiation of ‘void MyAssembler<dim>::assemble_elast_system(Vector<double>&, Vector<double>&, SparseMatrix<double>&, const typename DoFHandler<dim>::active_cell_iterator&, const typename DoFHandler<dim>::active_cell_iterator&) [with int dim = 3]’:
source/my_assembler.cc:1192: instantiated from here
source/my_assembler.cc:797: warning: unused parameter ‘elast_solution’
=====waves=======3d====debug=====MT== my_solver.cc
source/../include/my_solver.h: In constructor ‘MySolver<dim>::MySolver(SolverControl&, DoFHandler<dim>&, const Vector<double>&, Vector<double>&, SparsityPattern&, double) [with int dim = 3]’:
source/my_solver.cc:347: instantiated from here
source/../include/my_solver.h:18: warning: ‘MySolver<3>::reduction_control’ will be initialized after
source/../include/my_solver.h:12: warning: ‘const Vector<double> MySolver<3>::complete_displacement’
source/../include/my_solver.h:29: warning: when initialized here
source/my_solver.cc: In member function ‘void MySolver<dim>::solve_SSOR_2(Vector<double>&, const SparseMatrix<double>&, const Vector<double>&) [with int dim = 3]’:
source/my_solver.cc:347: instantiated from here
source/my_solver.cc:73: warning: unused variable ‘stop’
=====waves=======3d====debug=====MT== output.cc
source/output.cc: In member function ‘void Output<dim>::save_gmv(Vector<double>, Vector<double>, const char*) const [with int dim = 3]’:
source/output.cc:397: instantiated from here
source/output.cc:72: warning: unused variable ‘cnt’
source/output.cc: In member function ‘void Output<dim>::output_fk_wk(double&, double&, double&, double&, Vector<double>, Vector<double>, Vector<double>, double, double) [with int dim = 3]’:
source/output.cc:397: instantiated from here
source/output.cc:283: warning: unused variable ‘index_y’
source/output.cc:397: instantiated from here
source/output.cc:308: warning: unused variable ‘index_x’
source/output.cc:309: warning: unused variable ‘index_y’
source/output.cc:397: instantiated from here
source/output.cc:341: warning: unused variable ‘index_x’
source/output.cc:342: warning: unused variable ‘index_y’
source/output.cc: At global scope:
source/output.cc: In instantiation of ‘void Output<dim>::output_fk_wk(double&, double&, double&, double&, Vector<double>, Vector<double>, Vector<double>, double, double) [with int dim = 3]’:
source/output.cc:397: instantiated from here
source/output.cc:253: warning: unused parameter ‘MUS_Flaeche’
=====waves=======3d====debug=====MT== prandtl_reuss_problem.cc
source/../include/../include/parameter.h: In constructor ‘Daten::Daten(char*)’:
source/../include/../include/parameter.h:85: warning: format ‘%s’ expects type ‘char*’, but argument 3 has type ‘char (*)[1000]’
source/../include/../include/parameter.h:86: warning: format ‘%s’ expects type ‘char*’, but argument 3 has type ‘char (*)[1000]’
source/prandtl_reuss_problem.cc: In member function ‘void PrandtlReussProblem<dim>::run() [with int dim = 3]’:
source/prandtl_reuss_problem.cc:1294: instantiated from here
source/prandtl_reuss_problem.cc:1001: warning: deprecated conversion from string constant to ‘char*’'
source/prandtl_reuss_problem.cc: At global scope:
source/prandtl_reuss_problem.cc: In instantiation of ‘void PrandtlReussProblem<dim>::solve_SQP(double, Vector<double>) [with int dim = 3]’:
source/prandtl_reuss_problem.cc:1300: instantiated from here
source/prandtl_reuss_problem.cc:342: warning: unused parameter ‘surface_vector’
source/../include/../include/my_assembler.h: In constructor ‘MyAssembler<dim>::MyAssembler(DoFHandler<dim>&, FESystem<dim>&, SparsityPattern&, std::vector<double, std::allocator<double> >, std::vector<PointHistory<dim>, std::allocator<PointHistory<dim> > >, double, bool) [with int dim = 3]’:
source/prandtl_reuss_problem.cc:1018: instantiated from ‘void PrandtlReussProblem<dim>::run() [with int dim = 3]’
source/prandtl_reuss_problem.cc:1294: instantiated from here
source/../include/../include/my_assembler.h:39: warning: ‘MyAssembler<3>::materialpara_liste’ will be initialized after
source/../include/../include/my_assembler.h:32: warning: ‘const double MyAssembler<3>::mu_G’
source/../include/../include/my_assembler.h:51: warning: when initialized here
source/../include/../include/my_assembler.h:32: warning: ‘MyAssembler<3>::mu_G’ will be initialized after
source/../include/../include/my_assembler.h:30: warning: ‘const double MyAssembler<3>::mu_B’
source/../include/../include/my_assembler.h:51: warning: when initialized here
source/../include/../include/my_assembler.h:31: warning: ‘MyAssembler<3>::kappa_G’ will be initialized after
source/../include/../include/my_assembler.h:29: warning: ‘const double MyAssembler<3>::kappa_B’
source/../include/../include/my_assembler.h:51: warning: when initialized here
source/../include/../include/my_assembler.h:34: warning: ‘MyAssembler<3>::fliessgrenze_G’ will be initialized after
source/../include/../include/my_assembler.h:33: warning: ‘const double MyAssembler<3>::fliessgrenze_B’
source/../include/../include/my_assembler.h:51: warning: when initialized here
source/../include/my_solver.h: In constructor ‘MySolver<dim>::MySolver(SolverControl&, DoFHandler<dim>&, const Vector<double>&, Vector<double>&, SparsityPattern&, double) [with int dim = 3]’:
source/prandtl_reuss_problem.cc:364: instantiated from ‘void PrandtlReussProblem<dim>::solve_SQP(double, Vector<double>) [with int dim = 3]’
source/prandtl_reuss_problem.cc:1300: instantiated from here
source/../include/my_solver.h:18: warning: ‘MySolver<3>::reduction_control’ will be initialized after
source/../include/my_solver.h:12: warning: ‘const Vector<double> MySolver<3>::complete_displacement’
source/../include/my_solver.h:29: warning: when initialized here
=====waves=======3d====debug=====MT== SignoriniRotatingSolver2.cc
=====waves=======3d==============MT== Linking Elasto-Plast-3d
Da erscheinen noch einige Warnungen aus anderen Klassen. Bei denen ich aber nicht sehe wie sie schaden könnten und vor allem nicht an dieser Stelle.
Wie könnte ich denn am einfachsten die Gültigkeit von Iteratoren abfragen?
Danke schonmal vorab für eure Antworten?