Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed comments in a few functions #34

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/CabanaPD_Force.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ class Force<ExecutionSpace, ForceModel<LinearLPS, Elastic>>
double fy_i = 0.0;
double fz_i = 0.0;

// Get the bond distance and stretch
// Get the bond distance and linearized stretch
double xi, linear_s;
double xi_x, xi_y, xi_z;
getLinearizedDistanceComponents( x, u, i, j, xi, linear_s, xi_x,
Expand Down Expand Up @@ -966,8 +966,8 @@ class Force<ExecutionSpace, ForceModel<PMB, Elastic>>
double xi, r, s;
getDistance( x, u, i, j, xi, r, s );

// 1/2 from outside the integral; 1/2 from the integrand (pairwise
// potential).
// 0.25 factor is due to 1/2 from outside the integral and 1/2 from
// the integrand (pairwise potential).
double w = 0.25 * c * s * s * xi * vol( j );
W( i ) += w;
Phi += w * vol( i );
Expand Down Expand Up @@ -1088,8 +1088,8 @@ class Force<ExecutionSpace, ForceModel<PMB, Fracture>>
double xi, r, s;
getDistance( x, u, i, j, xi, r, s );

// 1/2 from outside the integral; 1/2 from the integrand
// (pairwise potential).
// 0.25 factor is due to 1/2 from outside the integral and 1/2
// from the integrand (pairwise potential).
double w = mu( i, n ) * 0.25 * c * s * s * xi * vol( j );
W( i ) += w;

Expand Down Expand Up @@ -1144,7 +1144,7 @@ class Force<ExecutionSpace, ForceModel<LinearPMB, Elastic>>
double fy_i = 0.0;
double fz_i = 0.0;

// Get the bond distance, displacement, and stretch
// Get the bond distance, displacement, and linearized stretch
double xi, linear_s;
double xi_x, xi_y, xi_z;
getLinearizedDistanceComponents( x, u, i, j, xi, linear_s, xi_x,
Expand Down Expand Up @@ -1180,12 +1180,12 @@ class Force<ExecutionSpace, ForceModel<LinearPMB, Elastic>>
auto energy_full =
KOKKOS_LAMBDA( const int i, const int j, double& Phi )
{
// Get the bond distance, displacement, and stretch
// Get the bond distance, displacement, and linearized stretch
double xi, linear_s;
getLinearizedDistance( x, u, i, j, xi, linear_s );

// 1/2 from outside the integral; 1/2 from the integrand (pairwise
// potential).
// 0.25 factor is due to 1/2 from outside the integral and 1/2 from
// the integrand (pairwise potential).
double w = 0.25 * c * linear_s * linear_s * xi * vol( j );
W( i ) += w;
Phi += w * vol( i );
Expand Down
3 changes: 2 additions & 1 deletion src/CabanaPD_Prenotch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ int bond_prenotch_intersection( const Kokkos::Array<double, 3> v1,
keep_bond = 0;
}
// Case II: no intersection

// Case III: single point intersection
else if ( case_flag == 3 )
{
Expand All @@ -174,9 +175,9 @@ int bond_prenotch_intersection( const Kokkos::Array<double, 3> v1,
// Check if intersection point belongs to the bond
auto d = dot( diff( p0, l0 ), n ) / dot( l, n );

// Check if intersection point belongs to the plane
if ( -tol < d && d < 1 + tol )
{
// Check if intersection point belongs to the plane
auto p = sum( l0, scale( l, d ) );

double norm2_cross_v1_v2 = norm_cross_v1_v2 * norm_cross_v1_v2;
Expand Down
9 changes: 4 additions & 5 deletions src/CabanaPD_Solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class SolverElastic
comm->gatherDilatation();
comm_time += comm_timer.seconds();

// Compute short range force
// Compute internal forces
force_timer.reset();
compute_force( *force, *particles, *neighbors, neigh_iter_tag{} );
force_time += force_timer.seconds();
Expand Down Expand Up @@ -373,12 +373,11 @@ class SolverFracture
void init_force()
{
init_timer.reset();
// Compute weighted volume for LPS (does nothing for PMB).
// Compute/communicate weighted volume for LPS (does nothing for PMB).
force->compute_weighted_volume( *particles, *neighbors, mu );
comm->gatherWeightedVolume();
// Compute dilatation for LPS (does nothing for PMB).
// Compute/communicate dilatation for LPS (does nothing for PMB).
force->compute_dilatation( *particles, *neighbors, mu );
// Communicate dilatation for LPS (does nothing for PMB).
comm->gatherDilatation();

// Compute initial forces
Expand Down Expand Up @@ -424,7 +423,7 @@ class SolverFracture
comm->gatherDilatation();
comm_time += comm_timer.seconds();

// Compute short range force
// Compute internal forces
force_timer.reset();
compute_force( *force, *particles, *neighbors, mu,
neigh_iter_tag{} );
Expand Down
Loading