11 Construct one action_set
13 number_of_user_action_sets = 0
14 for x
in self.
step.action_sets:
15 if x.user_should_modify_template():
16 number_of_user_action_sets +=1
20 if action_set.user_should_modify_template():
21 subnamespace =
"actions"
22 action_set_name = action_set.get_action_set_name()
23 print(
"user has to modify class " + action_set.get_action_set_name() +
" in actions directory manually ")
25 subnamespace =
"observers"
26 action_set_name = self.
step.name +
"2" + action_set.get_action_set_name() + str( self.
step.action_sets.index(action_set))
29 action_set_name, self.
step.project.namespace + [ subnamespace ], self.
step.project.subdirectory + subnamespace, action_set
32 for i
in self.
step.vertex_data:
33 new_action_set.include_files.append( i.subdirectory +
"vertexdata/" + i.name +
".h" )
34 for i
in self.
step.face_data:
35 new_action_set.include_files.append( i.subdirectory +
"facedata/" + i.name +
".h" )
36 for i
in self.
step.cell_data:
37 new_action_set.include_files.append( i.subdirectory +
"celldata/" + i.name +
".h" )
39 if len(self.
step.vertex_data)>0:
40 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_CREATE_PERSISTENT_VERTEX,
"void" ] + self.
step.get_vertex_operations_signature() )
41 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_DESTROY_PERSISTENT_VERTEX,
"void" ] + self.
step.get_vertex_operations_signature() )
42 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_CREATE_HANGING_VERTEX,
"void" ] + self.
step.get_vertex_operations_signature() )
43 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_DESTROY_HANGING_VERTEX,
"void" ] + self.
step.get_vertex_operations_signature() )
44 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_TOUCH_VERTEX_FIRST_TIME,
"void" ] + self.
step.get_vertex_operations_signature() )
45 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_TOUCH_VERTEX_LAST_TIME,
"void" ] + self.
step.get_vertex_operations_signature() )
47 if len(self.
step.face_data)>0:
48 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_CREATE_PERSISTENT_FACE,
"void" ] + self.
step.get_face_operations_signature() )
49 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_DESTROY_PERSISTENT_FACE,
"void" ] + self.
step.get_face_operations_signature() )
50 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_CREATE_HANGING_FACE,
"void" ] + self.
step.get_face_operations_signature() )
51 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_DESTROY_HANGING_FACE,
"void" ] + self.
step.get_face_operations_signature() )
52 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_TOUCH_FACE_FIRST_TIME,
"void" ] + self.
step.get_face_operations_signature() )
53 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_TOUCH_FACE_LAST_TIME,
"void" ] + self.
step.get_face_operations_signature() )
55 if len(self.
step.cell_data)>0:
56 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_CREATE_CELL,
"void" ] + self.
step.get_cell_operations_signature() )
57 new_action_set.operations.append( [ peano4.solversteps.ActionSet.OPERATION_DESTROY_CELL,
"void" ] + self.
step.get_cell_operations_signature() )
59 new_action_set.operations.append(
60 [ peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME,
"void" ] +
61 self.
step.get_touch_cell_signature()
63 new_action_set.operations.append(
64 [ peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_LAST_TIME,
"void" ] +
65 self.
step.get_touch_cell_signature()
68 output.artefacts.append( new_action_set )
69 output.makefile.add_cpp_file( new_action_set.get_cpp_file_name(), generated=
True )
71 return subnamespace +
"::" + action_set_name