20 Construct one action_set
22 number_of_user_action_sets = 0
23 for x
in self.
step.action_sets:
24 if x.user_should_modify_template():
25 number_of_user_action_sets +=1
29 if action_set.user_should_modify_template():
30 subnamespace =
"actions"
31 action_set_name = action_set.get_action_set_name()
32 print(
"user has to modify class " + action_set.get_action_set_name() +
" in actions directory manually ")
34 subnamespace =
"observers"
35 action_set_name = self.
step.get_observer_class_name() +
"2" + action_set.get_action_set_name() + str( self.
step.action_sets.index(action_set))
38 action_set_name, self.
step.project.namespace + [ subnamespace ], os.path.join(self.
step.project.temporary_subdirectory, subnamespace), action_set
41 for i
in self.
step.vertex_data:
42 new_action_set.include_files.append( i.subdirectory +
"vertexdata/" + i.name +
".h" )
43 for i
in self.
step.face_data:
44 new_action_set.include_files.append( i.subdirectory +
"facedata/" + i.name +
".h" )
45 for i
in self.
step.cell_data:
46 new_action_set.include_files.append( i.subdirectory +
"celldata/" + i.name +
".h" )
48 if len(self.
step.vertex_data)>0:
49 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_CREATE_PERSISTENT_VERTEX,
"void" ] + self.
step.get_vertex_operations_signature() )
50 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_DESTROY_PERSISTENT_VERTEX,
"void" ] + self.
step.get_vertex_operations_signature() )
51 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_CREATE_HANGING_VERTEX,
"void" ] + self.
step.get_vertex_operations_signature() )
52 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_DESTROY_HANGING_VERTEX,
"void" ] + self.
step.get_vertex_operations_signature() )
53 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_TOUCH_VERTEX_FIRST_TIME,
"void" ] + self.
step.get_vertex_operations_signature() )
54 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_TOUCH_VERTEX_LAST_TIME,
"void" ] + self.
step.get_vertex_operations_signature() )
56 if len(self.
step.face_data)>0:
57 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_CREATE_PERSISTENT_FACE,
"void" ] + self.
step.get_face_operations_signature() )
58 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_DESTROY_PERSISTENT_FACE,
"void" ] + self.
step.get_face_operations_signature() )
59 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_CREATE_HANGING_FACE,
"void" ] + self.
step.get_face_operations_signature() )
60 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_DESTROY_HANGING_FACE,
"void" ] + self.
step.get_face_operations_signature() )
61 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_TOUCH_FACE_FIRST_TIME,
"void" ] + self.
step.get_face_operations_signature() )
62 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_TOUCH_FACE_LAST_TIME,
"void" ] + self.
step.get_face_operations_signature() )
64 if len(self.
step.cell_data)>0:
65 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_CREATE_CELL,
"void" ] + self.
step.get_cell_operations_signature() )
66 new_action_set.operations.append( [ peano4.api.solversteps.ActionSet.OPERATION_DESTROY_CELL,
"void" ] + self.
step.get_cell_operations_signature() )
68 new_action_set.operations.append(
69 [ peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME,
"void" ] +
70 self.
step.get_touch_cell_signature()
72 new_action_set.operations.append(
73 [ peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_LAST_TIME,
"void" ] +
74 self.
step.get_touch_cell_signature()
77 output.artefacts.append( new_action_set )
79 temporary_action_set_path = new_action_set.get_cpp_file_name()
80 true_action_set_path = os.path.join(self.
step.project.subdirectory, subnamespace, temporary_action_set_path.split(
'/')[-1])
81 output.makefile.add_cpp_file( true_action_set_path, generated=
True )
83 return subnamespace +
"::" + new_action_set.classname