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

ROL: correct warnings in examples and tests #2364

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 4 additions & 4 deletions packages/rol/example/tempus/example_01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ int main(int argc, char *argv[]) {

RCP<Tempus::IntegratorBasic<RealT> > integrator = Tempus::integratorBasic<RealT>(tempusParList, model);

bool integratorStatus = integrator->advanceTime();
integrator->advanceTime();

// Test if at 'Final Time'
RealT time = integrator->getTime();
RealT timeFinal = tempusParList->sublist("Demo Integrator").sublist("Time Step Control").get<RealT>("Final Time");
// How to Test if at 'Final Time'
// RealT time = integrator->getTime();
// RealT timeFinal = tempusParList->sublist("Demo Integrator").sublist("Time Step Control").get<RealT>("Final Time");

// Output solution.
std::ofstream ftmp("Tempus_ForwardEuler_SinCos.dat");
Expand Down
10 changes: 5 additions & 5 deletions packages/rol/src/vector/ROL_PinTVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class PinTVector
int numLeft = 0;
int numRight = 0;

for(int i=0;i<stencil_.size();i++) {
for(int i=0;i<(int)stencil_.size();i++) {
if(stencil_[i]<0)
numLeft = std::max(numLeft,std::abs(stencil_[i]));
else if(stencil_[i]>0)
Expand Down Expand Up @@ -288,11 +288,11 @@ class PinTVector
return true;

// these are "neighbor" unowned vectors (left)
if(-leftVectors_.size() <= i && i < 0)
if(-(int)leftVectors_.size() <= i && i < 0)
return true;

// these are "neighbor" unowned vectors (right)
if(numOwnedSteps() <= i && i<numOwnedSteps()+rightVectors_.size())
if(numOwnedSteps() <= i && i<(int)(numOwnedSteps()+rightVectors_.size()))
return true;

return false;
Expand All @@ -309,11 +309,11 @@ class PinTVector
return stepVectors_->get(i);

// these are "neighbor" unowned vectors (left)
if(-leftVectors_.size() <= i && i < 0)
if(-(int)leftVectors_.size() <= i && i < 0)
return leftVectors_[leftVectors_.size()+i];

// these are "neighbor" unowned vectors (right)
if(numOwnedSteps() <= i && i<numOwnedSteps()+rightVectors_.size())
if((int)numOwnedSteps() <= i && i<(int)(numOwnedSteps()+rightVectors_.size()))
return rightVectors_[i-numOwnedSteps()];

return nullPtr;
Expand Down
1 change: 0 additions & 1 deletion packages/rol/test/function/constraint/test_03.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ int main(int argc, char* argv[]) {
// check inverses adjoint Jacobian_1_new
*outStream << "Checking apply Jacobian 2 new" << std::endl;
{
ROL::Vector<RealT> & v_un = *dynamic_cast<ROL::PartitionedVector<RealT>&>(*v_u).get(1);
dynamic_cast<ROL::PartitionedVector<RealT>&>(*v_u).get(0)->scale(0.0);

PtrVector jv_u = un_vec->clone();
Expand Down