Exemple #1
0
 def __CreatePartitionedFSIUtilities(self):
     if self.domain_size == 2:
         return KratosFSI.PartitionedFSIUtilitiesArray2D()
     elif self.domain_size == 3:
         return KratosFSI.PartitionedFSIUtilitiesArray3D()
     else:
         raise Exception("Domain size expected to be 2 or 3. Got " + str(self.domain_size))
Exemple #2
0
 def _create_partitioned_fsi_utilities(self):
     domain_size = self.GetFatherModelPart().ProcessInfo[KratosMultiphysics.DOMAIN_SIZE]
     if domain_size == 2:
         return KratosFSI.PartitionedFSIUtilitiesArray2D()
     elif domain_size == 3:
         return KratosFSI.PartitionedFSIUtilitiesArray3D()
     else:
         raise Exception("Domain size expected to be 2 or 3. Got " + str(self.domain_size))
Exemple #3
0
 def _create_partitioned_fsi_utilities(self):
     domain_size = self.GetFatherModelPart().ProcessInfo[
         KratosMultiphysics.DOMAIN_SIZE]
     if not self.GetFatherModelPart().IsDistributed():
         if domain_size == 2:
             if self.scalar_output:
                 return KratosFSI.PartitionedFSIUtilitiesDouble2D()
             else:
                 return KratosFSI.PartitionedFSIUtilitiesArray2D()
         elif domain_size == 3:
             if self.scalar_output:
                 return KratosFSI.PartitionedFSIUtilitiesDouble3D()
             else:
                 return KratosFSI.PartitionedFSIUtilitiesArray3D()
         else:
             raise Exception("Domain size expected to be 2 or 3. Got " +
                             str(self.domain_size))
     else:
         self._epetra_communicator = KratosTrilinos.CreateCommunicator()
         if domain_size == 2:
             if self.scalar_output:
                 return KratosTrilinos.TrilinosPartitionedFSIUtilitiesDouble2D(
                     self._epetra_communicator)
             else:
                 return KratosTrilinos.TrilinosPartitionedFSIUtilitiesArray2D(
                     self._epetra_communicator)
         elif domain_size == 3:
             if self.scalar_output:
                 return KratosTrilinos.TrilinosPartitionedFSIUtilitiesDouble3D(
                     self._epetra_communicator)
             else:
                 return KratosTrilinos.TrilinosPartitionedFSIUtilitiesArray3D(
                     self._epetra_communicator)
         else:
             raise Exception("Domain size expected to be 2 or 3. Got " +
                             str(self.domain_size))
 def _GetPartitionedFSIUtilities(self):
     if (self.domain_size == 2):
         return KratosFSI.PartitionedFSIUtilitiesArray2D()
     else:
         return KratosFSI.PartitionedFSIUtilitiesArray3D()