Beispiel #1
0
  FactoryManager<Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps>::FactoryManager(const RCP<const FactoryBase> PFact, const RCP<const FactoryBase> RFact, const RCP<const FactoryBase> AcFact)
  {
    if (PFact  != Teuchos::null) SetFactory("P", PFact);
    if (RFact  != Teuchos::null) SetFactory("R", RFact);
    if (AcFact != Teuchos::null) SetFactory("A", AcFact);

    SetIgnoreUserData(false); // set IgnorUserData flag to false (default behaviour)
  }
Beispiel #2
0
int main(){

std::cout << setCross (SetFactory(0), SetFactory(1)) << std::endl;
std::cout << setIntersect (SetFactory(0), SetFactory(1)) << std::endl;
std::cout << setMinus (SetFactory(0), SetFactory(1)) << std::endl;
std::cout << setUnion (SetFactory(0), SetFactory(1)) << std::endl;
std::cout << setCardinality (SetFactory(1).add( 2).add( 3)) << std::endl;
return 0;


}
Beispiel #3
0
bool
OrderedTask::Commit(const OrderedTask& that)
{
  bool modified = false;

  SetName(that.GetName());

  // change mode to that one
  SetFactory(that.factory_mode);

  // copy across behaviour
  SetOrderedTaskSettings(that.ordered_settings);

  // remove if that task is smaller than this one
  while (TaskSize() > that.TaskSize()) {
    Remove(TaskSize() - 1);
    modified = true;
  }

  // ensure each task point made identical
  for (unsigned i = 0; i < that.TaskSize(); ++i) {
    if (i >= TaskSize()) {
      // that task is larger than this
      Append(*that.task_points[i]);
      modified = true;
    } else if (!task_points[i]->Equals(*that.task_points[i])) {
      // that task point is changed
      Replace(*that.task_points[i], i);
      modified = true;
    }
  }

  // remove if that optional start list is smaller than this one
  while (optional_start_points.size() > that.optional_start_points.size()) {
    RemoveOptionalStart(optional_start_points.size() - 1);
    modified = true;
  }

  // ensure each task point made identical
  for (unsigned i = 0; i < that.optional_start_points.size(); ++i) {
    if (i >= optional_start_points.size()) {
      // that task is larger than this
      AppendOptionalStart(*that.optional_start_points[i]);
      modified = true;
    } else if (!optional_start_points[i]->Equals(*that.optional_start_points[i])) {
      // that task point is changed
      ReplaceOptionalStart(*that.optional_start_points[i], i);
      modified = true;
    }
  }

  if (modified)
    UpdateGeometry();
    // @todo also re-scan task sample state,
    // potentially resetting task

  return modified;
}
 // set information about 1-node aggregates (map name and generating factory)
 void SetOnePtMapName(const std::string name, Teuchos::RCP<const FactoryBase> mapFact) {
   SetParameter("OnePt aggregate map name", ParameterEntry(std::string(name))); // revalidate
   SetFactory("OnePt aggregate map factory",mapFact);
 }