public class DomainDecomposition
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DomainDecomposition.GridDirection |
| Modifier and Type | Field and Description |
|---|---|
java.util.Map<java.lang.String,java.util.HashMap<java.lang.Integer,java.lang.Double>> |
variables |
| Constructor and Description |
|---|
DomainDecomposition() |
DomainDecomposition(int noSteps,
java.lang.String[] labels)
Domain decomposition constructor
|
DomainDecomposition(int noSteps,
java.lang.String[] labels,
double initVal)
Domain decomposition constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
evalAllAverageValues()
On domain of 3 steps, sets mid step value to the average between
first and last step for all
variables
|
void |
evalAverageValue(java.lang.String label)
On domain of 3 steps, sets mid step value to the average
between first and last step
|
void |
evalBulkVariableFromInOutAverageAtAllSteps(java.lang.String bulkVarName,
java.lang.String varName,
DomainDecomposition.GridDirection dir,
double extVal)
Evaluates the bulk variable on a stage by taking the average between inlet
and outlet values of another variable on the same stage, eg.
|
void |
evalLinearProfileWithFinalExtVal(java.lang.String varName,
double valStep0,
double valExt) |
void |
evalLinearProfileWithStartExtVal(java.lang.String varName,
double valExt,
double valStepN) |
double |
getInletValue(java.lang.String label)
Gets the value of variable "label" at first step of the domain (inlet)
|
java.lang.String |
getLabel() |
int |
getNoSteps() |
double |
getOutletValue(java.lang.String label)
Gets the value of variable "label" at last step of the domain (outlet)
|
double |
getValue(java.lang.String label,
int step)
Returns the value of variable "label" at "step"
|
java.lang.String |
printStepsID()
Prints selected fields of the domain decomposition state
|
void |
setInletValue(java.lang.String label,
double val)
Sets the value of variable "label" at first step of the domain (inlet)
|
void |
setLabel(java.lang.String label) |
void |
setOutletValue(java.lang.String label,
double val)
Sets the value of variable "label" at last step of the domain (outlet)
|
void |
setValue(java.lang.String label,
int step,
double val)
Sets the value of variable "label" at step "step"
|
void |
setValueAtAllSteps(java.lang.String label,
double val)
Sets the value of variable "label" at all steps
|
void |
setValueFromAverageAtAllSteps(java.lang.String varName,
java.lang.String varName1,
DomainDecomposition d1,
java.lang.String varName2,
DomainDecomposition d2)
Set a variable from the average of other 2 variables in the grid
at the same step
|
java.lang.String |
toStringFormat()
Returns the domain decomposition state as a formatted string
|
java.lang.String |
toStringFormat(java.lang.String field)
Returns the domain decomposition field as a formatted string
|
java.lang.String |
toStringFormat(java.lang.String label,
java.lang.String varName,
double inlVal,
double outVal)
Prints selected variable of the domain decomposition to stdout
|
java.lang.String |
toStringFormatdWithConversion(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add)
Prints the state of a domain decomposition field to NCEIO.vout applying
the units conversion mul * (x + add)
|
java.lang.String |
toStringFormatWithConversion(java.lang.String label,
java.lang.String varName,
double inlVal,
double outVal,
double factor,
double delta)
Prints selected variable of the domain decomposition to stdout allowing
units conversion as (factor) * (variable + delta)
|
java.lang.String |
toStringFormatWithConversion(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add,
double extStartVal,
double extFinalVal)
Prints the state of a domain decomposition field to NCEIO.vout
applying the units conversion mul * (x + add)
|
java.lang.String |
toStringFormatWithConversionFinalBlank(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add,
double extStartVal) |
java.lang.String |
toStringFormatWithConversionStartBlank(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add,
double extFinalVal) |
java.lang.String |
toStringFormatWithConversionWithBlanks(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add) |
public java.util.Map<java.lang.String,java.util.HashMap<java.lang.Integer,java.lang.Double>> variables
public DomainDecomposition()
public DomainDecomposition(int noSteps,
java.lang.String[] labels,
double initVal)
noSteps - number of decomposition stepslabels - entries nameinitVal - initial value for all entriespublic DomainDecomposition(int noSteps,
java.lang.String[] labels)
noSteps - labels - public double getValue(java.lang.String label,
int step)
throws java.lang.RuntimeException
label - the name of the required variablestep - the step of interestjava.lang.RuntimeExceptionpublic void setValue(java.lang.String label,
int step,
double val)
label - the name of the required variablestep - the step of interestval - valuepublic void evalBulkVariableFromInOutAverageAtAllSteps(java.lang.String bulkVarName,
java.lang.String varName,
DomainDecomposition.GridDirection dir,
double extVal)
bulkVarName - name of the bulk variablevarName - name of the variable to be averageddir - direction of the calculation respect to the gridextVal - value of averaged variable in the point outside the gridpublic void evalLinearProfileWithFinalExtVal(java.lang.String varName,
double valStep0,
double valExt)
varName - valStep0 - valExt - public void evalLinearProfileWithStartExtVal(java.lang.String varName,
double valExt,
double valStepN)
varName - valExt - valStepN - public void setValueFromAverageAtAllSteps(java.lang.String varName,
java.lang.String varName1,
DomainDecomposition d1,
java.lang.String varName2,
DomainDecomposition d2)
varName - Name of Calculated variable from the average of var1 var2varName1 - Name of Variable 1d1 - DomainDecomposition of var1varName2 - Name of Variable 2d2 - DomainDecomposition of var2public void evalAverageValue(java.lang.String label)
public void evalAllAverageValues()
public void setInletValue(java.lang.String label,
double val)
label - variable namepublic void setOutletValue(java.lang.String label,
double val)
label - variable namepublic double getInletValue(java.lang.String label)
label - variable namepublic double getOutletValue(java.lang.String label)
label - variable namepublic void setValueAtAllSteps(java.lang.String label,
double val)
label - val - public java.lang.String toStringFormat()
public java.lang.String toStringFormat(java.lang.String field)
public java.lang.String toStringFormat(java.lang.String label,
java.lang.String varName,
double inlVal,
double outVal)
label - Printed name of the variablevarName - Variable ID in the gridinlVal - Value before entering in the grid (optional)outVal - Value after exiting the grid (optional)public java.lang.String toStringFormatdWithConversion(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add)
field - variable to be printedname - filed printed name (string)units - units printed name (string)mul - multiplieradd - addition termpublic java.lang.String toStringFormatWithConversion(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add,
double extStartVal,
double extFinalVal)
field - variable to be printedname - filed printed name (string)units - units printed name (string)mul - multiplieradd - addition termextStartVal - value external to grid at step -1extFinalVal - value external to grid at step Npublic java.lang.String toStringFormatWithConversionWithBlanks(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add)
field - name - units - mul - add - public java.lang.String toStringFormatWithConversionStartBlank(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add,
double extFinalVal)
field - name - units - mul - add - extFinalVal - public java.lang.String toStringFormatWithConversionFinalBlank(java.lang.String field,
java.lang.String name,
java.lang.String units,
double mul,
double add,
double extStartVal)
field - name - units - mul - add - extStartVal - public java.lang.String printStepsID()
public java.lang.String toStringFormatWithConversion(java.lang.String label,
java.lang.String varName,
double inlVal,
double outVal,
double factor,
double delta)
label - Printed name of the variablevarName - Variable ID in the gridinlVal - Value before entering in the grid (optional)outVal - Value after exiting the grid (optional)factor - delta - public int getNoSteps()
public java.lang.String getLabel()
public void setLabel(java.lang.String label)