49 std::vector<std::string>& rVariableNames,
50 std::string directory,
51 std::string inputFileNamePrefix)
67 "voltage_mechanics_mesh",
71 std::vector<int> columns_id;
72 for (
unsigned var_index = 0; var_index < rVariableNames.size(); var_index++)
74 std::string var_name = rVariableNames[var_index];
82 assert(columns_id.size() == rVariableNames.size());
87 std::vector<double> interpolated_voltages(rMechanicsMesh.
GetNumNodes());
88 Vec voltage_coarse = NULL;
90 for (
unsigned time_step=0; time_step<num_timesteps; time_step++)
92 for (
unsigned var_index = 0; var_index < rVariableNames.size(); var_index++)
94 std::string var_name = rVariableNames[var_index];
102 double interpolated_voltage = 0;
105 for (
unsigned node_index = 0; node_index<element.
GetNumNodes(); node_index++)
108 interpolated_voltage += voltage_repl[global_node_index]*mesh_pair.
rGetElementsAndWeights()[i].Weights(node_index);
111 interpolated_voltages[i] = interpolated_voltage;
114 if (voltage_coarse != NULL)
120 p_writer->
PutVector(columns_id[var_index], voltage_coarse);
126 if (voltage_coarse != NULL)
141 "voltage_mechanics_mesh",