sandialabs / compadre

Compadre (Compatible Particle Discretization and Remap)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove G_inv

kuberry opened this issue · comments

G_inv is calculated and stored in order to only be used in

Compadre_Targets.hpp:

        } else if (data._dimensions==2) { // 1D manifold in 2D problem
            if (data._operations(i) == TargetOperation::GradientOfScalarPointEvaluation) {
                Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
                    int offset = data._d_ss.getTargetOffsetIndex(i, 0, 0, 0);
                    for (int j=0; j<target_NP; ++j) {
                        P_target_row(offset, j) = 0;
                        delta(j) = (j == 1) ? std::pow(data._epsilons(target_index), -1) : 0;
                    }
                    for (int j=0; j<target_NP; ++j) {
                        double v1 = delta(j)*G_inv(0,0);
                        P_target_row(offset, j) = v1;
                    }
                });

If this case were refactored to use curvature coefficients instead, we could remove all G_inv calculation / storage.