26 const RealVectorValue n = n_unnormalized.
unit();
28 if (MooseUtils::absoluteFuzzyEqual(std::abs(n(0)), 1.0))
30 t1 = RealVectorValue(0, 1, 0);
31 t2 = RealVectorValue(0, 0, 1);
36 RealVectorValue ex(1, 0, 0);
37 t1 = ex - (ex * n) * n;
48 std::map<dof_id_type, std::vector<ADReal>> & this_map)
50 std::vector<std::map<dof_id_type, std::vector<ADReal>>> all_maps;
51 comm.allgather(this_map, all_maps);
52 for (
auto & one_map : all_maps)
53 for (
auto & it : one_map)
54 this_map[it.first] = it.second;
59 std::map<dof_id_type, std::vector<ADReal>> & this_map)
61 std::vector<std::map<dof_id_type, std::vector<ADReal>>> all_maps;
62 comm.allgather(this_map, all_maps);
64 for (
auto & one_map : all_maps)
65 for (
auto & it : one_map)
66 if (this_map.find(it.first) == this_map.end())
67 this_map[it.first] = it.second;
70 auto & existing = this_map[it.first];
71 for (
const auto i : index_range(existing))
72 existing[i] += it.second[i];
void allGatherADVectorMap(const Parallel::Communicator &comm, std::map< dof_id_type, std::vector< ADReal > > &this_map)
Parallel gather of a map of DoF ID to AD vector.
void computeOrthogonalDirections(const RealVectorValue &n_unnormalized, RealVectorValue &t1, RealVectorValue &t2)
Computes two unit vectors orthogonal to the given vector.
void allGatherADVectorMapSum(const Parallel::Communicator &comm, std::map< dof_id_type, std::vector< ADReal > > &this_map)
Parallel gather of a map of DoF ID to AD vector.