Skip to content

Commit c43a034

Browse files
committed
base class from which numerical examples are derived, enables use of a common pointer to the different numerical examples
1 parent d1a3017 commit c43a034

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

numEx-baseClass.h

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#ifndef NUMEX_BASECLASS_H
2+
#define NUMEX_BASECLASS_H
3+
4+
/**
5+
*
6+
*/
7+
template<int dim>
8+
class numEx_class
9+
{
10+
public:
11+
double search_tolerance = 1e-12;
12+
13+
virtual std::string numEx_name() {
14+
return "numEx";
15+
};
16+
17+
virtual unsigned int loading_direction() {
18+
return enums::coord_none;
19+
};
20+
21+
virtual std::vector< enums::enum_boundary_ids > id_boundary_loads() {
22+
return std::vector< enums::enum_boundary_ids > ();
23+
}
24+
25+
// @todo Check whether this virtual function is needed, because this is only called internally
26+
virtual std::vector< types::manifold_id > manifold_ids() {
27+
return std::vector< types::manifold_id > ();
28+
}
29+
30+
// abstract function:
31+
// Is never executed, thus must be overwritten in each derived class
32+
virtual void make_grid( /*input-> */ const Parameter::GeneralParameters &parameter,
33+
/*output->*/ Triangulation<dim> &triangulation,
34+
std::vector<double> &body_dimensions,
35+
std::vector< numEx::EvalPointClass<3> > &eval_points_list,
36+
const std::string relativePath ) =0;
37+
38+
virtual void make_constraints ( AffineConstraints<double> &constraints, const FESystem<dim> &fe, DoFHandler<dim> &dof_handler_ref,
39+
const bool &apply_dirichlet_bc, double &current_load_increment, const Parameter::GeneralParameters &parameter ) =0;
40+
};
41+
42+
#endif //NUMEX_BASECLASS_H

0 commit comments

Comments
 (0)