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 _get_partitioned_FSI_utilities(self): if (self.domain_size == 2): return KratosFSI.PartitionedFSIUtilitiesDouble2D() else: return KratosFSI.PartitionedFSIUtilitiesDouble3D()