public class NekWriter extends java.lang.Object implements IComponentVisitor
Constructor and Description |
---|
NekWriter()
Nullary constructor
|
Modifier and Type | Method and Description |
---|---|
void |
updateProperties(int numDimensions,
int newThermalElements,
int newFluidElements,
int newPassiveScalars)
Updates the current NekWriter's ProblemProperties in the event that any
initial variables may have changed (such as the number of mesh elements
being changed through the addition/removal in the MeshEditor)
|
void |
visit(AdaptiveTreeComposite component)
This operation informs the visitor that it is actually working with an
AdaptiveTreeComposite and should operate accordingly.
|
void |
visit(DataComponent component)
This operation directs a visitor to perform its actions on the Component
as a DataComponent.
|
void |
visit(EMFComponent component)
This operation informs the visitor that it is actually working with an
EMFComponent and should operate accordingly.
|
void |
visit(GeometryComponent component)
This operation directs a visitor to perform its actions on the Component
as a GeometryComponent.
|
void |
visit(IReactorComponent component)
This operation informs the visitor that it is actually working with an
IReactorComponent and should operate accordingly.
|
void |
visit(IShape component)
This operation directs a visitor to perform its actions on the Component
as an IShape.
|
void |
visit(ListComponent component)
This operation informs the visitor that it is actually working with a
ListComponent.
|
void |
visit(MasterDetailsComponent component)
This operation directs a visitor to perform its actions on the Component
as a MasterDetailsComponent.
|
void |
visit(MatrixComponent component)
This operation directs a visitor to perform its actions on the Component
as a MatrixComponent.
|
void |
visit(MeshComponent component)
This operation informs the visitor that it is actually working with a
MeshComponent and should operate accordingly.
|
void |
visit(ResourceComponent component)
This operation directs a visitor to perform its actions on the Component
as an OutputComponent.
|
void |
visit(TableComponent component)
This operation directs a visitor to perform its actions on the Component
as a VisitorComponent.
|
void |
visit(TimeDataComponent component)
This operation informs the visitor that it is actually working with a
TimeDataComponent and should operate accordingly.
|
void |
visit(TreeComposite component)
This operation informs the visitor that it is actually working with a
TreeComposite and should operate accordingly.
|
void |
writeReaFile(java.util.ArrayList<Component> components,
java.io.File outputFile,
ProblemProperties properties)
Reads in an ArrayList of Components, creates a HashMap keyed by Component
name, and then writes the contents into the specified output file using
formatting appropriate for a Nek5000 reafile.
|
public void writeReaFile(java.util.ArrayList<Component> components, java.io.File outputFile, ProblemProperties properties) throws java.io.FileNotFoundException, java.io.IOException
components
- An ArrayList of Components, can be assumed to be a mix of
DataComponents and MeshComponentsoutputFile
- The output file to write toproperties
- Properties of the Nek problemjava.io.FileNotFoundException
- Thrown when the output file cannot be foundjava.io.IOException
- Thrown when any of the writeSomething(...) methods fail to
write to the OutputStreampublic void visit(DataComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- DataComponent which was originally called by the accept()
operationpublic void visit(MeshComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- The MeshComponent.public void updateProperties(int numDimensions, int newThermalElements, int newFluidElements, int newPassiveScalars)
numDimensions
- Number of dimensions of the current problem (cannot be
changed)newThermalElements
- New number of elements with thermal BCsnewFluidElements
- New number of elements with fluid BCsnewPassiveScalars
- New number of passive scalar setspublic void visit(ResourceComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- OutputComponent which was originally called by the accept()
operationpublic void visit(TableComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- TableComponent which was originally called by the accept()
operationpublic void visit(MatrixComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- MatrixComponent which was originally called by the accept()
operationpublic void visit(IShape component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- IShape which was originally called by the accept() operationpublic void visit(GeometryComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- GeometryComponent which was originally called by the accept()
operationpublic void visit(MasterDetailsComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- MasterDetailsComponent which was originally called by the
accept() operation.public void visit(TreeComposite component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- The TreeCompositepublic void visit(IReactorComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- The IReactorComponentpublic void visit(TimeDataComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- The TimeDataComponent.public void visit(AdaptiveTreeComposite component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- The AdaptiveTreeCompositepublic void visit(EMFComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- The EMFComponent.public void visit(ListComponent component)
IComponentVisitor
visit
in interface IComponentVisitor
component
- The ListComponent