Skip to content

Commit

Permalink
changed logging for saturation and saturation term
Browse files Browse the repository at this point in the history
  • Loading branch information
josura committed Jul 14, 2023
1 parent b7bc604 commit 797f8fa
Showing 1 changed file with 31 additions and 17 deletions.
48 changes: 31 additions & 17 deletions src/main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,19 @@ int main(int argc, char** argv ) {
std::cout << "[LOG] conservation model was not set. set to default (none)\n";
conservationModel = new ConservationModel([](double time)->double{return 0;});
}

//logging if saturation is set and saturation parameters are set
if (saturation) {
if(vm.count("saturationTerm") == 0){
std::cout << "[LOG] saturation term not specified, using the interval [-1,1]"<<std::endl;
} else if(vm.count("saturationTerm") == 1){
double saturationTerm = vm["saturationTerm"].as<double>();
std::cout << "[LOG] saturation term specified, using the interval [-" << saturationTerm << "," << saturationTerm << "]"<<std::endl;
} else {
std::cerr << "[ERROR] saturation term specified more than once, possibility of using more values not yet implemented: aborting"<<std::endl;
return 1;
}
}
//end program options section

std::map<std::string,std::string> ensembletoEntrez = getEnsembletoEntrezidMap();
Expand Down Expand Up @@ -334,7 +347,6 @@ int main(int argc, char** argv ) {
//std::vector<double> outputValues = cellComputations[i]->computeAugmentedPerturbationSaturatedAndDissipatedBeforeCompute(iterationIntercell*intracellIterations + iterationIntracell); // TODO check if iteration intracell should be multiplied by iteration intercell
if (saturation) {
if(vm.count("saturationTerm") == 0){
std::cout << "[LOG] saturation term not specified, using the interval [-1,1]"<<std::endl;
std::vector<double> outputValues = cellComputations[i]->computeAugmentedPerturbationEnhanced2(iterationIntercell*intracellIterations + iterationIntracell, saturation = true); // TODO check if iteration intracell should be multiplied by iteration intercell
} else if (vm.count("saturationTerm") >= 1) {
//TODO create saturation vector
Expand Down Expand Up @@ -389,14 +401,14 @@ int main(int argc, char** argv ) {
}
//update input with virtual node values update

// std::cout<< "[DEBUG] input values before updating with virtual"<<std::endl;
// for(uint i = 0; i < cellTypes.size(); i++){
// std::cout << "[DEBUG] cell " << cellTypes[i] << " values: ";
// for(uint j = 0; j < cellComputations[i]->getInputAugmented().size(); j++){
// std::cout << cellComputations[i]->getInputAugmented()[j] << " ";
// }
// std::cout << std::endl;
// }
std::cout<< "[DEBUG] input values before updating with virtual"<<std::endl;
for(uint i = 0; i < cellTypes.size(); i++){
std::cout << "[DEBUG] cell " << cellTypes[i] << " values: ";
for(uint j = 0; j < cellComputations[i]->getInputAugmented().size(); j++){
std::cout << cellComputations[i]->getInputAugmented()[j] << " ";
}
std::cout << std::endl;
}

for (uint i = 0; i < cellTypes.size(); i++) {
//queuesCellTypes[i] = cellComputations[i]->computeAugmentedPerturbation();
Expand All @@ -410,14 +422,16 @@ int main(int argc, char** argv ) {
}
}
}
// std::cout<< "[DEBUG] input values after updating with virtual"<<std::endl;
// for(uint i = 0; i < cellTypes.size(); i++){
// std::cout << "[DEBUG] cell " << cellTypes[i] << " values: ";
// for(uint j = 0; j < cellComputations[i]->getInputAugmented().size(); j++){
// std::cout << cellComputations[i]->getInputAugmented()[j] << " ";
// }
// std::cout << std::endl;
// }
std::cout<< "[DEBUG] input values after updating with virtual"<<std::endl;
for(uint i = 0; i < cellTypes.size(); i++){
std::cout << "[DEBUG] cell " << cellTypes[i] << " values: ";
for(uint j = 0; j < cellComputations[i]->getInputAugmented().size(); j++){
std::cout << cellComputations[i]->getInputAugmented()[j] << " ";
}
std::cout << std::endl;
}


iterationIntercell++;

}
Expand Down

0 comments on commit 797f8fa

Please sign in to comment.